Donghwee Yoon

Author directory

2026

Electronic medical record (EMR) databases are widely used for clinical machine learning, but their preprocessing remains difficult to reproduce because cohort definitions, patient-level features, and clinical item-code mappings must be adapted to each database schema. We formulate EMR preprocessing as the task of translating study requests into database-specific cohort/feature extraction SQL and local clinical item-code mappings. Existing preprocessing and harmonization frameworks remain difficult to adapt because they rely on dataset-specific rules or predefined input formats. We introduce EMR-AGENT, an LLM-agent framework that reduces reliance on manual rule writing by automating database-specific cohort selection, feature extraction, and clinical code mapping from study requests. EMR-AGENT retrieves schema and documentation context, interacts with live databases through SQL, observes execution results, and refines extraction decisions from error feedback. To enable rigorous evaluation, we develop a benchmarking codebase for three intensive care unit (ICU) databases (MIMIC-III, eICU, and SICdb), covering reference databases and a newer SICdb version released after the backbone’s knowledge cutoff. Across these benchmarks, EMR-AGENT reduces schema-debugging and item-code search effort, enabling reproducible evaluation of preprocessing quality under expert review, while reducing reliance on hand-written database-specific pipelines.