Edit

Share via


Fetch DocumentReference using $docref operation in FHIR service

The $docref operation, as defined as part of US Core 6.1.0, is used to return all the references to documents related to a patient. A searchset Bundle containing DocumentReference resources for the patient is returned.

$docref parameters

Parameter Description
patient The ID of the patient resource.
start The start date-time of the date range relates to care dates, not record currency dates.
end The end date-time of the date range relates to care dates, not record currency dates.
type The type relates to document type.

Note

On-demand and profile parameters aren't currently supported.

Example $docref requests

Request the latest CCD for a patient using GET syntax

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

Request the latest CCD for a patient using POST syntax

POST [base]/DocumentReference/$docref

POST request body:

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

Request Discharge Summaries for 2019 using GET syntax

GET [base]/DocumentReference/$docref?patient=123&start=2019-01-01&end=2019-12-31&type=https://loinc.org|18842-5

Request Discharge Summaries for 2019 using POST syntax

POST [base]/DocumentReference/$docref

POST request body:

{
  "resourceType": "Parameters",
  "id": "get-docs",
  "parameter": [
    {
      "name": "patient",
      "valueId": "123"
    },
    {
      "name": "start",
      "valueDateTime": "2019-01-01"
    },
    {
      "name": "end",
      "valueDateTime": "2019-12-31"
    },
    {
      "name": "type",
      "valueCoding": {
        "system": "https://loinc.org",
        "code": "18842-5",
        "display": "Discharge summary"
      }
    }
  ]
}

US Core overview in Azure Health Data Services FHIR

Note

FHIR® is a registered trademark of HL7 and is used with the permission of HL7.