6-Layer Clinical Safety Pipeline
Persistent, Auditable, Contradiction-Safe Clinical Memory for Healthcare AI Agents
Live Patient Scenario
MRN: SM-2026-0847 • DOB: 1959-03-14
Safety Findings
ER prescribed NSAID without checking anticoagulant. Massively increased bleeding risk.
Amoxicillin is a penicillin-class antibiotic. Cross-reactivity detected via SNOMED CT drug hierarchy.
eGFR declining over 6 months. Approaching metformin contraindication at <30.
Cardiologist targets <130/80 vs Nephrologist <140/90. Conflicting treatment plans.
Bonus: 2 additional findings discovered autonomously
What happens if we swap the dangerous NSAID for a safer alternative?
6-Layer Safety Pipeline
Each layer adds confidence. Together they prevent hallucinations about patient safety.
Rule-based — never hallucinates
Mayo Clinic / Elsevier ClinicalKey AI
Drug normalization + NIH interaction DB (Epic/Cerner standard)
6 US-based models must agree
Evidence-cited clinical explanations
"I don't know" when evidence insufficient — refuses to guess
Clinical Terminology Integration
Three NIH/NLM vocabulary systems power coded clinical reasoning
Drug normalization + interaction detection. Resolves brand names to ingredients, checks NIH interaction DB.
Allergy cross-reactivity via drug class hierarchy. 8 drug classes with alias expansion.
Cross-vocabulary mapping: ICD-10 ↔ SNOMED CT ↔ LOINC ↔ RxNorm via CUI equivalence.
SHA-256 Audit Trail
Tamper-proof Merkle chain — every clinical decision is cryptographically linked
Patient data ingested: Sarah Mitchell (47 FHIR R4 resources)
Drug interaction: Warfarin + Ibuprofen (severity=CRITICAL)
Allergy conflict: Penicillin allergy + Amoxicillin (SNOMED CT cross-reactivity)
Lab trend: eGFR declining 45→38→32, metformin contraindication approaching
Every block's SHA-256 hash includes the previous block's hash — HIPAA-grade integrity
MCP Tools & A2A Skills
FastMCP 2.x • 18 Tools • SHARP-on-MCP
store_clinical_observationrecall_patient_contextcheck_medication_conflictscheck_allergy_conflictsdetect_belief_driftexplain_clinical_conflictGenAIclinical_care_handoffGenAI+ 5 more tools (audit trail, dependencies, summary, ingest, health)
Google ADK • 13 Tools • A2A Protocol
medication-safety-reviewclinical-context-recallcontradiction-assessmentcare-transition-summaryexplain-conflictGenAIEngine Modules (13)
System Architecture
Shared Engine (13 modules)
Tech Stack