{
  "resourceType": "StructureDefinition",
  "id": "ee-tis-medication-statement",
  "url": "https://fhir.ee/StructureDefinition/ee-tis-medication-statement",
  "version": "1.0.0",
  "name": "EETISMedicationStatement",
  "status": "draft",
  "date": "2024-02-23T10:56:02.4427313+00:00",
  "description": "Ravimiskeemi rida. One or more Medication Statements form patient's Medication Overview.",
  "fhirVersion": "5.0.0",
  "kind": "resource",
  "abstract": false,
  "type": "MedicationStatement",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/MedicationStatement",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "MedicationStatement.text",
        "path": "MedicationStatement.text",
        "short": "MedicationStatement is part of MedicationOverview representing one treatmentline"
      },
      {
        "id": "MedicationStatement.contained",
        "path": "MedicationStatement.contained",
        "max": "0"
      },
      {
        "id": "MedicationStatement.extension:extensionEETISPrescriptionValidityTime",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISPrescriptionValidityTime",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-prescription-validity-time"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISMedicationLeft",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISMedicationLeft",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-medication-left"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISTotalPrescribedAmount",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISTotalPrescribedAmount",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-total-prescribed-amount"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISLockStatus",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISLockStatus",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-lock-status"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISPrescriptionAuthorization",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISPrescriptionAuthorization",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-prescription-authorization"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISCancelledStatusReason",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISCancelledStatusReason",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-cancelled-status-reason"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISReimbursementRate",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISReimbursementRate",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-reimbursement-rate"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISMarketingRequest",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISMarketingRequest",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-marketing-request"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISSubstitutionAllowed",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISSubstitutionAllowed",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-substitution-allowed"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISVerification",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISVerification",
        "definition": "SIIN ON VÄGIVALDSELT PANDUD REFERENTSI ASEMEL STRING ET SERVERIGA KOOSTÖÖD TEHA.Optional Extension Element - found in all resources.",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-verification"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.extension:extensionEETISPrescriptionIntent",
        "path": "MedicationStatement.extension",
        "sliceName": "extensionEETISPrescriptionIntent",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-prescription-intent"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.partOf",
        "path": "MedicationStatement.partOf",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://hl7.org/fhir/StructureDefinition/MedicationStatement"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.status",
        "path": "MedicationStatement.status",
        "definition": "KINNITATUD | KINNITAMATA | A code representing the status of recording the medication statement."
      },
      {
        "id": "MedicationStatement.category",
        "path": "MedicationStatement.category",
        "slicing": {
          "discriminator": [
            {
              "type": "value",
              "path": "$this"
            }
          ],
          "rules": "open"
        },
        "mustHaveValue": true
      },
      {
        "id": "MedicationStatement.category:courseOfTherapyType",
        "path": "MedicationStatement.category",
        "sliceName": "courseOfTherapyType",
        "short": "pidev | fikseeritud | vajadusel | muutuv | ühekordne |",
        "binding": {
          "strength": "required",
          "description": "RAVIKUURI TÜÜP. LOEND",
          "valueSet": "https://fhir.ee/CodeSystem/ravikuuri-tyyp"
        }
      },
      {
        "id": "MedicationStatement.category:statementOriginCategory",
        "path": "MedicationStatement.category",
        "sliceName": "statementOriginCategory",
        "short": "Category defining the origin of MedicationStatement. VAJAB UUT LOENDIT!!",
        "definition": "SEE KATEGOORIA DEFINEERIB ÄRA, KAS RAVIMISKEEMI RIDA ON LOODUD RETSEPTIKESKUSE RETSEPTI PEALT VÕI PATSIENDI SÕNUL. (Type of medication statement (for example, drug classification like ATC, where meds would be administered, legal category of the medication.).",
        "binding": {
          "strength": "required",
          "description": "Category defining the origin of MedicationStatement.",
          "valueSet": "https://fhir.ee/CodeSystem/statement-origin-category"
        }
      },
      {
        "id": "MedicationStatement.category:prescriptionCategory",
        "path": "MedicationStatement.category",
        "sliceName": "prescriptionCategory",
        "short": "tavaretsept | narkootilise ravimi retsept | meditsiiniseadme retsept",
        "binding": {
          "strength": "required",
          "description": "RETSEPTI LIIK. LOEND.",
          "valueSet": "https://fhir.ee/CodeSystem/retsepti-liik"
        }
      },
      {
        "id": "MedicationStatement.category:repeatCategory",
        "path": "MedicationStatement.category",
        "sliceName": "repeatCategory",
        "short": "1-kordne | 2-kordne | 3-kordne | 6-kordne",
        "binding": {
          "strength": "required",
          "description": "Retsepti kordsus. LOEND.",
          "valueSet": "https://fhir.ee/CodeSystem/retsepti-kordsus"
        }
      },
      {
        "id": "MedicationStatement.medication",
        "path": "MedicationStatement.medication",
        "type": [
          {
            "code": "CodeableReference",
            "targetProfile": [
              "https://fhir.ee/StructureDefinition/ee-tis-medication-epc"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustHaveValue": true
      },
      {
        "id": "MedicationStatement.medication.concept",
        "path": "MedicationStatement.medication.concept",
        "max": "0"
      },
      {
        "id": "MedicationStatement.medication.reference",
        "path": "MedicationStatement.medication.reference",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.ee/StructureDefinition/ee-tis-medication-epc"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.subject",
        "path": "MedicationStatement.subject",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.ee/StructureDefinition/ee-tis-patient"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ],
        "mustHaveValue": true
      },
      {
        "id": "MedicationStatement.encounter",
        "path": "MedicationStatement.encounter",
        "max": "0"
      },
      {
        "id": "MedicationStatement.effective[x]",
        "path": "MedicationStatement.effective[x]",
        "short": "Ravimiskeemi rea kehtivus",
        "type": [
          {
            "code": "Period"
          }
        ]
      },
      {
        "id": "MedicationStatement.informationSource",
        "path": "MedicationStatement.informationSource",
        "short": "Ravimiskeemi rea (algne) koostaja",
        "definition": "AUTOR KES KOOSTAB RAVIMISKEEMI REA (arst). Initial author of the MedicationStatement. The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationStatement is derived from other resources, e.g. Claim or MedicationRequest.",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.ee/StructureDefinition/ee-tis-practitioner",
              "https://fhir.ee/StructureDefinition/ee-tis-practitioner-role"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.derivedFrom",
        "path": "MedicationStatement.derivedFrom",
        "short": "SEOTUD RETSEPTID. Link to information used to derive the MedicationStatement",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.ee/StructureDefinition/ee-tis-medication-request"
            ],
            "aggregation": [
              "referenced"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.reason",
        "path": "MedicationStatement.reason",
        "definition": "A concept, Condition or observation that supports why the medication is being/was taken.\r\nDIAGNOOSIKOOD retseptikeskusest"
      },
      {
        "id": "MedicationStatement.reason.concept",
        "path": "MedicationStatement.reason.concept",
        "short": "Diagnoosikoodid (RHK-10)",
        "binding": {
          "strength": "preferred",
          "description": "Diagnoosikood RHK-10",
          "valueSet": "https://fhir.ee/CodeSystem/rhk10"
        }
      },
      {
        "id": "MedicationStatement.reason.reference",
        "path": "MedicationStatement.reason.reference",
        "max": "0"
      },
      {
        "id": "MedicationStatement.note",
        "path": "MedicationStatement.note",
        "definition": "Provides extra information about the Medication Statement that is not conveyed by the other attributes.\r\nSiia saab kirjutada märkusi ravimiskeemi rea kohta."
      },
      {
        "id": "MedicationStatement.note.author[x]",
        "path": "MedicationStatement.note.author[x]",
        "min": 1,
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://fhir.ee/StructureDefinition/ee-tis-practitioner-role",
              "https://fhir.ee/StructureDefinition/ee-tis-practitioner",
              "https://fhir.ee/StructureDefinition/ee-tis-organization",
              "https://fhir.ee/StructureDefinition/EEBasePatient",
              "https://fhir.ee/StructureDefinition/ee-tis-related-person"
            ]
          },
          {
            "code": "string"
          }
        ]
      },
      {
        "id": "MedicationStatement.relatedClinicalInformation",
        "path": "MedicationStatement.relatedClinicalInformation",
        "max": "0"
      },
      {
        "id": "MedicationStatement.dosage",
        "path": "MedicationStatement.dosage",
        "definition": "Indicates how the medication is/was or should be taken by the patient.\r\nANNUSTAMISEJUHIS",
        "type": [
          {
            "code": "Dosage",
            "profile": [
              "https://fhir.ee/StructureDefinition/ee-tis-dosage"
            ]
          }
        ]
      },
      {
        "id": "MedicationStatement.dosage.additionalInstruction",
        "path": "MedicationStatement.dosage.additionalInstruction",
        "definition": "VALMISTAMISEJUHIS\r\nSupplemental instructions to the patient on how to take the medication  (e.g. \"with meals\" or\"take half to one hour before food\") or warnings for the patient about the medication (e.g. \"may cause drowsiness\" or \"avoid exposure of skin to direct sunlight or sunlamps\")."
      },
      {
        "id": "MedicationStatement.dosage.maxDosePerAdministration.unit",
        "path": "MedicationStatement.dosage.maxDosePerAdministration.unit",
        "max": "0"
      },
      {
        "id": "MedicationStatement.adherence",
        "path": "MedicationStatement.adherence",
        "max": "0",
        "mustHaveValue": true
      }
    ]
  }
}