{
  "resourceType": "StructureDefinition",
  "id": "medicationStatement-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/medicationStatement-eu-core",
  "name": "MedicationStatementEuCore",
  "title": "MedicationStatement (EU core)",
  "status": "active",
  "description": "This profile introduces essential constraints and extensions for the MedicationStatement resource that apply across multiple use cases.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationStatement.language",
        "path": "MedicationStatement.language",
        "short": "Language of the statement"
      },
      {
        "id": "MedicationStatement.extension",
        "path": "MedicationStatement.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.extension:adherence",
        "path": "MedicationStatement.extension",
        "sliceName": "adherence",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/5.0/StructureDefinition/extension-MedicationStatement.adherence"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:adherence.extension:code",
        "path": "MedicationStatement.extension.extension",
        "sliceName": "code",
        "short": "Type of adherence."
      },
      {
        "id": "MedicationStatement.identifier",
        "path": "MedicationStatement.identifier",
        "short": "Medication Statement Identifier"
      },
      {
        "id": "MedicationStatement.status",
        "path": "MedicationStatement.status",
        "short": "State of the medication"
      },
      {
        "id": "MedicationStatement.statusReason",
        "path": "MedicationStatement.statusReason",
        "short": "Reason for the 'exception' statuses of the medication"
      },
      {
        "id": "MedicationStatement.category",
        "path": "MedicationStatement.category",
        "short": "Type of intended use",
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "valueString": "MedicationStatementCategory",
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "preferred"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://hl7.eu/fhir/base/ValueSet/medicationIntendedUse-eu"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "When category is used for describing the intended use of the medication (e.g. Prophylactic use)."
                }
              ]
            }
          ],
          "strength": "preferred",
          "description": "A coded concept identifying where the medication included in the MedicationStatement is expected to be consumed or administered.",
          "valueSet": "http://hl7.org/fhir/ValueSet/medication-statement-category"
        }
      },
      {
        "id": "MedicationStatement.medication[x]",
        "path": "MedicationStatement.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          },
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/medication-eu-core"
            ]
          }
        ],
        "binding": {
          "strength": "example",
          "valueSet": "http://hl7.org/fhir/uv/ips/ValueSet/medication-uv-ips"
        }
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/patient-eu-core",
              "http://hl7.org/fhir/StructureDefinition/Group"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.effective[x]",
        "path": "MedicationStatement.effective[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "id": "MedicationStatement.effective[x]:effectivePeriod",
        "path": "MedicationStatement.effective[x]",
        "sliceName": "effectivePeriod",
        "short": "Period when the medication is/was or should be used.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "MedicationStatement.informationSource",
        "path": "MedicationStatement.informationSource",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.eu/fhir/base/StructureDefinition/patient-eu-core",
              "http://hl7.eu/fhir/base/StructureDefinition/practitioner-eu-core",
              "http://hl7.eu/fhir/base/StructureDefinition/practitionerRole-eu-core",
              "http://hl7.eu/fhir/base/StructureDefinition/organization-eu-core",
              "http://hl7.org/fhir/StructureDefinition/RelatedPerson"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.derivedFrom",
        "path": "MedicationStatement.derivedFrom",
        "short": "The reference to the source of the statement"
      },
      {
        "id": "MedicationStatement.reasonCode",
        "path": "MedicationStatement.reasonCode",
        "short": "Coded reason for use"
      },
      {
        "id": "MedicationStatement.note.text",
        "path": "MedicationStatement.note.text",
        "short": "Textual note about the statement"
      },
      {
        "id": "MedicationStatement.dosage",
        "path": "MedicationStatement.dosage",
        "short": "Details of how medication is/was taken or should be taken."
      }
    ]
  }
}
