NHS Digital FHIR Implementation Guide (Retired - 2.1.50)

This guidance is under active development by NHS Digital and content may be added or updated on a regular basis.

NHSDigital-DocumentReference

Profile url
https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference

This FHIR R4 implementation profile is designed around aligning document metadata standards from:

For FHIR RESTful Search Parameters see Search Parameters
For FHIR Messaging core MessageDefinition see document





with UK Core DocumentReference

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
masterIdentifierΣ0..1Identifier
identifierΣ0..*Identifier
statusΣ ?!1..1codeBinding
docStatusΣ0..1codeBinding
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemΣ1..1uri
versionΣ0..1string
codeΣ1..1code
displayΣ1..1string
userSelectedΣ0..1boolean
textΣ0..1string
categoryΣ0..*CodeableConcept
subjectΣ I0..1Reference(Patient | Practitioner | Group | Device)
dateΣ0..1instant
authorΣ I0..*Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson)
authenticatorI0..1Reference(Practitioner | PractitionerRole | Organization)
custodianI0..1Reference(Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
codeΣ1..1codeBinding
targetΣ I1..1Reference(DocumentReference)
descriptionΣ0..1string
securityLabelΣ0..*CodeableConceptBinding
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
attachmentΣ I1..1Attachment
formatΣ0..1CodingBinding
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
encounterI0..*Reference(Encounter | EpisodeOfCare)
event0..*CodeableConcept
periodΣ I0..1Period
facilityType0..1CodeableConcept
id0..1string
extensionI0..*Extension
NHSDataDictionaryCareSettingΣ0..*CodingBindingFixed Value
UKCoreCareSettingΣ0..*CodingBindingFixed Value
textΣ0..1string
sourcePatientInfoI0..1Reference(Patient)
relatedI0..*Reference(Resource)

from UK Core DocumentReference

idΣ0..1string
metaΣ0..1Meta
implicitRulesΣ ?!0..1uri
language0..1codeBinding
text0..1Narrative
contained0..*Resource
extensionI0..*Extension
modifierExtension?! I0..*Extension
masterIdentifierΣ0..1Identifier
identifierΣ0..*Identifier
statusΣ ?!1..1codeBinding
docStatusΣ0..1codeBinding
id0..1string
extensionI0..*Extension
id0..1string
extensionI0..*Extension
systemΣ1..1uri
versionΣ0..1string
codeΣ1..1code
displayΣ1..1string
userSelectedΣ0..1boolean
textΣ0..1string
categoryΣ0..*CodeableConcept
subjectΣ I0..1Reference(Patient | Practitioner | Group | Device)
dateΣ0..1instant
authorΣ I0..*Reference(Practitioner | PractitionerRole | Organization | Device | Patient | RelatedPerson)
authenticatorI0..1Reference(Practitioner | PractitionerRole | Organization)
custodianI0..1Reference(Organization)
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
codeΣ1..1codeBinding
targetΣ I1..1Reference(DocumentReference)
descriptionΣ0..1string
securityLabelΣ0..*CodeableConceptBinding
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
attachmentΣ I1..1Attachment
formatΣ0..1CodingBinding
id0..1string
extensionI0..*Extension
modifierExtensionΣ ?! I0..*Extension
encounterI0..*Reference(Encounter | EpisodeOfCare)
event0..*CodeableConcept
periodΣ I0..1Period
facilityType0..1CodeableConcept
id0..1string
extensionI0..*Extension
NHSDataDictionaryCareSettingΣ0..*CodingBindingFixed Value
UKCoreCareSettingΣ0..*CodingBindingFixed Value
textΣ0..1string
sourcePatientInfoI0..1Reference(Patient)
relatedI0..*Reference(Resource)

type

Code from UKCoreDocumentType

category

Code from DocumentClassValueSet

subject

A reference to a NHSDigital-Patient and/or an identifier reference using NHSNumber. Only traced NHS Numbers may be used.


    "subject": {
        "reference": "urn:uuid:edea022a-2d81-11eb-adc1-0242ac120002",
        "identifier": [
            {
                "system": "https://fhir.nhs.uk/Id/nhs-number",
                "value": "9912003888"
            }
        ]
    },


Preference is for a reference to a Patient resource, however current document flows may only support limited metadata.

author and authenticator

Combination of:

  • Identifier reference to Practioner and/or Organization (resource references are not permitted)
  • Resource reference to PractitionerRole and/or HealthcareService.

SDS Identifiers are not permitted and professional codes detailed in NHSDigital-Practitioner SHOULD be used.


    "author": [
        {
          "type" : "Practitioner",
              "identifier":  {
                  "system": "https://fhir.hl7.org.uk/Id/gphc-number",
                  "value": "7654321"
                },
                "display": "Mr Peter Potion"
        }
    ]


custodian

An identifier reference to an ODS Organisation.


        "custodian": {
                "identifier": {
                    "system": "https://fhir.nhs.uk/Id/ods-organization-code",
                    "value": "VNE51"
                },
                "display": "The Pharmacy System"
        }

content.attachment.contentType

A listed of supported document types (mime types) should be provided, this is likely to include:

  • FHIR Documents
  • PDF
  • html
  • jpeg/jpg
  • png

content.attachment.url

content.attachment.data MUST not be used.

For REST interactions this MUST be a url to the actual document. For messaging interactions this must be an internal resource reference to the actual document.

context.practiceSetting

Codes from UKCoreCareSettingType and/or NHS Data Dictionary Clinical Specialty

Search Parameters

Name Type Description Conformance Path
created date Document creation time SHOULD DocumentReference.created
patient:identifier token Who/what is the subject of the document SHALL DocumentReference.subject (Patient)
period date Time of service that is being documented SHOULD DocumentReference.context.period
setting token Additional details about where the content was created (e.g. clinical specialty) SHOULD DocumentReference.context.practiceSetting
type token Kind of document (SNOMED CT preferred) SHOULD DocumentReference.type

Additional parameters can be on DocumentReference - Search Parameters

Mandatory Search Parameters

patient:identifier

SHALL support searching using the patient:identifier search parameters:

GET [baseUrl]/DocumentReference?patient:identifier={system|}[code]

Example:

GET [baseUrl]/DocumentReference?patient:identifier=9876543210

Return all DocumentReference resources with an identifier 9876543210.

Optional Search Parameters

date + patient:identifier

SHOULD support searching using the combination of the patient:identifier and date search parameters:

  • including support for these date comparators: gt,lt,ge,le
  • including optional support for composite AND search on date (e.g.date=[date]&date=[date]]&...)
GET [baseUrl]/DocumentReference?patient:identifier={system|}[code]&date=[date]

Example:

GET [baseUrl]/DocumentReference?patient:identifier=9876543210&date=ge2010-01-01&date=le2011-12-31

Return all DocumentReference resources that have a date greater than or equal to 1st Jan 2010, a date less than or equal to 31st Dec 2011 and Patient with an identifier of 9876543210.

period + patient:identifier

SHOULD support searching using the combination of the patient:identifier and period search parameters:

  • including support for these date comparators: gt,lt,ge,le
  • including optional support for composite AND search on period (e.g.period=[date]&date=[date]]&...)
GET [baseUrl]/DocumentReference?patient:identifier={system|}[code]&period=[date]

Example:

GET [baseUrl]/DocumentReference?patient:identifier=9876543210&period=ge2010-01-01&period=le2011-12-31

Return all DocumentReference resources that have a period greater than or equal to 1st Jan 2010, a date less than or equal to 31st Dec 2011 and Patient with an identifier of 9876543210.

setting + patient:identifier

SHOULD support searching using the combination of the patient:identifier and setting search parameters

GET [baseUrl]/DocumentReference?patient:identifier={system|}[code]&setting={system|}[code]

Example:

GET /DocumentReference?patient:identifier=9876543210&setting=http://snomed.info/sct|893061000000109

Return all DocumentReference resources that have a setting with a type of 'Cardiology service (qualifier value)' and Patient with an identifier of 9876543210.

type + patient:identifier

SHOULD support searching using the combination of the patient:identifier and type search parameters

GET [baseUrl]/DocumentReference?patient:identifier={system|}[code]&type={system|}[code]

Example:

GET /DocumentReference?patient:identifier=9876543210&type=http://snomed.info/sct|373942005

Return all DocumentReference resources that have a type with a type of 'Discharge summary (qualifier value)' and Patient with an identifier of 9876543210.

back to top