Validator
LOG IN
SIGN UP
Scope
package:hl7.fhir.r4.core@4.0.1
Readonly
If you
Log in
or
sign up
, you can edit this script yourself.
<StructureDefinition xmlns="http://hl7.org/fhir"> <id value="NHSDigital-MedicationRequest" /> <url value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" /> <version value="1.0.2" /> <name value="NHSDigitalMedicationRequest" /> <title value="NHS Digital MedicationRequest" /> <status value="draft" /> <date value="2025-04-03T13:51:00+00:00" /> <publisher value="NHS England" /> <contact> <name value="NHS England" /> <telecom> <system value="email" /> <value value="interoperabilityteam@nhs.net" /> <use value="work" /> <rank value="1" /> </telecom> </contact> <description value="This profile defines the NHS England constraints and extensions on the International FHIR resource [MedicationRequest](https://hl7.org/fhir/R4/medicationrequest.html)." /> <purpose value="This profile is used to facilitate the management of the request lifecyle processes of a prescription." /> <copyright value="Copyright &#169; 2025+ NHS England Licensed under the Apache License, Version 2.0 (the \&quot;License\&quot;); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \&quot;AS IS\&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. HL7&#174; FHIR&#174; standard Copyright &#169; 2011+ HL7 The HL7&#174; FHIR&#174; standard is used under the FHIR license. You may obtain a copy of the FHIR license at https://www.hl7.org/fhir/license.html." /> <fhirVersion value="4.0.1" /> <kind value="resource" /> <abstract value="false" /> <type value="MedicationRequest" /> <baseDefinition value="https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationRequest" /> <derivation value="constraint" /> <differential> <element id="MedicationRequest"> <path value="MedicationRequest" /> <constraint> <key value="eps-1" /> <severity value="error" /> <human value="medication[x] - Only one of medicationReference or medicationCodeableConcept should be provided" /> <expression value="(medicationReference.exists() and medicationCodeableConcept.exists().not()) or (medicationReference.exists().not() and medicationCodeableConcept.exists())" /> </constraint> <constraint> <key value="eps-5" /> <severity value="error" /> <human value="Extension(responsiblePractitioner) - An identifier or resource reference must be provided" /> <expression value="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())" /> </constraint> <constraint> <key value="eps-7" /> <severity value="warning" /> <human value="For continuous-repeat-dispensing intent must be reflex-order or original-order" /> <expression value="(courseOfTherapyType.coding.code != 'continuous-repeat-dispensing') or ((courseOfTherapyType.coding.code = 'continuous-repeat-dispensing') and ((intent ='original-order') or (intent ='reflex-order')))" /> </constraint> <constraint> <key value="eps-8" /> <severity value="error" /> <human value="For continuous intent must be instance-order or original-order" /> <expression value="(courseOfTherapyType.coding.code != 'continuous') or ((courseOfTherapyType.coding.code = 'continuous') and ((intent ='original-order') or (intent ='instance-order')))" /> </constraint> <constraint> <key value="eps-9" /> <severity value="warning" /> <human value="dispenseRequest.numberOfRepeatsAllowed should be populated for continuous and continuous-repeat-dispensing MedicationRequests." /> <expression value="(courseOfTherapyType.coding.code.startsWith('acute')) or (courseOfTherapyType.coding.code.startsWith('continuous') and dispenseRequest.exists() and dispenseRequest.numberOfRepeatsAllowed.exists())" /> </constraint> <constraint> <key value="eps-10" /> <severity value="error" /> <human value="For continuous-repeat-dispensing (intent=reflex-order) basedOn must be populated" /> <expression value="(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())" /> </constraint> <constraint> <key value="eps-11" /> <severity value="error" /> <human value="For continuous-repeat-dispensing (intent=reflex-order) or continous orders, numberOfRepeatsAllowed must be empty or equal to 0" /> <expression value="(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)))" /> </constraint> <constraint> <key value="eps-12" /> <severity value="warning" /> <human value="For continuous issues basedOn should be populated" /> <expression value="(courseOfTherapyType.coding.code = 'acute') or (courseOfTherapyType.coding.code = 'continuous-repeat-dispensing') or (courseOfTherapyType.coding.code = 'continuous' and dispenseRequest.exists() and basedOn.exists())" /> </constraint> <constraint> <key value="eps-13" /> <severity value="error" /> <human value="Extension repeatInformation.numberOfPrescriptionsIssued should not be present for continuous-repeat-dispensing that are not intent=reflex-order" /> <expression value="(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().not()) 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())" /> </constraint> <constraint> <key value="eps-14" /> <severity value="error" /> <human value="Extension repeatInformation.numberOfPrescriptionsIssued should be present for continuous-repeat-dispensing that have intent=reflex-order" /> <expression value="(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())" /> </constraint> <constraint> <key value="eps-15" /> <severity value="warning" /> <human value="Extension repeatInformation.numberOfPrescriptionsIssued is recommend to be present for continuous issues" /> <expression value="(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())" /> </constraint> <constraint> <key value="eps-16" /> <severity value="error" /> <human value="Extension repeatInformation.numberOfPrescriptionsIssued should not be present for acute issues" /> <expression value="(courseOfTherapyType.coding.code != 'acute') or (courseOfTherapyType.coding.code = 'acute' and extension('https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation').exists().not())" /> </constraint> </element> <element id="MedicationRequest.extension:medicationRepeatInformation"> <path value="MedicationRequest.extension" /> <sliceName value="medicationRepeatInformation" /> <short value="Continous and Continuous Repeat Dispensing" /> <definition value="This extension <b>SHOULD</b> be present for `continuous` and `continuous-repeat-dispensing` therapy types. 

| Field | Description |
|---|---|
| numberOfPrescriptionsIssued | Running total of number of issues made against a repeat authorisation. Including this issue. |
| ~~numberOfRepeatPrescriptionsAllowed~~ | Retired. See <a href="#numberOfRepeatsAllowed">numberOfRepeatsAllowed</a> | 
| authorisationExpiryDate | The date a repeat prescription authorisation will expire. |

```json
"extension": [
 {
 "url": "https://fhir.hl7.org.uk/StructureDefinition/Extension-UKCore-MedicationRepeatInformation",
 "extension": [
 {
 "url": "numberOfPrescriptionsIssued",
 "valueUnsignedInt": 3
 },
 {
 "url": "authorisationExpiryDate",
 "valueDateTime": "2020-08-07"
 }
 ]
 }
]
```" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.extension:responsiblePractitioner"> <path value="MedicationRequest.extension" /> <sliceName value="responsiblePractitioner" /> <short value="Responsible Practitioner for the prescription" /> <definition value="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.

```json
"extension": [
 
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner",
 "valueReference": {
 "reference": "urn:uuid:a5acefc1-f8ca-4989-a5ac-34ae36741466",
 "display": "DR SAZ RAZ"
 }
 }
],
```" /> <max value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-ResponsiblePractitioner" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.extension:prescriptionEndorsement"> <path value="MedicationRequest.extension" /> <sliceName value="prescriptionEndorsement" /> <short value="NHS BSA Prescription Endorsements" /> <definition value="The codes are contained in the valueset

| Code | Display |
|---|---|
| CC | Contraceptive |
| FS | Sexual Health| 
| ACBS | Advisory Committee on Borderline Substances. Part XV Drug Tariff | 
| SLS | Selected List Scheme. Part XVIIIB Drug Tariff | 
| AF | Food replacement/food supplement products|

```json
"resourceType": "MedicationRequest",
 "extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionEndorsement",
 "valueCodeableConcept": {
 "coding": [
 {
 "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-endorsement",
 "code": "SLS",
 "display": "Selected List Scheme"
 }
 ]
 }
 }
 ],
```" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionEndorsement" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.extension:NHSBSAprescriptionType"> <path value="MedicationRequest.extension" /> <sliceName value="NHSBSAprescriptionType" /> <short value="NHS BSA Prescription Type" /> <definition value="The vocabulary for the ‘PrescriptionType’ vocabulary is defined within the NHSBSA Overprint Specification. 

The System must populate the ‘PrescriptionType’ attribute for the appropriate combination of prescriber and care setting. Retired codes within this vocabulary must not be used

```json
"extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType",
 "valueCoding": {
 "system": "https://fhir.nhs.uk/CodeSystem/prescription-type",
 "code": "1201",
 "display": "Outpatient Homecare Prescriber - Medical Prescriber"
 }
 }
 ]
```" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionType" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.extension:controlledDrug"> <path value="MedicationRequest.extension" /> <sliceName value="controlledDrug" /> <short value="Optional Controlled Drug Extensions" /> <definition value="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.

| Sch. | Code | Signing Legal Requirement | EPS Scope | Expiry Date | Quantity Representation | Repeat Dispensing Allowed | RD 1st Issue Expiry | RD Subsequent Expiry |
|---|---|---|---|---|---|---|---|---|
| 1 | CD1 | Invalid to prescribe | Out of scope | N/A | N/A | N/A | N/A ||
| 2 | CD2 | Hand signature or electronic signature | In scope | 28 days | Words and Figures | No | N/A | N/A ||
| 3 | CD3 | Hand signature or electronic signature | In scope | 28 days | Words and Figures | No | N/A | N/A ||
| 4 | CD4-1 CD4-2 | Hand signature or electronic signature | In scope | 28 days | Figures | Yes | 28 days | Up to 12 months |
| 5 | CD5 | Hand signature or electronic signature | In scope | 6 Months | Figures | Yes | 6 months | Up to 12 months |

It is a legal requirement to state the prescribed quantity as words in the `quantityWords`

```json
{
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug",
 "extension": [
 {
 "url": "quantityWords",
 "valueString": "twenty eight"
 },
 {
 "url": "schedule",
 "valueCoding": {
 "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-controlled-drug",
 "code": "CD2",
 "display": "Schedule 2"
 }
 }
 ]
}
```" /> <max value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-ControlledDrug" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.extension:dispensingInformation"> <path value="MedicationRequest.extension" /> <sliceName value="dispensingInformation" /> <short value="For EPS use only" /> <definition value="This extension is used in `continuous-repeat-dispensing` prescriptions sent by EPS to dispensing systems to convey information on prior dispensed medications.


```json
"extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation",
 "extension": [
 {
 "url": "dispenseStatus",
 "valueCoding": {
 "system": "https://fhir.nhs.uk/CodeSystem/medicationdispense-type",
 "code": "0001",
 "display": "Item fully dispensed"
 }
 },
 {
 "url": "dateLastDispensed",
 "valueDateTime": "2018-04-22T09:57:03+00:00"
 }
 ]
 }
 ],
```" /> <max value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-DispensingInformation" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.extension:prescriptionStatusHistory"> <path value="MedicationRequest.extension" /> <sliceName value="prescriptionStatusHistory" /> <definition value="The status history within EPS is primarily a technical Status and the statusReason will reflect current clinical status of the order." /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionStatusHistory" /> </type> <isModifier value="false" /> </element> <element id="MedicationRequest.identifier"> <path value="MedicationRequest.identifier" /> <slicing> <discriminator> <type value="value" /> <path value="system" /> </discriminator> <rules value="open" /> </slicing> <short value="Each MedicationRequest MUST be identified by an Universal Unique Identifiers (UUIDs) with a system of https://fhir.nhs.uk/Id/prescription-order-item-number" /> <definition value="UUID example (for illustration purposes only);

a54219b8-f741-4c47-b662-e4f8dfa49ab6

```json
 "identifier": [
 {
 "system": "https://fhir.nhs.uk/Id/prescription-order-item-number",
 "value": "a54219b8-f741-4c47-b662-e4f8dfa49ab6"
 }
]
```" /> <min value="1" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.identifier:prescriptionOrderItem"> <path value="MedicationRequest.identifier" /> <sliceName value="prescriptionOrderItem" /> <short value="Prescription Order Item" /> <definition value="Unique Id of the MedicationRequest within EPS" /> <min value="1" /> <max value="1" /> </element> <element id="MedicationRequest.identifier:prescriptionOrderItem.system"> <path value="MedicationRequest.identifier.system" /> <min value="1" /> <fixedUri value="https://fhir.nhs.uk/Id/prescription-order-item-number" /> </element> <element id="MedicationRequest.identifier:prescriptionOrderItem.value"> <path value="MedicationRequest.identifier.value" /> <min value="1" /> </element> <element id="MedicationRequest.status"> <path value="MedicationRequest.status" /> <short value="active | cancelled | stopped" /> <definition value="A code specifying the current state of the order. Generally, this will be active or completed state. 

| code | Definition |
|--|--|
| active | The prescription is 'actionable', but not all actions that are implied by it have occurred yet. It has not been dispensed or filled. |
| 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. |
| 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|
|completed|All actions that are implied by the prescription have occurred.|


### Logical medicationRequest status transitions

This 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.

<img src="https://github.com/NHSDigital/NHSDigital-FHIR-ImplementationGuide/blob/master/Diagams/medication-request-status-flow.png?raw=true" width="100%" hieght="auto"/>" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.statusReason"> <path value="MedicationRequest.statusReason" /> <definition value="This is generally only used for exception statuses such as `suspended` or `cancelled`. It is the clinical status reason for the cancellation.

This is mandatory for 'prescription-order-update' messages.

```json
"statusReason": {
 "coding": [
 {
 "system": "https://fhir.nhs.uk/CodeSystem/medicationrequest-status-reason",
 "code": "0001",
 "display": "Prescribing Error"
 }
 ]
},
```" /> <mustSupport value="true" /> <binding> <strength value="required" /> <valueSet value="https://fhir.nhs.uk/ValueSet/DM-medicationrequest-status-reason" /> </binding> </element> <element id="MedicationRequest.statusReason.coding"> <path value="MedicationRequest.statusReason.coding" /> <min value="1" /> <max value="1" /> </element> <element id="MedicationRequest.statusReason.coding.system"> <path value="MedicationRequest.statusReason.coding.system" /> <min value="1" /> </element> <element id="MedicationRequest.statusReason.coding.code"> <path value="MedicationRequest.statusReason.coding.code" /> <min value="1" /> </element> <element id="MedicationRequest.statusReason.coding.display"> <path value="MedicationRequest.statusReason.coding.display" /> <min value="1" /> </element> <element id="MedicationRequest.intent"> <path value="MedicationRequest.intent" /> <comment value="Indicates the type of order. A code specifying the current state of the order. Generally, this will be active or completed state. 

| code | display | courseOfTherapyType | Definition |
|---|---|
| order | Order | acute | The request represents a request/demand and authorization for action |
| original-order | Original Order | continuous-repeat-dispensing continuous | The request represents the original authorization for the medication request. |
| 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. |
| instance-order | Instance Order | continuous | The request represents an instance for the particular order. |" /> </element> <element id="MedicationRequest.category"> <path value="MedicationRequest.category" /> <definition value="In primary care the code of `community` should be used. In secondary care the category will often match the Episode/Spell type.

| Code | System | Display |
|---|---|
| leave | https://fhir.nhs.uk/CodeSystem/medicationrequest-category | Leave |
|outpatient | http://terminology.hl7.org/CodeSystem/medicationrequest-category |Outpatient |
| discharge | http://terminology.hl7.org/CodeSystem/medicationrequest-category | Discharge |
| community |http://terminology.hl7.org/CodeSystem/medicationrequest-category | Community |
| inpatient |http://terminology.hl7.org/CodeSystem/medicationrequest-category | Inpatient |

```json
"category": [
 {
 "coding": [
 {
 "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
 "code": "outpatient",
 "display": "Outpatient"
 }
 ]
 }
],
```" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.category.coding"> <path value="MedicationRequest.category.coding" /> <min value="1" /> <max value="1" /> <binding> <strength value="required" /> <valueSet value="https://fhir.nhs.uk/ValueSet/DM-medicationrequest-category" /> </binding> </element> <element id="MedicationRequest.medication[x]"> <path value="MedicationRequest.medication[x]" /> <definition value="Only Virtual Medical Products (VMP) and Actual Medical Products (AMP) can be used." /> <comment value="Any code from the SnomedCT UK DMD subset for VMP, AMP and VTM concepts

<table>
<thead>
<th data-no-sort width="25%">
dm+d Category
</th>
<th data-no-sort width="50%">
dm+d Description
</th>
<th data-no-sort width="25%">
UK SNOMED Members Of
</th>

</thead>
<tr>
<td>
VMP
</td>
<td>
Virtual Medical Product
</td>
<td>
<a href="https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000561000001109" target="_blank">999000561000001109</a>
</td>
</tr>
<tr>
<td>
AMP
</td>
<td>
Actual Medical Product
</td>
<td>
<a href="https://termbrowser.nhs.uk/?perspective=full&conceptId1=999000541000001108" target="_blank">999000541000001108</a>
</td>
</tr>
</table>" /> <type> <code value="CodeableConcept" /> <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-CodeableConcept" /> </type> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest-Medication" /> <aggregation value="bundled" /> </type> <mustSupport value="true" /> <binding> <strength value="extensible" /> <valueSet value="https://fhir.nhs.uk/ValueSet/NHSDigital-MedicationCode" /> </binding> </element> <element id="MedicationRequest.subject"> <path value="MedicationRequest.subject" /> <definition value="A resource reference to a Patient with a traced NHS Number is required, an untraced NHS Number **MUST NOT** be used.

```json
 "subject": {
 "type": "Patient",
 "reference": "urn:uuid:bde9eba6-079f-4210-8108-6ea8db58de8c",
 "display": "Miss Bernie Kanfeld"
 }
```" /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Patient-PDS" /> </type> <constraint> <key value="patient-nhs" /> <severity value="error" /> <human value="Length of the supplied NHS Number is wrong." /> <expression value="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})$'))" /> </constraint> <mustSupport value="true" /> </element> <element id="MedicationRequest.subject.identifier.system"> <path value="MedicationRequest.subject.identifier.system" /> <min value="1" /> <fixedUri value="https://fhir.nhs.uk/Id/nhs-number" /> </element> <element id="MedicationRequest.subject.identifier.value"> <path value="MedicationRequest.subject.identifier.value" /> <min value="1" /> </element> <element id="MedicationRequest.encounter"> <path value="MedicationRequest.encounter" /> <definition value="Encounter is required for secondary care prescriptions." /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Encounter" /> </type> </element> <element id="MedicationRequest.authoredOn"> <path value="MedicationRequest.authoredOn" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.requester"> <path value="MedicationRequest.requester" /> <definition value="The requester must contain a resource reference to the Practitioner who has electronically signed the prescription.

If the `requester` can not take responsibility for the prescription, i.e. they would not be the prescriber on the FP10. Then the **extension responsiblePractitioner** must be populated.

```json
"requester": {
 "reference": "urn:uuid:56166769-c1c4-4d07-afa8-132b5dfca666"
},
```" /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole" /> </type> <constraint> <key value="eps-3" /> <severity value="error" /> <human value="requester - An identifier reference or resource reference must be provided" /> <expression value="(reference.exists() or (identifier.exists()))" /> </constraint> <mustSupport value="true" /> </element> <element id="MedicationRequest.requester.reference"> <path value="MedicationRequest.requester.reference" /> <min value="1" /> </element> <element id="MedicationRequest.performer"> <path value="MedicationRequest.performer" /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-PractitionerRole" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner" /> </type> </element> <element id="MedicationRequest.recorder"> <path value="MedicationRequest.recorder" /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Practitioner" /> </type> <constraint> <key value="eps-4" /> <severity value="error" /> <human value="recorder - An identifier reference or resource reference must be provided" /> <expression value="(reference.exists() or (identifier.exists()))" /> </constraint> </element> <element id="MedicationRequest.reasonCode"> <path value="MedicationRequest.reasonCode" /> <comment value="This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonReference.

For EPS interactions, until further notice DO NOT USE this element for indication/reason as the information will not be seen by EPS dispensing systems due to the background conversion of data into the HL7v3 representation. Instead, this information can be added to the Dosage.text element." /> </element> <element id="MedicationRequest.reasonReference"> <path value="MedicationRequest.reasonReference" /> <definition value="Condition or observation that supports why the medication was ordered.

For EPS interactions, until further notice DO NOT USE this element for indication/reason as the information will not be seen by EPS dispensing systems due to the background conversion of data into the HL7v3 representation. Instead, this information can be added to the Dosage.text element." /> </element> <element id="MedicationRequest.basedOn"> <path value="MedicationRequest.basedOn" /> <definition value="This MUST be populated for `continuous-repeat-dispensing` issues where intent=`reflex-order`, i.e. the issues sent from EPS to pharmacists.
It is recommended this is populated for `continuous` issues and this should reference the original order.

Example for a `reflex-order` (continuous-repeat-dispensing): 

```json
 "basedOn": [
 {
 "extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation",
 "extension": [
 {
 "url": "numberOfRepeatsAllowed",
 "valueInteger": 6
 }
 ]
 }
 ],
 "identifier": {
 "system": "https://fhir.nhs.uk/Id/prescription-order-item-number",
 "value": "A7B86F8D-1D59-FC28-E050-D20AE3A215F0"
 }
 }
 ]
```

Example for a `instance-order` (continuous). Note this references an example MedicationRequest from GP Connect:

```json
 "basedOn": [
 {
 "extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation",
 "extension": [
 {
 "url": "numberOfRepeatsAllowed",
 "valueInteger": 5
 }
 ]
 }
 ],
 "identifier": {
 "system": "https://provider.nhs.uk/data-identifier",
 "value": "53426283749629"
 }
 }
 ]
```" /> <type> <code value="Reference" /> <targetProfile value="http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-MedicationRequest" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.basedOn.extension:repeatInformation"> <path value="MedicationRequest.basedOn.extension" /> <sliceName value="repeatInformation" /> <short value="Additional repeatInformation" /> <definition value="The extension `numberOfRepeatsIssued` should not be populated.

The meaning of `numberOfRepeatsAllowed` is the same as the dispensingRequest.numberOfRepeatsAllowed i.e. 

An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense.

```json
"extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation",
 "extension": [
 {
 "url": "numberOfRepeatsAllowed",
 "valueInteger": 2
 }
 ]
 }
 ]
```" /> <max value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-EPS-RepeatInformation" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.groupIdentifier"> <path value="MedicationRequest.groupIdentifier" /> <short value="groupIdentifier (Short Form Prescription ID)" /> <definition value="The purpose of the Short Form Prescription ID is to identify the prescription during its lifecycle within the Spine (i.e. prescribe, dispense & claim). The prescription UUID is retained to provide the link through to the Spine medication record within the PSIS and must be included as the first identifier within the prescription message.
The format of the Short Form Prescription ID is as follows;

`<RandomNumber>-<PracticeODSCode/ClinicODSCode>-<PracticeSequence/ClinicSequence><CheckDigit>`

Where;

`<RandomNumber>` is a locally generated random number each time a Prescription ID is generated of length 6 hexadecimal characters.

`<PracticeODSCode/ClinicODSCode>` is the unique ODS code for the practice or clinic code (aka cost centre) as defined within the Spine SDS of length 6 characters. Where the prescriber ODS code is shorter than 6 characters it must be zero-padded up to six characters from the start of the ODS code, e.g. “0A1B2C”.

`<PracticeSequence/ClinicSequence>` is an incremental sequence number starting from 00000 that is reset after FFFFF back to zero of length 5 hexadecimal characters. For systems that support multiple practices or clinics, a sequence number per practice/clinic is required. This is to ensure uniqueness of prescriptions within the Spine EPS component during the prescription lifecycle.

`<CheckDigit>` is calculated on the entire ID using the ISO/IEC 7064:2003 MOD 37-2 standard. The check digit algorithm is identical to that using for EPS Release 1.

Note. Hyphens are always included to separate the ID into 3 blocks of 6 characters.

Note. The implementation of the MOD 37-2 standard uses a “+” character for char 36 opposed to a “*” character.

Short Form Prescription ID example (for illustration purposes only);

**83C40E-A23856-00123W**

```json
"groupIdentifier": {
 ...
 "system": "https://fhir.nhs.uk/Id/prescription-order-number",
 "value": "DC2C66-A1B2C3-23407B"
},
```" /> <comment value="ITK HL7v3 Mapping = The groupIdentifier is equivalent to ParentPrescription.id (prescription-order-number). The extension is used to carry the ParentPrescription.id (UUID)." /> <min value="1" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.groupIdentifier.extension"> <path value="MedicationRequest.groupIdentifier.extension" /> <min value="1" /> </element> <element id="MedicationRequest.groupIdentifier.extension:PrescriptionOrderUUID"> <path value="MedicationRequest.groupIdentifier.extension" /> <sliceName value="PrescriptionOrderUUID" /> <short value="UUID order number for grouped MedciationRequests" /> <definition value="When UUIDs are used within HL7 messages they must be represented in an upper case human-readable hexadecimal format where hyphen separators are used as per the example below and as defined by the ‘datatype’ schema within the DMS.

UUID example (for illustration purposes only);

**34026084-A445-84AD-2D01-97D69ED25865**

```json
"groupIdentifier": {
 "extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId",
 "valueIdentifier": {
 "system": "https://fhir.nhs.uk/Id/prescription",
 "value": "ad945a29-85f8-439a-b590-6789719adc16"
 }
 }
 ],
 "system": "https://fhir.nhs.uk/Id/prescription-order-number",
 "value": "DC2C66-A1B2C3-23407B"
},
```" /> <min value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-PrescriptionId" /> </type> </element> <element id="MedicationRequest.groupIdentifier.extension:PrescriptionOrderUUID.value[x].system"> <path value="MedicationRequest.groupIdentifier.extension.value[x].system" /> <min value="1" /> </element> <element id="MedicationRequest.groupIdentifier.extension:PrescriptionOrderUUID.value[x].value"> <path value="MedicationRequest.groupIdentifier.extension.value[x].value" /> <min value="1" /> </element> <element id="MedicationRequest.groupIdentifier.system"> <path value="MedicationRequest.groupIdentifier.system" /> <min value="1" /> <fixedUri value="https://fhir.nhs.uk/Id/prescription-order-number" /> </element> <element id="MedicationRequest.groupIdentifier.value"> <path value="MedicationRequest.groupIdentifier.value" /> <min value="1" /> </element> <element id="MedicationRequest.courseOfTherapyType"> <path value="MedicationRequest.courseOfTherapyType" /> <definition value="```json
"courseOfTherapyType": {
 "coding": [
 {
 "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-course-of-therapy",
 "code": "acute",
 "display": "Short course (acute) therapy"
 }
 ]
},
```" /> <comment value="The type of prescription e.g. acute, continuous, etc. Was extension in STU3 https://fhir.hl7.org.uk/STU3/StructureDefinition/Extension-CareConnect-PrescriptionType-1 and Digital Medicine uses international codes, so continuous in place of repeat." /> <min value="1" /> <mustSupport value="true" /> <binding> <strength value="required" /> <valueSet value="https://fhir.nhs.uk/ValueSet/DM-medicationrequest-course-of-therapy" /> </binding> </element> <element id="MedicationRequest.courseOfTherapyType.coding"> <path value="MedicationRequest.courseOfTherapyType.coding" /> <min value="1" /> <max value="1" /> </element> <element id="MedicationRequest.courseOfTherapyType.coding.system"> <path value="MedicationRequest.courseOfTherapyType.coding.system" /> <min value="1" /> </element> <element id="MedicationRequest.courseOfTherapyType.coding.code"> <path value="MedicationRequest.courseOfTherapyType.coding.code" /> <min value="1" /> </element> <element id="MedicationRequest.note"> <path value="MedicationRequest.note" /> <short value="Dispensing Note" /> <definition value="Clinical information relating to a prescribed medication item that cannot be conveyed within dosage instructions is populated within `note` field.

Examples of dispensing notes are:

- To explain changes in dosage, for example, “Dosage has been increased on advice of the hospital”.
- "Tell patient to stop their statin whilst on this anitbiotic"
- "hospital consultant has confirmed dual treatment"

One scenario where `note` must be populated is when the current prescribed medication item is the last authorised repeat of that medication within a repeat prescribing cycle. Appropriate text, such as “Last authorised repeat” must be included within the `note` to inform the dispenser and to allow the dispenser to communicate to the patient or patient representative. Note that for repeat dispensing, the ‘numberOfPrescriptionsIssued’ element also conveys this information.

```json
"note": [
 {
 "text": "Tell patient to stop their statin whilst on this anitbiotic"
 }
 ],
```" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.dosageInstruction"> <path value="MedicationRequest.dosageInstruction" /> <definition value="The content of the `dosageInstruction` should follow guidance in [Digital Medicines Dosage](https://simplifier.net/guide/ukcoreimplementationguideformedicines/ElementDosage).

`dosageInstruction.text` **MUST** be supplied and is a human readable version of the structured dose as would be printed on a paper prescription. The use of a generic default value, for example “Use as directed”, if a value is not entered, is not acceptable from a clinical perspective. The user must be asked to select a dosage instruction from a pick list, type by hand or have the system populate with a valid and clinically safe dosage instruction relevant to the prescribed medication or clinical circumstances.

As per BNF guidelines, the dosage must be presented to the user without abbreviation although it may be entered and stored within the PMR in an abbreviated form. Within HL7 messaging, the dosage instruction must be represented without abbreviation.

```json
"dosageInstruction": [
 {
 "text": "Inject 10 milligram, once a week, Subcutaneous route, for 10 weeks",
 "timing": {
 "repeat": {
 "boundsDuration": {
 "value": 10,
 "unit": "week",
 "system": "http://unitsofmeasure.org",
 "code": "wk"
 },
 "frequency": 1,
 "period": 1,
 "periodUnit": "wk"
 }
 },
 "route": {
 "coding": [
 {
 "system": "http://snomed.info/sct",
 "code": "34206005",
 "display": "Subcutaneous route"
 }
 ]
 },
 "method": {
 "coding": [
 {
 "system": "http://snomed.info/sct",
 "code": "422145002",
 "display": "Inject"
 }
 ]
 },
 "doseAndRate": [
 {
 "doseQuantity": {
 "value": 10,
 "unit": "milligram",
 "system": "http://unitsofmeasure.org",
 "code": "mg"
 }
 }
 ]
 }
]

```" /> <comment value="There are examples where a medication request may include the option of an oral dose or an Intravenous or Intramuscular dose. For example, "Ondansetron 8mg orally or IV twice a day as needed for nausea" or "Compazine® (prochlorperazine) 5-10mg PO or 25mg PR bid prn nausea or vomiting". In these cases, two medication requests would be created and should be grouped together via a parent [RequestGroup](https://www.hl7.org/fhir/R4/requestgroup.html) resource, specifying selectionBehaviour="exactly-one". The decision on which dose and route of administration to use is based on the patient's condition at the time the dose is needed." /> <min value="1" /> <type> <code value="Dosage" /> <profile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Dosage" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.dosageInstruction.additionalInstruction"> <path value="MedicationRequest.dosageInstruction.additionalInstruction" /> <definition value="These sections **MUST** be used only be used to pass notes regarding the prescription to the pharmacist or patient. Lists of repeat medications and general practice notifications to the patient **SHOULD** be recorded in [NHSDigital-CommunicationRequest](https://simplifier.net/guide/nhsdigital/NHSDigital-CommunicationRequest) resource.

Patient instructions for taking the drug are contained with in the `patientInstruction` and `additionalInstruction` as per the guidance in [Dosage Structure Overview](https://developer.nhs.uk/apis/dose-syntax-implementation/dosage-overview.html)

```json
"dosageInstruction": [
 {
 "text": "10 milligram, Inject, Subcutaneous route, once weekly",
 "additionalInstruction": [
 "coding": [
 {
 "system": "http://snomed.info/sct",
 "code": "421769005",
 "display": "Follow directions"
 }
 ],
 ],
 "patientInstruction": "As directed"
 }
]
```" /> </element> <element id="MedicationRequest.dosageInstruction.patientInstruction"> <path value="MedicationRequest.dosageInstruction.patientInstruction" /> <definition value="These sections **MUST** be used only be used to pass notes regarding the prescription to the pharmacist or patient. Lists of repeat medications and general practice notifications to the patient **SHOULD** be recorded in [NHSDigital-CommunicationRequest](https://simplifier.net/guide/nhsdigital/NHSDigital-CommunicationRequest) resource.

Patient instructions for taking the drug are contained with in the `patientInstruction` and `additionalInstruction` as per the guidance in [Dosage Structure Overview](https://developer.nhs.uk/apis/dose-syntax-implementation/dosage-overview.html)

```json
"dosageInstruction": [
 {
 "text": "10 milligram, Inject, Subcutaneous route, once weekly",
 "additionalInstruction": [
 "coding": [
 {
 "system": "http://snomed.info/sct",
 "code": "421769005",
 "display": "Follow directions"
 }
 ],
 ],
 "patientInstruction": "As directed"
 }
]
```" /> </element> <element id="MedicationRequest.dispenseRequest"> <path value="MedicationRequest.dispenseRequest" /> <min value="1" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.id"> <path value="MedicationRequest.dispenseRequest.id" /> <max value="0" /> </element> <element id="MedicationRequest.dispenseRequest.extension"> <path value="MedicationRequest.dispenseRequest.extension" /> <min value="1" /> </element> <element id="MedicationRequest.dispenseRequest.extension:performerSiteType"> <path value="MedicationRequest.dispenseRequest.extension" /> <sliceName value="performerSiteType" /> <short value="type of dispensing organisation" /> <min value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.validityPeriod"> <path value="MedicationRequest.dispenseRequest.validityPeriod" /> <definition value="The `validityPeriod` attribute defines the validity period for the prescription authorisation. This period must start (the `validityPeriod.start`) at the date of prescribing and cannot exceed 12 months (the `validityPeriod.end`). Typically, most repeatable prescriptions will be authorised for a validity period of either 6 or 12 months.

```json
"dispenseRequest": {
 "validityPeriod": {
 "start": "2020-06-10",
 "end": "2020-12-07"
 },
 ...
 }
```" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.validityPeriod.start"> <path value="MedicationRequest.dispenseRequest.validityPeriod.start" /> <min value="1" /> </element> <element id="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed"> <path value="MedicationRequest.dispenseRequest.numberOfRepeatsAllowed" /> <definition value="An integer indicating the number of times, in addition to the original dispense, (aka refills or repeats) that the patient can receive the prescribed medication. Usage Notes: This integer does not include the original order dispense. This means that if an order indicates dispense 30 tablets plus "3 repeats", then the order can be dispensed a total of 4 times and the patient can receive a total of 120 tablets. A prescriber may explicitly say that zero refills are permitted after the initial dispense. 

The number of repeat issues authorised if specified. <br> <b>MUST</b> be present where a `continuous` or `continuous-repeat-dispensing` is authorised for a defined number of issues. <br> <b>MUST</b> NOT be specified where the number of repeat issues has not been defined. Therefore, the numberOfRepeats allowed is the total number of allowed issues. See also <a href="#repeatInformation">extension repeatInformation</a>

For `continuous` orders and `continuous-repeat-dispensing` with intent=`reflex-order` (i.e., orders sent from EPS to pharmacists) this <b>MUST</b> be zero. The `numberOfRepeatsAllowed` in the extension to `basedOn` can be used to convey this information to inform patients that they need to re-order the medication.

Example for a `continuous` issue:

```json

"dispenseRequest": {
 "numberOfRepeatsAllowed": 0
 }

```

Example for a `continuous-repeat-dispensing` issue with intent of `original-order`:

```json

"dispenseRequest": {
 "numberOfRepeatsAllowed": 2
 }
```

This will result in a total of three issues of the medication." /> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.quantity"> <path value="MedicationRequest.dispenseRequest.quantity" /> <min value="1" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.quantity.value"> <path value="MedicationRequest.dispenseRequest.quantity.value" /> <min value="1" /> </element> <element id="MedicationRequest.dispenseRequest.quantity.unit"> <path value="MedicationRequest.dispenseRequest.quantity.unit" /> <min value="1" /> </element> <element id="MedicationRequest.dispenseRequest.quantity.code"> <path value="MedicationRequest.dispenseRequest.quantity.code" /> <min value="1" /> </element> <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration"> <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration" /> <short value="Days Supply" /> <definition value="The `expectedSupplyDuration` entity is required for repeat dispensing (repeatable) prescriptions only.

The `expectedSupplyDuration` element defines the expected duration, in days, of each issue of the prescription. A default value of 28 can be used which must be amendable by the prescriber when required. The value must be an integer value greater than zero. A sensible upper limit validation should be included within the System. If this value is omitted, the Spine will assume a value of 28.

```json
"dispenseRequest": {
 ...
 "expectedSupplyDuration": {
 "value": 28,
 "unit": "days",
 "system": "http://unitsofmeasure.org",
 "code": "d"
 }
 }
```" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.value"> <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.value" /> <min value="1" /> </element> <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.code"> <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.code" /> <min value="1" /> <fixedCode value="d" /> </element> <element id="MedicationRequest.dispenseRequest.performer"> <path value="MedicationRequest.dispenseRequest.performer" /> <definition value="For non token based prescriptions the destination pharmacy **MUST** be recorded in the *dispenseRequest.performer.identifier* and a identifier reference (not a resource reference) with an ANANA/ODS Code **MUST** used. 

The extension https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType **MUST** be present.

Patients pharmacy preferences may be sourced from PDS.

Patients pharmacy preferences may be overriden by an 'one-off pharmacy nomination' by populating the *dispenseRequest.performer.identifier* with the ODS/ANANA code of the destination pharmacy.

```json
"dispenseRequest": {
 "extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-PerformerSiteType",
 "valueCoding": {
 "system": "https://fhir.nhs.uk/CodeSystem/dispensing-site-preference",
 "code": "0004"
 }
 },
 ],
 "performer": {
 "identifier": {
 "system": "https://fhir.nhs.uk/Id/ods-organization-code",
 "value": "FX748"
 }
 },
```" /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Organization" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.performer.extension:dispensingPractitioner"> <path value="MedicationRequest.dispenseRequest.performer.extension" /> <sliceName value="dispensingPractitioner" /> <short value="practitioner who released(/downloaded) the prescription" /> <definition value="Details of the dispenser who is actioning the MedicationRequest

```json
 "dispenseRequest": { 
 "performer": {
 "extension": [
 {
 "url": "https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer",
 "valueReference": {
 "reference": "urn:uuid:25f3dd9f-5838-44a7-930e-c78ae3ecadd6",
 "display": "LOTTIE POTTS"
 }
 }
 ],
 "identifier": {
 "system": "https://fhir.nhs.uk/Id/ods-organization-code",
 "value": "VNE51"
 },
 "display": "The Simple Pharmacy"
 }
 },
```" /> <max value="1" /> <type> <code value="Extension" /> <profile value="https://fhir.nhs.uk/StructureDefinition/Extension-DM-DispensingPerformer" /> </type> <mustSupport value="true" /> </element> <element id="MedicationRequest.dispenseRequest.performer.identifier.system"> <path value="MedicationRequest.dispenseRequest.performer.identifier.system" /> <min value="1" /> <fixedUri value="https://fhir.nhs.uk/Id/ods-organization-code" /> </element> <element id="MedicationRequest.dispenseRequest.performer.identifier.value"> <path value="MedicationRequest.dispenseRequest.performer.identifier.value" /> <min value="1" /> </element> <element id="MedicationRequest.substitution"> <path value="MedicationRequest.substitution" /> <definition value="Within UK healthcare, substitution is not the norm and so this element will normally be set to a default of `false`.

Substitution being set to false is a mandatory requirement for EPS..

Substituition is a mandatory requirement for EPS.

<div markdown="span" class="alert alert-warning" role="alert"><i class="fa fa-information"></i><h4>Important Note:</h4>
Within UK healthcare, substitution is not the norm so the international FHIR definition where "_If nothing is specified substitution may be done._" does not align with UK healthcare prescribing best practice.<br/>
<p>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. <br/></p>
<p>UK Core has profiled this element as MANDATORY and MUST have a default boolean value of <code>false</code> to denote substitution is not allowed.</p>
</div>
<h3 id="allowing-substitution">Allowing substitution</h3>
<p>Where substitution to be be allowed, set to <code>true</code>. The inclusion of the coded reason is optional as the valueset defined in FHIR is of limited benefit to UK healthcare.</p>

```json

"substitution": {
 "allowedBoolean": false
 }

```" /> <mustSupport value="true" /> </element> <element id="MedicationRequest.substitution.allowed[x]"> <path value="MedicationRequest.substitution.allowed[x]" /> <type> <code value="boolean" /> </type> </element> <element id="MedicationRequest.eventHistory"> <path value="MedicationRequest.eventHistory" /> <type> <code value="Reference" /> <targetProfile value="https://fhir.nhs.uk/StructureDefinition/NHSDigital-Provenance" /> </type> </element> </differential> </StructureDefinition>
Overview
Errors (0)
Warnings (0)
Messages (0)
Success
: The contents are valid.
Resource
Validated using the Validator Firely .NET SDK validator