{
  "resourceType": "StructureDefinition",
  "id": "medication-eu-core",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm",
      "valueInteger": 2
    },
    {
      "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
      "valueCode": "trial-use"
    }
  ],
  "url": "http://hl7.eu/fhir/base/StructureDefinition/medication-eu-core",
  "name": "MedicationEuCore",
  "title": "Medication (EU core)",
  "status": "active",
  "description": "This profile introduces essential constraints and extensions for the Medication resource that apply across multiple use cases.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "Medication",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/Medication",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "Medication.extension",
        "path": "Medication.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Medication.extension:productName",
        "path": "Medication.extension",
        "sliceName": "productName",
        "short": "Current trade name (authorised name) of the medicinal product.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-productname"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:classification",
        "path": "Medication.extension",
        "sliceName": "classification",
        "short": "Classifications of the product, e.g ATC, narcotic/psychotropic, orphan drug, etc",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-classification"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:sizeOfItem",
        "path": "Medication.extension",
        "sliceName": "sizeOfItem",
        "short": "Size of one item (for example, in a pack of 5 vials, this would represent the size of 1 vial)",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-sizeofitem"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:characteristic",
        "path": "Medication.extension",
        "sliceName": "characteristic",
        "short": "Specifies other descriptive properties of the medication.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-characteristic"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:unitOfPresentation",
        "path": "Medication.extension",
        "sliceName": "unitOfPresentation",
        "short": "Unit of presentation of the product (e.g. tablet, vial, ampoule, etc)",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-unitofpresentation"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:packageType",
        "path": "Medication.extension",
        "sliceName": "packageType",
        "short": "Type of container. This information is more relevant in cases when the packaging has an impact on administration of the product (e.g. pre-filled syringe)",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.eu/fhir/StructureDefinition/medication-package-type"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:device",
        "path": "Medication.extension",
        "sliceName": "device",
        "short": "Device, typically an administration device, included in the product.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-device"
            ]
          }
        ]
      },
      {
        "id": "Medication.extension:device.extension:device",
        "path": "Medication.extension.extension",
        "sliceName": "device"
      },
      {
        "id": "Medication.extension:device.extension:device.value[x]",
        "path": "Medication.extension.extension.value[x]",
        "binding": {
          "strength": "example",
          "valueSet": "http://terminology.ehdsi.eu/ValueSet/eHDSIPackage"
        }
      },
      {
        "id": "Medication.identifier",
        "path": "Medication.identifier",
        "short": "Identifier for the medicinal product, its generic representation, or packaged product (e.g. EMA PMS ID on product or package level)"
      },
      {
        "id": "Medication.code",
        "path": "Medication.code",
        "short": "A terminology-based code for the product (e.g. SNOMED CT code)"
      },
      {
        "id": "Medication.manufacturer",
        "path": "Medication.manufacturer",
        "short": "Marketing authorisation holder of the medicinal product. If the product does not have a marketing authorisation, the manufactured information may be used. It is sufficient to populate only name and optionally an identifier of the organisation."
      },
      {
        "id": "Medication.form",
        "path": "Medication.form",
        "binding": {
          "strength": "example",
          "valueSet": "http://terminology.ehdsi.eu/ValueSet/eHDSIDoseForm"
        }
      },
      {
        "id": "Medication.amount",
        "path": "Medication.amount",
        "short": "Amount of the medication (for example, in a package or a vial)"
      },
      {
        "id": "Medication.ingredient",
        "path": "Medication.ingredient",
        "short": "Ingredient or a part product. For combination packs, each ingredient can be a separate manufactured item with its own ingredients, dose form, and strength"
      },
      {
        "id": "Medication.ingredient.item[x]",
        "path": "Medication.ingredient.item[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "Medication.ingredient.item[x]:itemReference",
        "path": "Medication.ingredient.item[x]",
        "sliceName": "itemReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/medication-eu-core"
            ]
          }
        ]
      },
      {
        "id": "Medication.ingredient.item[x]:itemCodeableConcept",
        "path": "Medication.ingredient.item[x]",
        "sliceName": "itemCodeableConcept",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/medicine-active-substances-uv-ips",
          "extension": [
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "preferred"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://terminology.ehdsi.eu/ValueSet/eHDSISubstance"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "MyHealth@EU crossborder value set for substances. Based on EMA SPOR SMS."
                }
              ]
            }
          ]
        }
      },
      {
        "id": "Medication.ingredient.isActive",
        "path": "Medication.ingredient.isActive",
        "short": "Active ingredient indicator. By default, only active ingredients are expected - therefore, the default value is true."
      },
      {
        "id": "Medication.ingredient.strength",
        "path": "Medication.ingredient.strength",
        "short": "Amount of substance in product (presentation or concentration strength)",
        "definition": "Definitional resources should be used for specifying the different types of strengths: presentation; concentration."
      },
      {
        "id": "Medication.ingredient.strength.extension:basisOfStrengthSubstance",
        "path": "Medication.ingredient.strength.extension",
        "sliceName": "basisOfStrengthSubstance",
        "short": "Substance for which the strength is provided (this could be different from the precise active ingredient).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://profiles.ihe.net/PHARM/MPD/StructureDefinition/ihe-ext-medication-strengthsubstance"
            ]
          }
        ]
      },
      {
        "id": "Medication.batch.lotNumber",
        "path": "Medication.batch.lotNumber",
        "short": "Lot Number"
      },
      {
        "id": "Medication.batch.expirationDate",
        "path": "Medication.batch.expirationDate",
        "short": "Expiration Date"
      }
    ]
  }
}
