description: null package_name: uk.nhsdigital.r4 derivation: constraint name: NHSDigitalDocumentReference type: DocumentReference elements: category: {mustSupport: true, index: 7} content: mustSupport: true index: 13 elements: attachment: mustSupport: true index: 14 elements: contentType: {index: 15} data: {mustSupport: true, index: 16} url: {mustSupport: true, index: 17} type: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-DocumentType'} 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: 11 custodian: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization'] index: 12 status: {mustSupport: true, index: 1} identifier: {mustSupport: true, index: 0} context: mustSupport: true index: 18 elements: practiceSetting: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-CareSettingType'} mustSupport: true index: 19 related: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-ServiceRequest', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-Task'] index: 20 subject: constraint: patient-reference: {human: subject - An identifier reference plus a display name or resource reference must be provided, source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference', severity: warning, expression: (reference.exists() or (identifier.exists() and display.exists()))} patient-nhs: {human: Supplied NHS Number is outside the English and Welsh NHS Number range or length of the number is wrong., source: 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference', 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 index: 8 elements: identifier: elements: system: {index: 9} value: {index: 10} required: [value, system] package_version: 2.4.3 class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-DocumentReference base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-DocumentReference version: null