description: null package_name: uk.nhsdigital.r4.test derivation: constraint name: NHSDigitalComposition type: Composition elements: 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: Length of the supplied NHS 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(''^([0-9]{10})$''))'} refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient'] index: 0 section: index: 1 elements: code: index: 2 elements: coding: index: 3 elements: system: {index: 4} code: {index: 5} display: {index: 6} required: [code, display, system] required: [coding] text: {index: 7} required: [code, text] slicing: rules: closed ordered: false discriminator: - {path: code.coding.code, type: value} min: 1 slices: referrerDetailsSection: match: code: coding: {code: '1052891000000108'} schema: index: 165 elements: title: pattern: {type: string, value: Referrer details} type: string index: 166 code: elements: coding: elements: code: pattern: {type: code, value: '1052891000000108'} type: code index: 167 display: pattern: {type: string, value: Referrer details} type: string index: 168 clinicalSummarySection: match: code: coding: {code: '887181000000106'} schema: index: 22 elements: title: pattern: {type: string, value: Clinical summary} type: string index: 23 code: elements: coding: elements: code: pattern: {type: code, value: '887181000000106'} type: code index: 24 display: pattern: {type: string, value: Clinical summary} type: string index: 25 required: [code] entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 26 distributionListSection: match: code: coding: {code: '887261000000109'} schema: index: 70 elements: title: pattern: {type: string, value: Distribution list} type: string index: 71 code: index: 72 elements: coding: index: 73 elements: system: pattern: {type: uri, value: 'http://snomed.info/sct'} type: uri index: 74 version: {index: 75} code: pattern: {type: code, value: '887261000000109'} type: code index: 76 display: pattern: {type: string, value: Distribution list} type: string index: 77 required: [code, system] required: [coding] required: [code] patientDemographicsSection: match: code: coding: {code: '886731000000109'} schema: _required: true index: 139 elements: title: pattern: {type: string, value: Patient demographics} type: string index: 140 code: elements: coding: elements: code: pattern: {type: code, value: '886731000000109'} type: code index: 141 display: pattern: {type: string, value: Patient demographics} type: string index: 142 entry: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient'] index: 143 required: [entry] dischargeDetailsSection: match: code: coding: {code: '886811000000106'} schema: index: 47 elements: title: pattern: {type: string, value: Discharge details} type: string index: 48 code: index: 49 elements: coding: index: 50 elements: system: pattern: {type: uri, value: 'http://snomed.info/sct'} type: uri index: 51 version: {index: 52} code: pattern: {type: code, value: '886811000000106'} type: code index: 53 display: pattern: {type: string, value: Discharge details} type: string index: 54 userSelected: {index: 55} required: [code, system] text: {index: 56} required: [coding] text: {index: 57} mode: {index: 58} orderedBy: index: 59 elements: coding: elements: system: {index: 60} version: {index: 61} code: {index: 62} display: {index: 63} userSelected: {index: 64} required: [code, display, system] text: {index: 65} entry: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Encounter'] index: 66 elements: reference: {index: 67} required: [reference] emptyReason: {index: 68} section: {index: 69} required: [code, entry, text] allergiesAndAdverseReactionsSection: match: code: coding: {code: '886921000000105'} schema: index: 13 elements: title: pattern: {type: string, value: Allergies and adverse reactions} type: string index: 14 code: elements: coding: elements: code: pattern: {type: code, value: '886921000000105'} type: code index: 15 display: pattern: {type: string, value: Allergies and adverse reactions} type: string index: 16 required: [code] entry: type: Reference refers: ['https://fhir.hl7.org.uk/StructureDefinition/UKCore-AllergyIntolerance'] index: 17 participationInResearchSection: match: code: coding: {code: '886751000000102'} schema: index: 130 elements: title: pattern: {type: string, value: Participation in research} type: string index: 131 code: elements: coding: elements: code: pattern: {type: code, value: '886751000000102'} type: code index: 132 display: pattern: {type: string, value: Participation in research} type: string index: 133 entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 134 individualRequirementsSection: match: code: coding: {code: '1078911000000106'} schema: index: 95 elements: title: pattern: {type: string, value: Individual requirements} type: string index: 96 code: elements: coding: elements: version: {index: 97} code: pattern: {type: code, value: '1078911000000106'} type: code index: 98 display: pattern: {type: string, value: Individual requirements} type: string index: 99 entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 100 elements: reference: {index: 101} required: [reference] emptyReason: {index: 102} section: {index: 103} planAndRequestedActionsSection: match: code: coding: {code: '887201000000105'} schema: index: 150 elements: title: pattern: {type: string, value: Plan and requested actions} type: string index: 151 code: elements: coding: elements: code: pattern: {type: code, value: '887201000000105'} type: code index: 152 display: pattern: {type: string, value: Plan and requested actions} type: string index: 153 required: [code] entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 154 elements: reference: {index: 155} required: [reference] emptyReason: {index: 156} section: {index: 157} proceduresSection: match: code: coding: {code: '887171000000109'} schema: index: 158 elements: title: pattern: {type: string, value: Procedures} type: string index: 159 code: index: 160 elements: coding: elements: code: pattern: {type: code, value: '887171000000109'} type: code index: 161 display: pattern: {type: string, value: Procedures} type: string index: 162 entry: type: Reference refers: ['https://fhir.hl7.org.uk/StructureDefinition/UKCore-Procedure'] index: 163 elements: reference: {index: 164} required: [reference] required: [code, title] diagnosesSection: match: code: coding: {code: '887161000000102'} schema: index: 27 elements: title: pattern: {type: string, value: Diagnoses} type: string index: 28 code: elements: coding: elements: system: pattern: {type: uri, value: 'http://snomed.info/sct'} type: uri index: 29 code: pattern: {type: code, value: '887161000000102'} type: code index: 30 display: pattern: {type: string, value: Diagnoses} type: string index: 31 userSelected: {index: 32} text: {index: 33} text: {index: 34} mode: {index: 35} orderedBy: index: 36 elements: coding: elements: system: {index: 37} version: {index: 38} code: {index: 39} display: {index: 40} userSelected: {index: 41} required: [code, display, system] text: {index: 42} entry: type: Reference refers: ['https://fhir.hl7.org.uk/StructureDefinition/UKCore-Condition'] index: 43 elements: reference: {index: 44} required: [reference] emptyReason: {index: 45} section: {index: 46} required: [text] personCompletingRecordSection: match: code: coding: {code: '887231000000104'} schema: index: 144 elements: title: pattern: {type: string, value: Person completing record} type: string index: 145 code: elements: coding: elements: code: pattern: {type: code, value: '887231000000104'} type: code index: 146 display: pattern: {type: string, value: Person completing record} type: string index: 147 required: [code] entry: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner'] index: 148 elements: reference: {index: 149} required: [reference] assessmentScalesSection: match: code: coding: {code: '887141000000103'} schema: index: 18 elements: title: pattern: {type: string, value: Assessment scales} type: string index: 19 code: elements: coding: elements: code: pattern: {type: code, value: '887141000000103'} type: code index: 20 display: pattern: {type: string, value: Assessment scales} type: string index: 21 informationAndAdviceGivenSection: match: code: coding: {code: '1052951000000105'} schema: index: 104 elements: title: pattern: {type: string, value: Information and advice given} type: string index: 105 code: elements: coding: elements: code: pattern: {type: code, value: '1052951000000105'} type: code index: 106 display: pattern: {type: string, value: Information and advice given} type: string index: 107 entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 108 admissionDetailsSection: match: code: coding: {code: '886781000000108'} schema: index: 8 elements: title: pattern: {type: string, value: Admission details} type: string index: 9 code: elements: coding: elements: code: pattern: {type: code, value: '886781000000108'} type: code index: 10 display: pattern: {type: string, value: Admission details} type: string index: 11 entry: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Encounter'] index: 12 required: [entry] legalInformationSection: match: code: coding: {code: '886961000000102'} schema: index: 117 elements: title: pattern: {type: string, value: Legal information} type: string index: 118 code: elements: coding: elements: code: pattern: {type: code, value: '886961000000102'} type: code index: 119 display: pattern: {type: string, value: Legal information} type: string index: 120 entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 121 elements: reference: {index: 122} required: [reference] emptyReason: {index: 123} section: {index: 124} patientAndCarerConcernsExpectationsAndWishesSection: match: code: coding: {code: '1052941000000107'} schema: index: 135 elements: title: pattern: {type: string, value: 'Patient and carer concerns, expectations and wishes'} type: string index: 136 code: elements: coding: elements: code: pattern: {type: code, value: '1052941000000107'} type: code index: 137 display: pattern: {type: string, value: 'Patient and carer concerns, expectations and wishes'} type: string index: 138 safetyAlertsSection: match: code: coding: {code: '886931000000107'} schema: index: 169 elements: title: pattern: {type: string, value: Safety alerts} type: string index: 170 code: elements: coding: elements: code: pattern: {type: code, value: '886931000000107'} type: code index: 171 display: pattern: {type: string, value: Safety alerts} type: string index: 172 gpPracticeSection: match: code: coding: {code: '886711000000101'} schema: index: 78 elements: title: pattern: {type: string, value: GP practice} type: string index: 79 code: elements: coding: elements: version: {index: 80} code: pattern: {type: code, value: '886711000000101'} type: code index: 81 display: pattern: {type: string, value: GP practice} type: string index: 82 userSelected: {index: 83} text: {index: 84} text: {index: 85} mode: {index: 86} orderedBy: index: 87 elements: coding: elements: system: {index: 88} version: {index: 89} code: {index: 90} display: {index: 91} userSelected: {index: 92} required: [code, display, system] text: {index: 93} entry: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization'] index: 94 required: [entry, text] medicationsAndMedicalDevicesSection: match: code: coding: {code: '933361000000108'} schema: index: 125 elements: title: pattern: {type: string, value: Medications and medical devices} type: string index: 126 code: elements: coding: elements: code: pattern: {type: code, value: '933361000000108'} type: code index: 127 display: pattern: {type: string, value: Medications and medical devices} type: string index: 128 entry: type: Reference refers: ['https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationStatement'] index: 129 socialContextSection: match: code: coding: {code: '887051000000101'} schema: index: 173 elements: title: pattern: {type: string, value: Social context} type: string index: 174 code: elements: coding: elements: code: pattern: {type: code, value: '887051000000101'} type: code index: 175 display: pattern: {type: string, value: Social context} type: string index: 176 entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 177 investigationResultsSection: match: code: coding: {code: '1082101000000102'} schema: index: 109 elements: title: pattern: {type: string, value: Investigation results} type: string index: 110 code: elements: coding: elements: code: pattern: {type: code, value: '1082101000000102'} type: code index: 111 display: pattern: {type: string, value: Investigation results} type: string index: 112 entry: type: Reference refers: ['http://hl7.org/fhir/StructureDefinition/Binary'] index: 113 elements: reference: {index: 114} required: [reference] emptyReason: {index: 115} section: {index: 116} package_version: 2.16.0-prerelease class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-Composition base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-Composition version: null required: [section, subject]