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