An open-source framework for end-to-end analysis of electronic health record data

With progressive digitalization of healthcare systems worldwide, large-scale collection of electronic health records (EHRs) has become commonplace. However, an extensible framework for comprehensive exploratory analysis that accounts for data heterogeneity is missing. Here we introduce ehrapy, a modular open-source Python framework designed for exploratory analysis of heterogeneous epidemiology and EHR data. ehrapy incorporates a series of analytical steps, from data extraction and quality control to the generation of low-dimensional representations. Complemented by rich statistical modules, ehrapy facilitates associating patients with disease states, differential comparison between patient clusters, survival analysis, trajectory inference, causal inference and more. Leveraging ontologies, ehrapy further enables data sharing and training EHR deep learning models, paving the way for foundational models in biomedical research. We demonstrate ehrapy's features in six distinct examples. We applied ehrapy to stratify patients affected by unspecified pneumonia into finer-grained phenotypes. Furthermore, we reveal biomarkers for significant differences in survival among these groups. Additionally, we quantify medication-class effects of pneumonia medications on length of stay. We further leveraged ehrapy to analyze cardiovascular risks across different data modalities. We reconstructed disease state trajectories in patients with severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) based on imaging data. Finally, we conducted a case study to demonstrate how ehrapy can detect and mitigate biases in EHR data. ehrapy, thus, provides a framework that we envision will standardize analysis pipelines on EHR data and serve as a cornerstone for the community.

Authors

Institutions

Publication Details

Journal
Nature Medicine
Published
2024-09-12
DOI
https://doi.org/10.1038/s41591-024-03214-0
Citations
31
Primary Topic
Machine Learning in Healthcare
Type
article
Field-Weighted Citation Impact
10.42
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

An open-source framework for end-to-end analysis of electronic health record data

Lukas Heumos, Anne Hilgendorff, Fabiola Curion, Nastassya Horlava et al.
31 citations
Nature Medicine
Machine Learning in Healthcare
10.42
article

An open-source framework for end-to-end analysis of electronic health record data

Lukas Heumos, Anne Hilgendorff, Fabiola Curion, Nastassya Horlava, Isaac Virshup, Vladimir A. Shitov, Philipp Ehmele, Eljas Roellin, Roland Eils, Leon Hetzel, Niklas J. Lang, Tim Treis, Luke Zappia, Julius Upmeier zu Belzen, L T May, Xinyue Zhang, Lisa Sikkema, Fabian Joachim Theis, Altana Namsaraeva, Herbert B. Schiller, Rainer Knoll
article en
31 citations

Abstract

With progressive digitalization of healthcare systems worldwide, large-scale collection of electronic health records (EHRs) has become commonplace. However, an extensible framework for comprehensive exploratory analysis that accounts for data heterogeneity is missing. Here we introduce ehrapy, a modular open-source Python framework designed for exploratory analysis of heterogeneous epidemiology and EHR data. ehrapy incorporates a series of analytical steps, from data extraction and quality control to the generation of low-dimensional representations. Complemented by rich statistical modules, ehrapy facilitates associating patients with disease states, differential comparison between patient clusters, survival analysis, trajectory inference, causal inference and more. Leveraging ontologies, ehrapy further enables data sharing and training EHR deep learning models, paving the way for foundational models in biomedical research. We demonstrate ehrapy's features in six distinct examples. We applied ehrapy to stratify patients affected by unspecified pneumonia into finer-grained phenotypes. Furthermore, we reveal biomarkers for significant differences in survival among these groups. Additionally, we quantify medication-class effects of pneumonia medications on length of stay. We further leveraged ehrapy to analyze cardiovascular risks across different data modalities. We reconstructed disease state trajectories in patients with severe acute respiratory syndrome coronavirus 2 (SARS-CoV-2) based on imaging data. Finally, we conducted a case study to demonstrate how ehrapy can detect and mitigate biases in EHR data. ehrapy, thus, provides a framework that we envision will standardize analysis pipelines on EHR data and serve as a cornerstone for the community.

Nature MedicineVol. 30(11)
Heidelberg University (DE), German Center for Neurodegenerative Diseases (DE), Helmholtz Zentrum München (DE), German Center for Lung Research (DE), Berlin Institute of Health at Charité - Universitätsmedizin Berlin (DE), Technical University of Munich (DE), Ludwig-Maximilians-Universität München (DE)
Good health and well-being
Openalex Percentile: Top 1%
Machine Learning in Healthcare
10.42
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.