AI-Powered Clinical Decision Support for Medication Safety
CLIENT
Preggify
PARTNER
Marlocks Technologies
YEAR
2026
Overview
Preggify, a 25-hospital integrated delivery system serving 2.3 million patients annually, faced a critical patient safety challenge: its medication ordering system generated a 95% false positive rate for drug interaction alerts, causing alert fatigue and 180 preventable adverse drug events (ADEs) per year.
To address this life-threatening issue while maintaining HIPAA compliance and real-time clinical workflow integration, Marlocks Technologies (AWS Advanced Tier Partner) implemented an AI-powered medication safety agent using Amazon Bedrock with Claude 3.5 Sonnet.
The solution analyzes 2,400 medication orders daily across complex clinical scenarios, integrating with Epic FHIR APIs, Micromedex drug interaction databases, and UpToDate clinical guidelines. By combining foundation model intelligence with specialized medical knowledge bases, the system achieved 94.2% accuracy while reducing false positives by 70%.
Key Challenges
Alert Fatigue from False Positives
The rules-based medication screening system generated 2,280 false alerts daily — a 95% false positive rate — drowning pharmacists in noise and eroding trust in the alert system entirely.
Missed Genuine Safety Concerns
Despite the high alert volume, 180 genuine adverse drug events occurred annually. The system was simultaneously over-alerting and under-detecting real patient safety risks.
HIPAA Compliance with AI
Protected Health Information could not be used for model training, logged in plaintext, or stored outside HIPAA-compliant AWS services. All AI services required Business Associate Agreement coverage.
Complex Enterprise System Integration
The AI agent needed real-time integration with Epic FHIR R4 APIs, Micromedex (500,000+ drug interaction pairs), UpToDate (45,000+ clinical topics), and the hospital formulary — with zero tolerance for integration failures.
The Solution
AI/ML Orchestration Layer
Marlocks deployed a serverless, event-driven architecture orchestrating Amazon Bedrock Agents with Claude 3.5 Sonnet — selected after evaluating 6 foundation models on medical reasoning accuracy, citation reliability, and HIPAA compliance.
8 Specialized Lambda Tool Functions
Drug Interaction Checker (Micromedex)
Clinical Guidelines Search (UpToDate via OpenSearch)
Hospital Formulary Lookup
Patient Allergy Verification
Contraindication Analysis
Dosage Validation
Lab Value Assessment
Audit Trail Logger
Enterprise Integration & Data Layer
Secure, high-performance integrations bridge AI intelligence with existing hospital systems:
Epic FHIR R4 — OAuth 2.0 authenticated connection retrieving patient medications, allergies, labs, and diagnoses in under 800ms
Amazon Aurora PostgreSQL — Stores the 12,000-medication hospital formulary, encrypted at rest with AWS KMS customer-managed keys
Amazon DynamoDB — Session state and caching with sub-10ms reads; Streams trigger real-time safety trend analytics
Amazon OpenSearch Serverless — Vector database storing 45,000 UpToDate clinical guidelines with semantic search, improving accuracy 23% over keyword matching
Security, Compliance & Governance
Defense-in-depth architecture meeting HIPAA Security Rule requirements:
All compute in private VPC subnets — zero public IP addresses
AWS KMS customer-managed keys encrypting Aurora, S3, DynamoDB, and OpenSearch at rest
Zero IAM users — all access via temporary credentials with 1-hour expiration
CloudTrail audit logs with 7-year S3 Object Lock (WORM) retention
Amazon GuardDuty with real-time PagerDuty alerts for critical findings
94/100 CIS AWS Foundations Benchmark score; zero findings in annual HIPAA audit
Observability & Continuous Improvement
Comprehensive observability tracks clinical accuracy, performance, and business impact:
AWS X-Ray — Distributed tracing identified Micromedex API calls as 47% of total latency, driving caching optimizations
Amazon CloudWatch — 14 key metrics tracked including clinical accuracy, false positive rate, P95 latency, and pharmacist satisfaction
Amazon QuickSight — Executive dashboards showing ADEs prevented, pharmacist time saved, cost per order ($0.11), and ROI
Synthetic monitoring — Automated end-to-end health checks every minute; hourly synthetic orders test each tool function
Production Results
All metrics exceeded targets across clinical, operational, and financial dimensions.
| Metric | Target | Actual Result |
|---|---|---|
| Clinical Accuracy | ≥94% | 94.2% |
| False Positive Rate | ≤30% | 27.4% |
| P95 Latency | <5 seconds | 4.2 seconds |
| System Availability | 99.9% | 99.97% |
| ADEs Prevented (Annual) | >150 | 168 |
| Pharmacist Satisfaction | ≥85% | 89% |
| ROI | >300% | 525% |
| Pharmacist Time Saved | 1.5 hrs/day/site | 1.8 hrs/day/site |
| Medication Approval Time | <10 minutes | <5 minutes |
| Cost per Medication Order | $0.15 | $0.11 |
Key Business Impact
168 adverse drug events prevented annually — zero patient safety incidents in 6 months of production
False positive rate reduced from 95% to 27.4% — eliminating 1,950 unnecessary pharmacist interventions daily
13,500 pharmacist hours saved annually across 25 hospitals (1.8 hrs/day/site)
Medication order approval time reduced from 45 minutes to under 5 minutes for AI-reviewed orders
Pharmacist satisfaction with drug interaction alerts improved from 12% to 89%
$3.3M annual benefit against $630K total cost of ownership — 525% ROI in year one
Key Lessons Learned
Foundation model selection is critical for healthcare AI:
Testing 6 models revealed variance from 78% to 94.2% accuracy. Claude 3.5 Sonnet consistently cited authoritative medical sources while others hallucinated studies or made dangerous off-label recommendations. Budget 3–4 weeks for rigorous medical-specific evaluation.
RAG with commercial medical databases is non-negotiable:
Claude without knowledge base integration achieved only 78% accuracy. Adding OpenSearch with UpToDate pushed it to 89%. Integrating Micromedex reached 94.2%. Plan to license commercial medical knowledge bases — free clinical guidelines alone are insufficient.
Human-in-the-loop is non-negotiable in clinical AI:
8% of AI recommendations were overridden for valid clinical reasons the AI couldn't detect. Pharmacists gained confidence only when they could see transparent reasoning chains and override with documented rationale. Design AI as augmentation, not replacement.
Caching strategy determines clinical performance:
Without caching, P95 latency was 8.2 seconds — unacceptable for clinical workflow. Three-tier caching (DynamoDB, in-memory, OpenSearch) reduced this to 4.2 seconds. Cache static medical knowledge aggressively; always fetch patient context fresh from Epic.