DocumentReference
Overview
The DocumentReference resource is used to reference a clinical document for a patient within the health system. This resource supports reading Continuity of Care Documents (CCD), returning a list of clinical documents, and a reference to retrieve a document as a PDF. When retrieving document links and metadata, this resource will refer to the Binary
resource for downloading the complete document.
Additionally, this resource supports writing an unstructured document. For fields supported on write, see the create section.
The following fields are returned if valued for clinical documents:
- DocumentReference ID
- Subject
- Document type
- Document description/title
- Authenticator/verifying provider
- Create date/time
- Indexed date/time
- Status
- Document status
- Content
- Patient encounter
The following fields are returned if valued for the $docref operation (CCD read):
Note: The examples provided here are non-normative and replaying them in the public sandbox is not guaranteed to yield the results shown on the site.
Errors
The common errors and OperationOutcomes may be returned.
Terminology Bindings
DocumentReference.type |
|
Search
Search for DocumentReferences that meet supplied query parameters:
GET /DocumentReference?:parameters
Authorization Types
Parameters
Name | Required? | Type | Description |
---|---|---|---|
_id |
Conditionally | token |
The logical resource ID associated with the resource. This parameter is required if neither the patient nor subject parameters are used. Example: _id=1234
|
patient |
Conditionally | reference |
The patient to which the document reference belongs. This parameter is required if neither the _id nor subject parameters are used. Example: patient=5678
|
subject |
Conditionally | reference |
The subject of the document reference. May use the “:Patient” modifier. This parameter is required if neither the _id nor patient parameters are used. Example: subject=Patient/91011
|
encounter |
No | reference |
The encounter to which the document reference belongs. Example: encounter=1213
|
created |
No | date |
A date/time the referenced document was created. Example: created=ge2017-01-07&created=le2017-02-05
|
_count |
No | number |
The maximum number of results to return. |
Implementation Notes
- Search results are currently limited to published clinical documents.
- Contents of the document are found by following the Attachment URL.
- See more information on the
Binary
resource to determine what Authorization scopes are required, and how to set theAccept
header when downloading document contents.
- See more information on the
- When searching with the
_id
parameter:- It must not be provided with any other parameters.
- When searching with the
subject
parameter:- It must appear once, and must represent a Patient resource.
- It can be provided either with or without the :Patient modifier. Example:
subject=Patient/12345
orsubject:Patient=12345
- When searching with the
encounter
parameter:- It must appear once, and must represent an Encounter resource.
- It can be provided with either a single reference, or a comma-separated list of references. Example
encounter=1234
orencounter=1234,5678
- When searching with the
created
parameter:- It must be provided twice, once with the
ge
parameter and once with thele
parameter. - The two provided date/times may not be equal and must form a closed range.
- If one
created
parameter includes a time, both must include a time.
- It must be provided twice, once with the
Headers
Accept: application/json+fhir
Authorization: <OAuth2 Bearer Token>
Example
Request
GET https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference?patient=12724066&created=ge2020-01-01&created=le2020-12-31
Response
Status: 200 OK
{
"resourceType": "Bundle",
"id": "0be75cc8-da20-460a-a39e-9825bdb87472",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference?patient=12724066&created=ge2020-01-01&created=le2020-12-31"
}
],
"entry": [
{
"fullUrl": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/197286315",
"resource": {
"resourceType": "DocumentReference",
"id": "197286315",
"meta": {
"versionId": "197286314",
"lastUpdated": "2020-04-05T04:00:46.000Z"
},
"text": {
"status": "generated",
"div": "<div><p><b>Document Reference</b></p><p><b>Patient Name</b>: SMART, NANCY</p><p><b>Document Type</b>: Pregnancy Summary Document</p><p><b>Document Title</b>: Pregnancy Summary Document</p><p><b>Date</b>: Apr 5, 2020 4:00 A.M. UTC</p><p><b>Document Status</b>: Auth (Verified)</p></div>"
},
"subject": {
"reference": "Patient/12724066",
"display": "SMART, NANCY"
},
"type": {
"coding": [
{
"system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72",
"code": "22520442",
"display": "Pregnancy Summary Document",
"userSelected": true
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor",
"code": "UNK",
"display": "unknown"
}
],
"text": "Pregnancy Summary Document"
},
"created": "2020-04-05T04:00:45.000Z",
"indexed": "2020-04-05T04:00:45.000Z",
"status": "current",
"docStatus": {
"coding": [
{
"system": "http://hl7.org/fhir/composition-status",
"code": "final",
"display": "Final"
}
],
"text": "Auth (Verified)"
},
"description": "Pregnancy Summary Document",
"content": [
{
"attachment": {
"contentType": "application/pdf",
"url": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/XR-197286315",
"title": "Pregnancy Summary Document"
}
}
]
}
}
]
}
Retrieve by ID
List an individual DocumentReference by its ID:
GET /DocumentReference/:id
Implementation Notes
- Contents of the document are found by following the Attachment URL.
- See more information on the
Binary
resource to determine what Authorization scopes are required, and how to set theAccept
header when downloading document contents.
- See more information on the
Authorization Types
Headers
Accept: application/json+fhir
Authorization: <OAuth2 Bearer Token>
Example
Request
GET https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/197286315
Response
Status: 200 OK
{
"resourceType": "DocumentReference",
"id": "197286315",
"meta": {
"versionId": "197286314",
"lastUpdated": "2020-04-05T04:00:46.000Z"
},
"text": {
"status": "generated",
"div": "<div><p><b>Document Reference</b></p><p><b>Patient Name</b>: SMART, NANCY</p><p><b>Document Type</b>: Pregnancy Summary Document</p><p><b>Document Title</b>: Pregnancy Summary Document</p><p><b>Date</b>: Apr 5, 2020 4:00 A.M. UTC</p><p><b>Document Status</b>: Auth (Verified)</p></div>"
},
"subject": {
"reference": "Patient/12724066",
"display": "SMART, NANCY"
},
"type": {
"coding": [
{
"system": "https://fhir.cerner.com/ec2458f2-1e24-41c8-b71b-0e701af7583d/codeSet/72",
"code": "22520442",
"display": "Pregnancy Summary Document",
"userSelected": true
},
{
"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor",
"code": "UNK",
"display": "unknown"
}
],
"text": "Pregnancy Summary Document"
},
"created": "2020-04-05T04:00:45.000Z",
"indexed": "2020-04-05T04:00:45.000Z",
"status": "current",
"docStatus": {
"coding": [
{
"system": "http://hl7.org/fhir/composition-status",
"code": "final",
"display": "Final"
}
],
"text": "Auth (Verified)"
},
"description": "Pregnancy Summary Document",
"content": [
{
"attachment": {
"contentType": "application/pdf",
"url": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/XR-197286315",
"title": "Pregnancy Summary Document"
}
}
]
}
Create
Create new documents. Currently limited to unstructured clinical notes or documentation. For example, a document with display formatting or styling can be written, but a CCD cannot.
POST /DocumentReference
Implementation Notes
- Currently only XHTML formatted documents are supported.
- You can validate your document using any available strict XHTML 1.0 validator (eg: W3C Markup Validation Service or Nu Html Checker).
Authorization Types
Headers
Authorization: <OAuth2 Bearer Token>
Accept: application/json+fhir
Content-Type: application/json+fhir
Body fields
Name | Required | Type | |
---|---|---|---|
resourceType
|
Yes |
string |
|
|
|||
subject
|
Yes |
Reference (Patient ) |
|
|
|||
type
|
Yes |
CodeableConcept |
|
|
|||
author
|
No |
List of Reference (Practitioner ) |
|
|
|||
indexed
|
Yes |
instant |
|
|
|||
status
|
Yes |
code |
|
|
|||
docStatus
|
No |
CodeableConcept |
|
|
|||
description
|
No |
string |
|
|
|||
content
|
Yes |
List of BackboneElement |
|
|
|||
content.attachment
|
Yes |
Attachment |
|
|
|||
content.attachment.contentType
|
Yes |
string |
|
|
|||
content.attachment.data
|
Yes |
string |
|
|
|||
context
|
Yes |
BackboneElement |
|
|
|||
context.encounter
|
Yes |
Reference (Encounter ) |
|
|
|||
context.period
|
No |
Period |
|
|
Example
Request
POST https://fhir-ehr-code.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference
Body
{
"resourceType": "DocumentReference",
"subject": {
"reference": "Patient/53663272"
},
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "34840-9"
}
]
},
"author": [
{
"reference": "Practitioner/21500981"
}
],
"indexed": "2015-11-18T18:00:00Z",
"status": "current",
"docStatus": {
"coding": [
{
"system": "http://hl7.org/fhir/composition-status",
"code": "final"
}
]
},
"description": "Rheumatology Note",
"content": [
{
"attachment": {
"contentType": "application/xhtml+xml;charset=utf-8",
"data": "<snipped for brevity>"
}
}
],
"context": {
"encounter": {
"reference": "Encounter/4208059"
},
"period": {
"end": "2015-08-20T09:10:14Z"
}
}
}
Response
Status: 201 Created
Connection: Keep-Alive Content-Encoding: gzip Content-Length: 20 Content-Type: text/html; charset=UTF-8 Date: Wed, 06 Jan 2016 18:09:18 GMT Keep-Alive: timeout=15, max=100 access-control-allow-methods: DELETE, GET, POST, PUT, OPTIONS, HEAD access-control-allow-origin: * access-control-expose-headers: ETag, Content-Location, Location, X-Request-Id, WWW-Authenticate, Date access-control-max-age: 0 cache-control: no-cache location: https://fhir-ehr-code.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/5789254 strict-transport-security: max-age=631152000 vary: Origin,User-Agent,Accept-Encoding opc-request-id: /11111111111111111111111111111111/11111111111111111111111111111111 x-content-type-options: nosniff x-frame-options: SAMEORIGIN x-request-id: 11111111-1111-1111-1111-111111111111 x-xss-protection: 1; mode=block
Operation: $docref
Argonaut operation for querying DocumentReferences for the supplied parameters:
GET /DocumentReference/$docref?:parameters
Authorization Types
Terminology Bindings
DocumentReference.type |
|
DocumentReference.content.format |
|
Parameters
Name | Required? | Type | Description |
---|---|---|---|
patient |
Yes | reference |
A reference to the patient whose document references are required. Example: patient=12345
|
type |
Yes | token |
The document reference type. Example: type=http://loinc.org\|34133-9
|
start |
No | date |
The start of the date range from which document reference records should be included. Example: start=2014-09-24T12:00:00.000Z
|
end |
No | date |
The end of the date range till which document reference records should be included. Example: end=2016-09-24T12:00:00.000Z
|
Implementation Notes
- The
type
parameter:- It must include both a system and a code. (e.g.
&type=http://loinc.org\|34133-9
) - It may be a single system and code, or a comma-separated list.
- It must include both a system and a code. (e.g.
- The
start
andend
parameters:- They must be valid dateTimes with a time component.
- They must have prefixes of
eq
or nothing. - If
start
is not provided, then all previous records up to theend
date are included. - If
end
is not provided, then all records between thestart
date and the current date are included.
Headers
Accept: application/json+fhir
Authorization: <OAuth2 Bearer Token>
Example
Request
GET https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/$docref?patient=12724066&type=http%3A%2F%2Floinc.org%7C34133-9
Response
Status: 200 OK
{
"resourceType": "Bundle",
"id": "33c6587c-ab3c-4846-a2c6-05724fe4013e",
"type": "searchset",
"total": 1,
"link": [
{
"relation": "self",
"url": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/$docref?patient=12724066&type=http%3A%2F%2Floinc.org%7C34133-9"
}
],
"entry": [
{
"fullUrl": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/DocumentReference/c7d249c7-1742-47a8-9fca-1fc361728aa8",
"resource": {
"resourceType": "DocumentReference",
"id": "c7d249c7-1742-47a8-9fca-1fc361728aa8",
"subject": {
"reference": "Patient/12724066"
},
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "34133-9"
}
],
"text": "Summary of episode note"
},
"indexed": "2020-07-08T17:05:01Z",
"status": "current",
"content": [
{
"attachment": {
"contentType": "application/xml",
"url": "https://fhir-open.cerner.com/dstu2/ec2458f2-1e24-41c8-b71b-0e701af7583d/Binary/$autogen-ccd-if?patient=12724066"
},
"format": [
{
"system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
"code": "urn:hl7-org:sdwg:ccda-structuredBody:2.1",
"display": "For documents following C-CDA constraints using a structured body."
}
]
}
]
}
}
]
}