{
  "resourceType": "StructureDefinition",
  "id": "630",
  "meta": {
    "versionId": "4",
    "lastUpdated": "2018-05-12T15:54:00.715+00:00"
  },
  "url": "http://fhir.de/StructureDefinition/medikationsplanplus/medicationstatement",
  "name": "medikationsplanplus-medicationstatement",
  "status": "draft",
  "date": "2017-08-05T10:21:30.545+00:00",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationStatement.id",
        "path": "MedicationStatement.id",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.meta",
        "path": "MedicationStatement.meta",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.meta.profile",
        "path": "MedicationStatement.meta.profile",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.language",
        "path": "MedicationStatement.language",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.identifier",
        "path": "MedicationStatement.identifier",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.identifier.system",
        "path": "MedicationStatement.identifier.system",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.identifier.value",
        "path": "MedicationStatement.identifier.value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.basedOn",
        "path": "MedicationStatement.basedOn",
        "max": "0"
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "max": "0"
      },
      {
        "id": "MedicationStatement.context",
        "path": "MedicationStatement.context",
        "max": "0"
      },
      {
        "id": "MedicationStatement.status",
        "path": "MedicationStatement.status",
        "comment": "ToDo: Invariante, die \"entered-in-error\"-Statements im Medikationsplan verbietet",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.category",
        "path": "MedicationStatement.category",
        "max": "0"
      },
      {
        "id": "MedicationStatement.medication[x]:medicationReference",
        "path": "MedicationStatement.medicationReference",
        "sliceName": "medicationReference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://fhir.de/StructureDefinition/medikationsplanplus/medication"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x]:medicationReference.reference",
        "path": "MedicationStatement.medicationReference.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod",
        "path": "MedicationStatement.effectivePeriod",
        "sliceName": "effectivePeriod",
        "short": "Einnahmezeitraum",
        "type": [
          {
            "code": "Period"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod.start",
        "path": "MedicationStatement.effectivePeriod.start",
        "short": "Beginn der Einnahme (@ms)",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod.end",
        "path": "MedicationStatement.effectivePeriod.end",
        "short": "Ende der Einnahme (@me)",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dateAsserted",
        "path": "MedicationStatement.dateAsserted",
        "short": "Datum der Erfassung (@c)",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.informationSource",
        "path": "MedicationStatement.informationSource",
        "max": "0",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://fhir.de/StructureDefinition/medikationsplanplus/patient"
          },
          {
            "code": "Reference",
            "targetProfile": "http://fhir.de/StructureDefinition/medikationsplanplus/practitioner"
          },
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
          }
        ]
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://hl7.org/fhir/StructureDefinition/Patient"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.subject.reference",
        "path": "MedicationStatement.subject.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.derivedFrom",
        "path": "MedicationStatement.derivedFrom",
        "max": "0"
      },
      {
        "id": "MedicationStatement.taken",
        "path": "MedicationStatement.taken",
        "short": "fixed: \"na\"",
        "definition": "Das Element \"taken\" wird in R4 nicht mehr verwendet. Die Information wird statt dessen vom Element \"status\" abgedeckt. In STU3 wird hier der fixe Wert \"na\" gesetzt, da die Information, ob ein Medikament vom Patienten tatsächlich eingenommen wurde, nicht erfasst wird.",
        "comment": "https://github.com/hl7germany/medikationsplanplusplus/issues/13",
        "fixedCode": "na",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.reasonNotTaken",
        "path": "MedicationStatement.reasonNotTaken",
        "max": "0"
      },
      {
        "id": "MedicationStatement.reasonCode.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.reasonCode.text",
        "short": "Grund für die Einnahme (@r)",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.reasonReference",
        "path": "MedicationStatement.reasonReference",
        "max": "0"
      },
      {
        "id": "MedicationStatement.note",
        "path": "MedicationStatement.note",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage",
        "path": "MedicationStatement.dosage",
        "slicing": {
          "discriminator": [
            {
              "type": "exists",
              "path": "text"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "5",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.text",
        "path": "MedicationStatement.dosage.text",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.additionalInstruction",
        "path": "MedicationStatement.dosage.additionalInstruction",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.patientInstruction",
        "path": "MedicationStatement.dosage.patientInstruction",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.site",
        "path": "MedicationStatement.dosage.site",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.method",
        "path": "MedicationStatement.dosage.method",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.dose[x]",
        "path": "MedicationStatement.dosage.dose[x]",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage.maxDosePerPeriod",
        "path": "MedicationStatement.dosage.maxDosePerPeriod",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.maxDosePerAdministration:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerAdministration",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.maxDosePerLifetime:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerLifetime",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage.rate[x]",
        "path": "MedicationStatement.dosage.rate[x]",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext",
        "path": "MedicationStatement.dosage",
        "sliceName": "freitext",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:freitext.text",
        "path": "MedicationStatement.dosage.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:freitext.additionalInstruction",
        "path": "MedicationStatement.dosage.additionalInstruction",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.patientInstruction",
        "path": "MedicationStatement.dosage.patientInstruction",
        "max": "0",
        "mustSupport": false
      },
      {
        "id": "MedicationStatement.dosage:freitext.timing",
        "path": "MedicationStatement.dosage.timing",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.timing.code.coding.code",
        "path": "MedicationStatement.dosage.timing.code.coding.code",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.asNeeded[x]:asNeededBoolean",
        "path": "MedicationStatement.dosage.asNeededBoolean",
        "sliceName": "asNeededBoolean",
        "short": "Bedarfs- oder Dauermedikation",
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:freitext.site",
        "path": "MedicationStatement.dosage.site",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.route",
        "path": "MedicationStatement.dosage.route",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.method",
        "path": "MedicationStatement.dosage.method",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.dose[x]",
        "path": "MedicationStatement.dosage.dose[x]",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.maxDosePerPeriod",
        "path": "MedicationStatement.dosage.maxDosePerPeriod",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.maxDosePerAdministration:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerAdministration",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.maxDosePerLifetime:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerLifetime",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:freitext.rate[x]",
        "path": "MedicationStatement.dosage.rate[x]",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert",
        "path": "MedicationStatement.dosage",
        "sliceName": "kodiert",
        "max": "4",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.sequence",
        "path": "MedicationStatement.dosage.sequence",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.text",
        "path": "MedicationStatement.dosage.text",
        "short": "Freitextdosierung (@t)",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.additionalInstruction",
        "path": "MedicationStatement.dosage.additionalInstruction",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.patientInstruction",
        "path": "MedicationStatement.dosage.patientInstruction",
        "short": "Hinweise/Instruktionen an den Patienten für die Einnahme (@i)",
        "definition": "Hinweise/Instruktionen an den Patienten für die Einnahme, zum Beispiel \"morgens nüchtern 30 min vor dem Frühstück\"",
        "max": "0",
        "mustSupport": false
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing",
        "path": "MedicationStatement.dosage.timing",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing.event",
        "path": "MedicationStatement.dosage.timing.event",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing.repeat",
        "path": "MedicationStatement.dosage.timing.repeat",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing.code",
        "path": "MedicationStatement.dosage.timing.code",
        "short": "Einnahmezeitpunkt CM|CD|CV|HS (@m|@d|@v|@h)",
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "TimingAbbreviation"
            }
          ],
          "strength": "required",
          "valueSetUri": "http://fhir.de/ValueSet/medikationsplanplus/einnahmezeitpunkte"
        }
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing.code.coding",
        "path": "MedicationStatement.dosage.timing.code.coding",
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing.code.coding.system",
        "path": "MedicationStatement.dosage.timing.code.coding.system",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.timing.code.coding.code",
        "path": "MedicationStatement.dosage.timing.code.coding.code",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.asNeeded[x]",
        "path": "MedicationStatement.dosage.asNeeded[x]",
        "short": "Bedarfsmedikation",
        "comment": "Muss als dosage.timing.code.text im Slice \"freitext\" angegeben werden",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.site",
        "path": "MedicationStatement.dosage.site",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.route",
        "path": "MedicationStatement.dosage.route",
        "max": "0",
        "mustSupport": false,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName",
              "valueString": "RouteOfAdministration"
            }
          ],
          "strength": "example",
          "valueSetUri": "http://hl7.org/fhir/ValueSet/route-codes"
        }
      },
      {
        "id": "MedicationStatement.dosage:kodiert.route.coding",
        "path": "MedicationStatement.dosage.route.coding",
        "binding": {
          "strength": "required",
          "valueSetUri": "urn:oid: 2.16.840.1.113883.2.6.60.4.11.26"
        }
      },
      {
        "id": "MedicationStatement.dosage:kodiert.route.coding.system",
        "path": "MedicationStatement.dosage.route.coding.system",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage:kodiert.route.coding.code",
        "path": "MedicationStatement.dosage.route.coding.code",
        "min": 1
      },
      {
        "id": "MedicationStatement.dosage:kodiert.method",
        "path": "MedicationStatement.dosage.method",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.doseQuantity:doseQuantity",
        "path": "MedicationStatement.dosage.doseQuantity",
        "sliceName": "doseQuantity",
        "short": "Dosiereinheit kodiert (@du)",
        "comment": "ToDo: Slicing einfügen und DoseRange profilieren",
        "min": 1,
        "type": [
          {
            "code": "Quantity",
            "profile": "http://hl7.org/fhir/StructureDefinition/SimpleQuantity"
          }
        ],
        "example": [
          {
            "label": "1 Stück",
            "valueQuantity": {
              "value": 1,
              "unit": "Stück"
            }
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.doseQuantity:doseQuantity.value",
        "path": "MedicationStatement.dosage.doseQuantity.value",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.doseQuantity:doseQuantity.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.dosage.doseQuantity.unit",
        "definition": "Menschenlesbare repräsentation der Dosierungseinheit oder Freitext für die Dosierung",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.doseQuantity:doseQuantity.system",
        "path": "MedicationStatement.dosage.doseQuantity.system",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.doseQuantity:doseQuantity.code",
        "path": "MedicationStatement.dosage.doseQuantity.code",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage:kodiert.maxDosePerPeriod",
        "path": "MedicationStatement.dosage.maxDosePerPeriod",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.maxDosePerAdministration:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerAdministration",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.maxDosePerLifetime:SimpleQuantity",
        "path": "MedicationStatement.dosage.maxDosePerLifetime",
        "sliceName": "SimpleQuantity",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage:kodiert.rate[x]",
        "path": "MedicationStatement.dosage.rate[x]",
        "max": "0"
      }
    ]
  }
}