The "gold standard" of medical knowledge is the Randomized Controlled Trial (RCT). By randomly assigning patients to a treatment or a control group, researchers can isolate the effect of a drug from the noise of human biology. However, this purity comes at a cost: strict inclusion and exclusion criteria. As noted by Rohan Khera and Martijn J. Schuemie in the LEGEND-T2DM protocol, these trials often exclude the very patients doctors see most—those with multiple chronic conditions, the elderly, and diverse demographic profiles.
This creates an efficacy-effectiveness gap: a drug may work perfectly in a controlled lab setting (efficacy) but fail or cause unexpected harm in the "messy" real world (effectiveness). A new research direction is closing this gap by transforming massive, unstructured Electronic Health Record (EHR) data into high-quality Real-World Evidence (RWE).
The Architecture of Real-World Evidence
To turn a hospital's database into a simulated clinical trial, researchers must solve a data problem and a math problem.
The data problem is that EHRs are "noisy." Unlike trial data, which is collected via rigorous protocols, EHR data is a byproduct of routine care—filled with missing values and unstructured clinical notes. Vivek A. Rudrapatna and Atul Butte demonstrated in their pilot study on tofacitinib that even when data is incomplete, rigorous manual abstraction and stochastic imputation can replicate trial results. This suggests that the "messiness" of real-world patients—many of whom would never qualify for a trial—does not necessarily invalidate the signal of a drug's performance.
The math problem is confounding. In a trial, randomization ensures that the only difference between two groups is the drug. In the real world, a doctor might give a stronger drug to a sicker patient. To fix this, researchers use Causal Inference. Frameworks like TRIALSCOPE, developed by Javier González and colleagues, combine Large Language Models (LLMs) to extract features from notes with causal models that "balance" the groups, effectively emulating a randomized environment after the fact.
Scaling to Global Networks
The power of this approach lies in scale. While a typical trial might involve a few thousand people, the LEGEND-T2DM initiative leverages a global network of databases covering over 240 million patients. This scale allows for "phenome-wide" evaluations.
For example, Rohit Vashisht and Sanket S. Dhruva recently used EHR data from 9 million patients to evaluate GLP-1 receptor agonists. By emulating trials across 239 different health outcomes simultaneously, they were able to confirm known heart benefits while uncovering rare, novel signals—like a reduced risk of epilepsy—that a standard trial would be too small to detect.
From Populations to Digital Twins
Beyond just validating drugs, this research direction is moving toward Precision Medicine. By identifying specific patient subgroups that react differently to treatments, researchers can refine who should receive a drug. Jie Xu and Jiang Bian have shown that machine learning can identify subgroups at high risk for adverse events by analyzing the complex interactions of comorbidities that traditional trial eligibility criteria ignore.
The ultimate goal, as outlined in the manifesto by Richard W. Peck, is the creation of Digital Twins. By using historical real-world data to model how a specific patient’s disease is likely to progress, researchers can create "in silico" control groups. This reduces the need for placebo arms in trials, accelerating drug delivery and ensuring that the evidence generated actually reflects the diverse, complex reality of human health.