Agentic Medical RAG: A Reasoning Framework for Automated Clinical Documentation
Abstract
The transition of structured medical data into unstructured narratives presents a significant risk of “Information Decay” where generative models often prioritize narrative generation over clinical completeness. This work evaluates a Clinical Intelligence System designed to mitigate this “Unstructured Output Data Dilution” by transforming structured OMOP Common Data Model records into high-fidelity SOAP(Subjective, Objective, Assessment, Plan) notes. Utilizing an agentic architecture built on LangGraph and popular foundation models, the system employs a “Hybrid Synthesis” approach. This workflow combines generative reasoning with a “Structured Injection” layer, which uses marker-based placeholders to ensure that raw database records are accurately represented in the final output. Empirical testing on a 10,000 patient synthetic dataset demonstrated that while baseline zeroshot models suffered from a loss of clinical entities, the proposed hybrid pipeline achieved high clinical recall for conditions and medications. By automating the generation of standardized SOAP and EDRx documentation, the system significantly reduces administrative clinician load, allowing practitioners to focus on direct patient care rather than manual data synthesis. Through decoupling data retrieval from narrative generation and enforcing clinical structure via Pydantic validation, the system provides a reproducible, transparent, and medically complete solution for automated documentation that bridges the gap between structured data integrity and natural language synthesis.