US Core Implementation Guide (Release 1.1.0 Ballot )

This page is part of the US Core (v1.1.0: STU2 Ballot 1) based on FHIR R3. The current version which supercedes this version is 5.0.1. For a full list of available versions, see the Directory of published versions

US Core Get DocumentReferences

Formats: XML, JSON, Turtle

OPERATION: US Core Fetch Patient DocumentReferences

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 off type “searchset” containing resources conforming to the US Core DocumentReference Profile 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.

URL: [base]/DocumentReference/$docref

Parameters

UseNameCardinalityTypeBindingDocumentation
INpatient1..1id

The patient id to match against a patient resource. If there is no match, an empty Bundle is returned

INstart0..1date

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.

INend0..1date

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.

INtype0..1CodeableConceptDocument Type Value Set (Required)

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.

OUTreturn1..1Bundle

The bundle type is "searchset"containing resources conforming to the US Core DocumentReference Profile

  • 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

source file: pages/_includes/docref/md

The operation can be invoked using the GET Syntax if the complex type parameter is omitted:

GET [base]/DocumentReference/$docref?{parameters}

Otherwise the POST transaction is used as follows:

POST [base]/DocumentReference/$docref}


Example
##### 1. Request the latest CCD for a patient #####

GET [base]/DocumentReference/$docref?patient=123

or

POST [base]/DocumentReference/$docref}

    **payload:**

    {
      "resourceType": "Parameters",
      "id": "get-ccd123",
      "parameter": [
        {
          "name": "patient",
          "valueId" : "123"
        }
      ]
    }


##### 1. Response #####

    {
      "resourceType": "Bundle",
      "id": "get-ccd123-response",
      "type": "searchset",
      "total": 1,
      "entry": [{
        "fullUrl": "http://server/path/DocumentReference/get-ccd123",
        "resource":{
        "resourceType" : "DocumentReference",
        "id" : "get-ccd123",
        "meta" : {
          "profile" : [
            "http://fhir.org/guides/argonaut/StructureDefinition/argo-documentreference"
          ]
        },
        "identifier" : [
          {
            "system" : "urn:ietf:rfc:3986",
            "value" : "urn:oid:2.16.840.1.113883.19.5.99999.1"
          }
        ],
        "status" : "current",
        "type" : {
          "coding" : [
            {
              "system" : "http://loinc.org",
              "code" : "34133-9",
              "display" : "Summary of episode note"
            }
          ],
          "text" : "CCD Document"
        },
        "subject" : {
          "reference" : "Patient/example",
          "display" : "Amy Shaw"
        },
        "created" : "2006-09-01",
        "indexed" : "2016-03-09T15:29:46Z",
        "author" : [
          {
            "reference" : "Practitioner/practitioner-1",
            "display" : "Ronald Bone, MD"
          }
        ],
        "description" : "Pulmonology clinic acute visit",
        "content" : [
          {
            "attachment" : {
              "contentType" : "text/plain",
              "url" : "/Binary/1-note",
              "title" : "Uri where the data can be found: [base]/Binary/1-note"
            },
            "format" : {
              "system" : "urn:oid:1.3.6.1.4.1.19376.1.2.3",
              "code" : "urn:hl7-org:sdwg:ccda-structuredBody:2.1",
              "display" : "Documents following C-CDA constraints using a structured body"
            }
          }
        ],
        "context" : {
          "period" : {
            "start" : "2004-12-23T08:00:00+11:00",
            "end" : "2004-12-23T08:01:00+11:00"
          }
        }
      }
      }
      ]
    }