{
  "resourceType": "StructureDefinition",
  "url": "http://digen.nublar.de/fhir/StructureDefinition/DigenMedication",
  "name": "DigenMedication",
  "status": "draft",
  "description": "An entry from the medication database that is defined by a PZN. The PZN is specific to a retail medication product with a defined package size.",
  "fhirVersion": "3.0.2",
  "kind": "resource",
  "abstract": false,
  "type": "Medication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Medication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Medication.id",
        "path": "Medication.id",
        "definition": "The internal ID of the object in the abdata database",
        "comment": "abdata_basisinfo/uuid"
      },
      {
        "id": "Medication.meta.security",
        "path": "Medication.meta.security",
        "max": "0"
      },
      {
        "id": "Medication.implicitRules",
        "path": "Medication.implicitRules",
        "max": "0"
      },
      {
        "id": "Medication.language",
        "path": "Medication.language",
        "fixedCode": "de"
      },
      {
        "id": "Medication.contained",
        "path": "Medication.contained",
        "max": "0"
      },
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "short": "PZN",
        "min": 1
      },
      {
        "id": "Medication.code.id",
        "path": "Medication.code.id",
        "max": "0"
      },
      {
        "id": "Medication.code.coding",
        "path": "Medication.code.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Medication.code.coding.id",
        "path": "Medication.code.coding.id",
        "max": "0"
      },
      {
        "id": "Medication.code.coding.system",
        "path": "Medication.code.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/ifa/pzn"
      },
      {
        "id": "Medication.code.coding.version",
        "path": "Medication.code.coding.version",
        "requirements": "Wir würden auch PZNs vorhalten, die nicht mehr am Markt verfügbar sind und daher auch nicht in der DB vorkommen. Daher gehen wir davon aus, dass eine Versionierung nicht notwendig ist, da die DB aus unserer Sicht nur neue Werte hinzubekommt.",
        "max": "0"
      },
      {
        "id": "Medication.code.coding.code",
        "path": "Medication.code.coding.code",
        "short": "PZN",
        "definition": "The entry's PZN. There is exactly one Medication entry per PZN.",
        "comment": "The PZN will be normalized to 8 digits. \r\nabdata_basisinfo/pzn",
        "min": 1
      },
      {
        "id": "Medication.code.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.code.coding.display",
        "definition": "A combined field that is based on either long name, product name, or short name (in that order of preference).",
        "comment": "1. abdata_basisinfo/langname\r\n2. abdata_basisinfo/produktname\r\n3. abdata_basisinfo/kurzname",
        "min": 1
      },
      {
        "id": "Medication.code.coding.userSelected",
        "path": "Medication.code.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.code.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.code.text",
        "max": "0"
      },
      {
        "id": "Medication.isBrand",
        "path": "Medication.isBrand",
        "min": 1,
        "fixedBoolean": true
      },
      {
        "id": "Medication.isOverTheCounter",
        "path": "Medication.isOverTheCounter",
        "max": "0"
      },
      {
        "id": "Medication.manufacturer",
        "path": "Medication.manufacturer",
        "max": "0"
      },
      {
        "id": "Medication.form",
        "path": "Medication.form",
        "short": "Darreichungsform",
        "min": 1
      },
      {
        "id": "Medication.form.id",
        "path": "Medication.form.id",
        "max": "0"
      },
      {
        "id": "Medication.form.coding",
        "path": "Medication.form.coding",
        "min": 1,
        "max": "1",
        "binding": {
          "strength": "required",
          "valueSetUri": "http://fhir.de/ValueSet/kbv/s-bmp-darreichungsform"
        }
      },
      {
        "id": "Medication.form.coding.id",
        "path": "Medication.form.coding.id",
        "max": "0"
      },
      {
        "id": "Medication.form.coding.system",
        "path": "Medication.form.coding.system",
        "min": 1
      },
      {
        "id": "Medication.form.coding.version",
        "path": "Medication.form.coding.version",
        "fixedString": "1.02"
      },
      {
        "id": "Medication.form.coding.code",
        "path": "Medication.form.coding.code",
        "comment": "Die Schlüsseltabelle enthält eine Liste von kodierten Darreichungsformen, die im Rahmen der Spezifikation zum bundeseinheitlichen Medikationsplan nach § 31a SGB V zu verwenden sind (Anhang 3 zu Anlage 3 Vereinbarung BMP).\r\nabdata_darreichungsform/dar_key",
        "min": 1
      },
      {
        "id": "Medication.form.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.form.coding.display",
        "comment": "abdata_darreichungsform/bezeichnung",
        "min": 1
      },
      {
        "id": "Medication.form.coding.userSelected",
        "path": "Medication.form.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.form.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.form.text",
        "max": "0"
      },
      {
        "id": "Medication.ingredient",
        "path": "Medication.ingredient",
        "short": "Wirkstoff und Wirkstoffmenge",
        "definition": "The actual ingredient or compound and its amount. Only the major active ingredient is included. There may be other active ingredients, which are not included in the resource.",
        "max": "1"
      },
      {
        "id": "Medication.ingredient.id",
        "path": "Medication.ingredient.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept",
        "path": "Medication.ingredient.itemCodeableConcept",
        "sliceName": "itemCodeableConcept",
        "short": "Wirkstoff",
        "definition": "Only the major active ingredient is included. There may be other active ingredients, which are not included in the resource.",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept.id",
        "path": "Medication.ingredient.itemCodeableConcept.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept.coding",
        "path": "Medication.ingredient.itemCodeableConcept.coding",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.ingredient.itemCodeableConcept.text",
        "short": "Plain text representation of the ingredient",
        "requirements": "abdata_wirkstoff/bezeichnung",
        "min": 1
      },
      {
        "id": "Medication.ingredient.isActive",
        "path": "Medication.ingredient.isActive",
        "comment": "Only active ingredients are returned",
        "min": 1,
        "fixedBoolean": true
      },
      {
        "id": "Medication.ingredient.amount",
        "path": "Medication.ingredient.amount",
        "short": "Wirkstärke",
        "definition": "Specifies how much of the ingredient there is in this Medication.  For example, 250 mg per tablet.  This is expressed as a ratio where the numerator is 250mg and the denominator is 1 tablet."
      },
      {
        "id": "Medication.ingredient.amount.id",
        "path": "Medication.ingredient.amount.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.numerator",
        "path": "Medication.ingredient.amount.numerator",
        "min": 1
      },
      {
        "id": "Medication.ingredient.amount.numerator.id",
        "path": "Medication.ingredient.amount.numerator.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.numerator.value",
        "path": "Medication.ingredient.amount.numerator.value",
        "short": "Wirkstärke ohne Einheit",
        "comment": "abdata_wirkstaerke/stoffmenge: Teil vor \"~g\" (86,85~gmg)",
        "min": 1
      },
      {
        "id": "Medication.ingredient.amount.numerator.comparator",
        "path": "Medication.ingredient.amount.numerator.comparator",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.numerator.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.ingredient.amount.numerator.unit",
        "short": "Einheit der Wirkstärke",
        "comment": "abdata_wirkstaerke/stoffmenge: Teil nach \"~g\" (86,85~gmg)",
        "min": 1
      },
      {
        "id": "Medication.ingredient.amount.numerator.system",
        "path": "Medication.ingredient.amount.numerator.system",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.numerator.code",
        "path": "Medication.ingredient.amount.numerator.code",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.denominator",
        "path": "Medication.ingredient.amount.denominator",
        "short": "Wirkstoffmenge pro",
        "definition": "Ingredient amount per \"X\""
      },
      {
        "id": "Medication.ingredient.amount.denominator.id",
        "path": "Medication.ingredient.amount.denominator.id",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.denominator.value",
        "path": "Medication.ingredient.amount.denominator.value",
        "min": 1,
        "fixedDecimal": 1
      },
      {
        "id": "Medication.ingredient.amount.denominator.comparator",
        "path": "Medication.ingredient.amount.denominator.comparator",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.denominator.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.ingredient.amount.denominator.unit",
        "short": "Bezugsangabe",
        "definition": "Unit that was used for calculating the active ingredient strength.",
        "comment": "May be as simple as \"Stück\", \"Tablette\", \"Kapsel\" or as complicated as \"1ml Tropfen = 20 Tropfen\"\r\nTaken from medication DB table FAK, Field \"Bezugsangabe zur Zusammensetzung\"",
        "min": 1
      },
      {
        "id": "Medication.ingredient.amount.denominator.system",
        "path": "Medication.ingredient.amount.denominator.system",
        "max": "0"
      },
      {
        "id": "Medication.ingredient.amount.denominator.code",
        "path": "Medication.ingredient.amount.denominator.code",
        "max": "0"
      },
      {
        "id": "Medication.package.id",
        "path": "Medication.package.id",
        "max": "0"
      },
      {
        "id": "Medication.package.container",
        "path": "Medication.package.container",
        "max": "0"
      },
      {
        "id": "Medication.package.content.id",
        "path": "Medication.package.content.id",
        "max": "0"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept",
        "path": "Medication.package.content.itemCodeableConcept",
        "sliceName": "itemCodeableConcept",
        "requirements": "We don't have information regarding different parts in a package. We are trying to make a statement about the whole package. Therefore the item must reference itself. The simplest way to do this is to use codeableConcept to refer to the same PZN.",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ]
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.id",
        "path": "Medication.package.content.itemCodeableConcept.id",
        "max": "0"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding",
        "path": "Medication.package.content.itemCodeableConcept.coding",
        "min": 1,
        "max": "1"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding.id",
        "path": "Medication.package.content.itemCodeableConcept.coding.id",
        "max": "0"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding.system",
        "path": "Medication.package.content.itemCodeableConcept.coding.system",
        "min": 1,
        "fixedUri": "http://fhir.de/CodeSystem/ifa/pzn"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding.version",
        "path": "Medication.package.content.itemCodeableConcept.coding.version",
        "max": "0"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding.code",
        "path": "Medication.package.content.itemCodeableConcept.coding.code",
        "short": "PZN",
        "definition": "Use the PZN to refer to the package as a whole",
        "requirements": "Mandatory",
        "min": 1
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding.display",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.package.content.itemCodeableConcept.coding.display",
        "max": "0"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.coding.userSelected",
        "path": "Medication.package.content.itemCodeableConcept.coding.userSelected",
        "max": "0"
      },
      {
        "id": "Medication.package.content.item[x]:itemCodeableConcept.text",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.package.content.itemCodeableConcept.text",
        "max": "0"
      },
      {
        "id": "Medication.package.content.amount",
        "path": "Medication.package.content.amount",
        "short": "Packungsgröße",
        "comment": "This includes the precise amount as well as a normalized package size categorization (Normgröße)"
      },
      {
        "id": "Medication.package.content.amount.id",
        "path": "Medication.package.content.amount.id",
        "max": "0"
      },
      {
        "id": "Medication.package.content.amount.extension",
        "path": "Medication.package.content.amount.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "open"
        }
      },
      {
        "id": "Medication.package.content.amount.extension:NormgroesseSlice",
        "path": "Medication.package.content.amount.extension",
        "sliceName": "NormgroesseSlice",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://digen.nublar.de/fhir/StructureDefinition/NormgroesseExtension"
          }
        ]
      },
      {
        "id": "Medication.package.content.amount.value",
        "path": "Medication.package.content.amount.value",
        "short": "Genaue Packungsgröße",
        "definition": "The precise amount of product in the package.",
        "comment": "abdata_basisinfo/pkg_menge",
        "min": 1
      },
      {
        "id": "Medication.package.content.amount.unit",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.package.content.amount.unit",
        "short": "Einheit der Packungsgröße",
        "definition": "The unit of the (precise) amount of product in the package.",
        "comment": "abdata_basisinfo/pkg_einheit",
        "min": 1
      },
      {
        "id": "Medication.package.content.amount.system",
        "path": "Medication.package.content.amount.system",
        "max": "0"
      },
      {
        "id": "Medication.package.content.amount.code",
        "path": "Medication.package.content.amount.code",
        "max": "0"
      },
      {
        "id": "Medication.package.batch",
        "path": "Medication.package.batch",
        "max": "0"
      },
      {
        "id": "Medication.image",
        "path": "Medication.image",
        "definition": "Photo of the medication and/or its packaging."
      },
      {
        "id": "Medication.image.id",
        "path": "Medication.image.id",
        "comment": "abdata_plusx_bild/id"
      },
      {
        "id": "Medication.image.contentType",
        "path": "Medication.image.contentType",
        "comment": "This SHALL be an image MIME type.\r\nabdata_plusx_bild/contenttype",
        "min": 1
      },
      {
        "id": "Medication.image.language",
        "path": "Medication.image.language",
        "max": "0"
      },
      {
        "id": "Medication.image.data",
        "path": "Medication.image.data",
        "comment": "The base64-encoded data SHALL be expressed in the same character set as the base resource XML or JSON.\r\nabdata_plusx_bild/datab64"
      },
      {
        "id": "Medication.image.url",
        "path": "Medication.image.url",
        "example": [
          {
            "label": "large image",
            "valueUri": "api/abdata/medication/image/large/00000106"
          },
          {
            "label": "thumbnail image",
            "valueUri": "api/abdata/medication/image/thumbnail/00000106"
          }
        ]
      },
      {
        "id": "Medication.image.size",
        "path": "Medication.image.size",
        "max": "0"
      },
      {
        "id": "Medication.image.hash",
        "path": "Medication.image.hash",
        "max": "0"
      },
      {
        "id": "Medication.image.title",
        "extension": [
          {
            "url": "http://hl7.org/fhir/StructureDefinition/elementdefinition-translatable",
            "valueBoolean": true
          }
        ],
        "path": "Medication.image.title",
        "definition": "The title is used to differentiate between thumbnail image or large image.",
        "min": 1
      },
      {
        "id": "Medication.image.creation",
        "path": "Medication.image.creation",
        "min": 1
      }
    ]
  }
}