{
"description": null,
"_filename": "NHSDigital-DocumentReference.StructureDefinition.json",
"package_name": "uk.nhsdigital.r4.test",
"date": null,
"derivation": "constraint",
"publisher": null,
"fhirVersion": "4.0.1",
"name": "NHSDigitalDocumentReference",
"abstract": false,
"type": "DocumentReference",
"experimental": null,
"resourceType": "StructureDefinition",
"title": null,
"package_version": "2.8.13-prerelease",
"status": "draft",
"id": "d1cae527-7170-45b6-a993-af23f562fdce",
"kind": "resource",
"url": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference",
"version": null,
"differential": {
"element": [ {
"id": "DocumentReference.identifier",
"path": "DocumentReference.identifier",
"mustSupport": true
}, {
"id": "DocumentReference.status",
"path": "DocumentReference.status",
"mustSupport": true
}, {
"id": "DocumentReference.type",
"path": "DocumentReference.type",
"definition": "Specifies the particular kind of document referenced (e.g. History and Physical, Discharge Summary, Progress Note). This usually equates to the purpose of making the document referenced.\r\n\r\n```json\r\n\"type\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"736253002\",\r\n \"display\": \"Mental health crisis plan\"\r\n }\r\n ]\r\n }\r\n```",
"mustSupport": true
}, {
"id": "DocumentReference.type.coding",
"min": 1,
"path": "DocumentReference.type.coding"
}, {
"id": "DocumentReference.type.coding.system",
"min": 1,
"path": "DocumentReference.type.coding.system"
}, {
"id": "DocumentReference.type.coding.code",
"min": 1,
"path": "DocumentReference.type.coding.code"
}, {
"id": "DocumentReference.type.coding.display",
"min": 1,
"path": "DocumentReference.type.coding.display"
}, {
"id": "DocumentReference.category",
"min": 1,
"path": "DocumentReference.category",
"binding": {
"strength": "required",
"valueSet": "https://fhir.nhs.uk/ValueSet/DocumentCategory",
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
"valueString": "DocumentC80Class"
} ],
"description": "NHS Digital Document Category"
},
"definition": "A categorization for the type of document referenced - helps for indexing and searching. This may be implied by or derived from the code specified in the DocumentReference.type.\r\n\r\n```json\r\n\"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://snomed.info/sct\",\r\n \"code\": \"734163000\",\r\n \"display\": \"Care plan\"\r\n }\r\n ]\r\n }\r\n ]\r\n```",
"mustSupport": true
}, {
"id": "DocumentReference.subject",
"min": 1,
"path": "DocumentReference.subject",
"type": [ {
"code": "Reference",
"aggregation": [ "referenced" ],
"targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient" ]
} ],
"constraint": [ {
"key": "patient-reference",
"human": "subject - An identifier reference or resource reference must be provided",
"severity": "warning",
"expression": "(reference.exists() or (identifier.exists()))"
}, {
"key": "patient-nhs",
"human": "Supplied NHS Number is outside the English and Welsh NHS Number range or length of the number is wrong.",
"severity": "error",
"expression": "identifier.where(system='https://fhir.nhs.uk/Id/nhs-number').exists().not() or (identifier.where(system='https://fhir.nhs.uk/Id/nhs-number').exists() and identifier.where(system='https://fhir.nhs.uk/Id/nhs-number').value.matches('^([456789]{1}[0-9]{9})$'))"
} ],
"definition": "A reference to a [NHSDigital-Patient](https://simplifier.net/resolve?target=simplifier&scope=uk.nhsdigital.r4&canonical=https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient) and/or an identifier reference using NHSNumber. Only traced NHS Numbers may be used. \r\n\r\n```json\r\n\r\n \"subject\": {\r\n \"reference\": \"urn:uuid:edea022a-2d81-11eb-adc1-0242ac120002\",\r\n \"identifier\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/Id/nhs-number\",\r\n \"value\": \"9912003888\"\r\n }\r\n ]\r\n },\r\n\r\n```\r\n\r\nPreference is for a reference to a Patient resource, however current document flows may only support limited metadata.",
"mustSupport": true
}, {
"id": "DocumentReference.subject.identifier.system",
"min": 1,
"path": "DocumentReference.subject.identifier.system"
}, {
"id": "DocumentReference.subject.identifier.value",
"min": 1,
"path": "DocumentReference.subject.identifier.value"
}, {
"id": "DocumentReference.date",
"path": "DocumentReference.date",
"mustSupport": true
}, {
"id": "DocumentReference.author",
"path": "DocumentReference.author",
"type": [ {
"code": "Reference",
"targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization", "http://hl7.org/fhir/StructureDefinition/Device", "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient", "https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson", "https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole" ]
} ],
"definition" : "A resource reference to a contained [NHSDigital-PractitionerRole](https://simplifier.net/resolve?target=simplifier&scope=uk.nhsdigital.r4&canonical=https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole)\r\n\r\n```json\r\n\r\n \"author\": [\r\n {\r\n \"reference\": \"#author\",\r\n }\r\n ]\r\n```\r\n\r\nThe contained resource: \r\n\r\n```json\r\n{\r\n \"resourceType\": \"DocumentReference\",\r\n \"id\": \"a9b9f0f4-cc37-4ea3-bd4b-16d15ddbe63b\",\r\n \"contained\": [\r\n {\r\n \"resourceType\": \"PractitionerRole\",\r\n \"id\": \"author\",\r\n \"practitioner\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/sds-user-id\",\r\n \"value\": \"0987654321\"\r\n }\r\n },\r\n \"organization\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"RR8\"\r\n },\r\n \"display\": \"LEEDS TEACHING HOSPITALS NHS TRUST\"\r\n }\r\n }\r\n ],\r\n```",
"mustSupport": true
}, {
"id": "DocumentReference.custodian",
"path": "DocumentReference.custodian",
"type": [ {
"code": "Reference",
"targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization" ]
} ],
"definition": "An identifier reference to an ODS Organisation. \r\n\r\n```json\r\n\r\n \"custodian\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/ods-organization-code\",\r\n \"value\": \"VNE51\"\r\n },\r\n \"display\": \"The Pharmacy System\"\r\n }\r\n```",
"mustSupport": true
}, {
"id": "DocumentReference.content",
"path": "DocumentReference.content",
"definition": "The document and format referenced. There may be multiple content element repetitions, each with a different format.\r\n\r\n```json\r\n\"content\": [\r\n {\r\n \"attachment\": {\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/STU3/StructureDefinition/Extension-eRS-AttachedBy\",\r\n \"valueReference\": {\r\n \"identifier\": {\r\n \"system\": \"https://fhir.nhs.uk/Id/sds-user-id\",\r\n \"value\": \"987654321\"\r\n }\r\n }\r\n }\r\n ],\r\n \"contentType\": \"application/pdf\",\r\n \"url\": \"Binary/att-70001-70002\",\r\n \"size\": 18592,\r\n \"title\": \"upload.png\",\r\n \"creation\": \"2022-01-31\"\r\n }\r\n }\r\n ]\r\n```",
"mustSupport": true
}, {
"id": "DocumentReference.content.attachment",
"path": "DocumentReference.content.attachment",
"mustSupport": true
}, {
"id": "DocumentReference.content.attachment.contentType",
"path": "DocumentReference.content.attachment.contentType",
"definition": "A listed of supported document types (mime types) should be provided, this is likely to include:\r\n\r\n- FHIR Documents\r\n- PDF\r\n- html\r\n- jpeg/jpg\r\n- png"
}, {
"id": "DocumentReference.content.attachment.data",
"path": "DocumentReference.content.attachment.data",
"definition": "**SHOULD** not be used. Use url to link to the actual document",
"mustSupport": true
}, {
"id": "DocumentReference.content.attachment.url",
"path": "DocumentReference.content.attachment.url",
"definition": "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.",
"mustSupport": true
}, {
"id": "DocumentReference.context",
"path": "DocumentReference.context",
"definition" : "The clinical context in which the document was prepared.\r\n\r\n```json\r\n\"context\": {\r\n \"related\": [\r\n {\r\n \"type\": \"ServiceRequest\",\r\n \"reference\": \"ServiceRequest/be735573-9f24-42e1-ae98-af89d632e4bf\"\r\n },\r\n {\r\n \"type\": \"Task\",\r\n \"reference\": \"Task/f66e4cd7-207c-4b7d-9ac9-80630c451125\"\r\n }\r\n ]\r\n }\r\n```",
"mustSupport": true
}, {
"id": "DocumentReference.context.practiceSetting",
"path": "DocumentReference.context.practiceSetting",
"binding": {
"strength": "extensible",
"valueSet": "https://fhir.nhs.uk/ValueSet/NHSDigital-CareSettingType",
"extension": [ {
"url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
"valueString": "DocumentC80PracticeSetting"
} ]
},
"definition": "It is recommended a care setting code should be provided",
"mustSupport": true
}, {
"id": "DocumentReference.context.related",
"path": "DocumentReference.context.related",
"type": [ {
"code": "Reference",
"targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest", "https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task" ]
} ],
"definition": "Related identifiers or resources associated with the DocumentReference.\r\n\r\nIn eRS this is used to link a DocumentReference (i.e. a document) to a ServiceRequest and/or Task.",
"mustSupport": true
} ]
},
"baseDefinition": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference"
}