{
  "resourceType": "StructureDefinition",
  "id": "au-medicationdispense",
  "url": "http://hl7.org.au/fhir/StructureDefinition/au-medicationdispense",
  "version": "1.1.0",
  "name": "AUBaseMedicationDispense",
  "title": "AU Base Medication Dispense",
  "status": "draft",
  "date": "2019-04-25T23:07:00.6519188+00:00",
  "publisher": "Health Level Seven Australia (Medications WG)",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org.au/fhir",
          "use": "work"
        }
      ]
    }
  ],
  "description": "This profile defines a medication dispense structure including core localisation concepts for use as a dispense record in an Australian context.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationDispense",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationDispense",
        "path": "MedicationDispense",
        "short": "A dispense record for a medication for a patient in an Australian healthcare context",
        "definition": "Dispensing of a medication to patient in an Australian healthcare contex"
      },
      {
        "id": "MedicationDispense.extension",
        "path": "MedicationDispense.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationDispense.extension:groundsForConcurrentSupply",
        "path": "MedicationDispense.extension",
        "sliceName": "groundsForConcurrentSupply",
        "short": "Grounds for Concurrent Supply of Medication",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/grounds-for-concurrent-supply"
          }
        ]
      },
      {
        "id": "MedicationDispense.extension:dispenseNumber",
        "path": "MedicationDispense.extension",
        "sliceName": "dispenseNumber",
        "short": "Number of this Dispense",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/dispense-number"
          }
        ]
      },
      {
        "id": "MedicationDispense.extension:brandName",
        "path": "MedicationDispense.extension",
        "sliceName": "brandName",
        "short": "Medication Brand Name",
        "definition": "The brand medication text name for an associated medication, this may be supplied if a coded brand name is not available for medicationCodeableConcept but the brand name is needed.",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/medication-brand-name"
          }
        ]
      },
      {
        "id": "MedicationDispense.extension:genericName",
        "path": "MedicationDispense.extension",
        "sliceName": "genericName",
        "short": "Medication Generic Drug Name",
        "definition": "The generic medication text name for an associated medication, this may not be the same as the medicationCodeableConcept medication (prescribed, dispensed or stated) but may be used to provide an additional or equivalent drug name that is a generic medication concept.",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/medication-generic-name"
          }
        ]
      },
      {
        "id": "MedicationDispense.identifier",
        "path": "MedicationDispense.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            },
            {
              "type": "value",
              "path": "type"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier",
        "path": "MedicationDispense.identifier",
        "sliceName": "localDispenseIdentifier",
        "short": "Local Dispense Identifier",
        "definition": "Identifier assigned by the dispensing system this allows linking of this dispensing record to a local system identfier."
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.type",
        "path": "MedicationDispense.identifier.type",
        "short": "Coded identifier type for local dispense identifier",
        "min": 1,
        "binding": {
          "strength": "required",
          "description": "Local identifier type",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ValueSet/au-hl7v2-0203"
          }
        }
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.type.coding",
        "path": "MedicationDispense.identifier.type.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.type.coding.system",
        "path": "MedicationDispense.identifier.type.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org.au/fhir/v2/0203"
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.type.coding.code",
        "path": "MedicationDispense.identifier.type.coding.code",
        "min": 1,
        "fixedCode": "LDI"
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.type.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.identifier.type.text",
        "min": 1,
        "fixedString": "Local Dispense Identifier"
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.system",
        "path": "MedicationDispense.identifier.system",
        "short": "Namespace for local dispense record identifier",
        "definition": "URL assigned by the local dispensing system.",
        "min": 1
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.value",
        "path": "MedicationDispense.identifier.value",
        "short": "Dispense record identifier",
        "min": 1
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.assigner",
        "path": "MedicationDispense.identifier.assigner",
        "min": 1
      },
      {
        "id": "MedicationDispense.identifier:localDispenseIdentifier.assigner.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.identifier.assigner.display",
        "min": 1
      },
      {
        "id": "MedicationDispense.medication[x]",
        "path": "MedicationDispense.medication[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "closed"
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept",
        "path": "MedicationDispense.medication[x]",
        "sliceName": "medicationCodeableConcept",
        "short": "Coded Dispensed Medication",
        "min": 0,
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding",
        "path": "MedicationDispense.medication[x].coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:pbs",
        "path": "MedicationDispense.medication[x].coding",
        "sliceName": "pbs",
        "short": "PBS Item Code",
        "definition": "PBS code from http://pbs.gov.au/code/item. Use of PBS as a code to refer to a type of medication, this excludes implication of context based on the PBS code. Where context is to be implied or stated PBS code needs to be associated with recording a prescription (MedicationRequest) or dispense record(MedicationDispense)",
        "binding": {
          "strength": "preferred",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ValueSet/pbs-item"
          }
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:pbs.system",
        "path": "MedicationDispense.medication[x].coding.system",
        "min": 1,
        "fixedUri": "http://pbs.gov.au/code/item"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:gtin",
        "path": "MedicationDispense.medication[x].coding",
        "sliceName": "gtin",
        "short": "Medication Package Global Trade Item Number (GTIN)",
        "definition": "GTIN value from http://www.gs1.org/gtin.",
        "binding": {
          "strength": "preferred",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ValueSet/gtin"
          }
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:gtin.system",
        "path": "MedicationDispense.medication[x].coding.system",
        "min": 1,
        "fixedUri": "http://www.gs1.org/gtin"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:amt",
        "path": "MedicationDispense.medication[x].coding",
        "sliceName": "amt",
        "short": "AMT Medicines",
        "binding": {
          "strength": "preferred",
          "valueSetUri": "https://healthterminologies.gov.au/fhir/ValueSet/australian-medication-1"
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:amt.extension",
        "path": "MedicationDispense.medication[x].coding.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:amt.extension:medicationClass",
        "path": "MedicationDispense.medication[x].coding.extension",
        "sliceName": "medicationClass",
        "short": "Class of Medication Coding",
        "definition": "General category of coding to allow usage of codes to be distinguished from the same CodeSystem",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/medication-type"
          }
        ]
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:amt.system",
        "path": "MedicationDispense.medication[x].coding.system",
        "min": 1,
        "fixedUri": "http://snomed.info/sct"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:mimsPackage",
        "path": "MedicationDispense.medication[x].coding",
        "sliceName": "mimsPackage",
        "short": "MIMS Package",
        "max": "1",
        "binding": {
          "strength": "preferred",
          "valueSetReference": {
            "reference": "http://hl7.org.au/fhir/ValueSet/mims"
          }
        }
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:mimsPackage.system",
        "path": "MedicationDispense.medication[x].coding.system",
        "min": 1,
        "fixedUri": "http://www.mims.com.au/codes"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.medication[x].text",
        "short": "Medication primary text",
        "definition": "A human language representation of the concept as seen/selected/uttered by the user who entered the data and/or which represents the intended meaning of the user.\r\n\r\nThis may be a brand or generic name as suitable for the intent of the entry."
      },
      {
        "id": "MedicationDispense.medication[x]:medicationReference",
        "path": "MedicationDispense.medication[x]",
        "sliceName": "medicationReference",
        "short": "Dispensed Medication",
        "min": 0,
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-medication"
          }
        ]
      },
      {
        "id": "MedicationDispense.authorizingPrescription",
        "path": "MedicationDispense.authorizingPrescription",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org.au/fhir/StructureDefinition/au-medicationrequest"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction",
        "path": "MedicationDispense.dosageInstruction",
        "type": [
          {
            "code": "Dosage",
            "profile": "http://hl7.org.au/fhir/StructureDefinition/au-dosage"
          }
        ]
      },
      {
        "id": "MedicationDispense.dosageInstruction.method.coding",
        "path": "MedicationDispense.dosageInstruction.method.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationDispense.substitution",
        "path": "MedicationDispense.substitution",
        "max": "1"
      },
      {
        "id": "MedicationDispense.substitution.reason",
        "path": "MedicationDispense.substitution.reason",
        "binding": {
          "strength": "preferred",
          "valueSetUri": "https://healthterminologies.gov.au/fhir/ValueSet/medicine-substitution-reason-1"
        }
      }
    ]
  }
}