BioEcko Docs
Advanced

Drug Interaction Checker

The Drug Interaction Checker provides real-time drug-drug interaction alerts within the OPD prescription workflow. When a doctor adds two or more medications...

February 2026 · 4 min

Manual area

Advanced

Coverage

5 sections

Operator notes

3 implementation notes

Overview

The Drug Interaction Checker provides real-time drug-drug interaction alerts within the OPD prescription workflow. When a doctor adds two or more medications to a prescription, the system automatically cross-references them against a built-in interaction database covering 200+ common drug pairs, flagging potential interactions by severity before the prescription is finalized.

How It Works

The interaction engine lives in lib/drug-interactions.ts and is invoked automatically in the OPD consultation prescription tab:

  1. Prescription Entry -- Doctor adds medications to the prescription list
  2. Real-time Check -- When 2+ medications are present, the DrugInteractionAlert component runs checkInteractions() against the full medication list
  3. Alert Display -- Interactions are displayed inline as color-coded cards directly below the prescription table
  4. Clinical Decision -- The doctor can review the interaction, read the clinical recommendation, and decide to continue, adjust, or remove the medication

No extra click is required -- the alerts appear automatically as medications are added.

Severity Levels

Interactions are classified into three severity tiers:

  • Major (Red) -- Potentially life-threatening or requiring immediate intervention. Examples: Warfarin + NSAIDs, MAOIs + SSRIs, Methotrexate + NSAIDs. These display with a red border and prominent warning icon.
  • Moderate (Amber) -- May require dosage adjustment or monitoring. Examples: ACE inhibitors + Potassium supplements, Statins + Macrolides. These display with an amber/yellow border.
  • Minor (Blue) -- Generally low risk but worth noting. Examples: Antacids + certain antibiotics (timing separation needed). These display with a blue informational border.

Each alert includes: the two drugs involved, severity level, interaction mechanism description, and a clinical recommendation.

Interaction Database

The interaction database covers:

  • 200+ drug-drug pairs with evidence-based severity classification
  • Generic name matching -- matches on generic names (e.g., 'aspirin', 'metformin') using case-insensitive partial matching
  • Mechanism descriptions -- explains WHY the interaction occurs (e.g., 'CYP3A4 inhibition', 'additive bleeding risk')
  • Clinical recommendations -- actionable guidance (e.g., 'Monitor INR closely', 'Separate doses by 2 hours')

The database is extensible -- hospital pharmacists can add custom interaction rules via the Pharmacy > Drug Interactions page.

Integration Points

The Drug Interaction Checker integrates with:

  • OPD Consultation -- Inline alerts in the prescription tab when composing prescriptions
  • Pharmacy Dispensing -- Pharmacist sees interaction warnings when verifying prescriptions
  • Pharmacy Interactions Page -- Dedicated lookup tool at /dashboard/pharmacy/interactions for checking arbitrary drug combinations
  • Patient Allergy Data -- Cross-references against the patient's recorded allergies (separate from drug-drug interactions)
  • eMAR -- Nursing staff see interaction flags when administering medications to inpatients

Notes

Warning

The interaction database covers common drug pairs but is not exhaustive. Always use clinical judgment alongside automated alerts. Consult a clinical pharmacist for complex regimens.

Tip

The interaction checker uses generic name matching. Brand name medications are matched to their generic equivalents. Ensure medications are entered with standard generic names for best results.

Info

Interaction alerts are informational and do not block prescription submission. The doctor retains full clinical authority to proceed after reviewing the alert.

On this page