Skip to content

policy: Healthcare "Medication Interaction" Safety Check #45

@akarlaraytu

Description

@akarlaraytu

📘 Context

A clinical decision-support AI assistant needs a deterministic gate to prevent
prescribing decisions that could trigger dangerous drug-drug, drug-allergy, or
contraindication-based interactions.

This policy should serve as a pre-prescription safety gate, complementary to
clinician judgment, blocking obviously unsafe combinations and escalating
borderline cases for pharmacist review.

🎯 The Goal

Write a medication interaction safety policy for a clinical AI assistant.

Variables you can use:

  • new_drug_class (Enum): "ANTICOAGULANT", "OPIOID", "BENZODIAZEPINE", "NSAID", "SSRI", "MAOI", "OTHER".
  • current_medications (Set[String]): List of patient's active medications.
  • known_allergies (Set[String]): List of documented allergies.
  • patient_age (Integer): In years.
  • patient_pregnant (Boolean): Pregnancy status (if applicable).
  • renal_impairment (Boolean): Whether eGFR < 30.
  • hepatic_impairment (Boolean): Whether liver function is compromised.
  • pharmacist_approved (Boolean): Whether a pharmacist signed off.
  • interaction_severity (Enum): "NONE", "MINOR", "MODERATE", "MAJOR", "CONTRAINDICATED".

Requirements:

  • BLOCK if interaction_severity == "CONTRAINDICATED".
  • BLOCK if the drug is in known_allergies.
  • BLOCK if new_drug_class == "MAOI" and any SSRI is in current_medications.
  • BLOCK if new_drug_class == "OPIOID" and any BENZODIAZEPINE is in current_medications and pharmacist_approved is False.
  • ESCALATE if interaction_severity == "MAJOR".
  • ESCALATE if patient_pregnant is True and new_drug_class != "OTHER".
  • ESCALATE if renal_impairment is True and new_drug_class == "NSAID".

📚 Resources

  • Start here: docs/getting-started.md
  • Check syntax: quickstart/01_hello_world.csl
  • See how examples are structured: examples/community/

✅ Definition of Done

Submit a PR with: examples/community/healthcare_medication_interaction.csl

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions