A Multi-Agent Pipeline for Source-Grounded Synthetic Note Generation from Longitudinal Structured EHR
Abstract
Structured EHR is abundant but sparse, coded, and difficult to use directly for note-centric clinical modeling. We present MedNotes, a multi-agent synthetic data generation pipeline that converts longitudinal structured EHR into source-grounded clinical note representations under explicit quality control. MedNotes treats structured-data-to-text synthesis as a closed-loop agentic process: a generator proposes a note, evaluator agents diagnose factual, coverage, structural, and hallucination-related failures, and a router accepts, revises, or rejects the draft. On 1{,}485 EHRSHOT encounters, MedNotes achieves a 91.4\% pass rate, with mean factual accuracy of 0.980, completeness of 99.1\%, structural fidelity of 0.761, and 0.028 critical hallucinations per encounter. Iterative refinement improves acceptance from 69.4\% to 91.4\%. The resulting synthetic corpus improves downstream CPT prediction and paragraph-level section prediction when combined with limited real data.