SafeRx - AI Medication Interaction Review

Pharmacists manually review every prescription for drug interactions, which is repetitive, slow, and error-prone at scale. SafeRx uses Claude Sonnet to screen prescriptions, auto-approve safe ones, and route risky ones to pharmacists with full reasoning and confidence scores.

  • LLM analysis with a curated knowledge base of 50+ drug interactions to screen prescriptions automatically
  • 3 independent safety gates instead of a single binary approve/reject, because confidence alone isn't enough to catch every edge case
  • PHI masking so the model only sees clinical data, never patient identity
  • Human-in-the-loop design where the system assists pharmacists, never replaces them
  • Full audit logging of every decision for regulatory compliance and quality reviews

How strict should the AI confidence threshold be? Too low risks patient safety. Too high sends everything to pharmacists, eliminating the efficiency gain. The interactive threshold simulator lets stakeholders explore this tradeoff with real data.

  • A pharmacist submits a prescription through the React frontend, which sends the medication list to the FastAPI backend.
  • PHI/PII is stripped for HIPAA compliance before anything reaches the AI so the model only ever sees clinical data, never patient identity.
  • Claude analyzes the medications against a curated knowledge base of 50+ drug interactions and returns a structured assessment.
  • Three independent safety gates decide what happens next. All three must pass for auto-approval. If any one fails, it goes straight to a pharmacist.
  • Flagged prescriptions land in the pharmacist queue with the AI's reasoning, confidence score, and detected interactions so they can make an informed decision.
  • Every decision is audit logged including who submitted it, what the AI recommended, and what the pharmacist decided, all with timestamps, ensuring full traceability for regulatory compliance and quality reviews.
Gate Pass Criteria Why
Confidence Score >= 95% Low confidence needs human review
Risk Level "low" Medium/high risk always needs pharmacist eyes
AI Recommendation "auto_approve" AI may flag nuances even at high confidence

AI screening costs ~$0.026/check vs. $5.42 for manual pharmacist review. At 50 Rx/day, that saves ~$8,000/month.

Daily Volume Without AI With AI Savings
25/day $4,063/mo $39/mo $4,024
50/day $8,125/mo $59/mo $8,066
100/day $16,250/mo $98/mo $16,152
200/day $32,500/mo $176/mo $32,324
  • Where to set the AI confidence threshold is a business decision, and the simulator lets stakeholders see the tradeoff for themselves.
  • Confidence scores, AI's reasoning, and override controls were included for transparency to build trust and drive adoption with pharmacists.
  • Calculating AI costs and ROI upfront ensures we're building something that drives value when scaled.