Harnessing electronic health records for real-world evidence

Jue Hou, Rachel Zhao, Jessica Gronsbell, Brett K. Beaulieu‐Jones, Griffin Webber, Thomas Jemielita, Shuyan Wan, Chuan Hong, Yucong Lin, Tianrun Cai, Jun Wen, Vidul Ayakulangara Panickan, Clara-Lea Bonzel, Kai‐Li Liaw, Katherine P. Liao, Tianxi CaiarXiv 2022 · DOI

Abstract

While randomized controlled trials (RCTs) are the gold-standard for establishing the efficacy and safety of a medical treatment, real-world evidence (RWE) generated from real-world data (RWD) has been vital in post-approval monitoring and is being promoted for the regulatory process of experimental therapies. An emerging source of RWD is electronic health records (EHRs), which contain detailed information on patient care in both structured (e.g., diagnosis codes) and unstructured (e.g., clinical notes, images) form. Despite the granularity of the data available in EHRs, critical variables required to reliably assess the relationship between a treatment and clinical outcome can be challenging to extract. We provide an integrated data curation and modeling pipeline leveraging recent advances in natural language processing, computational phenotyping, and modeling techniques with noisy data to address this fundamental challenge and accelerate the reliable use of EHRs for RWE, as well as the creation of digital twins. The proposed pipeline is highly automated for the task and includes guidance for deployment. Examples are also drawn from existing literature on EHR emulation of RCT and accompanied by our own studies with Mass General Brigham (MGB) EHR.

Introduction

Randomized Controlled Trials (RCTs) have long served as the bedrock of medical evidence. However, their limitations—high costs, slow timelines, and the exclusion of complex patient populations—have created a growing demand for Real-World Evidence (RWE). Electronic Health Records (EHRs) represent a massive, untapped resource for RWE, yet they are notoriously difficult to utilize. Structured data, such as ICD-10 diagnosis codes, often lack the nuance required for clinical research; indeed, studies suggest that up to 85% of RCTs cannot be replicated using structured EHR data alone. Critical clinical endpoints, such as cancer recurrence or specific physiological measurements, are frequently buried in unstructured clinical notes or medical imaging. This paper introduces an automated, four-module pipeline designed to transform this "noisy" data into high-quality evidence for trial emulation and the development of patient "digital twins."

The Integrated Data Curation and Modeling Pipeline

The proposed framework addresses the "unmet need" for standardized data extraction through a systematic four-step process:

1. Meta-Data Harmonization

The first step involves mapping variables from RCT protocols to standardized medical concepts. Using Natural Language Processing (NLP) tools such as MetaMap and NILE, the pipeline performs Named Entity Recognition (NER) to link clinical variables to the Unified Medical Language System (UMLS). This ensures that disparate data points are mapped to consistent systems like PheCodes for diagnoses and RxNorm for medications.

2. Cohort Construction

Cohort identification follows a three-phase strategy:

  • Data Mart: Establishing a broad base of potentially relevant patients.
  • Disease Cohort: Narrowing the population using automated phenotyping algorithms (e.g., MAP or PheNorm) to ensure patients actually meet the disease criteria.
  • Treatment Arms: Identifying specific intervention groups by establishing the precise temporal order of clinical events, ensuring that the treatment preceded the outcome of interest.

3. Variable Curation

To capture the full clinical picture, the pipeline extracts data from three primary sources:

  • Phenotype-derived: Using machine learning to define complex disease statuses.
  • Text-derived: Utilizing specialized tools like EXTEND and NICE to extract numerical values (e.g., tumor dimensions or ejection fractions) from narrative clinical notes.
  • Image-derived: Employing AI segmentation to derive physical measures from CT or MRI scans.

4. Validation and Robust Modeling

To handle the inherent noise in observational data, the pipeline employs "doubly robust estimation." This statistical approach provides accurate results if either the treatment assignment model or the outcome model is correctly specified, significantly reducing bias. Furthermore, the framework includes a mathematical formula to determine the necessary sample size for manual validation; for instance, a subset of 59 patients is typically required to ensure a 95% detection chance for errors with a 5% tolerance.

Key Methodological Insights

The "Silver Standard" Strategy

A central innovation of this pipeline is the use of "silver-standard labels." Because human-verified "gold-standard" labels are expensive and time-consuming to produce, the pipeline uses noisy, automatically extracted features to train initial models. This allows for the scaling of research without requiring exhaustive manual chart reviews for every patient.

Temporal Logic and Digital Twins

Valid RWE requires more than just the presence of a drug code; it requires proof of clinical sequence (e.g., distinguishing first-line from second-line therapy). By robustly modeling these individual patient trajectories, the pipeline facilitates the creation of "digital twins"—virtual models that can forecast personalized treatment outcomes based on real-world longitudinal data.

Results and Feasibility

Using data from the Mass General Brigham (MGB) EHR, the authors demonstrate that NLP tools like EXTEND can extract numerical data from clinical notes with high accuracy. This capability effectively bridges the gap where structured data is missing, overcoming the "85% infeasibility" barrier previously associated with EHR-based trial emulation. The framework proves that combining automated NLP with robust statistical modeling makes large-scale RWE generation both feasible and scientifically rigorous.

Limitations and Future Directions

Despite its automation, the pipeline faces several challenges:

  • Data Leakage: Patients receiving care across multiple institutions may have fragmented records, leading to an incomplete clinical picture.
  • The Placebo Problem: EHRs rarely contain data on placebo treatments, making certain trial emulations difficult.
  • Inherent Missingness: AI cannot recover information that was never documented by a clinician (e.g., specific performance status scores).

Future research aims to address these gaps through federated learning, allowing AI models to be trained across multiple hospital systems without the need to share raw, sensitive patient data, thereby mitigating the issue of fragmented records.

Conclusion

By integrating NLP, computational phenotyping, and robust statistical frameworks, this pipeline provides a scalable path for transforming EHR data into regulatory-grade Real-World Evidence. This approach not only accelerates the monitoring of experimental therapies but also moves the medical community closer to the goal of truly personalized precision medicine.

Summary updated

BibTeX
@misc{hou2022harnessing,
  author = {Jue Hou and Rachel Zhao and Jessica Gronsbell and Brett K. Beaulieu‐Jones and Griffin Webber and Thomas Jemielita and Shuyan Wan and Chuan Hong and Yucong Lin and Tianrun Cai and Jun Wen and Vidul Ayakulangara Panickan and Clara-Lea Bonzel and Kai‐Li Liaw and Katherine P. Liao and Tianxi Cai},
  title = {{Harnessing electronic health records for real-world evidence}},
  year = {2022},
  eprint = {2211.16609},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2211.16609},
}
Figure