{
  "resourceType": "StructureDefinition",
  "id": "UKCore-MedicationDispense",
  "url": "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationDispense",
  "version": "2.1.0",
  "name": "UKCoreMedicationDispense",
  "title": "UK Core MedicationDispense",
  "status": "active",
  "date": "2021-09-10",
  "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 MedicationDispense resource for the minimal set of data to query and retrieve dispensed medication information.",
  "purpose": "This profile covers the supply of medications to a patient. Examples include dispensing and pick-up from an outpatient or community pharmacy, dispensing patient-specific medications from inpatient pharmacy to ward, as well as issuing a single dose from ward stock to a patient for consumption. The medication dispense is the result of a pharmacy system responding to a medication order.",
  "copyright": "Copyright © 2021+ 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": "rim",
      "uri": "http://hl7.org/v3",
      "name": "RIM Mapping"
    },
    {
      "identity": "w5",
      "uri": "http://hl7.org/fhir/fivews",
      "name": "FiveWs Pattern Mapping"
    },
    {
      "identity": "rx-dispense-rmim",
      "uri": "http://www.hl7.org/v3/PORX_RM020070UV",
      "name": "V3 Pharmacy Dispense RMIM"
    },
    {
      "identity": "v2",
      "uri": "http://hl7.org/v2",
      "name": "HL7 v2 Mapping"
    }
  ],
  "kind": "resource",
  "abstract": false,
  "type": "MedicationDispense",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationDispense.identifier.assigner",
        "path": "MedicationDispense.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.partOf",
        "path": "MedicationDispense.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Procedure"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.partOf.identifier.assigner",
        "path": "MedicationDispense.partOf.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.medication[x]",
        "path": "MedicationDispense.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Medication"
            ]
          }
        ],
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationCode"
        }
      },
      {
        "id": "MedicationDispense.subject",
        "path": "MedicationDispense.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/Group",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.subject.identifier.assigner",
        "path": "MedicationDispense.subject.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.context",
        "path": "MedicationDispense.context",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/EpisodeOfCare",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Encounter"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.context.identifier.assigner",
        "path": "MedicationDispense.context.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.supportingInformation.identifier.assigner",
        "path": "MedicationDispense.supportingInformation.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.performer.actor",
        "path": "MedicationDispense.performer.actor",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Device"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.performer.actor.identifier.assigner",
        "path": "MedicationDispense.performer.actor.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.location",
        "path": "MedicationDispense.location",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.location.identifier.assigner",
        "path": "MedicationDispense.location.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.authorizingPrescription",
        "path": "MedicationDispense.authorizingPrescription",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-MedicationRequest"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.authorizingPrescription.identifier.assigner",
        "path": "MedicationDispense.authorizingPrescription.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.type",
        "path": "MedicationDispense.type",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationSupplyType"
        }
      },
      {
        "id": "MedicationDispense.destination",
        "path": "MedicationDispense.destination",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Location"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.destination.identifier.assigner",
        "path": "MedicationDispense.destination.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.receiver",
        "path": "MedicationDispense.receiver",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.receiver.identifier.assigner",
        "path": "MedicationDispense.receiver.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.note.author[x]",
        "path": "MedicationDispense.note.author[x]",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Patient",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-RelatedPerson"
            ]
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.asNeeded[x]",
        "path": "MedicationDispense.dosageInstruction.asNeeded[x]",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationPrecondition"
        }
      },
      {
        "id": "MedicationDispense.dosageInstruction.site",
        "path": "MedicationDispense.dosageInstruction.site",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-BodySite"
        }
      },
      {
        "id": "MedicationDispense.dosageInstruction.route",
        "path": "MedicationDispense.dosageInstruction.route",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-SubstanceOrProductAdministrationRoute"
        }
      },
      {
        "id": "MedicationDispense.dosageInstruction.method",
        "path": "MedicationDispense.dosageInstruction.method",
        "binding": {
          "strength": "extensible",
          "valueSet": "https://fhir.hl7.org.uk/ValueSet/UKCore-MedicationDosageMethod"
        }
      },
      {
        "id": "MedicationDispense.substitution.responsibleParty",
        "path": "MedicationDispense.substitution.responsibleParty",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Practitioner",
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-PractitionerRole"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.substitution.responsibleParty.identifier.assigner",
        "path": "MedicationDispense.substitution.responsibleParty.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.detectedIssue.identifier.assigner",
        "path": "MedicationDispense.detectedIssue.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.eventHistory",
        "path": "MedicationDispense.eventHistory",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Provenance"
            ]
          }
        ]
      },
      {
        "id": "MedicationDispense.eventHistory.identifier.assigner",
        "path": "MedicationDispense.eventHistory.identifier.assigner",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.hl7.org.uk/StructureDefinition/UKCore-Organization"
            ]
          }
        ]
      }
    ]
  }
}