6-Layer Clinical Safety Pipeline
Persistent, Auditable, Contradiction-Safe Clinical Memory for Healthcare AI Agents
MRN: SM-2026-0847 • DOB: 1959-03-14
All findings detected automatically from FHIR R4 patient data
NSAID bleeding risk. ER physician prescribed ibuprofen without checking existing anticoagulant therapy. Concurrent use increases risk of GI hemorrhage by 3-6x.
Allergy cross-reaction. Urgent Care prescribed amoxicillin (beta-lactam) to a patient with documented penicillin anaphylaxis. Cross-reactivity rate: ~2%, but history of anaphylaxis makes this contraindicated.
Lab-medication contraindication. eGFR trend: 45 → 38 → 32 mL/min. FDA recommends discontinuing metformin at eGFR <30. Current trajectory reaches threshold in ~3 months.
Provider contradiction. Two specialists set incompatible blood pressure targets for the same patient:
Each clinical decision flows through all 6 layers sequentially. Green never hallucinates. Purple uses LLMs. Red is the safety gate.
Hard-coded drug interaction pairs and allergy cross-reaction rules. Zero hallucination risk.
Mayo Clinic and Elsevier ClinicalKey AI. Peer-reviewed evidence retrieval.
Federal gold standard used by Epic and Cerner. Drug class lookups and interaction validation.
GPT-5.4 → MedGemma 27B → Gemini 3 Flash — Cascading consensus with majority vote.
Generates patient-specific clinical narratives with explicit evidence citations. Every claim is grounded.
"I don't know" when evidence is insufficient. The system refuses to guess about patient safety.
Tamper-proof Merkle chain — every clinical decision is cryptographically chained to the previous entry
Patient data ingested: Sarah Mitchell (FHIR R4 Bundle — 47 resources)
Drug interaction detected: Warfarin + Ibuprofen (severity=CRITICAL, pipeline=deterministic)
Allergy cross-reaction: Penicillin allergy + Amoxicillin prescribed (severity=CRITICAL)
Lab-medication alert: eGFR 32 mL/min + Metformin (approaching FDA contraindication threshold)
Each block's SHA-256 hash includes the previous block's hash, creating a tamper-proof chain. Any modification to a historical entry invalidates all subsequent hashes. This provides HIPAA-grade audit compliance without a blockchain.
11 MCP tools for Claude + 5 A2A skills for agent-to-agent orchestration
store_clinical_observation
Store clinical note for patient
recall_patient_context
Hybrid search over clinical memory
check_medication_conflicts
Drug interaction detection (4-tier)
check_allergy_conflicts
Allergy cross-reaction alerts
get_treatment_dependencies
Condition-medication dependency map
get_clinical_audit_trail
Tamper-proof audit chain
summarize_patient_history
Importance-scored patient overview
detect_belief_drift
Cross-provider contradiction detection
ingest_patient_data
Pull all FHIR data into memory
explain_clinical_conflict
LLM-grounded conflict explanation with citations
clinical_care_handoff
Evidence-grounded care handoff note
medication-safety-review
Drug interactions + allergy conflicts
clinical-context-recall
Hybrid search with confidence gating
contradiction-assessment
Scan for conflicting records
care-transition-summary
Structured handoff summary
explain-conflict
LLM-grounded clinical rationale with evidence citations
Shared engine powering both MCP and A2A interfaces
engine/