Developer documentation‎ > ‎FHIR REST API‎ > ‎Roadmap‎ > ‎

DocumentReference

https://www.hl7.org/fhir/documentreference.html

Status

In development. API spec subject to change.

Overview

A DocumentReference is used to capture information about documents authored outside PKB and then subsequently sent to us. For example, a discharge summary sent in an MDM T02.

A DocumentReference will be generated for each [[Message]] where [[Message.Type]] = DOCUMENT.

Relevant PKB Entities

Endpoints

Interaction HTTP URL Supported Search Params Permitted User Types Description Examples
search GET /DocumentReference
  • encounter. Required. Multi-value support: none. Modifier support: [<type>].
  • Patient
  • Professional
Retrieve DocumentReference resources for a specific Encounter. /DocumentReference?encounter=Encounter/8b1e7011-bcbb-4ab8-91d3-fd5aecd5a774

Mappings

FHIR PKB Notes
Resource id [[Message.Data Point ID]]  
Resource meta
  • meta: Meta
    • extension[0]
      • url = "http://fhir.patientsknowbest.com/structuredefinition/message-status"
      • valueCoding: Coding
        • system = "http://fhir.patientsknowbest.com/codesystem/message-status"
        • code = [[Message.Status]]
    • lastUpdated = [[Data Point.Persisted Timestamp]]
    • security: Coding
      • system = "http://fhir.patientsknowbest.com/codesystem/privacy-label"
      • code = [[Data Point.Privacy Label]]
[[Message.Status]] code mappings (PKB → FHIR):
  • DRAFT → DRAFT
  • SENT → SENT
  • UNREAD → UNREAD
  • READ → READ
[[Data Point.Privacy Label]] code mappings (PKB → FHIR):
  • GENERAL_HEALTH → GENERAL_HEALTH
  • MENTAL_HEALTH → MENTAL_HEALTH
  • SEXUAL_HEALTH → SEXUAL_HEALTH
  • SOCIAL_CARE → SOCIAL_CARE

DocumentReference.identifier
  • identifier: Identifier
    • value = [[Message.External Data Point ID]]
    • assigner: Reference
      • reference = the relative URL of the Organization resource.
      • display = [[Organisation.Name]]
The assigner reference will represent the PKB Organisation even if the source PKB Team is known, since external IDs are tracked at the level of the Organisation.
DocumentReference.status <conditional>
If there is another DocumentReference with the same [[Message.External Data Point ID]] for the same [[Source.Source Organisation]] but a more recent [[Message.Persisted Timestamp]]: "superseded"
Else: "current"
DocumentReference.type
  • type: CodeableConcept
    • coding[0]: Coding
      • code = [[Message.Document Type]]
      • system = "http://fhir.patientsknowbest.com/codesystem/document-type"
[[Message.Document Type]] code mappings (PKB → FHIR):
  • DISCHARGE_SUMMARY → DISCHARGE_SUMMARY
  • CLINIC_LETTER → CLINIC_LETTER
  • REFERRAL_LETTER → REFERRAL_LETTER
  • APPOINTMENT_LETTER → APPOINTMENT_LETTER
  • ADMISSION_TCI_LETTER → ADMISSION_TCI_LETTER
  • MULTI_DISCIPLINARY_TEAM_MEETING_NOTES → MULTI_DISCIPLINARY_TEAM_MEETING_NOTES


DocumentReference.subject
  • subject: Reference
    • reference = the relative URL of the Patient resource
    • display = [[User.Title]] [[User.Given Name]] [[User.Family Name]]
 
DocumentReference.indexed [[Message.Persisted Timestamp]]  
DocumentReference.context
  • context: BackboneElement
    • encounter: Reference
      • reference = the relative URL of the Encounter resource
 
Comments