Argonaut Data Query Implementation Guide Version 1.0.0

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. For a full list of available versions, see the Directory of published versions

Argonaut Get DocumentReferences


<OperationDefinition xmlns="http://hl7.org/fhir">
  <id value="docref"/>
  <text>
    <status value="generated"/>
    <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 &quot;searchset&quot;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>
  </text>
  <url value="http://fhir.org/guides/argonaut/OperationDefinition/docref"/>
  <name value="Argonaut Get DocumentReferences"/>
  <status value="draft"/>
  <kind value="operation"/>
  <publisher value="Argonaut Project"/>
  <contact>
    <telecom>
      <system value="other"/>
      <value value="http://argonautwiki.hl7.org"/>
    </telecom>
  </contact>
  <date value="2016-10-18"/>
  <description
               value="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 &quot;searchset&quot; 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 &#39;on-the-fly&#39; 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 &#39;on-demand&#39; document cannot be created then the operation will return an empty search bundle."/>
  <code value="docref"/>
  <notes
         value=" - 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 value="false"/>
  <type value="DocumentReference"/>
  <instance value="false"/>
  <parameter>
    <name value="patient"/>
    <use value="in"/>
    <min value="1"/>
    <max value="1"/>
    <documentation
                   value="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 value="id"/>
  </parameter>
  <parameter>
    <name value="start"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="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 value="date"/>
  </parameter>
  <parameter>
    <name value="end"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="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 value="date"/>
  </parameter>
  <parameter>
    <name value="type"/>
    <use value="in"/>
    <min value="0"/>
    <max value="1"/>
    <documentation
                   value="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 value="CodeableConcept"/>
    <binding>
      <strength value="required"/>
      <valueSetUri value="http://hl7.org/fhir/ValueSet/c80-doc-typecodes"/>
    </binding>
  </parameter>
  <parameter>
    <name value="return"/>
    <use value="out"/>
    <min value="1"/>
    <max value="1"/>
    <documentation
                   value="The bundle type is &quot;searchset&quot;containing Argonaut DocumentReference Profiles"/>
    <type value="Bundle"/>
  </parameter>
</OperationDefinition>