Drug Interaction Analysis
AI-Powered Medication Review & Safety
Why Drug Interactions Matter
Mr. Robert Chen is a 71-year-old retired engineer from suburban Chicago. He takes metformin and Jardiance (empagliflozin) for type 2 diabetes, lisinopril and amlodipine for blood pressure, Lipitor (atorvastatin) for cholesterol, Eliquis (apixaban) as a blood thinner for atrial fibrillation, Nexium (esomeprazole) for acid reflux, and gabapentin for neuropathic pain. That is eight medications, prescribed by four different specialists — his endocrinologist, cardiologist, gastroenterologist, and primary care physician.
His cardiologist started Eliquis six months ago but does not know about the gabapentin his PCP added last month. His endocrinologist recently switched him from metformin alone to metformin plus Jardiance, but the cardiologist's medication list in the EHR still shows the old regimen. Mr. Chen's wife manages his pill organiser and has started mixing up the "small white pills" — three of his medications are small, white, and round.
This is polypharmacy — the simultaneous use of multiple medications — and it is one of the most dangerous yet underappreciated problems in Western healthcare. Among Americans over 65, more than 40% take five or more prescription medications. Among nursing home residents, the average is 7-8 medications.
Types of Drug Interactions
Not all drug interactions are created equal. Understanding the types helps you appreciate what an AI medication review system needs to check.
Pharmacokinetic Interactions (How the Body Processes Drugs)
These occur when one drug affects how the body absorbs, distributes, metabolises, or excretes another drug. Think of it as one drug changing the plumbing that another drug flows through.
| Mechanism | What Happens | Example |
|---|---|---|
| Absorption | One drug blocks another from entering the bloodstream | Calcium supplements reduce absorption of levothyroxine (thyroid medication) — take 4 hours apart |
| Metabolism (Liver) | One drug speeds up or slows down the liver's processing of another | Grapefruit juice inhibits CYP3A4 enzymes, causing Lipitor (atorvastatin) levels to spike — increasing muscle damage risk |
| Excretion (Kidney) | One drug affects how fast another is removed by the kidneys | NSAIDs like Advil (ibuprofen) reduce kidney blood flow, causing lithium or methotrexate to accumulate to toxic levels |
| Protein binding | One drug displaces another from blood proteins, increasing its free (active) concentration | Warfarin displaced by aspirin — both compete for the same protein binding sites, increasing bleeding risk |
Pharmacodynamic Interactions (How Drugs Act on the Body)
These occur when two drugs have additive, synergistic, or opposing effects on the same body system — even though they do not interfere with each other's metabolism.
| Type | What Happens | Example |
|---|---|---|
| Additive | Two drugs with similar effects combine to create an exaggerated response | Eliquis (blood thinner) + aspirin — both reduce clotting, significantly increasing bleeding risk |
| Synergistic | Combined effect is greater than the sum of individual effects | Alcohol + benzodiazepines (Xanax, Valium) — both depress the central nervous system, risk of respiratory failure |
| Antagonistic | One drug blocks the effect of another | Beta-blockers (metoprolol) reduce the effectiveness of albuterol (asthma rescue inhaler) |
The Opioid Prescribing Crisis
Western healthcare — particularly in the United States, Canada, and Australia — faces a drug interaction challenge that is less prominent in other regions: the opioid crisis.
Opioid medications like oxycodone (OxyContin, Percocet), hydrocodone (Vicodin, Norco), and fentanyl are widely prescribed for pain but carry severe interaction risks:
Prescription Drug Monitoring Programs (PDMPs)
Every US state operates a PDMP — a database that tracks controlled substance prescriptions. Before prescribing an opioid, a physician is required (in most states, by law) to check the PDMP to see if the patient has active prescriptions from other providers.
AI enhances PDMP integration by:
FDA Black Box Warnings
The FDA's "black box" warning is the strongest warning placed on a medication label. AI medication review systems must incorporate these warnings prominently:
| Drug / Combination | Black Box Warning | Clinical Implication |
|---|---|---|
| Opioids + Benzodiazepines | Concurrent use increases risk of profound sedation, respiratory depression, coma, and death | Avoid combination; if unavoidable, use lowest doses for shortest duration |
| Fluoroquinolones (Cipro, Levaquin) | Tendon rupture, peripheral neuropathy, CNS effects | Avoid in patients over 60, those on corticosteroids, or with kidney/liver transplants |
| Warfarin | Major or fatal bleeding | Requires regular INR monitoring; interacts with hundreds of drugs and foods |
| Metformin | Lactic acidosis risk in kidney impairment | Hold before iodinated contrast procedures; check eGFR regularly |
| Ozempic / Wegovy (semaglutide) | Thyroid C-cell tumour risk (observed in rodents) | Contraindicated in patients with personal/family history of medullary thyroid carcinoma |
> Look at data/fda-black-box-warnings.json for the complete database of black box warnings used in the sandbox medication review tool.
How AI Checks Interactions at Scale
An AI-powered medication review system works in three layers, each catching different types of problems:
Layer 1: Pairwise Drug-Drug Interaction Check
The AI takes the complete medication list and checks every possible pair of drugs against an interaction database. For a patient on 8 medications, that is 28 unique pairs to check. For a patient on 12 medications, it is 66 pairs. This combinatorial explosion is exactly why humans miss interactions — no physician can hold 66 pairwise checks in their head during a 15-minute appointment.
The primary databases used in the US are First Databank (FDB), Medi-Span, and Clinical Pharmacology — commercial drug databases that power the interaction alerts in Epic, Oracle Health, and pharmacy dispensing systems.
Layer 2: Drug-Disease Interaction Check
Some drugs are dangerous not because of other drugs, but because of the patient's conditions:
Layer 3: Duplicate Therapy Detection
The AI identifies when a patient is taking two drugs from the same class — a surprisingly common problem when multiple specialists prescribe independently:
> Look at data/drug-interactions.json for the interaction database used in the sandbox medication review tool.
Pharmacy Benefit Manager Workflows
In the US healthcare system, most patients do not pay the full cost of their medications. Instead, a Pharmacy Benefit Manager (PBM) — companies like CVS Caremark, Express Scripts, and OptumRx — manages the drug benefit on behalf of the insurance company. PBMs maintain formularies (lists of covered drugs) and require prior authorisation for expensive or non-preferred medications.
AI assists in PBM workflows by:
The prior authorisation process alone costs the US healthcare system over $35 billion annually and consumes an estimated 34 hours per physician per week (according to the AMA). AI-powered prior auth is one of the highest-value applications of NLP in healthcare.
A Real-World Interaction Scenario
Let us walk through what an AI medication review looks like in practice, using Mr. Chen's case from the beginning:
His medications:
AI Findings:
| Finding | Severity | Explanation |
|---|---|---|
| Eliquis + OTC NSAIDs (patient buys Advil) | High | Apixaban + ibuprofen significantly increases GI bleeding risk. Patient education critical. |
| Jardiance + Lisinopril | Moderate | Both can lower blood pressure. Monitor for symptomatic hypotension, especially on standing. |
| Nexium (long-term, >1 year) | Advisory | Long-term PPI use associated with magnesium depletion, vitamin B12 deficiency, increased fracture risk, and possible kidney disease. Consider deprescribing trial. |
| Gabapentin — fall risk in 71-year-old | Advisory | Gabapentin causes dizziness and sedation. In elderly patients, this increases fall risk. Start low, titrate slowly. |
| No duplicate therapy detected | — | All drugs are from different classes — appropriate prescribing. |
The AI also flags that Mr. Chen's medication list in the cardiologist's EHR is outdated and recommends a medication reconciliation across all providers.
Key Takeaways
This is chapter 4 of AI for Healthcare (Western).
Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.
View course details