description: null package_name: uk.nhsdigital.r4.test derivation: constraint name: NHSDigitalClaim type: Claim elements: patient: constraint: patient-reference: {human: An identifier reference or resource reference must be provided, severity: error, 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})$''))'} mustSupport: true index: 11 elements: identifier: index: 12 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/nhs-number'} index: 13 value: {index: 14} required: [value, system] required: [identifier] insurance: mustSupport: true index: 45 elements: coverage: elements: identifier: {index: 46} required: [identifier] use: pattern: {type: Code, value: claim} index: 10 item: mustSupport: true index: 47 extensions: prescriptionStatus: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus', min: 1, max: 1, type: Extension, mustSupport: true, index: 49} prescriptionStatusReason: url: https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatusReason type: Extension short: Prescription Status Reason mustSupport: true index: 50 elements: value: choices: [] index: 52 repeatInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', type: Extension, isModifier: false, index: 53} elements: extension: index: 48 slicing: slices: prescriptionStatus: match: {} schema: {type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatus', index: 49} min: 1 max: 1 prescriptionStatusReason: match: {} schema: type: Extension short: Prescription Status Reason mustSupport: true url: https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatusReason index: 50 elements: value: choices: [] index: 52 repeatInformation: match: {} schema: {type: Extension, isModifier: false, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', index: 53} sequence: pattern: {type: PositiveInt, value: 1} index: 54 productOrService: index: 55 elements: coding: index: 56 elements: system: pattern: {type: Uri, value: 'http://snomed.info/sct'} index: 57 code: pattern: {type: Code, value: '16076005'} index: 58 display: pattern: {type: String, value: Prescription} index: 59 required: [display, system, code] required: [coding] programCode: short: PrescriptionChargeExemption mustSupport: true index: 60 elements: coding: index: 61 elements: system: {index: 62} code: {index: 63} required: [system, code] required: [coding] slicing: rules: open discriminator: - {path: coding.system, type: value} min: null slices: exemptionEvidence: match: coding: {system: 'https://fhir.nhs.uk/CodeSystem/DM-exemption-evidence'} schema: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-vs-exemption-evidence'} mustSupport: true index: 64 elements: coding: elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/DM-exemption-evidence'} index: 65 code: {index: 66} required: [system, code] prescriptionChargeExemption: match: coding: {system: 'https://fhir.nhs.uk/CodeSystem/prescription-charge-exemption'} schema: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-prescription-charge-exemption'} mustSupport: true _required: true index: 67 elements: coding: elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/prescription-charge-exemption'} index: 68 code: {index: 69} required: [system, code] detail: mustSupport: true index: 70 extensions: medicationRequest: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-ClaimMedicationRequestReference', min: 1, max: 1, short: MedicationRequest reference, type: Extension, mustSupport: true, index: 72} sequenceIdentifier: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-ClaimSequenceIdentifier', min: 1, max: 1, type: Extension, mustSupport: true, index: 73} repeatInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', max: 1, type: Extension, index: 74} taskBusinessStatusReason: url: https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatusReason max: 1 type: Extension binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-MedicationDispense-Status-Reason'} isModifier: false index: 75 elements: extension: array: true min: 2 index: 71 slicing: slices: medicationRequest: match: {} schema: {short: MedicationRequest reference, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-ClaimMedicationRequestReference', index: 72} min: 1 max: 1 sequenceIdentifier: match: {} schema: {type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-ClaimSequenceIdentifier', index: 73} min: 1 max: 1 repeatInformation: match: {} schema: {type: Extension, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', index: 74} max: 1 taskBusinessStatusReason: match: {} schema: type: Extension binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-MedicationDispense-Status-Reason'} isModifier: false url: https://fhir.nhs.uk/StructureDefinition/Extension-EPS-TaskBusinessStatusReason index: 75 max: 1 sequence: {mustSupport: true, index: 76} productOrService: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-MedicationRequest-Code'} mustSupport: true index: 77 modifier: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-medicationdispense-type'} mustSupport: true index: 78 programCode: short: Dispensing Endorsement and Charge Payment mustSupport: true index: 79 elements: coding: mustSupport: true index: 80 elements: system: {index: 81} code: {index: 82} required: [system, code] required: [coding] slicing: rules: open discriminator: - {path: coding.system, type: value} min: null slices: prescriptionCharge: match: coding: {system: 'https://fhir.nhs.uk/CodeSystem/DM-prescription-charge'} schema: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-vs-prescription-charge'} mustSupport: true _required: true index: 83 elements: coding: elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/DM-prescription-charge'} index: 84 dispensingEndorsement: match: coding: {system: 'https://fhir.nhs.uk/CodeSystem/medicationdispense-endorsement'} schema: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-dispensing-endorsement'} mustSupport: true index: 85 elements: coding: elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/medicationdispense-endorsement'} index: 86 text: {short: Additional Information for Dispensing Endorsements, index: 87} quantity: {mustSupport: true, index: 88} subDetail: mustSupport: true index: 89 extensions: medicationDispense: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-ClaimMedicationDispenseReference', max: 1, type: Extension, index: 90} repeatInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', max: 1, type: Extension, index: 91} elements: extension: type: Extension url: https://fhir.nhs.uk/StructureDefinition/Extension-ClaimMedicationDispenseReference index: 90 slicing: slices: medicationDispense: match: {} schema: {type: Extension, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-ClaimMedicationDispenseReference', index: 90} max: 1 repeatInformation: match: {} schema: {type: Extension, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', index: 91} max: 1 sequence: {mustSupport: true, index: 92} productOrService: binding: {strength: extensible, valueSet: 'https://fhir.nhs.uk/ValueSet/NHSDigital-MedicationDispense-Code'} mustSupport: true index: 93 quantity: mustSupport: true index: 94 extensions: runningTotal: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-RunningTotal', max: 1, type: Extension, index: 95} elements: extension: type: Extension url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-RunningTotal index: 95 slicing: slices: runningTotal: match: {} schema: {type: Extension, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-RunningTotal', index: 95} max: 1 required: [quantity] required: [modifier] required: [detail, extension] type: mustSupport: true index: 6 elements: coding: index: 7 elements: system: pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/claim-type'} index: 8 code: pattern: {type: Code, value: pharmacy} index: 9 required: [system, code] required: [coding] created: {mustSupport: true, index: 15} extension: type: Extension short: Used to reference a previous Claim mustSupport: true url: https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf index: 0 slicing: slices: replacementOf: match: {} schema: {type: Extension, short: Used to reference a previous Claim, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf', index: 0} max: 1 agent: match: {} schema: {type: Extension, short: Provenance of the resource, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent', index: 1} max: 1 priority: mustSupport: true index: 20 elements: coding: index: 21 elements: system: pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/processpriority'} index: 22 code: pattern: {type: Code, value: normal} index: 23 required: [system, code] required: [coding] status: {mustSupport: true, index: 5} payee: mustSupport: true index: 37 elements: type: elements: coding: index: 38 elements: system: pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/payeetype'} index: 39 code: pattern: {type: Code, value: provider} index: 40 display: pattern: {type: String, value: Provider} index: 41 required: [display, system, code] required: [coding] party: type: Reference constraint: nhsd-claim-party: {human: party - An identifier reference or resource reference must be provided, severity: error, expression: (reference.exists() or (identifier.exists()))} refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization'] index: 42 elements: identifier: elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/ods-organization-code'} index: 43 value: {index: 44} required: [value, system] required: [party] prescription: mustSupport: true index: 24 extensions: groupIdentifier: url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-GroupIdentifier type: Extension index: 26 extensions: {} elements: extension: {array: true, min: 2, index: 27} elements: extension: index: 25 slicing: slices: groupIdentifier: match: {} schema: type: Extension url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-GroupIdentifier index: 26 extensions: {} elements: extension: {array: true, min: 2, index: 27} reference: {index: 28} identifier: index: 29 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/prescription-order-item-number'} index: 30 value: {index: 31} required: [value, system] required: [extension] identifier: mustSupport: true index: 2 elements: system: {index: 3} value: {index: 4} required: [value, system] provider: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-SDS'] index: 16 elements: reference: {index: 17} identifier: elements: system: {index: 18} value: {index: 19} required: [value, system] required: [reference] originalPrescription: extensions: groupIdentifier: url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-GroupIdentifier type: Extension index: 33 extensions: {} elements: extension: {array: true, min: 2, index: 34} elements: extension: index: 32 slicing: slices: groupIdentifier: match: {} schema: type: Extension url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-GroupIdentifier index: 33 extensions: {} elements: extension: {array: true, min: 2, index: 34} identifier: elements: system: {index: 35} value: {index: 36} required: [value, system] required: [extension] package_version: 2.18.8-prerelease extensions: replacementOf: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-replacementOf', max: 1, type: Extension, short: Used to reference a previous Claim, mustSupport: true, index: 0} agent: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-Provenance-agent', max: 1, type: Extension, short: Provenance of the resource, mustSupport: true, index: 1} class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-Claim base: http://hl7.org/fhir/StructureDefinition/Claim version: 1.1.0 required: [prescription, payee, identifier, item]