The FHIR STU3 DocumentReference resource is used to describe a document that is made available to a healthcare system. See: <https://www.hl7.org/fhir/documentreference.html>
FHIR Resource: DocumentReference <https://www.hl7.org/fhir/documentreference.html>
Supported Attributes
| Name | Comment |
|---|---|
identifier |
|
docStatus |
|
type |
_ Loinc |
class |
|
subject |
Patient |
created |
|
description |
|
indexed |
|
author |
Organization |
authenticator |
Practitioner |
custodian |
|
securityLabel |
|
content |
|
content.attachment |
|
related |
https://api.healthgorilla.com/fhir/DocumentReferenceFHIR Operations
The following operations are currently supported:
1. Read
| HTTP Request | Method | Action |
|---|---|---|
/DocumentReference/{ID} | GET | Retrieve document by ID |
2. Search
| HTTP Request | Method | Action |
|---|---|---|
/DocumentReference?[parameter={value}] | GET | Retrieve documents by the specified search criteria |
Parameters:
| Key | Type | Description |
|---|---|---|
| patient | Reference | Patient Identifier |
| type | Token | Kind of document (LOINC if possible) |
| class | Token | Categorization of document |
| _lastUpdated | Date | |
| date | Date | Creation Date (can use modifiers) |
Examples
2.1 Retrieve documents by patient
https://api.healthgorilla.com/fhir/DocumentReference?patient=8063965523692105bfc35def2.2 Get all Discharge Summary documents updated in August 2018
https://api.healthgorilla.com/fhir/DocumentReference?type=18842-5&_lastUpdated=2018-083. Create
| HTTP Request | Method | Action |
|---|---|---|
| /DocumentReference | POST | Creates new Document to the specified patient chart |
The following attributes are required:
| Name | Details |
|---|---|
| subject | |
| type | |
| content.attachment | |
| status |
Example
{
"resourceType": "DocumentReference",
"status": "current",
"type": {
"coding": [
{
"system": "http://loinc.org",
"code": "18776-5",
"display": "Plan of Care"
},
{
"system": "https://www.healthgorilla.com/document-type",
"code": "PlanOfCare",
"display": "Plan of Care"
}
],
"text": "Plan of Care"
},
"class": {
"coding": [
{
"system": "http://loinc.org",
"code": "18776-5",
"display": "Plan of Care"
}
]
},
"subject": {
"reference": "Patient/03db435262ce2aba13b8d8c6",
"display": "Lisa Simpson"
},
"created": "2018-10-02T04:30:00+03:00",
"author": [
{
"display": "El Camino Hospital"
}
],
"authenticator": {
"reference": "Practitioner/fc076a524383b188ffc10051",
"display": "Robert Kelso, M.D."
},
"content": [
{
"attachment": {
"contentType": "application/xml",
"title": "file.xml",
"data": "<Base64 Encoded Document>
}
}
]
}4. Delete
| HTTP Request | Method | Action |
|---|---|---|
/DocumentReference/{ID} | DELETE | Deletes Document |
5. Download PDF
You can generate a PDF copy of the record using the following request:
| HTTP Request | Method | Action |
|---|---|---|
/DocumentReference/{ID}/$pdf | GET | Generate PDF |
You can specify the client timezone by passing it in the ‘tz’ attribute.
The result contains a link to a Binary resource (PDF) that can be downloaded.
Example
https://api.healthgorilla.com/fhir/DocumentReference/fdeba55d364311cb75fb7e3f/$pdf{
"resourceType": "Parameters",
"parameter": [
{
"name": "url",
"valueString": "https://api.healthgorilla.com/fhir/Binary/tmp-21c7f85d0ca6b9a3c29cf03a"
},
{
"name": "contentType",
"valueString": "application/pdf"
},
{
"name": "size",
"valuePositiveInt": 20050
},
{
"name": "checksum",
"valueString": "5c824c40a20e85affbcfa9f2b6b8b5e5"
},
{
"name": "expiredAt",
"valueDateTime": "2019-12-17T15:46:32+03:00"
}
]
}