description: null package_name: uk.nhsdigital.r4.test derivation: constraint name: NHSDigitalMedicationRequest type: MedicationRequest elements: category: mustSupport: true index: 19 elements: coding: index: 20 slicing: rules: open discriminator: - {path: system, type: value} min: 1 max: 1 slices: patientClassFHIR: match: {system: 'http://terminology.hl7.org/CodeSystem/medicationrequest-category'} schema: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-medicationrequest-category'} index: 21 elements: system: pattern: {type: Uri, value: 'http://terminology.hl7.org/CodeSystem/medicationrequest-category'} index: 22 code: {index: 23} required: [system, code] patientClassUK: match: {system: 'https://fhir.nhs.uk/CodeSystem/medicationrequest-category'} schema: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-medicationrequest-category'} index: 24 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/CodeSystem/medicationrequest-category'} index: 25 code: {index: 26} required: [system, code] required: [coding] eventHistory: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Provenance'] index: 84 substitution: mustSupport: true index: 80 elements: allowed: choices: [allowedBoolean] index: 82 allowedBoolean: {type: boolean, choiceOf: allowed, index: 83} encounter: type: Reference refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Encounter'] index: 35 dispenseRequest: mustSupport: true index: 60 elements: id: {index: 61} extension: index: 62 slicing: rules: open discriminator: - {path: url, type: value} min: 1 slices: performerSiteType: match: {url: null} schema: {type: Extension, short: type of dispensing organisation, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType', index: 63} min: 1 validityPeriod: mustSupport: true index: 64 elements: start: {index: 65} required: [start] numberOfRepeatsAllowed: {mustSupport: true, index: 66} quantity: mustSupport: true index: 67 elements: value: {index: 68} unit: {index: 69} code: {index: 70} required: [value, unit, code] expectedSupplyDuration: short: Days Supply mustSupport: true index: 71 elements: value: {index: 72} code: pattern: {type: Code, value: d} index: 73 required: [value, code] performer: type: Reference mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization-ODS'] index: 74 extensions: dispensingPractitioner: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer', min: 0, max: 1, short: practitioner who released(/downloaded) the prescription, type: Extension, mustSupport: true, index: 76} elements: extension: index: 75 slicing: rules: open discriminator: - {path: url, type: value} min: 0 slices: dispensingPractitioner: match: {url: null} schema: {short: practitioner who released(/downloaded) the prescription, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer', index: 76} min: 0 max: 1 identifier: index: 77 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/ods-organization-code'} index: 78 value: {index: 79} required: [value, system] required: [identifier] extensions: performerSiteType: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType', min: 1, type: Extension, short: type of dispensing organisation, mustSupport: true, index: 63} required: [extension, quantity] medicationCodeableConcept: {type: CodeableConcept, mustSupport: true, choiceOf: medication, index: 29} statusReason: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-medicationrequest-status-reason'} mustSupport: true index: 13 elements: coding: index: 14 elements: system: {index: 15} code: {index: 16} display: {index: 17} required: [display, system, code] required: [coding] authoredOn: {mustSupport: true, index: 36} note: {short: Dispensing Note, mustSupport: true, index: 56} extension: index: 0 slicing: rules: open discriminator: - {path: url, type: value} min: 1 slices: medicationRepeatInformation: match: {url: null} schema: {short: Continous and Continuous Repeat Dispensing, mustSupport: true, index: 1} min: 0 responsiblePractitioner: match: {url: null} schema: {short: Responsible Practitioner for the prescription, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner', index: 2} min: 0 max: 1 prescriptionEndorsement: match: {url: null} schema: {type: Extension, short: NHS BSA Prescription Endorsements, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionEndorsement', index: 3} min: 0 prescriptionTaskStatusReason: match: {url: null} schema: {type: Extension, short: Prescription task status reason, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory', index: 4} min: 0 NHSBSAprescriptionType: match: {url: null} schema: {type: Extension, short: NHS BSA Prescription Type, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType', index: 5} min: 1 controlledDrug: match: {url: null} schema: {short: Optional Controlled Drug Extensions, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug', index: 6} min: 0 max: 1 dispensingInformation: match: {url: null} schema: {short: For EPS use only, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation', index: 7} min: 0 max: 1 requester: type: Reference constraint: eps-3: {human: requester - An identifier reference or resource reference must be provided, severity: error, expression: (reference.exists() or (identifier.exists()))} mustSupport: true refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-EPSLegal', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole-SDS'] index: 37 elements: reference: {index: 38} required: [reference] status: {short: active | cancelled | stopped, mustSupport: true, index: 12} dosageInstruction: type: Dosage mustSupport: true index: 57 elements: additionalInstruction: {index: 58} patientInstruction: {index: 59} groupIdentifier: short: groupIdentifier (Short Form Prescription ID) mustSupport: true index: 45 extensions: PrescriptionOrderUUID: url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId type: Extension short: UUID order number for grouped MedciationRequests index: 47 elements: value[x]: elements: system: {index: 48} value: {index: 49} required: [value, system] elements: extension: index: 46 slicing: rules: open discriminator: - {path: url, type: value} min: 1 slices: PrescriptionOrderUUID: match: {url: null} schema: type: Extension short: UUID order number for grouped MedciationRequests url: https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId index: 47 elements: value[x]: elements: system: {index: 48} value: {index: 49} required: [value, system] system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/prescription-order-number'} index: 50 value: {index: 51} required: [extension, value, system] recorder: type: Reference constraint: eps-4: {human: recorder - An identifier reference or resource reference must be provided, severity: error, expression: (reference.exists() or (identifier.exists()))} refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner'] index: 40 identifier: short: Each MedicationRequest MUST be identified by an Universal Unique Identifiers (UUIDs) with a system of https://fhir.nhs.uk/Id/prescription-order-item-number mustSupport: true index: 8 slicing: rules: open discriminator: - {path: system, type: value} min: 1 slices: prescriptionOrderItem: match: {system: 'https://fhir.nhs.uk/Id/prescription-order-item-number'} schema: short: Prescription Order Item _required: true index: 9 elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/prescription-order-item-number'} index: 10 value: {index: 11} required: [value, system] intent: {index: 18} basedOn: type: Reference mustSupport: true refers: ['http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation', 'https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest'] index: 41 extensions: repeatInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', min: 0, max: 1, short: Additional repeatInformation, type: Extension, mustSupport: true, index: 43} orignalPrescriptionId: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId', min: 0, type: Extension, isModifier: false, index: 44} elements: extension: index: 42 slicing: rules: open discriminator: - {path: url, type: value} min: 0 slices: repeatInformation: match: {url: null} schema: {short: Additional repeatInformation, type: Extension, mustSupport: true, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation', index: 43} min: 0 max: 1 orignalPrescriptionId: match: {url: null} schema: {type: Extension, isModifier: false, url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId', index: 44} min: 0 medicationReference: type: Reference mustSupport: true choiceOf: medication refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Medication'] index: 30 courseOfTherapyType: binding: {strength: required, valueSet: 'https://fhir.nhs.uk/ValueSet/DM-medicationrequest-course-of-therapy'} mustSupport: true index: 52 elements: coding: index: 53 elements: system: {index: 54} code: {index: 55} required: [system, code] required: [coding] subject: type: Reference constraint: 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 refers: ['https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient-PDS'] index: 31 elements: reference: {index: 32} identifier: elements: system: pattern: {type: Uri, value: 'https://fhir.nhs.uk/Id/nhs-number'} index: 33 value: {index: 34} required: [value, system] required: [reference] performer: {type: Reference, index: 39} medication: mustSupport: true choices: [medicationCodeableConcept, medicationReference] index: 28 package_version: 2.8.9-prerelease extensions: medicationRepeatInformation: {url: null, min: 0, short: Continous and Continuous Repeat Dispensing, mustSupport: true, index: 1} responsiblePractitioner: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner', min: 0, max: 1, short: Responsible Practitioner for the prescription, type: Extension, mustSupport: true, index: 2} prescriptionEndorsement: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionEndorsement', min: 0, type: Extension, short: NHS BSA Prescription Endorsements, mustSupport: true, index: 3} prescriptionTaskStatusReason: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory', min: 0, type: Extension, short: Prescription task status reason, mustSupport: true, index: 4} NHSBSAprescriptionType: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType', min: 1, type: Extension, short: NHS BSA Prescription Type, mustSupport: true, index: 5} controlledDrug: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug', min: 0, max: 1, short: Optional Controlled Drug Extensions, type: Extension, mustSupport: true, index: 6} dispensingInformation: {url: 'https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation', min: 0, max: 1, short: For EPS use only, type: Extension, mustSupport: true, index: 7} class: profile kind: resource url: https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest base: https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationRequest version: null required: [authoredOn, dosageInstruction, requester, extension, groupIdentifier, identifier, courseOfTherapyType, dispenseRequest, category]