Medi-Gemma: A Hybrid Clinical Decision Support System Integrating Deterministic EMR Analytics and Retrieval-Augmented Generation

2026-07-06Artificial Intelligence

Artificial Intelligence
AI summary

The authors designed Medi-Gemma, a system that helps doctors make decisions about wound care by carefully using language models without making dangerous errors. Their system separates understanding clinical data from managing it, ensuring reliable data handling and clear reasoning. They use special modules to process electronic medical records, check safety rules, and incorporate up-to-date patient information directly into the model's input. Tests showed this approach reduces mistakes and keeps the system aligned with trustworthy clinical data. This work aims to make AI tools safer and more accurate for healthcare use.

Large Language ModelsClinical Decision Support SystemElectronic Medical RecordsTabular DataDeterministic ReasoningVector RetrievalData OrchestrationRisk PathwaysPrompt EngineeringSafety Compliance
Authors
Mohammed Saim Ahmed Quadri, Yunzhe Xue, Justin W. Ady, Usman Roshan
Abstract
Deploying Large Language Models (LLMs) in high-stakes clinical settings remains limited by structural hallucinations, weak deterministic reasoning over tabular patient data, and omissions in vector retrieval. This paper presents the architecture and validation of Medi-Gemma, a Clinical Decision Support System (CDSS) for wound pathology triage and workflow automation. The platform introduces a decoupled framework that separates clinical perception from data orchestration while preserving traceable reasoning. Medi-Gemma uses a multi-stage pipeline coordinated by a centralized ClinicalOrchestrator. Data requests are handled without generative inference by a DataManager that cleans unstructured Electronic Medical Record (EMR) files through type coercion. Natural language queries are processed by a hierarchical IntentRouter, which routes requests to deterministic analytics paths executed by a PandasQueryEngine or to patient-specific reasoning managed by a ClinicalRAGEngine using a CPU-optimized vector store. A key contribution is the Ground Truth Injection Module, which intercepts patient-specific queries, extracts numeric identification tokens, queries the structured dataframe via Pandas, retrieves the latest validated clinical state, and embeds this snapshot as an overriding context block in the LLM prompt before generation. Safety compliance is enforced by a deterministic ProtocolManager that maps clinical terminology to fixed evidence-based risk pathways, while a SafetyVerifier phrase filter prevents output rule violations. Validation shows that this architecture eliminates semantic context drift, prevents database compilation crashes, and improves factual adherence to backend clinical repositories. These results support Medi-Gemma as a safer pattern for LLM-based clinical decision support where structured data fidelity, retrieval grounding, and deterministic safeguards are essential.