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: 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})$''))'} 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: [display, system, code] required: [coding] text: {index: 7} required: [text, code] 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} index: 166 code: elements: coding: elements: code: pattern: {type: Code, value: '1052891000000108'} index: 167 display: pattern: {type: String, value: Referrer details} index: 168 clinicalSummarySection: match: code: coding: {code: '887181000000106'} schema: index: 22 elements: title: pattern: {type: String, value: Clinical summary} index: 23 code: elements: coding: elements: code: pattern: {type: Code, value: '887181000000106'} index: 24 display: pattern: {type: String, value: Clinical summary} 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} index: 71 code: index: 72 elements: coding: index: 73 elements: system: pattern: {type: Uri, value: 'http://snomed.info/sct'} index: 74 version: {index: 75} code: pattern: {type: Code, value: '887261000000109'} index: 76 display: pattern: {type: String, value: Distribution list} index: 77 required: [system, code] required: [coding] required: [code] patientDemographicsSection: match: code: coding: {code: '886731000000109'} schema: _required: true index: 139 elements: title: pattern: {type: String, value: Patient demographics} index: 140 code: elements: coding: elements: code: pattern: {type: Code, value: '886731000000109'} index: 141 display: pattern: {type: String, value: Patient demographics} 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} index: 48 code: index: 49 elements: coding: index: 50 elements: system: pattern: {type: Uri, value: 'http://snomed.info/sct'} index: 51 version: {index: 52} code: pattern: {type: Code, value: '886811000000106'} index: 53 display: pattern: {type: String, value: Discharge details} index: 54 userSelected: {index: 55} required: [system, code] 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: [display, system, code] 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: [entry, text, code] allergiesAndAdverseReactionsSection: match: code: coding: {code: '886921000000105'} schema: index: 13 elements: title: pattern: {type: String, value: Allergies and adverse reactions} index: 14 code: elements: coding: elements: code: pattern: {type: Code, value: '886921000000105'} index: 15 display: pattern: {type: String, value: Allergies and adverse reactions} 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} index: 131 code: elements: coding: elements: code: pattern: {type: Code, value: '886751000000102'} index: 132 display: pattern: {type: String, value: Participation in research} 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} index: 96 code: elements: coding: elements: version: {index: 97} code: pattern: {type: Code, value: '1078911000000106'} index: 98 display: pattern: {type: String, value: Individual requirements} 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} index: 151 code: elements: coding: elements: code: pattern: {type: Code, value: '887201000000105'} index: 152 display: pattern: {type: String, value: Plan and requested actions} 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} index: 159 code: index: 160 elements: coding: elements: code: pattern: {type: Code, value: '887171000000109'} index: 161 display: pattern: {type: String, value: Procedures} index: 162 entry: type: Reference refers: ['https://fhir.hl7.org.uk/StructureDefinition/UKCore-Procedure'] index: 163 elements: reference: {index: 164} required: [reference] required: [title, code] diagnosesSection: match: code: coding: {code: '887161000000102'} schema: index: 27 elements: title: pattern: {type: String, value: Diagnoses} index: 28 code: elements: coding: elements: system: pattern: {type: Uri, value: 'http://snomed.info/sct'} index: 29 code: pattern: {type: Code, value: '887161000000102'} index: 30 display: pattern: {type: String, value: Diagnoses} 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: [display, system, code] 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} index: 145 code: elements: coding: elements: code: pattern: {type: Code, value: '887231000000104'} index: 146 display: pattern: {type: String, value: Person completing record} 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} index: 19 code: elements: coding: elements: code: pattern: {type: Code, value: '887141000000103'} index: 20 display: pattern: {type: String, value: Assessment scales} index: 21 informationAndAdviceGivenSection: match: code: coding: {code: '1052951000000105'} schema: index: 104 elements: title: pattern: {type: String, value: Information and advice given} index: 105 code: elements: coding: elements: code: pattern: {type: Code, value: '1052951000000105'} index: 106 display: pattern: {type: String, value: Information and advice given} 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} index: 9 code: elements: coding: elements: code: pattern: {type: Code, value: '886781000000108'} index: 10 display: pattern: {type: String, value: Admission details} 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} index: 118 code: elements: coding: elements: code: pattern: {type: Code, value: '886961000000102'} index: 119 display: pattern: {type: String, value: Legal information} 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'} index: 136 code: elements: coding: elements: code: pattern: {type: Code, value: '1052941000000107'} index: 137 display: pattern: {type: String, value: 'Patient and carer concerns, expectations and wishes'} index: 138 safetyAlertsSection: match: code: coding: {code: '886931000000107'} schema: index: 169 elements: title: pattern: {type: String, value: Safety alerts} index: 170 code: elements: coding: elements: code: pattern: {type: Code, value: '886931000000107'} index: 171 display: pattern: {type: String, value: Safety alerts} index: 172 gpPracticeSection: match: code: coding: {code: '886711000000101'} schema: index: 78 elements: title: pattern: {type: String, value: GP practice} index: 79 code: elements: coding: elements: version: {index: 80} code: pattern: {type: Code, value: '886711000000101'} index: 81 display: pattern: {type: String, value: GP practice} 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: [display, system, code] 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} index: 126 code: elements: coding: elements: code: pattern: {type: Code, value: '933361000000108'} index: 127 display: pattern: {type: String, value: Medications and medical devices} 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} index: 174 code: elements: coding: elements: code: pattern: {type: Code, value: '887051000000101'} index: 175 display: pattern: {type: String, value: Social context} 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} index: 110 code: elements: coding: elements: code: pattern: {type: Code, value: '1082101000000102'} index: 111 display: pattern: {type: String, value: Investigation results} 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.8.14-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]