{
  "resourceType": "StructureDefinition",
  "url": "https://hl7.pt/fhir/StructureDefinition/PT_MedicationDispense",
  "version": "1.1",
  "name": "PT_MedicationDispense",
  "status": "draft",
  "experimental": false,
  "date": "2022-12-21T16:15:08.1993021+00:00",
  "description": "A generic MedicationDispense resource for Portugal",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationDispense",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationDispense.meta",
        "path": "MedicationDispense.meta"
      },
      {
        "id": "MedicationDispense.meta.id",
        "path": "MedicationDispense.meta.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.meta.versionId",
        "path": "MedicationDispense.meta.versionId",
        "max": "0"
      },
      {
        "id": "MedicationDispense.meta.source",
        "path": "MedicationDispense.meta.source",
        "max": "0"
      },
      {
        "id": "MedicationDispense.meta.profile",
        "path": "MedicationDispense.meta.profile",
        "max": "0"
      },
      {
        "id": "MedicationDispense.meta.security",
        "path": "MedicationDispense.meta.security",
        "max": "0"
      },
      {
        "id": "MedicationDispense.meta.tag",
        "path": "MedicationDispense.meta.tag",
        "max": "0"
      },
      {
        "id": "MedicationDispense.implicitRules",
        "path": "MedicationDispense.implicitRules",
        "max": "0"
      },
      {
        "id": "MedicationDispense.language",
        "path": "MedicationDispense.language",
        "max": "0"
      },
      {
        "id": "MedicationDispense.text",
        "path": "MedicationDispense.text",
        "max": "0"
      },
      {
        "id": "MedicationDispense.contained",
        "path": "MedicationDispense.contained",
        "max": "0"
      },
      {
        "id": "MedicationDispense.extension",
        "path": "MedicationDispense.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        },
        "min": 0
      },
      {
        "id": "MedicationDispense.extension:SendLabel",
        "path": "MedicationDispense.extension",
        "sliceName": "SendLabel",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://hl7.pt/fhir/StructureDefinition/SendLabel"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "MedicationDispense.extension:refillsRemaining",
        "path": "MedicationDispense.extension",
        "sliceName": "refillsRemaining",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://hl7.org/fhir/StructureDefinition/medicationdispense-refillsRemaining"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "MedicationDispense.extension:regulatedAuthorization",
        "path": "MedicationDispense.extension",
        "sliceName": "regulatedAuthorization",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://hl7.pt/fhir/StructureDefinition/RegulatedAuthorization"
            ]
          }
        ],
        "isModifier": false
      },
      {
        "id": "MedicationDispense.identifier.id",
        "path": "MedicationDispense.identifier.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.identifier.value",
        "path": "MedicationDispense.identifier.value",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-2 or ORC-8; ORC-3 (secondary)"
          }
        ]
      },
      {
        "id": "MedicationDispense.identifier.period",
        "path": "MedicationDispense.identifier.period",
        "max": "0"
      },
      {
        "id": "MedicationDispense.identifier.assigner",
        "path": "MedicationDispense.identifier.assigner",
        "max": "0"
      },
      {
        "id": "MedicationDispense.partOf",
        "path": "MedicationDispense.partOf",
        "max": "0"
      },
      {
        "id": "MedicationDispense.status",
        "path": "MedicationDispense.status",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-1"
          }
        ]
      },
      {
        "id": "MedicationDispense.statusReason[x]",
        "path": "MedicationDispense.statusReason[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-16"
          }
        ]
      },
      {
        "id": "MedicationDispense.statusReason[x].id",
        "path": "MedicationDispense.statusReason[x].id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.statusReason[x].coding.id",
        "path": "MedicationDispense.statusReason[x].coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.statusReason[x].coding.version",
        "path": "MedicationDispense.statusReason[x].coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.statusReason[x].coding.userSelected",
        "path": "MedicationDispense.statusReason[x].coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category",
        "path": "MedicationDispense.category",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "ORC-29"
          }
        ]
      },
      {
        "id": "MedicationDispense.category.id",
        "path": "MedicationDispense.category.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding.id",
        "path": "MedicationDispense.category.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding.system",
        "path": "MedicationDispense.category.coding.system",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "ORC-29.3"
          }
        ]
      },
      {
        "id": "MedicationDispense.category.coding.version",
        "path": "MedicationDispense.category.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding.code",
        "path": "MedicationDispense.category.coding.code",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "ORC-29.1"
          }
        ]
      },
      {
        "id": "MedicationDispense.category.coding.display",
        "path": "MedicationDispense.category.coding.display",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "ORC-29.2"
          }
        ]
      },
      {
        "id": "MedicationDispense.category.coding.userSelected",
        "path": "MedicationDispense.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]",
        "path": "MedicationDispense.medication[x]",
        "type": [
          {
            "code": "Reference"
          }
        ],
        "binding": {
          "strength": "example"
        }
      },
      {
        "id": "MedicationDispense.medication[x].id",
        "path": "MedicationDispense.medication[x].id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x].reference",
        "path": "MedicationDispense.medication[x].reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "Medication/RXD-2"
          }
        ]
      },
      {
        "id": "MedicationDispense.medication[x].type",
        "path": "MedicationDispense.medication[x].type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x].identifier",
        "path": "MedicationDispense.medication[x].identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x].display",
        "path": "MedicationDispense.medication[x].display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.subject.id",
        "path": "MedicationDispense.subject.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.subject.reference",
        "path": "MedicationDispense.subject.reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "Patient/PID-3"
          }
        ]
      },
      {
        "id": "MedicationDispense.subject.type",
        "path": "MedicationDispense.subject.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.subject.identifier",
        "path": "MedicationDispense.subject.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.subject.display",
        "path": "MedicationDispense.subject.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.context.id",
        "path": "MedicationDispense.context.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.context.reference",
        "path": "MedicationDispense.context.reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "Encounter/PV1-19"
          }
        ]
      },
      {
        "id": "MedicationDispense.context.type",
        "path": "MedicationDispense.context.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.context.identifier",
        "path": "MedicationDispense.context.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.context.display",
        "path": "MedicationDispense.context.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.supportingInformation.id",
        "path": "MedicationDispense.supportingInformation.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.supportingInformation.type",
        "path": "MedicationDispense.supportingInformation.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.supportingInformation.identifier",
        "path": "MedicationDispense.supportingInformation.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.supportingInformation.display",
        "path": "MedicationDispense.supportingInformation.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.performer.id",
        "path": "MedicationDispense.performer.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.performer.actor.id",
        "path": "MedicationDispense.performer.actor.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.performer.actor.reference",
        "path": "MedicationDispense.performer.actor.reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "Practitioner/RXD-10"
          }
        ]
      },
      {
        "id": "MedicationDispense.performer.actor.type",
        "path": "MedicationDispense.performer.actor.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.performer.actor.identifier",
        "path": "MedicationDispense.performer.actor.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.performer.actor.display",
        "path": "MedicationDispense.performer.actor.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.location.id",
        "path": "MedicationDispense.location.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.location.reference",
        "path": "MedicationDispense.location.reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-27"
          }
        ]
      },
      {
        "id": "MedicationDispense.location.type",
        "path": "MedicationDispense.location.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.location.identifier",
        "path": "MedicationDispense.location.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.location.display",
        "path": "MedicationDispense.location.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.authorizingPrescription.id",
        "path": "MedicationDispense.authorizingPrescription.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.authorizingPrescription.reference",
        "path": "MedicationDispense.authorizingPrescription.reference",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "MedicationRequest/ORC-8, ORC-4, RXD-4"
          }
        ]
      },
      {
        "id": "MedicationDispense.authorizingPrescription.type",
        "path": "MedicationDispense.authorizingPrescription.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.authorizingPrescription.identifier",
        "path": "MedicationDispense.authorizingPrescription.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.authorizingPrescription.display",
        "path": "MedicationDispense.authorizingPrescription.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.type",
        "path": "MedicationDispense.type",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "RXD-33"
          }
        ]
      },
      {
        "id": "MedicationDispense.type.id",
        "path": "MedicationDispense.type.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.type.coding.id",
        "path": "MedicationDispense.type.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.type.coding.system",
        "path": "MedicationDispense.type.coding.system",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "RXD-33.3"
          }
        ]
      },
      {
        "id": "MedicationDispense.type.coding.version",
        "path": "MedicationDispense.type.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.type.coding.code",
        "path": "MedicationDispense.type.coding.code",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "RXD-33.1"
          }
        ]
      },
      {
        "id": "MedicationDispense.type.coding.display",
        "path": "MedicationDispense.type.coding.display",
        "mapping": [
          {
            "identity": "HL7v2.5",
            "map": "RXD-33.2"
          }
        ]
      },
      {
        "id": "MedicationDispense.type.coding.userSelected",
        "path": "MedicationDispense.type.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.quantity.id",
        "path": "MedicationDispense.quantity.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.quantity.value",
        "path": "MedicationDispense.quantity.value",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-4"
          }
        ]
      },
      {
        "id": "MedicationDispense.quantity.unit",
        "path": "MedicationDispense.quantity.unit",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-5.2"
          }
        ]
      },
      {
        "id": "MedicationDispense.quantity.system",
        "path": "MedicationDispense.quantity.system",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-5.3"
          }
        ]
      },
      {
        "id": "MedicationDispense.quantity.code",
        "path": "MedicationDispense.quantity.code",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-5.1"
          }
        ]
      },
      {
        "id": "MedicationDispense.whenHandedOver",
        "path": "MedicationDispense.whenHandedOver",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-3"
          }
        ]
      },
      {
        "id": "MedicationDispense.destination.id",
        "path": "MedicationDispense.destination.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.destination.reference",
        "path": "MedicationDispense.destination.reference",
        "mapping": [
          {
            "identity": "HL7v2.4",
            "map": "RXD-13"
          },
          {
            "identity": "HL7v2.5",
            "map": "RXD-30; RXD-31"
          }
        ]
      },
      {
        "id": "MedicationDispense.destination.type",
        "path": "MedicationDispense.destination.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.destination.identifier",
        "path": "MedicationDispense.destination.identifier",
        "max": "0"
      },
      {
        "id": "MedicationDispense.destination.display",
        "path": "MedicationDispense.destination.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.note.id",
        "path": "MedicationDispense.note.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.note.time",
        "path": "MedicationDispense.note.time",
        "max": "0"
      },
      {
        "id": "MedicationDispense.note.text",
        "path": "MedicationDispense.note.text",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-9"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.id",
        "path": "MedicationDispense.dosageInstruction.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.sequence",
        "path": "MedicationDispense.dosageInstruction.sequence",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.text",
        "path": "MedicationDispense.dosageInstruction.text",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-7.8"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.additionalInstruction",
        "path": "MedicationDispense.dosageInstruction.additionalInstruction",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXD-15"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.additionalInstruction.id",
        "path": "MedicationDispense.dosageInstruction.additionalInstruction.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.additionalInstruction.coding.id",
        "path": "MedicationDispense.dosageInstruction.additionalInstruction.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.additionalInstruction.coding.version",
        "path": "MedicationDispense.dosageInstruction.additionalInstruction.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.additionalInstruction.coding.userSelected",
        "path": "MedicationDispense.dosageInstruction.additionalInstruction.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.id",
        "path": "MedicationDispense.dosageInstruction.timing.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.event",
        "path": "MedicationDispense.dosageInstruction.timing.event",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-7.4; ORC-7.5"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.repeat.id",
        "path": "MedicationDispense.dosageInstruction.timing.repeat.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.repeat.timeOfDay",
        "path": "MedicationDispense.dosageInstruction.timing.repeat.timeOfDay",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-7.2.2"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.code",
        "path": "MedicationDispense.dosageInstruction.timing.code",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "ORC-7.2.1"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.code.id",
        "path": "MedicationDispense.dosageInstruction.timing.code.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.code.coding.id",
        "path": "MedicationDispense.dosageInstruction.timing.code.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.code.coding.version",
        "path": "MedicationDispense.dosageInstruction.timing.code.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing.code.coding.userSelected",
        "path": "MedicationDispense.dosageInstruction.timing.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.site",
        "path": "MedicationDispense.dosageInstruction.site",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXR-2"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.site.id",
        "path": "MedicationDispense.dosageInstruction.site.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.site.coding.id",
        "path": "MedicationDispense.dosageInstruction.site.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.site.coding.version",
        "path": "MedicationDispense.dosageInstruction.site.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.site.coding.userSelected",
        "path": "MedicationDispense.dosageInstruction.site.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route",
        "path": "MedicationDispense.dosageInstruction.route",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXR-1"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.id",
        "path": "MedicationDispense.dosageInstruction.route.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.id",
        "path": "MedicationDispense.dosageInstruction.route.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.version",
        "path": "MedicationDispense.dosageInstruction.route.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.userSelected",
        "path": "MedicationDispense.dosageInstruction.route.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.method",
        "path": "MedicationDispense.dosageInstruction.method",
        "mapping": [
          {
            "identity": "HL7v2.x",
            "map": "RXR-4"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.method.id",
        "path": "MedicationDispense.dosageInstruction.method.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.method.coding.id",
        "path": "MedicationDispense.dosageInstruction.method.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.method.coding.version",
        "path": "MedicationDispense.dosageInstruction.method.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.method.coding.userSelected",
        "path": "MedicationDispense.dosageInstruction.method.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.doseAndRate.id",
        "path": "MedicationDispense.dosageInstruction.doseAndRate.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.doseAndRate.rate[x]",
        "path": "MedicationDispense.dosageInstruction.doseAndRate.rate[x]",
        "max": "0"
      }
    ]
  }
}