{
  "resourceType": "StructureDefinition",
  "url": "http://digen.nublar.de/fhir/StructureDefinition/AbrechnungsOriginalMedicationStatement",
  "name": "AbrechnungsOriginalMedicationStatement",
  "status": "draft",
  "description": "This resource represents a claims-derived medication event. Changes to this resource must always be traceable to a new claim or a change in an existing claim. These resources are used when assembling a PresentableMedicationStatement.",
  "fhirVersion": "3.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationStatement.meta.profile",
        "path": "MedicationStatement.meta.profile",
        "max": "1"
      },
      {
        "id": "MedicationStatement.meta.security",
        "path": "MedicationStatement.meta.security",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.meta.security:confidentiality",
        "path": "MedicationStatement.meta.security",
        "sliceName": "confidentiality",
        "short": "Verbergen?",
        "definition": "The confidentiality of the object. Based on the patient's judgement. This allows the patient to hide the object from all other users.",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "description": "ValueSet for confidentialityCodes in DiGeN",
          "valueSetReference": {
            "reference": "http://digen.nublar.de/fhir/ValueSet/confidentialityCodesForDiGeN"
          }
        }
      },
      {
        "id": "MedicationStatement.meta.security:confidentiality.system",
        "path": "MedicationStatement.meta.security.system",
        "min": 1
      },
      {
        "id": "MedicationStatement.meta.security:confidentiality.version",
        "path": "MedicationStatement.meta.security.version",
        "max": "0"
      },
      {
        "id": "MedicationStatement.meta.tag",
        "path": "MedicationStatement.meta.tag",
        "max": "0"
      },
      {
        "id": "MedicationStatement.implicitRules",
        "path": "MedicationStatement.implicitRules",
        "max": "0"
      },
      {
        "id": "MedicationStatement.language",
        "path": "MedicationStatement.language",
        "max": "0"
      },
      {
        "id": "MedicationStatement.contained",
        "path": "MedicationStatement.contained",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.contained:dispenseResource",
        "path": "MedicationStatement.contained",
        "sliceName": "dispenseResource",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "MedicationDispense",
            "profile": "http://digen.nublar.de/fhir/StructureDefinition/DigenMedicationStatementDispense"
          }
        ]
      },
      {
        "id": "MedicationStatement.contained:dispenseResource.performer",
        "path": "MedicationStatement.contained.performer",
        "min": 1
      },
      {
        "id": "MedicationStatement.contained:dispenseResource.whenHandedOver",
        "path": "MedicationStatement.contained.whenHandedOver",
        "min": 1
      },
      {
        "id": "MedicationStatement.contained:requestResource",
        "path": "MedicationStatement.contained",
        "sliceName": "requestResource",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "MedicationRequest",
            "profile": "http://digen.nublar.de/fhir/StructureDefinition/DigenMedicationStatementRequest"
          }
        ]
      },
      {
        "id": "MedicationStatement.contained:requestResource.requester.agent.identifier",
        "path": "MedicationStatement.contained.requester.agent.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.contained:requestResource.requester.onBehalfOf.identifier",
        "path": "MedicationStatement.contained.requester.onBehalfOf.identifier",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.identifier.id",
        "path": "MedicationStatement.identifier.id",
        "max": "0"
      },
      {
        "id": "MedicationStatement.identifier.use",
        "path": "MedicationStatement.identifier.use",
        "max": "0"
      },
      {
        "id": "MedicationStatement.identifier.type",
        "path": "MedicationStatement.identifier.type",
        "max": "0"
      },
      {
        "id": "MedicationStatement.identifier.system",
        "path": "MedicationStatement.identifier.system",
        "definition": "Establishes the namespace for the value - that is, a URL that describes a set values that are unique.\r\nThe identifier ist built usind the prescriptionID, the namespace OID depends on and is specific for the AOK, the patient is insuree of.",
        "comment": "Use the following OIDs:\r\n1.2.276.0.76.3.1.321.1.1.6.27 for DiGeN-spezifische Prescription-Identifikation (AOK Hessen)\r\n1.2.276.0.76.3.1.321.1.1.6.28 for DiGeN-spezifische Prescription-Identifikation (AOK Baden-Württemberg)\r\n1.2.276.0.76.3.1.321.1.1.6.29 for DiGeN-spezifische Prescription-Identifikation (AOK Bayern)\r\n1.2.276.0.76.3.1.321.1.1.6.30 for DiGeN-spezifische Prescription-Identifikation (AOK Bremen/Bremerhaven)\r\n1.2.276.0.76.3.1.321.1.1.6.31 for DiGeN-spezifische Prescription-Identifikation (AOK Niedersachsen)\r\n1.2.276.0.76.3.1.321.1.1.6.32 for DiGeN-spezifische Prescription-Identifikation (AOK Nordost)\r\n1.2.276.0.76.3.1.321.1.1.6.33 for DiGeN-spezifische Prescription-Identifikation (AOK NORDWEST)\r\n1.2.276.0.76.3.1.321.1.1.6.34 for DiGeN-spezifische Prescription-Identifikation (AOK Sachsen-Anhalt)\r\n1.2.276.0.76.3.1.321.1.1.6.35 for DiGeN-spezifische Prescription-Identifikation (AOK PLUS - Sachsen und Thüringen)\r\n1.2.276.0.76.3.1.321.1.1.6.36 for DiGeN-spezifische Prescription-Identifikation (AOK Rheinland/Hamburg)\r\n1.2.276.0.76.3.1.321.1.1.6.37 for DiGeN-spezifische Prescription-Identifikation (AOK Rheinland-Pfalz/Saarland)",
        "min": 1
      },
      {
        "id": "MedicationStatement.identifier.value",
        "path": "MedicationStatement.identifier.value",
        "min": 1
      },
      {
        "id": "MedicationStatement.identifier.period",
        "path": "MedicationStatement.identifier.period",
        "max": "0"
      },
      {
        "id": "MedicationStatement.identifier.assigner",
        "path": "MedicationStatement.identifier.assigner",
        "max": "0"
      },
      {
        "id": "MedicationStatement.basedOn",
        "path": "MedicationStatement.basedOn",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://digen.nublar.de/fhir/StructureDefinition/DigenMedicationStatementRequest",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.basedOn.identifier",
        "path": "MedicationStatement.basedOn.identifier",
        "max": "0"
      },
      {
        "id": "MedicationStatement.basedOn.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.basedOn.display",
        "max": "0"
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": "http://digen.nublar.de/fhir/StructureDefinition/DigenMedicationStatementDispense",
            "aggregation": [
              "contained"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.partOf.identifier",
        "path": "MedicationStatement.partOf.identifier",
        "max": "0"
      },
      {
        "id": "MedicationStatement.partOf.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.partOf.display",
        "max": "0"
      },
      {
        "id": "MedicationStatement.context",
        "path": "MedicationStatement.context",
        "max": "0"
      },
      {
        "id": "MedicationStatement.status",
        "path": "MedicationStatement.status",
        "fixedCode": "intended"
      },
      {
        "id": "MedicationStatement.category",
        "path": "MedicationStatement.category",
        "min": 1,
        "fixedCodeableConcept": {
          "coding": [
            {
              "system": "http://digen.nublar.de/fhir/CodeSystem/1.2.276.0.76.3.1.321.1.1.5.8",
              "code": "kkis",
              "display": "Krankenkassen-Informationssystem"
            }
          ]
        },
        "binding": {
          "strength": "required",
          "description": "Data Source Types",
          "valueSetReference": {
            "reference": "http://digen.nublar.de/fhir/ValueSet/dataSourceTypes"
          }
        }
      },
      {
        "id": "MedicationStatement.category.coding",
        "path": "MedicationStatement.category.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationStatement.category.coding.system",
        "path": "MedicationStatement.category.coding.system",
        "min": 1
      },
      {
        "id": "MedicationStatement.category.coding.version",
        "path": "MedicationStatement.category.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationStatement.category.coding.code",
        "path": "MedicationStatement.category.coding.code",
        "min": 1
      },
      {
        "id": "MedicationStatement.category.coding.userSelected",
        "path": "MedicationStatement.category.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept",
        "path": "MedicationStatement.medicationCodeableConcept",
        "sliceName": "medicationCodeableConcept",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept.coding",
        "path": "MedicationStatement.medicationCodeableConcept.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept.coding.system",
        "path": "MedicationStatement.medicationCodeableConcept.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/ifa/pzn"
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept.coding.version",
        "path": "MedicationStatement.medicationCodeableConcept.coding.version",
        "max": "0"
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept.coding.code",
        "path": "MedicationStatement.medicationCodeableConcept.coding.code",
        "min": 1
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept.coding.userSelected",
        "path": "MedicationStatement.medicationCodeableConcept.coding.userSelected",
        "max": "0"
      },
      {
        "id": "MedicationStatement.medication[x]:medicationCodeableConcept.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.medicationCodeableConcept.text",
        "max": "0"
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod",
        "path": "MedicationStatement.effectivePeriod",
        "sliceName": "effectivePeriod",
        "max": "0",
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod.start",
        "path": "MedicationStatement.effectivePeriod.start",
        "max": "0"
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod.end",
        "path": "MedicationStatement.effectivePeriod.end",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dateAsserted",
        "path": "MedicationStatement.dateAsserted",
        "comment": "Resource creation date.",
        "min": 1
      },
      {
        "id": "MedicationStatement.informationSource",
        "path": "MedicationStatement.informationSource",
        "max": "0"
      },
      {
        "id": "MedicationStatement.subject.reference",
        "path": "MedicationStatement.subject.reference",
        "min": 1
      },
      {
        "id": "MedicationStatement.subject.identifier",
        "path": "MedicationStatement.subject.identifier",
        "max": "0"
      },
      {
        "id": "MedicationStatement.subject.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "MedicationStatement.subject.display",
        "max": "0"
      },
      {
        "id": "MedicationStatement.derivedFrom",
        "path": "MedicationStatement.derivedFrom",
        "max": "0"
      },
      {
        "id": "MedicationStatement.taken",
        "path": "MedicationStatement.taken",
        "fixedCode": "unk"
      },
      {
        "id": "MedicationStatement.reasonNotTaken",
        "path": "MedicationStatement.reasonNotTaken",
        "max": "0"
      },
      {
        "id": "MedicationStatement.reasonCode",
        "path": "MedicationStatement.reasonCode",
        "max": "0"
      },
      {
        "id": "MedicationStatement.reasonReference",
        "path": "MedicationStatement.reasonReference",
        "max": "0"
      },
      {
        "id": "MedicationStatement.note",
        "path": "MedicationStatement.note",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage",
        "path": "MedicationStatement.dosage",
        "max": "0"
      }
    ]
  }
}