{
  "resourceType": "StructureDefinition",
  "id": "ced3d650-d33a-48d3-a463-37191d642b72",
  "meta": {
    "lastUpdated": "2018-10-22T11:03:13.391+00:00"
  },
  "url": "http://medico-emr.net/stu3/sd/MedicationDispense-MedicationDispense-1",
  "name": "MedicationDispense-MedicationDispense-1",
  "status": "retired",
  "date": "2018-10-22T11:03:13.2042955+00:00",
  "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",
        "comment": "Represents a dispense of medication - i.e. this is not about infusions"
      },
      {
        "id": "MedicationDispense.id",
        "path": "MedicationDispense.id",
        "definition": "Format: MedDisp-####",
        "min": 1
      },
      {
        "id": "MedicationDispense.meta",
        "path": "MedicationDispense.meta",
        "min": 1,
        "type": [
          {
            "code": "Meta",
            "profile": "http://medico-emr.net/stu3/sd/Meta-ProfileOnly-1"
          }
        ]
      },
      {
        "id": "MedicationDispense.meta.profile",
        "path": "MedicationDispense.meta.profile",
        "fixedUri": "http://medico-emr.net/stu3/sd/MedicationDispense-MedicationDispense-1"
      },
      {
        "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.identifier",
        "path": "MedicationDispense.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        },
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationDispense.identifier:medicoResourceId",
        "path": "MedicationDispense.identifier",
        "sliceName": "medicoResourceId",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Identifier",
            "profile": "http://medico-emr.net/stu3/sd/Identifier-medicoResourceId-1"
          }
        ]
      },
      {
        "id": "MedicationDispense.identifier:medicoResourceId.system",
        "path": "MedicationDispense.identifier.system",
        "fixedUri": "http://medico-emr.net/sid1/MedDisp"
      },
      {
        "id": "MedicationDispense.partOf",
        "path": "MedicationDispense.partOf",
        "max": "0"
      },
      {
        "id": "MedicationDispense.status",
        "path": "MedicationDispense.status",
        "definition": "Only \"completed\" and \"stopped\" are used in medico",
        "min": 1
      },
      {
        "id": "MedicationDispense.category",
        "path": "MedicationDispense.category",
        "definition": "useful values for medico are - out of that CodeSystem\r\ninpatient, outpatient and discharge (discharge means patient got prescription on his discharge)",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.id",
        "path": "MedicationDispense.category.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding",
        "path": "MedicationDispense.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationDispense.category.coding.id",
        "path": "MedicationDispense.category.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding.system",
        "path": "MedicationDispense.category.coding.system",
        "min": 1,
        "fixedUri": "http://terminology.hl7.org/CodeSystem/medication-dispense-category"
      },
      {
        "id": "MedicationDispense.category.coding.version",
        "path": "MedicationDispense.category.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding.code",
        "path": "MedicationDispense.category.coding.code",
        "min": 1
      },
      {
        "id": "MedicationDispense.category.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.category.coding.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.coding.userSelected",
        "path": "MedicationDispense.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.category.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.category.text",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept",
        "path": "MedicationDispense.medicationCodeableConcept",
        "sliceName": "medicationCodeableConcept",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.id",
        "path": "MedicationDispense.medicationCodeableConcept.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding",
        "path": "MedicationDispense.medicationCodeableConcept.coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "code"
            }
          ],
          "rules": "open"
        },
        "min": 1
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding",
        "path": "MedicationDispense.medicationCodeableConcept.coding",
        "sliceName": "ATC_encoding"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding.id",
        "path": "MedicationDispense.medicationCodeableConcept.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding.system",
        "path": "MedicationDispense.medicationCodeableConcept.coding.system",
        "min": 1,
        "fixedUri": "http://hl7.org/fhir/sid/atc"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding.version",
        "path": "MedicationDispense.medicationCodeableConcept.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding.code",
        "path": "MedicationDispense.medicationCodeableConcept.coding.code",
        "definition": "The ATC code"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.medicationCodeableConcept.coding.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:ATC_encoding.userSelected",
        "path": "MedicationDispense.medicationCodeableConcept.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding",
        "path": "MedicationDispense.medicationCodeableConcept.coding",
        "sliceName": "PZN_encoding",
        "definition": "The PZN (Pharma Zentral Nummer)",
        "max": "1"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding.id",
        "path": "MedicationDispense.medicationCodeableConcept.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding.system",
        "path": "MedicationDispense.medicationCodeableConcept.coding.system",
        "min": 1,
        "fixedUri": "http://www.ifaffm.de/pzn"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding.version",
        "path": "MedicationDispense.medicationCodeableConcept.coding.version",
        "definition": "If possible - the version of the PZN should be transfered as well - see \r\nhttp://wiki.hl7.de/index.php?title=IG:Ultrakurzformat_Patientenbezogener_Medikationsplan",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding.code",
        "path": "MedicationDispense.medicationCodeableConcept.coding.code",
        "min": 1
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.medicationCodeableConcept.coding.display",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:PZN_encoding.userSelected",
        "path": "MedicationDispense.medicationCodeableConcept.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding",
        "path": "MedicationDispense.medicationCodeableConcept.coding",
        "sliceName": "Form_encoding",
        "definition": "Defines the form of a medication drug - the codes from the valueset may not be used (SNOMED CT)\r\n- instead only the texts are passed",
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding.id",
        "path": "MedicationDispense.medicationCodeableConcept.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding.system",
        "path": "MedicationDispense.medicationCodeableConcept.coding.system",
        "definition": "http://medico-emr.net/%KUNDE%/cs/medFormcs1",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/cs/medFormcs1",
        "min": 1
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding.version",
        "path": "MedicationDispense.medicationCodeableConcept.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding.code",
        "path": "MedicationDispense.medicationCodeableConcept.coding.code",
        "min": 1
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.medicationCodeableConcept.coding.display",
        "min": 1
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.coding:Form_encoding.userSelected",
        "path": "MedicationDispense.medicationCodeableConcept.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.medication[x]:medicationCodeableConcept.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.medicationCodeableConcept.text",
        "definition": "The plain text name of the medicine",
        "min": 1
      },
      {
        "id": "MedicationDispense.subject",
        "path": "MedicationDispense.subject",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-SubjectPatient-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Patient-Patient-1"
          }
        ]
      },
      {
        "id": "MedicationDispense.context",
        "path": "MedicationDispense.context",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://medico-emr.net/stu3/sd/Reference-ContextEncounter-1",
            "targetProfile": "http://medico-emr.net/stu3/sd/Encounter-Case-1"
          }
        ]
      },
      {
        "id": "MedicationDispense.supportingInformation",
        "path": "MedicationDispense.supportingInformation",
        "max": "0"
      },
      {
        "id": "MedicationDispense.performer",
        "path": "MedicationDispense.performer",
        "max": "0"
      },
      {
        "id": "MedicationDispense.authorizingPrescription",
        "path": "MedicationDispense.authorizingPrescription",
        "max": "0"
      },
      {
        "id": "MedicationDispense.type",
        "path": "MedicationDispense.type",
        "max": "0"
      },
      {
        "id": "MedicationDispense.quantity",
        "path": "MedicationDispense.quantity",
        "min": 1
      },
      {
        "id": "MedicationDispense.quantity.id",
        "path": "MedicationDispense.quantity.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.quantity.value",
        "path": "MedicationDispense.quantity.value",
        "min": 1
      },
      {
        "id": "MedicationDispense.quantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.quantity.unit",
        "definition": "The unit as it stored in medico - i.e. there is no garuantee for a mapping to http://unitsofmeasure.org",
        "min": 1
      },
      {
        "id": "MedicationDispense.quantity.system",
        "path": "MedicationDispense.quantity.system",
        "max": "0",
        "fixedUri": "http://unitsofmeasure.org"
      },
      {
        "id": "MedicationDispense.quantity.code",
        "path": "MedicationDispense.quantity.code",
        "max": "0"
      },
      {
        "id": "MedicationDispense.daysSupply",
        "path": "MedicationDispense.daysSupply",
        "max": "0"
      },
      {
        "id": "MedicationDispense.whenPrepared",
        "path": "MedicationDispense.whenPrepared",
        "max": "0"
      },
      {
        "id": "MedicationDispense.whenHandedOver",
        "path": "MedicationDispense.whenHandedOver",
        "min": 1
      },
      {
        "id": "MedicationDispense.destination",
        "path": "MedicationDispense.destination",
        "max": "0"
      },
      {
        "id": "MedicationDispense.receiver",
        "path": "MedicationDispense.receiver",
        "max": "0"
      },
      {
        "id": "MedicationDispense.note",
        "path": "MedicationDispense.note",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction",
        "path": "MedicationDispense.dosageInstruction",
        "min": 1,
        "max": "1"
      },
      {
        "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",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.additionalInstruction",
        "path": "MedicationDispense.dosageInstruction.additionalInstruction",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.patientInstruction",
        "path": "MedicationDispense.dosageInstruction.patientInstruction",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.timing",
        "path": "MedicationDispense.dosageInstruction.timing",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.asNeeded[x]",
        "path": "MedicationDispense.dosageInstruction.asNeeded[x]",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.site",
        "path": "MedicationDispense.dosageInstruction.site",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route",
        "path": "MedicationDispense.dosageInstruction.route",
        "definition": "How drug should enter body (Applikationsweg).\r\nUnfortunately HL7 defines this through SNOMED CT - so only text is tranfered without a code-system",
        "min": 1
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.id",
        "path": "MedicationDispense.dosageInstruction.route.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding",
        "path": "MedicationDispense.dosageInstruction.route.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.id",
        "path": "MedicationDispense.dosageInstruction.route.coding.id",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.system",
        "path": "MedicationDispense.dosageInstruction.route.coding.system",
        "definition": "http://medico-emr.net/%KUNDE%/cs/medRoutecs1",
        "comment": "Dynamically resolved for validation\r\n--FixedValue=http://medico-emr.net/%KUNDE%/cs/medRoutecs1",
        "min": 1
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.version",
        "path": "MedicationDispense.dosageInstruction.route.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.code",
        "path": "MedicationDispense.dosageInstruction.route.coding.code",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.dosageInstruction.route.coding.display",
        "definition": "The route of the medication - as a string",
        "min": 1
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.coding.userSelected",
        "path": "MedicationDispense.dosageInstruction.route.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.route.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationDispense.dosageInstruction.route.text",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.method",
        "path": "MedicationDispense.dosageInstruction.method",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.dose[x]",
        "path": "MedicationDispense.dosageInstruction.dose[x]",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.maxDosePerPeriod",
        "path": "MedicationDispense.dosageInstruction.maxDosePerPeriod",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.maxDosePerAdministration",
        "path": "MedicationDispense.dosageInstruction.maxDosePerAdministration",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.maxDosePerLifetime",
        "path": "MedicationDispense.dosageInstruction.maxDosePerLifetime",
        "max": "0"
      },
      {
        "id": "MedicationDispense.dosageInstruction.rate[x]",
        "path": "MedicationDispense.dosageInstruction.rate[x]",
        "max": "0"
      },
      {
        "id": "MedicationDispense.substitution",
        "path": "MedicationDispense.substitution",
        "max": "0"
      },
      {
        "id": "MedicationDispense.detectedIssue",
        "path": "MedicationDispense.detectedIssue",
        "max": "0"
      },
      {
        "id": "MedicationDispense.notDone",
        "path": "MedicationDispense.notDone",
        "max": "0"
      },
      {
        "id": "MedicationDispense.notDoneReason[x]",
        "path": "MedicationDispense.notDoneReason[x]",
        "max": "0"
      },
      {
        "id": "MedicationDispense.eventHistory",
        "path": "MedicationDispense.eventHistory",
        "max": "0"
      }
    ]
  }
}