{ "description": null, "_filename": "NHSDigital-MedicationRequest.StructureDefinition.json", "package_name": "uk.nhsdigital.r4.test", "date": null, "derivation": "constraint", "publisher": null, "fhirVersion": "4.0.1", "name": "NHSDigitalMedicationRequest", "abstract": false, "type": "MedicationRequest", "experimental": null, "resourceType": "StructureDefinition", "title": null, "package_version": "2.8.7-prerelease", "status": "draft", "id": "4b78f57e-8ebe-45b8-a433-f8ac988d3d39", "kind": "resource", "url": "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest", "version": null, "differential": { "element": [ { "id": "MedicationRequest", "path": "MedicationRequest", "constraint": [ { "key": "eps-1", "human": "medication[x] - Only one of medicationReference or medicationCodeableConcept should be provided", "severity": "error", "expression": "(medicationReference.exists() and medicationCodeableConcept.exists().not()) or (medicationReference.exists().not() and medicationCodeableConcept.exists())" }, { "key": "eps-5", "human": "Extension(responsiblePractitioner) - An identifier or resource reference must be provided", "severity": "error", "expression": "extension('https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner').exists().not() or (extension('https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner').value.reference.exists() or extension('https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner').value.system.exists())" }, { "key": "eps-7", "human": "For continuous-repeat-dispensing intent must be reflex-order or original-order", "severity": "warning", "expression": "(courseOfTherapyType.coding.code != 'continuous-repeat-dispensing') or ((courseOfTherapyType.coding.code = 'continuous-repeat-dispensing') and ((intent ='original-order') or (intent ='reflex-order')))" }, { "key": "eps-8", "human": "For continuous intent must be instance-order or original-order", "severity": "error", "expression": "(courseOfTherapyType.coding.code != 'continuous') or ((courseOfTherapyType.coding.code = 'continuous') and ((intent ='original-order') or (intent ='instance-order')))" }, { "key": "eps-9", "human": "dispenseRequest.numberOfRepeatsAllowed should be populated for continuous and continuous-repeat-dispensing MedicationRequests.", "severity": "warning", "expression": "(courseOfTherapyType.coding.code.startsWith('acute')) or (courseOfTherapyType.coding.code.startsWith('continuous') and dispenseRequest.exists() and dispenseRequest.numberOfRepeatsAllowed.exists())" }, { "key": "eps-10", "human": "For continuous-repeat-dispensing (intent=reflex-order) basedOn must be populated", "severity": "error", "expression": "(courseOfTherapyType.coding.code = 'acute') or (courseOfTherapyType.coding.code = 'continuous') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent !='reflex-order') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent ='reflex-order' and dispenseRequest.exists() and basedOn.exists())" }, { "key": "eps-11", "human": "For continuous-repeat-dispensing (intent=reflex-order) or continous orders, numberOfRepeatsAllowed must be empty or equal to 0", "severity": "error", "expression": "(courseOfTherapyType.coding.code = 'acute') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent !='reflex-order') or ((courseOfTherapyType.coding.code = 'continuous' or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent ='reflex-order')) and (dispenseRequest.numberOfRepeatsAllowed.exists().not() or (dispenseRequest.numberOfRepeatsAllowed.exists() and dispenseRequest.numberOfRepeatsAllowed = 0)))" }, { "key": "eps-12", "human": "For continuous issues basedOn should be populated", "severity": "warning", "expression": "(courseOfTherapyType.coding.code = 'acute') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing') or (courseOfTherapyType.coding.code = 'continuous' and dispenseRequest.exists() and basedOn.exists())" }, { "key": "eps-13", "human": "Extension repeatInformation.numberOfPrescriptionsIssued should not be present for continuous-repeat-dispensing that are not intent=reflex-order", "severity": "error", "expression": "(courseOfTherapyType.coding.code != 'continuous-repeat-dispensing') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent='reflex-order') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent!='reflex-order' and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').exists() and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').extension('numberOfPrescriptionsIssued').exists().not())" }, { "key": "eps-14", "human": "Extension repeatInformation.numberOfPrescriptionsIssued should be present for continuous-repeat-dispensing that have intent=reflex-order", "severity": "error", "expression": "(courseOfTherapyType.coding.code != 'continuous-repeat-dispensing') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent != 'reflex-order') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing' and intent='reflex-order' and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').exists() and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').extension('numberOfPrescriptionsIssued').exists())" }, { "key": "eps-15", "human": "Extension repeatInformation.numberOfPrescriptionsIssued is recommend to be present for continuous issues", "severity": "warning", "expression": "(courseOfTherapyType.coding.code != 'continuous') or (courseOfTherapyType.coding.code = 'continuous' and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').exists() and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').extension('numberOfPrescriptionsIssued').exists())" }, { "key": "eps-16", "human": "Extension repeatInformation.numberOfPrescriptionsIssued should not be present for acute issues", "severity": "error", "expression": "(courseOfTherapyType.coding.code != 'acute') or (courseOfTherapyType.coding.code = 'acute' and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').exists().not())" } ] }, { "id": "MedicationRequest.extension", "min": 1, "path": "MedicationRequest.extension", "slicing": { "rules": "open", "discriminator": [ { "path": "url", "type": "value" } ] } }, { "id": "MedicationRequest.extension:medicationRepeatInformation", "min": 0, "path": "MedicationRequest.extension", "short": "Continous and Continuous Repeat Dispensing", "sliceName": "medicationRepeatInformation", "definition": "This extension SHOULD be present for `continuous` and `continuous-repeat-dispensing` therapy types. \r\n\r\n| Field | Description |\r\n|---|---|\r\n| numberOfPrescriptionsIssued | Running total of number of issues made against a repeat authorisation. Including this issue. |\r\n| ~~numberOfRepeatPrescriptionsAllowed~~ | Retired. See numberOfRepeatsAllowed | \r\n| authorisationExpiryDate | The date a repeat prescription authorisation will expire. |\r\n\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation\",\r\n \"extension\": [\r\n {\r\n \"url\": \"numberOfPrescriptionsIssued\",\r\n \"valueUnsignedInt\": 3\r\n },\r\n {\r\n \"url\": \"authorisationExpiryDate\",\r\n \"valueDateTime\": \"2020-08-07\"\r\n }\r\n ]\r\n }\r\n]\r\n```", "mustSupport": true }, { "path": "MedicationRequest.extension", "min": 0, "definition": "Must only be populated if the `requester` can not be responsible for the prescription, i.e. they would not be named as the prescriber on the FP10.\r\n\r\n```json\r\n\"extension\": [\r\n \r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner\",\r\n \"valueReference\": {\r\n \"reference\": \"urn:uuid:a5acefc1-f8ca-4989-a5ac-34ae36741466\",\r\n \"display\": \"DR SAZ RAZ\"\r\n }\r\n }\r\n],\r\n```", "short": "Responsible Practitioner for the prescription", "type": [ { "code": "Extension", "profile": [ "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner" ] } ], "mustSupport": true, "sliceName": "responsiblePractitioner", "max": "1", "id": "MedicationRequest.extension:responsiblePractitioner" }, { "id": "MedicationRequest.extension:prescriptionEndorsement", "min": 0, "path": "MedicationRequest.extension", "type": [ { "code": "Extension", "profile": [ "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionEndorsement" ] } ], "short": "NHS BSA Prescription Endorsements", "sliceName": "prescriptionEndorsement", "definition": "The codes are contained in the valueset\r\n\r\n| Code | Display |\r\n|---|---|\r\n| CC | Contraceptive |\r\n| FS | Sexual Health| \r\n| ACBS | Advisory Committee on Borderline Substances. Part XV Drug Tariff | \r\n| SLS | Selected List Scheme. Part XVIIIB Drug Tariff | \r\n| AF | Food replacement/food supplement products|\r\n\r\n```json\r\n\"resourceType\": \"MedicationRequest\",\r\n \"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionEndorsement\",\r\n \"valueCodeableConcept\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/medicationrequest-endorsement\",\r\n \"code\": \"SLS\",\r\n \"display\": \"Selected List Scheme\"\r\n }\r\n ]\r\n }\r\n }\r\n ],\r\n```", "mustSupport": true }, { "id": "MedicationRequest.extension:prescriptionTaskStatusReason", "min": 0, "path": "MedicationRequest.extension", "type": [ { "code": "Extension", "profile": [ "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory" ] } ], "short": "Prescription task status reason", "sliceName": "prescriptionTaskStatusReason", "definition": "The status history within EPS is primarily a technical Status and the statusReason will reflect current clinical status of the order.", "mustSupport": true }, { "id": "MedicationRequest.extension:NHSBSAprescriptionType", "min": 1, "path": "MedicationRequest.extension", "type": [ { "code": "Extension", "profile": [ "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType" ] } ], "short": "NHS BSA Prescription Type", "sliceName": "NHSBSAprescriptionType", "definition": "The vocabulary for the ‘PrescriptionType’ vocabulary is defined within the NHSBSA Overprint Specification. \r\n\r\nThe System must populate the ‘PrescriptionType’ attribute for the appropriate combination of prescriber and care setting. Retired codes within this vocabulary must not be used\r\n\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType\",\r\n \"valueCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/prescription-type\",\r\n \"code\": \"1201\",\r\n \"display\": \"Outpatient Homecare Prescriber - Medical Prescriber\"\r\n }\r\n }\r\n ]\r\n```", "mustSupport": true }, { "path": "MedicationRequest.extension", "min": 0, "definition": "The table below summarises the EPS requirements for the CD schedules. The terms “Hand signature” and “Electronic signature” expressed in the table are shortened references to the legal definition of signature requirements within government legislation.\r\n\r\n| Sch. | Code | Signing Legal Requirement | EPS Scope | Expiry Date | Quantity Representation | Repeat Dispensing Allowed | RD 1st Issue Expiry | RD Subsequent Expiry |\r\n|---|---|---|---|---|---|---|---|---|\r\n| 1 | CD1 | Invalid to prescribe | Out of scope | N/A | N/A | N/A | N/A ||\r\n| 2 | CD2 | Hand signature or electronic signature | In scope | 28 days | Words and Figures | No | N/A | N/A ||\r\n| 3 | CD3 | Hand signature or electronic signature | In scope | 28 days | Words and Figures | No | N/A | N/A ||\r\n| 4 | CD4-1 CD4-2 | Hand signature or electronic signature | In scope | 28 days | Figures | Yes | 28 days | Up to 12 months |\r\n| 5 | CD5 | Hand signature or electronic signature | In scope | 6 Months | Figures | Yes | 6 months | Up to 12 months |\r\n\r\nIt is a legal requirement to state the prescribed quantity as words in the `quantityWords`\r\n\r\n```json\r\n{\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug\",\r\n \"extension\": [\r\n {\r\n \"url\": \"quantityWords\",\r\n \"valueString\": \"twenty eight\"\r\n },\r\n {\r\n \"url\": \"schedule\",\r\n \"valueCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/medicationrequest-controlled-drug\",\r\n \"code\": \"CD2\",\r\n \"display\": \"Schedule 2\"\r\n }\r\n }\r\n ]\r\n}\r\n```", "short": "Optional Controlled Drug Extensions", "type": [ { "code": "Extension", "profile": [ "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug" ] } ], "mustSupport": true, "sliceName": "controlledDrug", "max": "1", "id": "MedicationRequest.extension:controlledDrug" }, { "path": "MedicationRequest.extension", "min": 0, "definition": "This extension is used in `continuous-repeat-dispensing` prescriptions sent by EPS to dispensing systems to convey information on prior dispensed medications.\r\n\r\n\r\n```json\r\n\"extension\": [\r\n {\r\n \"url\": \"https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation\",\r\n \"extension\": [\r\n {\r\n \"url\": \"dispenseStatus\",\r\n \"valueCoding\": {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/medicationdispense-type\",\r\n \"code\": \"0001\",\r\n \"display\": \"Item fully dispensed\"\r\n }\r\n },\r\n {\r\n \"url\": \"dateLastDispensed\",\r\n \"valueDateTime\": \"2018-04-22T09:57:03+00:00\"\r\n }\r\n ]\r\n }\r\n ],\r\n```", "short": "For EPS use only", "type": [ { "code": "Extension", "profile": [ "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation" ] } ], "mustSupport": true, "sliceName": "dispensingInformation", "max": "1", "id": "MedicationRequest.extension:dispensingInformation" }, { "id": "MedicationRequest.identifier", "min": 1, "path": "MedicationRequest.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", "slicing": { "rules": "open", "discriminator": [ { "path": "system", "type": "value" } ] }, "definition": "UUID example (for illustration purposes only);\r\n\r\na54219b8-f741-4c47-b662-e4f8dfa49ab6\r\n\r\n```json\r\n \"identifier\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/Id/prescription-order-item-number\",\r\n \"value\": \"a54219b8-f741-4c47-b662-e4f8dfa49ab6\"\r\n }\r\n]\r\n```", "mustSupport": true }, { "id": "MedicationRequest.identifier:prescriptionOrderItem", "max": "1", "min": 1, "path": "MedicationRequest.identifier", "short": "Prescription Order Item", "sliceName": "prescriptionOrderItem", "definition": "Unique Id of the MedicationRequest within EPS" }, { "id": "MedicationRequest.identifier:prescriptionOrderItem.system", "min": 1, "path": "MedicationRequest.identifier.system", "fixedUri": "https://fhir.nhs.uk/Id/prescription-order-item-number" }, { "id": "MedicationRequest.identifier:prescriptionOrderItem.value", "min": 1, "path": "MedicationRequest.identifier.value" }, { "id": "MedicationRequest.status", "path": "MedicationRequest.status", "short": "active | cancelled | stopped", "definition": "A code specifying the current state of the order. Generally, this will be active or completed state. \r\n\r\n| code | Definition |\r\n|--|--|\r\n| active | The prescription is 'actionable', but not all actions that are implied by it have occurred yet. It has not been dispensed or filled. |\r\n| cancelled | The prescription is to be cancelled or it has been cancelled been withdrawn before any administrations have occurred. Prescriptions in the process of being cancelled will be regarded as active until all actions are complete. |\r\n| stopped | Actions implied by the prescription are to be permanently halted, before all of the administrations occurred. This should not be used if the original order was entered in error|\r\n|completed|All actions that are implied by the prescription have occurred.|\r\n\r\n\r\n### Logical medicationRequest status transitions\r\n\r\nThis state transition diagram is an enhancement over the generic State Machine defined within the FHIR specification. It includes the status values associated with a medication request with transitions applicable to a UK implementation.\r\n\r\n", "mustSupport": true }, { "id": "MedicationRequest.statusReason", "path": "MedicationRequest.statusReason", "binding": { "strength": "required", "valueSet": "https://fhir.nhs.uk/ValueSet/DM-medicationrequest-status-reason" }, "definition": "This is generally only used for exception statuses such as `suspended` or `cancelled`. It is the clinical status reason for the cancellation.\r\n\r\nThis is mandatory for 'prescription-order-update' messages.\r\n\r\n```json\r\n\"statusReason\": {\r\n \"coding\": [\r\n {\r\n \"system\": \"https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason\",\r\n \"code\": \"0001\",\r\n \"display\": \"Prescribing Error\"\r\n }\r\n ]\r\n},\r\n```", "mustSupport": true }, { "id": "MedicationRequest.statusReason.coding", "max": "1", "min": 1, "path": "MedicationRequest.statusReason.coding" }, { "id": "MedicationRequest.statusReason.coding.system", "min": 1, "path": "MedicationRequest.statusReason.coding.system" }, { "id": "MedicationRequest.statusReason.coding.code", "min": 1, "path": "MedicationRequest.statusReason.coding.code" }, { "id": "MedicationRequest.statusReason.coding.display", "min": 1, "path": "MedicationRequest.statusReason.coding.display" }, { "id": "MedicationRequest.intent", "path": "MedicationRequest.intent", "comment": "Indicates the type of order. A code specifying the current state of the order. Generally, this will be active or completed state. \r\n\r\n| code | display | courseOfTherapyType | Definition |\r\n|---|---|\r\n| order | Order | acute | The request represents a request/demand and authorization for action |\r\n| original-order | Original Order | continuous-repeat-dispensing continuous | The request represents the original authorization for the medication request. |\r\n| reflex-order |Reflex Order | continuous-repeat-dispensing | The request represents an automatically generated supplemental authorization (by EPS) for action based on a parent authorization together with initial results of the action taken against that parent authorization. |\r\n| instance-order | Instance Order | continuous | The request represents an instance for the particular order. |" }, { "id": "MedicationRequest.category", "min": 1, "path": "MedicationRequest.category", "definition": "In primary care the code of `community` should be used. In secondary care the category will often match the Episode/Spell type.\r\n\r\n| Code | System | Display |\r\n|---|---|\r\n| leave | https://fhir.nhs.uk/CodeSystem/medicationrequest-category | Leave |\r\n|outpatient | http://terminology.hl7.org/CodeSystem/medicationrequest-category |Outpatient |\r\n| discharge | http://terminology.hl7.org/CodeSystem/medicationrequest-category | Discharge |\r\n| community |http://terminology.hl7.org/CodeSystem/medicationrequest-category | Community |\r\n| inpatient |http://terminology.hl7.org/CodeSystem/medicationrequest-category | Inpatient |\r\n\r\n```json\r\n\"category\": [\r\n {\r\n \"coding\": [\r\n {\r\n \"system\": \"http://terminology.hl7.org/CodeSystem/medicationrequest-category\",\r\n \"code\": \"outpatient\",\r\n \"display\": \"Outpatient\"\r\n }\r\n ]\r\n }\r\n],\r\n```", "mustSupport": true }, { "id": "MedicationRequest.category.coding", "max": "1", "min": 1, "path": "MedicationRequest.category.coding", "slicing": { "rules": "open", "discriminator": [ { "path": "system", "type": "value" } ] } }, { "id": "MedicationRequest.category.coding:patientClassFHIR", "max": "1", "path": "MedicationRequest.category.coding", "binding": { "strength": "required", "valueSet": "https://fhir.nhs.uk/ValueSet/DM-medicationrequest-category" }, "sliceName": "patientClassFHIR" }, { "id": "MedicationRequest.category.coding:patientClassFHIR.system", "min": 1, "path": "MedicationRequest.category.coding.system", "fixedUri": "http://terminology.hl7.org/CodeSystem/medicationrequest-category" }, { "id": "MedicationRequest.category.coding:patientClassFHIR.code", "min": 1, "path": "MedicationRequest.category.coding.code" }, { "id": "MedicationRequest.category.coding:patientClassUK", "max": "1", "path": "MedicationRequest.category.coding", "binding": { "strength": "required", "valueSet": "https://fhir.nhs.uk/ValueSet/DM-medicationrequest-category" }, "sliceName": "patientClassUK" }, { "id": "MedicationRequest.category.coding:patientClassUK.system", "min": 1, "path": "MedicationRequest.category.coding.system", "fixedUri": "https://fhir.nhs.uk/CodeSystem/medicationrequest-category" }, { "id": "MedicationRequest.category.coding:patientClassUK.code", "min": 1, "path": "MedicationRequest.category.coding.code" }, { "id": "MedicationRequest.medication[x]", "path": "MedicationRequest.medication[x]", "type": [ { "code": "CodeableConcept", "profile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-CodeableConcept" ] }, { "code": "Reference", "aggregation": [ "bundled" ], "targetProfile": [ "https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Medication" ] } ], "binding": { "strength": "extensible", "valueSet": "https://fhir.nhs.uk/ValueSet/NHSDigital-MedicationCode" }, "comment": "Any code from the SnomedCT UK DMD subset for VMP, AMP and VTM concepts\r\n\r\n
\r\ndm+d Category\r\n | \r\n\r\ndm+d Description\r\n | \r\n\r\nUK SNOMED Members Of\r\n | \r\n\r\n\r\n
---|---|---|
\r\nVMP\r\n | \r\n\r\nVirtual Medical Product\r\n | \r\n\r\n999000561000001109\r\n | \r\n
\r\nAMP\r\n | \r\n\r\nActual Medical Product\r\n | \r\n\r\n999000541000001108\r\n | \r\n
It could be unwise to assume all UK implementations will prevent substitution if not explicitly stated, especially if the same clinical system has been previously implemented outside the UK.
UK Core has profiled this element as MANDATORY and MUST have a default boolean value of false
to denote substitution is not allowed.
Where substitution to be be allowed, set to true
. The inclusion of the coded reason is optional as the valueset defined in FHIR is of limited benefit to UK healthcare.