Skip to content

Rakibul Hasan

Contextual DDI Agent identifies Drug - Drug Interaction within EHR when provider submits a new medication order.

Core trick

Fires on a CDS Hooks medication-order event, pulls the patient's FHIR chart, checks candidate interactions against UpToDate, then summarizes with an LLM.

Tags

Description

Contextual DDI Agent identifies Drug - Drug Interaction within EHR when provider submits a new medication order. It fetches patient current H&P, Medication, Lab order, Past History, identifies potential adverse effect, confirms using UpToDate, summarizes using LLM.
shonkhochil/ddi-contextual-agent★ 00 forksPythonCreated Jul 18, 2026 · last push Jul 18, 2026

README excerpt

\# Contextual DDI Agent 

\*\*Abridge AI Hackathon 2026 - San Francisco\*\*



\## The Problem

Traditional Electronic Health Record (EHR) Clinical Decision Support (CDS) systems rely on deterministic rules engines. They check single discrete thresholds and lack clinical nuance, leading to massive alert fatigue. Providers frequently override these alerts, risking severe Drug-Drug Interactions (DDIs).



\## The Solution

This project introduces a contextual, AI-driven DDI agent that sits at the intersection of CDS Hooks and FHIR. Instead of firing blindly, the agent synthesizes the proposed medication against the patient's entire clinical context (active conditions, recent labs, current medications, and progress notes).



It evaluates:

1\. \*\*Pharmacokinetics:\*\* CYP450, P-gp, and protein binding overlap.

2\. \*\*Pharmacodynamics:\*\* Synergistic toxicities.

3\. \*\*Clinical Context:\*\* How current organ function (e.g., AKI) exacerbates risk.



The agent only alerts on Tier 1 or Tier 2 interactions, providing the pathophysiological mechanism, actionable clinical recommendations, and pharmacological citations.



\## Architecture

\* \*\*Frontend:\*\* Streamlit (Simulating the EHR CPOE interface)

\* \*\*Backend Reasoning Engine:\*\* Google Gemini (via AI Studio API)

\* \*\*Telemetry:\*\* Built-in clinician feedback loop for continuous agent refinement.



\## How to Run Locally

1\. Clone this repository.

2\. Install dependencies: `pip install streamlit google-gener

Team