---
title: "Facade DocumentReference"
canonical: "https://wiki.patientsknowbest.com/space/api/3364847910/Facade%20DocumentReference"
format: markdown
---
[http://fhir.patientsknowbest.com/structuredefinition/facade-documentreference](http://fhir.patientsknowbest.com/structuredefinition/facade-documentreference)

[https://www.hl7.org/fhir/STU3/documentreference.html](https://www.hl7.org/fhir/STU3/documentreference.html)

## 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.

## Relevant PKB entities

- [[[Document]]](https://wiki.patientsknowbest.com/space/api/3743121409/Entity%3A+Document)

## Mappings

| **FHIR** | **PKB** | **Notes** |
| --- | --- | --- |
| Resource id | [[Document.Data Point ID]] |  |
| Resource meta | - meta: Meta
  - extension[0]
    - url = "[http://fhir.patientsknowbest.com/structuredefinition/document-status](http://fhir.patientsknowbest.com/structuredefinition/document-status)"
    - valueCoding: Coding
      - system = "[http://fhir.patientsknowbest.com/codesystem/document-status](http://fhir.patientsknowbest.com/codesystem/document-status)"
      - code = [[Document.Status]]
  - lastUpdated = [[Data Point.Persisted Timestamp]]
  - security: Coding
    - system = "[http://fhir.patientsknowbest.com/codesystem/privacy-label](http://fhir.patientsknowbest.com/codesystem/privacy-label)"
    - code = [[Data Point.Privacy Label]]<br>[[Document.Status]] code mappings (PKB → FHIR):<br>- UNREAD → UNREAD
- READ → READ<br>[[Data Point.Privacy Label]] code mappings (PKB → FHIR):<br>- GENERAL_HEALTH → GENERAL_HEALTH
- MENTAL_HEALTH → MENTAL_HEALTH
- SEXUAL_HEALTH → SEXUAL_HEALTH
- SOCIAL_CARE → SOCIAL_CARE |  |
| DocumentReference.extension | - extension[0]: Extension
  - url = "[http://fhir.patientsknowbest.com/structuredefinition/specialty](http://fhir.patientsknowbest.com/structuredefinition/specialty)"
  - valueCoding: Coding
    - code = [[Data Point.Specialty]]
    - display = Resolve( [[DataPoint.Specialty]] ) | The "Resolve()" notation indicates a lookup will be performed into the optional, customer-provided code set. If a match is found, the corresponding display value will be used.<br>See [here for more information](https://pkbdev.atlassian.net/wiki/spaces/api/pages/3365012136/Code+sets#Hospital-Service-(Specialty)). |
| DocumentReference.identifier | - identifier: Identifier
  - value = [[Document.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 [[Document.External Data Point ID]] for the same [[Source.Source Organisation]] but a more recent [[Document.Persisted Timestamp]]:   "superseded"   
Else:   "current" |  |
| DocumentReference.type | - type: CodeableConcept
  - coding[0]: Coding
    - code = [[Document.Document Type]]
    - system = "[http://fhir.patientsknowbest.com/codesystem/document-type](http://fhir.patientsknowbest.com/codesystem/document-type)"<br>[[Document.Document Type]] code mappings (PKB → FHIR):<br>- ADMISSION_TCI_LETTER → ADMISSION_TCI_LETTER
- ALERT_NOTIFICATION → ALERT_NOTIFICATION
- APPOINTMENT_LETTER → APPOINTMENT_LETTER
- BIRTH_REPORT → BIRTH_REPORT
- CLINIC_LETTER → CLINIC_LETTER
- DISCHARGE_LETTER → DISCHARGE_LETTER
- DISCHARGE_SUMMARY → DISCHARGE_SUMMARY
- MULTI_DISCIPLINARY_TEAM_MEETING_NOTES → MULTI_DISCIPLINARY_TEAM_MEETING_NOTES
- REFERRAL_LETTER → REFERRAL_LETTER |  |
| DocumentReference.subject | - subject: Reference
  - reference = the relative URL of the Patient resource
  - display = [[User.Title]] [[User.Given Name]] [[User.Family Name]] |  |
| DocumentReference.created | [[Document.Timestamp]] |  |
| DocumentReference.indexed | [[Document.Persisted Timestamp]] |  |
| DocumentReference.content | - content: BackboneElement
  - attachment: Attachment
    - creation = [[Document.Timestamp]] |  |