{
  "resourceType": "StructureDefinition",
  "id": "MedicationStatement",
  "url": "https://fhir.centraxx.de/StructureDefinition/MedicationStatement",
  "version": "2025.4.0",
  "name": "MedicationStatement",
  "status": "active",
  "publisher": "Kairos an IQVIA business",
  "description": "Represents a CentraXX medication.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationStatement.extension",
        "path": "MedicationStatement.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "9",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:updateWithOverwrite",
        "path": "MedicationStatement.extension",
        "sliceName": "updateWithOverwrite",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/updateWithOverwrite"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:fillerOrderNumber",
        "path": "MedicationStatement.extension",
        "sliceName": "fillerOrderNumber",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/fillerOrderNumber"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:placerOrderNumber",
        "path": "MedicationStatement.extension",
        "sliceName": "placerOrderNumber",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/placerOrderNumber"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:type",
        "path": "MedicationStatement.extension",
        "sliceName": "type",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/type"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:resultDate",
        "path": "MedicationStatement.extension",
        "sliceName": "resultDate",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/resultDate"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:transcriptionist",
        "path": "MedicationStatement.extension",
        "sliceName": "transcriptionist",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/transcriptionist"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:prescriber",
        "path": "MedicationStatement.extension",
        "sliceName": "prescriber",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/prescribedBy"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:isPrescription",
        "path": "MedicationStatement.extension",
        "sliceName": "isPrescription",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/isPrescription"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.extension:ordinanceReleaseMethod",
        "path": "MedicationStatement.extension",
        "sliceName": "ordinanceReleaseMethod",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/ordinanceReleaseMethod"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "slicing": {
          "discriminator": [
            {
              "type": "exists",
              "path": "reference"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/MedicationStatement"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byReference",
        "path": "MedicationStatement.partOf",
        "sliceName": "byReference",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/MedicationStatement"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byReference.reference",
        "path": "MedicationStatement.partOf.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byIdentifier",
        "path": "MedicationStatement.partOf",
        "sliceName": "byIdentifier",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/MedicationStatement"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byIdentifier.type",
        "path": "MedicationStatement.partOf.type",
        "min": 1,
        "fixedUri": "MedicationStatement",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byIdentifier.identifier",
        "path": "MedicationStatement.partOf.identifier",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byIdentifier.identifier.extension",
        "path": "MedicationStatement.partOf.identifier.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 2,
        "max": "2",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byIdentifier.identifier.extension:medicationCode",
        "path": "MedicationStatement.partOf.identifier.extension",
        "sliceName": "medicationCode",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/identifier/code"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.partOf:byIdentifier.identifier.extension:fillerOrderNumber",
        "path": "MedicationStatement.partOf.identifier.extension",
        "sliceName": "fillerOrderNumber",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/identifier/fillerOrderNumber"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.status",
        "path": "MedicationStatement.status",
        "min": 1,
        "fixedString": "completed",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x]",
        "path": "MedicationStatement.medication[x]",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding",
        "path": "MedicationStatement.medication[x].coding",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "system"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "4",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:medication",
        "path": "MedicationStatement.medication[x].coding",
        "sliceName": "medication",
        "min": 1,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:medication.system",
        "path": "MedicationStatement.medication[x].coding.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medication",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:medication.code",
        "path": "MedicationStatement.medication[x].coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:agent",
        "path": "MedicationStatement.medication[x].coding",
        "sliceName": "agent",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:agent.system",
        "path": "MedicationStatement.medication[x].coding.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medication/agent",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:agent.code",
        "path": "MedicationStatement.medication[x].coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:agentGroup",
        "path": "MedicationStatement.medication[x].coding",
        "sliceName": "agentGroup",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:agentGroup.system",
        "path": "MedicationStatement.medication[x].coding.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medication/agentGroup",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:agentGroup.code",
        "path": "MedicationStatement.medication[x].coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:methodOfApplication",
        "path": "MedicationStatement.medication[x].coding",
        "sliceName": "methodOfApplication",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:methodOfApplication.system",
        "path": "MedicationStatement.medication[x].coding.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medication/applicationMethod",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.medication[x].coding:methodOfApplication.code",
        "path": "MedicationStatement.medication[x].coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.context",
        "path": "MedicationStatement.context",
        "min": 0,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Encounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.effective[x]",
        "path": "MedicationStatement.effective[x]",
        "min": 0,
        "type": [
          {
            "code": "Period"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.effective[x].start",
        "path": "MedicationStatement.effective[x].start",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.effective[x].end",
        "path": "MedicationStatement.effective[x].end",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dateAsserted",
        "path": "MedicationStatement.dateAsserted",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.informationSource",
        "path": "MedicationStatement.informationSource",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.centraxx.de/StructureDefinition/Practitioner"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.note",
        "path": "MedicationStatement.note",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.note.text",
        "path": "MedicationStatement.note.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage",
        "path": "MedicationStatement.dosage",
        "min": 0,
        "max": "1",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.text",
        "path": "MedicationStatement.dosage.text",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.additionalInstruction",
        "path": "MedicationStatement.dosage.additionalInstruction",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.additionalInstruction.text",
        "path": "MedicationStatement.dosage.additionalInstruction.text",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.timing",
        "path": "MedicationStatement.dosage.timing",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.timing.event",
        "path": "MedicationStatement.dosage.timing.event",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.asNeeded[x]",
        "path": "MedicationStatement.dosage.asNeeded[x]",
        "min": 0,
        "type": [
          {
            "code": "boolean"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.route",
        "path": "MedicationStatement.dosage.route",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.route.coding",
        "path": "MedicationStatement.dosage.route.coding",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.route.coding.system",
        "path": "MedicationStatement.dosage.route.coding.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medication/applicationForm",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.route.coding.code",
        "path": "MedicationStatement.dosage.route.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.method",
        "path": "MedicationStatement.dosage.method",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.method.coding",
        "path": "MedicationStatement.dosage.method.coding",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.method.coding.system",
        "path": "MedicationStatement.dosage.method.coding.system",
        "min": 1,
        "fixedString": "https://fhir.centraxx.de/system/medication/applicationMedium",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.method.coding.code",
        "path": "MedicationStatement.dosage.method.coding.code",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate",
        "path": "MedicationStatement.dosage.doseAndRate",
        "slicing": {
          "discriminator": [
            {
              "type": "pattern",
              "path": "type"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "4",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription",
        "path": "MedicationStatement.dosage.doseAndRate",
        "sliceName": "prescription",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.extension",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.extension:doseValue",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "sliceName": "doseValue",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/doseValue"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.type",
        "path": "MedicationStatement.dosage.doseAndRate.type",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://fhir.centraxx.de/system/medication/doseType",
              "code": "PRESCRIPTION"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x]",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x]",
        "min": 0,
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x].extension",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x].extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x].extension:createMasterData",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x].extension",
        "sliceName": "createMasterData",
        "comment": "set this true to create non-existent units on the fly in CXX catalog.",
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/createMasterData"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x].value",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x].value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x].unit",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x].unit",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x].system",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x].system",
        "min": 0,
        "fixedString": "https://fhir.centraxx.de/system/laborValue/unit",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.dose[x].code",
        "path": "MedicationStatement.dosage.doseAndRate.dose[x].code",
        "min": 0,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.rate[x]",
        "path": "MedicationStatement.dosage.doseAndRate.rate[x]",
        "min": 0,
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:prescription.rate[x].value",
        "path": "MedicationStatement.dosage.doseAndRate.rate[x].value",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:is",
        "path": "MedicationStatement.dosage.doseAndRate",
        "sliceName": "is",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:is.extension",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:is.extension:doseValue",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "sliceName": "doseValue",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/doseValue"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:is.type",
        "path": "MedicationStatement.dosage.doseAndRate.type",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://fhir.centraxx.de/system/medication/doseType",
              "code": "IS"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:trg",
        "path": "MedicationStatement.dosage.doseAndRate",
        "sliceName": "trg",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:trg.extension",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:trg.extension:doseValue",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "sliceName": "doseValue",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/doseValue"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:trg.type",
        "path": "MedicationStatement.dosage.doseAndRate.type",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://fhir.centraxx.de/system/medication/doseType",
              "code": "TRG"
            }
          ]
        },
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:dev",
        "path": "MedicationStatement.dosage.doseAndRate",
        "sliceName": "dev",
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:dev.extension",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "url"
            }
          ],
          "rules": "closed"
        },
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:dev.extension:doseValue",
        "path": "MedicationStatement.dosage.doseAndRate.extension",
        "sliceName": "doseValue",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.centraxx.de/extension/medication/doseValue"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "MedicationStatement.dosage.doseAndRate:dev.type",
        "path": "MedicationStatement.dosage.doseAndRate.type",
        "min": 1,
        "patternCodeableConcept": {
          "coding": [
            {
              "system": "https://fhir.centraxx.de/system/medication/doseType",
              "code": "DEV"
            }
          ]
        },
        "mustSupport": true
      }
    ]
  }
}