Skip to main content
medRxiv
  • Home
  • About
  • Submit
  • ALERTS / RSS
Advanced Search

Large Language Models Facilitate the Generation of Electronic Health Record Phenotyping Algorithms

View ORCID ProfileChao Yan, Henry H. Ong, Monika E. Grabowska, Matthew S. Krantz, Wu-Chen Su, Alyson L. Dickson, Josh F. Peterson, View ORCID ProfileQiPing Feng, View ORCID ProfileDan M. Roden, C. Michael Stein, View ORCID ProfileV. Eric Kerchberger, Bradley A. Malin, Wei-Qi Wei
doi: https://doi.org/10.1101/2023.12.19.23300230
Chao Yan
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Chao Yan
Henry H. Ong
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Monika E. Grabowska
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
MS
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Matthew S. Krantz
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
MD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Wu-Chen Su
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
MS
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Alyson L. Dickson
2Department of Medicine, Vanderbilt University Medical Center, Nashville, TN
MA
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Josh F. Peterson
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
2Department of Medicine, Vanderbilt University Medical Center, Nashville, TN
MD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
QiPing Feng
2Department of Medicine, Vanderbilt University Medical Center, Nashville, TN
PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for QiPing Feng
Dan M. Roden
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
MD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for Dan M. Roden
C. Michael Stein
2Department of Medicine, Vanderbilt University Medical Center, Nashville, TN
MD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
V. Eric Kerchberger
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
2Department of Medicine, Vanderbilt University Medical Center, Nashville, TN
MD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • ORCID record for V. Eric Kerchberger
Bradley A. Malin
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
3Department of Computer Science, Vanderbilt University, Nashville, TN
4Department of Biostatistics, Vanderbilt University Medical Center, Nashville, TN
PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
Wei-Qi Wei
1Department of Biomedical Informatics, Vanderbilt University Medical Center, Nashville, TN
3Department of Computer Science, Vanderbilt University, Nashville, TN
MD, PhD
  • Find this author on Google Scholar
  • Find this author on PubMed
  • Search for this author on this site
  • For correspondence: wei-qi.wei{at}vumc.org
  • Abstract
  • Full Text
  • Info/History
  • Metrics
  • Supplementary material
  • Data/Code
  • Preview PDF
Loading

ABSTRACT

Objectives Phenotyping is a core task in observational health research utilizing electronic health records (EHRs). Developing an accurate algorithm demands substantial input from domain experts, involving extensive literature review and evidence synthesis. This burdensome process limits scalability and delays knowledge discovery. We investigate the potential for leveraging large language models (LLMs) to enhance the efficiency of EHR phenotyping by generating high-quality algorithm drafts.

Materials and Methods We prompted four LLMs—GPT-4 and GPT-3.5 of ChatGPT, Claude 2, and Bard—in October 2023, asking them to generate executable phenotyping algorithms in the form of SQL queries adhering to a common data model (CDM) for three phenotypes (i.e., type 2 diabetes mellitus, dementia, and hypothyroidism). Three phenotyping experts evaluated the returned algorithms across several critical metrics. We further implemented the top-rated algorithms and compared them against clinician-validated phenotyping algorithms from the Electronic Medical Records and Genomics (eMERGE) network.

Results GPT-4 and GPT-3.5 exhibited significantly higher overall expert evaluation scores in instruction following, algorithmic logic, and SQL executability, when compared to Claude 2 and Bard. Although GPT-4 and GPT-3.5 effectively identified relevant clinical concepts, they exhibited immature capability in organizing phenotyping criteria with the proper logic, leading to phenotyping algorithms that were either excessively restrictive (with low recall) or overly broad (with low positive predictive values).

Conclusion GPT versions 3.5 and 4 are capable of drafting phenotyping algorithms by identifying relevant clinical criteria aligned with a CDM. However, expertise in informatics and clinical experience is still required to assess and further refine generated algorithms.

Competing Interest Statement

The authors have declared no competing interest.

Funding Statement

This work was supported by R01GM139891, R01AG069900, F30AG080885, T32GM007347, K01HL157755, and U01HG011181.

Author Declarations

I confirm all relevant ethical guidelines have been followed, and any necessary IRB and/or ethics committee approvals have been obtained.

Yes

The details of the IRB/oversight body that provided approval or exemption for the research described are given below:

This study was approved by the institutional review boards at Vanderbilt University Medical Center (IRB #: 201434).

I confirm that all necessary patient/participant consent has been obtained and the appropriate institutional forms have been archived, and that any patient/participant/sample identifiers included were not known to anyone (e.g., hospital staff, patients or participants themselves) outside the research group so cannot be used to identify individuals.

Yes

I understand that all clinical trials and any other prospective interventional studies must be registered with an ICMJE-approved registry, such as ClinicalTrials.gov. I confirm that any such study reported in the manuscript has been registered and the trial registration ID is provided (note: if posting a prospective study registered retrospectively, please provide a statement in the trial ID field explaining why the study was not registered in advance).

Yes

I have followed all appropriate research reporting guidelines, such as any relevant EQUATOR Network research reporting checklist(s) and other pertinent material, if applicable.

Yes

Footnotes

  • We added more discussions in the main file and details in the supplemental materials.

Data Availability

Source code for results and LLM-generated SQL-formatted algorithms are shared at https://github.com/The-Wei-Lab/LLM-Phenotyping-2024.

Copyright 
The copyright holder for this preprint is the author/funder, who has granted medRxiv a license to display the preprint in perpetuity. It is made available under a CC-BY-NC 4.0 International license.
Back to top
PreviousNext
Posted February 26, 2024.
Download PDF

Supplementary Material

Data/Code
Email

Thank you for your interest in spreading the word about medRxiv.

NOTE: Your email address is requested solely to identify you as the sender of this article.

Enter multiple addresses on separate lines or separate them with commas.
Large Language Models Facilitate the Generation of Electronic Health Record Phenotyping Algorithms
(Your Name) has forwarded a page to you from medRxiv
(Your Name) thought you would like to see this page from the medRxiv website.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Share
Large Language Models Facilitate the Generation of Electronic Health Record Phenotyping Algorithms
Chao Yan, Henry H. Ong, Monika E. Grabowska, Matthew S. Krantz, Wu-Chen Su, Alyson L. Dickson, Josh F. Peterson, QiPing Feng, Dan M. Roden, C. Michael Stein, V. Eric Kerchberger, Bradley A. Malin, Wei-Qi Wei
medRxiv 2023.12.19.23300230; doi: https://doi.org/10.1101/2023.12.19.23300230
Twitter logo Facebook logo LinkedIn logo Mendeley logo
Citation Tools
Large Language Models Facilitate the Generation of Electronic Health Record Phenotyping Algorithms
Chao Yan, Henry H. Ong, Monika E. Grabowska, Matthew S. Krantz, Wu-Chen Su, Alyson L. Dickson, Josh F. Peterson, QiPing Feng, Dan M. Roden, C. Michael Stein, V. Eric Kerchberger, Bradley A. Malin, Wei-Qi Wei
medRxiv 2023.12.19.23300230; doi: https://doi.org/10.1101/2023.12.19.23300230

Citation Manager Formats

  • BibTeX
  • Bookends
  • EasyBib
  • EndNote (tagged)
  • EndNote 8 (xml)
  • Medlars
  • Mendeley
  • Papers
  • RefWorks Tagged
  • Ref Manager
  • RIS
  • Zotero
  • Tweet Widget
  • Facebook Like
  • Google Plus One

Subject Area

  • Health Informatics
Subject Areas
All Articles
  • Addiction Medicine (349)
  • Allergy and Immunology (668)
  • Allergy and Immunology (668)
  • Anesthesia (181)
  • Cardiovascular Medicine (2648)
  • Dentistry and Oral Medicine (316)
  • Dermatology (223)
  • Emergency Medicine (399)
  • Endocrinology (including Diabetes Mellitus and Metabolic Disease) (942)
  • Epidemiology (12228)
  • Forensic Medicine (10)
  • Gastroenterology (759)
  • Genetic and Genomic Medicine (4103)
  • Geriatric Medicine (387)
  • Health Economics (680)
  • Health Informatics (2657)
  • Health Policy (1005)
  • Health Systems and Quality Improvement (985)
  • Hematology (363)
  • HIV/AIDS (851)
  • Infectious Diseases (except HIV/AIDS) (13695)
  • Intensive Care and Critical Care Medicine (797)
  • Medical Education (399)
  • Medical Ethics (109)
  • Nephrology (436)
  • Neurology (3882)
  • Nursing (209)
  • Nutrition (577)
  • Obstetrics and Gynecology (739)
  • Occupational and Environmental Health (695)
  • Oncology (2030)
  • Ophthalmology (585)
  • Orthopedics (240)
  • Otolaryngology (306)
  • Pain Medicine (250)
  • Palliative Medicine (75)
  • Pathology (473)
  • Pediatrics (1115)
  • Pharmacology and Therapeutics (466)
  • Primary Care Research (452)
  • Psychiatry and Clinical Psychology (3432)
  • Public and Global Health (6527)
  • Radiology and Imaging (1403)
  • Rehabilitation Medicine and Physical Therapy (814)
  • Respiratory Medicine (871)
  • Rheumatology (409)
  • Sexual and Reproductive Health (410)
  • Sports Medicine (342)
  • Surgery (448)
  • Toxicology (53)
  • Transplantation (185)
  • Urology (165)