DocumentReference

A 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

NameComment
identifier
docStatus
type Loinc
Document Type
class
subjectPatient
created
description
indexed
authorOrganization
authenticatorPractitioner
custodian
securityLabel
content
content.attachment
related
https://api.healthgorilla.com/fhir/DocumentReference

FHIR Operations

The following operations are currently supported:

1. Read

HTTP RequestMethodAction
/DocumentReference/{ID}GETRetrieve document by ID

2. Search

HTTP RequestMethodAction
/DocumentReference?[parameter={value}]GETRetrieve documents by the specified search criteria

Parameters:

KeyTypeDescription
patientReferencePatient Identifier
typeTokenKind of document (LOINC if possible)
classTokenCategorization of document
_lastUpdatedDate
dateDateCreation Date (can use modifiers)

Examples

2.1 Retrieve documents by patient

https://api.healthgorilla.com/fhir/DocumentReference?patient=8063965523692105bfc35def

2.2 Get all Discharge Summary documents updated in August 2018

https://api.healthgorilla.com/fhir/DocumentReference?type=18842-5&_lastUpdated=2018-08

3. Create

HTTP RequestMethodAction
/DocumentReferencePOSTCreates new Document to the specified patient chart

The following attributes are required:

NameDetails
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 RequestMethodAction
/DocumentReference/{ID}DELETEDeletes Document

5. Download PDF

You can generate a PDF copy of the record using the following request:

HTTP RequestMethodAction
/DocumentReference/{ID}/$pdfGETGenerate 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"
        }
    ]
}