  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, 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.
