Related Experiment Video
Updated: Jun 16, 2026

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Computable Structured Phenotype Versus Large Language Model Identification of Opioid Use Disorder Using Electronic
Melanie F Molina1, Cynthia Fenton2, Kathy T LeSaint3
1Department of Emergency Medicine, University of California, San Francisco, CA; Division of Clinical Informatics and Digital Transformation, Department of Medicine, University of California, San Francisco, CA.
A large language model and a rule-based phenotype showed strong performance in identifying opioid use disorder in the emergency department (ED). The large language model demonstrated higher specificity, potentially reducing false-positive alerts.
Area of Science:
- Medical Informatics
- Artificial Intelligence in Healthcare
- Clinical Decision Support
Background:
- Accurate identification of opioid use disorder (OUD) in the emergency department (ED) is crucial for timely intervention.
- Existing rule-based computable phenotypes offer a structured approach to OUD detection.
- The emergence of large language models (LLMs) presents new opportunities for clinical data analysis.
Purpose of the Study:
- To compare the diagnostic performance of a rule-based computable phenotype against a large language model (LLM) for identifying OUD in ED encounters.
- To utilize expert physician review as the gold standard for OUD diagnosis.
Main Methods:
- Retrospective analysis of adult ED encounters with random sampling.
- Development of a rule-based phenotype incorporating diagnosis codes, medications, toxicology, and keywords.
- Application of a large language model (ChatGPT 4.1) using zero-shot prompting on ED notes.
- Independent chart review by two emergency physicians for OUD determination, with adjudication for discrepancies.
- Estimation of performance metrics (sensitivity, specificity, PPV, NPV) using inverse probability weighting.
Main Results:
- Weighted prevalence of OUD was 5.6% in the study population.
- The rule-based phenotype achieved a sensitivity of 0.84 and specificity of 0.964.
- The large language model demonstrated a sensitivity of 0.81 and a significantly higher specificity of 0.996 (P<.0001).
- The LLM also showed a higher positive predictive value (0.92) compared to the phenotype (0.58).
Conclusions:
- Both the rule-based phenotype and the large language model exhibit strong diagnostic capabilities for OUD in the ED.
- The LLM's superior specificity and positive predictive value suggest its potential to minimize false-positive OUD identifications in clinical workflows.
- Further prospective validation of LLMs in diverse patient populations is warranted.
Related Concept Videos
Mechanistic Models: Compartment Models in Individual and Population Analysis
Drug Abuse and Addiction: Pharmacological Phenomena
Classification of Illness
An illness is a response to a disease in which the person's level of functioning is changed compared with a previous level. The general classification of illness includes acute and chronic.
Acute illness is severe and...
Methods of Documentation VII: EMR
Model Approaches for Pharmacokinetic Data: Distributed Parameter Models
The distributed parameter models are specifically designed to account for variations and differences in some drug classes. This model is particularly useful for assessing regional concentrations of anticancer or...
Substance Use Disorders Affecting Sleep
Understanding the concepts of physical dependence,...
