{
  "resourceType": "StructureDefinition",
  "id": "UKCore-MedicationRequest",
  "url": "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-MedicationRequest",
  "version": "1.0.0",
  "name": "UKCoreMedicationRequest",
  "title": "UK Core MedicationRequest",
  "status": "draft",
  "publisher": "HL7 UK",
  "contact": [
    {
      "name": "HL7 UK",
      "telecom": [
        {
          "system": "email",
          "value": "secretariat@hl7.org.uk",
          "use": "work",
          "rank": 1
        }
      ]
    },
    {
      "name": "NHS Digital",
      "telecom": [
        {
          "system": "email",
          "value": "interoperabilityteam@nhs.net",
          "use": "work",
          "rank": 2
        }
      ]
    }
  ],
  "description": "Defines the UK Core constraints and extensions on the MedicationRequest resource for the minimal set of data to query and retrieve prescription information.",
  "purpose": "An order or request for both supply of the medication and the instructions for administration of the medication to an individual. This profile covers inpatient medication orders as well as community orders (whether filled by the prescriber or by a pharmacy). It also includes orders for over-the-counter medications (e.g. Aspirin), total parenteral nutrition and diet/ vitamin supplements. It may be used to support the order of medication-related devices. It is not intended for use in prescribing particular diets, or for ordering non-medication-related items (eyeglasses, supplies, etc).",
  "copyright": "Copyright © 2020 HL7 UK Licensed under the Apache License, Version 2.0 (the \"License\"); 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 \"AS IS\" 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® FHIR® standard Copyright © 2011+ HL7 The HL7® FHIR® 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": "4.0.1",
  "mapping": [
    {
      "identity": "workflow",
      "uri": "http://hl7.org/fhir/workflow",
      "name": "Workflow Pattern"
    },
    {
      "identity": "script10.6",
      "uri": "http://ncpdp.org/SCRIPT10_6",
      "name": "Mapping to NCPDP SCRIPT 10.6"
    },
    {
      "identity": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "MedicationRequest",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationRequest",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationRequest.identifier.assigner",
        "path": "MedicationRequest.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.reported[x]",
        "path": "MedicationRequest.reported[x]",
        "type": [
          {
            "code": "boolean"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Patient",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Practitioner",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-PractitionerRole",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-RelatedPerson",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.medication[x]",
        "path": "MedicationRequest.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Medication"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.subject",
        "path": "MedicationRequest.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Group",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Patient"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.subject.identifier.assigner",
        "path": "MedicationRequest.subject.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.encounter",
        "path": "MedicationRequest.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Encounter"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.encounter.identifier.assigner",
        "path": "MedicationRequest.encounter.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.supportingInformation.identifier.assigner",
        "path": "MedicationRequest.supportingInformation.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.requester",
        "path": "MedicationRequest.requester",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Practitioner",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-PractitionerRole",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Patient",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-RelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.requester.identifier.assigner",
        "path": "MedicationRequest.requester.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.performer",
        "path": "MedicationRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Device",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Practitioner",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-PractitionerRole",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Patient",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-RelatedPerson",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-CareTeam"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.performer.identifier.assigner",
        "path": "MedicationRequest.performer.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.recorder",
        "path": "MedicationRequest.recorder",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Practitioner",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.recorder.identifier.assigner",
        "path": "MedicationRequest.recorder.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.reasonReference",
        "path": "MedicationRequest.reasonReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Condition",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Observation"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.reasonReference.identifier.assigner",
        "path": "MedicationRequest.reasonReference.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.basedOn",
        "path": "MedicationRequest.basedOn",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-CarePlan",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-MedicationRequest",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-ServiceRequest"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.basedOn.identifier.assigner",
        "path": "MedicationRequest.basedOn.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.groupIdentifier.assigner",
        "path": "MedicationRequest.groupIdentifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.insurance.identifier.assigner",
        "path": "MedicationRequest.insurance.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.note.author[x]",
        "path": "MedicationRequest.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Practitioner",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Patient",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-RelatedPerson",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT",
        "path": "MedicationRequest.dosageInstruction.route.coding",
        "sliceName": "snomedCT",
        "max": "1",
        "binding": {
          "strength": "extensible",
          "description": "A code from the SNOMED Clinical Terminology UK coding system that describes the e-Prescribing route of administration. Any code from the SNOMED CT UK 'NHS e-Prescribing route of administration subset' with subset original id 30201000001137; the corresponding SNOMED CT UK Refset FSN is 'ePrescribing route of administration simple reference set (foundation metadata concept)' with Refset Id 999000051000001100.",
          "valueSet": "https://fhir.nhs.uk/R4/ValueSet/UKCore-MedicationDosageRoute"
        }
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.system",
        "path": "MedicationRequest.dosageInstruction.route.coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.code",
        "path": "MedicationRequest.dosageInstruction.route.coding.code",
        "min": 1
      },
      {
        "id": "MedicationRequest.dosageInstruction.route.coding:snomedCT.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationRequest.dosageInstruction.route.coding.display",
        "min": 1
      },
      {
        "id": "MedicationRequest.dispenseRequest.performer",
        "path": "MedicationRequest.dispenseRequest.performer",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.dispenseRequest.performer.identifier.assigner",
        "path": "MedicationRequest.dispenseRequest.performer.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.priorPrescription",
        "path": "MedicationRequest.priorPrescription",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-MedicationRequest"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.priorPrescription.identifier.assigner",
        "path": "MedicationRequest.priorPrescription.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.detectedIssue.identifier.assigner",
        "path": "MedicationRequest.detectedIssue.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Organization",
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationRequest.eventHistory.identifier.assigner",
        "path": "MedicationRequest.eventHistory.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.nhs.uk/R4/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      }
    ]
  }
}