This page is part of the Argonaut Data Query Implementation Guide (v1.0.0: Release) based on FHIR R2. This is the current published version in it's permanent home (it will always be available at this URL). For a full list of available versions, see the Directory of published versions
{ "resourceType" : "OperationDefinition", "id" : "docref", "text" : { "status" : "generated", "div" : "<div xmlns="http://www.w3.org/1999/xhtml"> <p>OPERATION: Argonaut Fetch Patient DocumentReferences</p> <p>This operation is used to return all the references to documents related to a patient.</p> <p>The operation takes the input parameters:</p> <ul> <li>patient id</li> <li>start date</li> <li>end date</li> <li>document type</li> </ul> <p>and returns a <a href="http://hl7.org/fhir/bundle.html">Bundle</a> of type “searchset” containing <a href="StructureDefinition-argo-documentreference.html">Argonaut DocumentReference Profiles</a> for the patient. If the server has or can create documents that are related to the patient, and that are available for the given user, the server returns the DocumentReference profiles needed to support the records. The principle intended use for this operation is to provide a provider or patient with access to their available document information.</p> <p>The server SHOULD return at least all references for documents that it has made available in a document indexing system. This is the same as a simple query (<code>GET [base]/DocumentReference?patient=[id]</code>). This operaton differs from a simple query in that DocumentReferences may be created ‘on-the-fly’ in response to this operation. For example, in some cases the documents themselves may not exist but can be generated when needed so a reference to them can be generated using this operation. If no documents exist and an ‘on-demand’ document cannot be created then the operation will return an empty search bundle.</p> <p><code>URL: [base]/DocumentReference/$docref</code></p> <p>Parameters</p> <!-- table --> <table class="grid"><tr><td><b>Use</b></td><td><b>Name</b></td><td><b>Cardinality</b></td><td><b>Type</b></td><td><b>Binding</b></td><td><b>Documentation</b></td></tr><tr><td>IN</td><td>patient</td><td>1..1</td><td>id</td><td/><td><div><p>The patient id to match against a patient resource. If there is no match, an empty Bundle is returned</p> </div></td></tr><tr><td>IN</td><td>start</td><td>0..1</td><td>date</td><td/><td><div><p>The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no start date is provided, all documents prior to the end date are in scope. If neither a start date nor an end date is provided, the most recent or current document is in scope.</p> </div></td></tr><tr><td>IN</td><td>end</td><td>0..1</td><td>date</td><td/><td><div><p>The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no end date is provided, all documents subsequent to the start date are in scope. If neither a start date nor an end date is provided, the most recent or current document is in scope.</p> </div></td></tr><tr><td>IN</td><td>type</td><td>0..1</td><td>CodeableConcept</td><td><a href="http://hl7.org/fhir/ValueSet/c80-doc-typecodes">Document Type Value Set</a> (Required)</td><td><div><p>The type relates to document type e.g. the LOINC code for a C-CDA Clinical Summary of Care (CCD) is 34133-9 (Summary of episode note). If no type is provided, the CCD document if available SHALL be in scope and all other document types MAY be in scope.</p> </div></td></tr><tr><td>OUT</td><td>return</td><td>1..1</td><td>Bundle</td><td/><td><div><p>The bundle type is "searchset"containing Argonaut DocumentReference Profiles</p> </div></td></tr></table> <ul> <li><p>The server is responsible for determining what resources to return as included resources (rather than the client specifying which ones). This frees the client from needing to determine what it could or should ask for.</p></li> <li><p>The document itself can be subsequently retrieved using the link provided from the DocumentQuery search results. The link could,for example, be a FHIR endpoint to a <a href="http://hl7.org/fhir/binary.html">Binary</a> Resource or some other document repository.</p></li> </ul> <p>It is assumed that the server has identified and secured the context appropriately, and can either associate the authorization context with a single patient, or determine whether the context has the rights to the nominated patient, if there is one. If there is no nominated patient (e.g. the operation is invoked at the system level) and the context is not associated with a single patient record, then the server should return an error. Specifying the relationship between the context, a user and patient records is outside the scope of this specification</p> </div>" }, "url" : "http://fhir.org/guides/argonaut/OperationDefinition/docref", "name" : "Argonaut Get DocumentReferences", "status" : "draft", "kind" : "operation", "publisher" : "Argonaut Project", "contact" : [ { "telecom" : [ { "system" : "other", "value" : "http://argonautwiki.hl7.org" } ] } ], "date" : "2016-10-18", "description" : "This operation is used to return all the references to documents related to a patient. The operation takes the input parameters: - patient id - start date - end date - document type and returns a [Bundle](http://hl7.org/fhir/bundle.html) of type "searchset" containing [Argonaut DocumentReference Profiles](http://fhir.org/guides/argonaut/StructureDefinition-argo-documentreference.html) for the patient. If the server has or can create documents that are related to the patient, and that are available for the given user, the server returns the DocumentReference profiles needed to support the records. The principle intended use for this operation is to provide a provider or patient with access to their available document information. The server SHOULD return at least all references for documents that it has made available in a document indexing system. This is the same as a simple query (`GET [base]/DocumentReference?patient=[id]`). This operaton differs from a simple query in that DocumentReferences may be created 'on-the-fly' in response to this operation. For example, in some cases the documents themselves may not exist but can be generated when needed so a reference to them can be generated using this operation. If no documents exist and an 'on-demand' document cannot be created then the operation will return an empty search bundle.", "code" : "docref", "notes" : " - The server is responsible for determining what resources to return as included resources (rather than the client specifying which ones). This frees the client from needing to determine what it could or should ask for. - The document itself can be subsequently retrieved using the link provided from the DocumentQuery search results. The link could,for example, be a FHIR endpoint to a Binary Resource or some other document repository. It is assumed that the server has identified and secured the context appropriately, and can either associate the authorization context with a single patient, or determine whether the context has the rights to the nominated patient, if there is one. If there is no nominated patient (e.g. the operation is invoked at the system level) and the context is not associated with a single patient record, then the server should return an error. Specifying the relationship between the context, a user and patient records is outside the scope of this specification", "system" : false, "type" : [ "DocumentReference" ], "instance" : false, "parameter" : [ { "name" : "patient", "use" : "in", "min" : 1, "max" : "1", "documentation" : "The id of the patient resource located on the server on which this operation is executed. If there is no match, an empty Bundle is returned", "type" : "id" }, { "name" : "start", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no start date is provided, all documents prior to the end date are in scope. If neither a start date nor an end date is provided, the most recent or current document is in scope.", "type" : "date" }, { "name" : "end", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The date range relates to care dates, not record currency dates - e.g. all records relating to care provided in a certain date range. If no end date is provided, all documents subsequent to the start date are in scope. If neither a start date nor an end date is provided, the most recent or current document is in scope", "type" : "date" }, { "name" : "type", "use" : "in", "min" : 0, "max" : "1", "documentation" : "The type relates to document type e.g. for the LOINC code for a C-CDA Clinical Summary of Care (CCD) is 34133-9 (Summary of episode note). If no type is provided, the CCD document, if available, SHALL be in scope and all other document types MAY be in scope", "type" : "CodeableConcept", "binding" : { "strength" : "required", "valueSetUri" : "http://hl7.org/fhir/ValueSet/c80-doc-typecodes" } }, { "name" : "return", "use" : "out", "min" : 1, "max" : "1", "documentation" : "The bundle type is "searchset"containing Argonaut DocumentReference Profiles", "type" : "Bundle" } ] }