description: null package_name: uk.nhsdigital.r4.test derivation: constraint name: NHSDigitalDocumentReference type: DocumentReference elements: category: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DocumentCategory'} mustSupport: true index: 7 date: {mustSupport: true, index: 11} content: mustSupport: true index: 14 elements: attachment: mustSupport: true index: 15 elements: contentType: {index: 16} data: {mustSupport: true, index: 17} url: {mustSupport: true, index: 18} type: mustSupport: true index: 2 elements: coding: index: 3 elements: system: {index: 4} code: {index: 5} display: {index: 6} required: [display, system, code] required: [coding] author: type: Reference mustSupport: true refers: ['http://hl7.org/fhir/StructureDefinition/Device', 'https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole'] index: 12 custodian: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization'] index: 13 status: {mustSupport: true, index: 1} identifier: {mustSupport: true, index: 0} context: mustSupport: true index: 19 elements: practiceSetting: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-CareSettingType'} mustSupport: true index: 20 related: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task'] index: 21 subject: type: Reference constraint: patient-reference: {human: subject - An identifier reference or resource reference must be provided, severity: warning, expression: (reference.exists() or (identifier.exists()))} 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})$''))'} mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient'] index: 8 elements: identifier: elements: system: {index: 9} value: {index: 10} required: [value, system] package_version: 2.8.9-prerelease class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference version: null required: [subject, category]