In a modern hospital, a patient’s story is told in two languages: the structured language of databases (medication dosages, lab results, timestamps) and the unstructured narrative of clinical notes (physician observations, discharge summaries). Ideally, these two should be perfectly in sync.
In reality, they often clash. Overburdened doctors might copy-paste outdated information, or unintuitive software interfaces might lead to data entry errors. These inconsistencies aren't just administrative headaches; they are "silent" risks to patient safety that can lead to misdiagnosis or incorrect treatment. While "fact-checking" is a popular research topic, existing tools usually handle simple, single-table claims. They aren't built for the scale and complexity of relational hospital databases where a single note might reference dozens of interconnected tables.
To address this, researchers have introduced EHRCon, a new benchmark dataset designed to detect contradictions between unstructured clinical notes and structured database tables in Electronic Health Records (EHRs). Alongside the dataset, they propose CheckEHR, an eight-stage LLM-based framework that transforms the messy task of medical fact-checking into a structured pipeline.
The CheckEHR Framework
The authors propose CheckEHR, a framework that leverages Large Language Models (LLMs) through a sophisticated "divide and conquer" strategy. Instead of asking an LLM a simple binary question ("Is this note correct?"), CheckEHR uses an eight-stage pipeline to systematically verify claims:
- Note Segmentation: Breaks long clinical notes into manageable, topic-specific chunks.
- Named Entity Recognition (NER): Identifies specific medical entities (e.g., "WBC 10.0") that can be verified.
- Time Filtering: Interprets when an event happened, translating narrative phrases like "shortly after admission" into searchable time windows.
- Table Identification: Picks the relevant database tables (e.g.,
LABEVENTSvs.PRESCRIPTIONS). - Pseudo Table Creation: The LLM extracts information from the note into a temporary "mini-table" format.
- Self-Correction: A verification step where the LLM checks its own "mini-table" against the original note to catch hallucinations.
- Value Reformatting: Standardizes units and date formats to match the database schema.
- Query Generation: Converts the extracted facts into SQL queries to programmatically check the actual EHR database.
The EHRCon Dataset
The primary contribution of this work is EHRCon, a dataset built on the widely used MIMIC-III clinical database.
- Scale: The dataset features 4,101 manually annotated entities across 105 clinical notes.
- Expert Involvement: It was developed in collaboration with healthcare professionals (nurses and emergency specialists) to ensure the labels reflect real-world clinical logic.
- Dual Versions: To maximize generalizability, the dataset is provided in both the original MIMIC-III schema and the OMOP CDM (Common Data Model) schema.
- Labels: Entities are labeled as CONSISTENT or INCONSISTENT, with detailed metadata on which specific table or column caused the discrepancy.
Key Insights and Results
- The "Decomposition" Advantage: The most striking insight is that while LLMs are mediocre at direct medical fact-checking (achieving only ~10% recall), they become highly effective when the task is broken down into a structured pipeline. Using GPT-3.5 as the backbone, CheckEHR achieved a 61.06% recall in a few-shot setting, a massive leap over direct prompting.
- Discharge Summaries are Error-Prone: The study found that discharge summaries contain a disproportionately high number of inconsistencies. Because these notes summarize weeks of data at the end of a stay, they are prime territory for "summary lag" and manual entry errors.
- The "One-Hour" Bug: An in-depth analysis revealed that over 56% of discrepancies were time-related, with many involving a precise one-hour difference. This suggests that many "errors" in medical records might actually be software synchronization issues (like daylight savings or timezone offsets) rather than human typos.
- The Complexity of OMOP: Surprisingly, performance was lower on the standardized OMOP CDM version than the original MIMIC-III. OMOP's highly detailed, standardized naming makes it harder for models to match simple text mentions to database entries.
- Model Comparison: Llama-3 70B showed impressive zero-shot capabilities, nearly matching GPT-3.5, though it struggled more with the highly unstructured nature of nursing notes compared to semi-structured physician notes.
Limitations and Future Work
Because MIMIC-III is a public dataset, dates have been shifted to protect privacy. The authors acknowledge that this de-identification process might introduce some artificial inconsistencies that wouldn't exist in a live hospital environment. Furthermore, while the dataset is high-quality, it is relatively small due to the expense of manual expert annotation.
Future work could explore using CheckEHR to "silver-label" larger datasets. Ultimately, the goal is to move beyond static datasets and integrate this framework into a live EHR interface, alerting doctors to contradictions as they write their notes.
Summary updated