Skip to content

Document Reference

angshuman sarkar edited this page Jul 4, 2020 · 4 revisions

So you have seen how to transfer a media resource using the PHR envelope/bundle. As explained earlier, Media is a basic resource and does not express any semantic meaning. For transferring any clinical documents, or attachments/medias etc, you should consider using the FHIR DocumentReference. A document reference is used to transfer any document with context - who is the author, what is the context (encounter) and significantly whats the type and category of document.

So lets say we want to transfer clinical notes from a doctor (maybe a OP consultation) - but this time we want to specify some contexts and meta information about the document.


{
  "resourceType": "DocumentReference",
  "id": "21012",
  "masterIdentifier": {
    "system": "urn:fr:hip",
    "value": "urn:oid:hip1001.21012"
  },
  "status": "current",
  "docStatus": "final",
  "type": {
    "text": "Clinical Note",
    "coding": [
      {
        "system": "http://loinc.org",
        "code": "34108-1",
        "display": "Outpatient Note"
      },
      {
        "system": "http://egovstandards.gov.in/mdds/CD05.046",
        "code": "17",
        "display": "Clinical Note"
      }
    ]
  },
  "subject": {
    "display": "Hina Patel",
    "reference": "Patient/NCP10008"
  },
  "date": "2005-12-24T09:43:41+11:00",
  "author": [
    {
      "display": "Dr. Manju Sengar",
      "reference": "Practitioner/DHID1234"
    }
  ],
  "authenticator": {
    "reference": "Organization/HIP1001"
  },
  "description": "Human readable description - about the document",
  "securityLabel": [
    {
      "coding": [
        {
          "system": "http://terminology.hl7.org/CodeSystem/v3-Confidentiality",
          "code": "N",
          "display": "Normal"
        }
      ]
    }
  ],
  "content": [
    {
      "attachment": {
        "contentType": "application/pdf",
        "title": "Physical",
        "data": "base 64 encoded inline data"
      }
    }
  ],
  "context": {
    "encounter": [
      {
        "reference": "Encounter/E001",
        "display": "ambulatory encounter which lead to this document"
      }
    ],
    "period": {
      "start": "2004-12-23T08:00:00+11:00",
      "end": "2004-12-23T08:01:00+11:00"
    }
  }
}
  • id - must be unique within the bundle context.
  • masterIdentifier - optional. not used in reference stack. However, may be useful in other context, especially as a traceability means within the hospital.
  • status - usually "current", unless you are superseding the document
  • docStatus - preliminary | final | amended
  • type - type of the document. "Text" is mandatory, you may use coding. Please refer to country specific codes and mandates. The above example illustrates uses of multiple coding - loinc and MDDS (for India). Indian MDDS standards for code directory can be found here - check table for Clinical Document Type (CD05.046)
  • subject - reference to the patient resource in the bundle. In PHR context, the patient is already known, and reference stack do not use this - however it maybe useful for document exchanges. Please check country specific mandate.
  • date - date the document was created. mandatory.
  • author - reference to the practitioner resource. "Text" is mandatory. You may provide additional details using the practitioner resource in the same bundle.
  • authenticator - usually the organization where the document was created. Optional in PHR framework context, as HIU or patient systems know the origin of the document. Maybe mandated for other contexts.
  • description - Human readable description - about the document. Optional.
  • securityLabel - optional. Describes risk of harm if disclosed.
  • content - one or more attachments. "attachment.data" must be based64 encoded inline data. Check the media resource guide on how to encode to base64 data. Please do not send http URL as attachment. "attachment.contentType" describes the mimetype of the content. Refer here for common mimetypes - however please restrict to the following mimetypes - "application/pdf", "application/msword", "image/png", "image/jpeg", "application/msword", "application/rtf", "video/mpeg" etc. It purely depends on the Patient application or Doctor's application capability of rendering the attachment.
  • context - provides the context of the document - for example the encounter, which if provided is reference to encounter resource within the bundle. "context.period" is optional.