Huan Li, Mark Iscoe, John Lutz, Carolina Diniz Hopper, Sabrina Fried, Josue Minaya, Caroline Raymond King, Olga Reykhart, Hyung Paek, Daniella Meeker, Edward R. Melnick, R. Andrew Taylor
Abstract
We developed and deploy a real time, electronic health record integrated machine learning phenotype to identify emergency department patients with opioid use disorder for prospective clinical trial screening and buprenorphine initiation. We conducted a multi phase study across three emergency departments in a single United States health system from 2014 to 2025. Using visit level data available at or before triage, we trained a random forest classifier to estimate opioid use disorder risk and embedded scoring in the electronic health record to trigger point of care alerts for trial eligibility review.
Introduction
The opioid crisis continues to evolve as one of the most urgent and complex public health emergencies in the United States. The number of overdose deaths attributed to fentanyl analogs rose by 540% from 2013 to 2016, and in 2022 alone, more than 109,000 drug overdose deaths occurred nationwide, and nearly 70% of these involved opioids [1,2]. Emergency departments (EDs) and frontline services, including emergency medical services, are frequently the first or only point of healthcare contact for individuals with opioid use disorder (OUD) at high risk of overdose.
Results
Participants and descriptive data
In the retrospective observation phase of this study, a total of 3,177,664 unique patients met the inclusion criteria, representing all adult patients with ED visits in the health system between 2014 and 2025. Following outcome-based balancing, the training dataset included 17,054 patients, and the test dataset included 4,246 patients. Within the overall population, 1,336,335 (42.05%, Table 1) were aged 18–39 years, 972,293 (30.60%) were aged 40–64 years, and 869,016 (27.35%) were 65 years or older.
Discussion
In this multi-phase study, we developed, implemented, and prospectively validated an EHR-embedded phenotype that accurately identifies patients with OUD in real time. By integrating daily inference within existing data infrastructure, we demonstrated that automated phenotyping can transition from retrospective research to prospective clinical application with minimal latency. The model’s high predictive performance and operational feasibility highlight its potential to enhance clinical care and clinical trial efficiency for ED patients with OUD.
Methods
Study design and study population
This multi-phase study involved two components: 1) a retrospective observational study utilizing ED visit data from 2014 to 2025 to develop a predictive model, and 2) a prospective validation of the resulting model. The validated model was created with the goal of integration into a clinical decision support tool designed to identify OUD patients eligible for buprenorphine initiation in the prospective ADAPT clinical trial [13].
Conclusion
Acknowledgments
We acknowledge the use of ChatGPT (OpenAI, GPT-5.0) and Yale’s Clarity GPT4 for facilitating advanced language modeling and Grammarly for enhancing our manuscript’s clarity and quality.
Citation: Li H, Iscoe M, Lutz J, Hopper CD, Fried S, Minaya J, et al. (2026) Implementation of an opioid use disorder (OUD) machine-learning phenotype in real-time for the ADAPT clinical trial. PLOS Digit Health 5(9): e0001140. https://doi.org/10.1371/journal.pdig.0001140
Editor: Ann Carrigan, The University of Sydney, AUSTRALIA
Received: December 2, 2025; Accepted: August 16, 2026; Published: September 3, 2026
Copyright: © 2026 Li et al. This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
Data Availability: Data was obtained with a HIPAA waiver under IRB 2000037541. Data may be requested from Yale New Haven Health System by referring to this publication and the associated IRB number. Determinations will be made on a case-by-case basis. The code used for model development is available in S6 Appendix.
Funding: This research was supported by the National Institute on Drug Abuse (NIDA) of the National Institutes of Health (NIH) under Award Number R33DA059884, received by E.R.M. (Edward R. Melnick). Funder website: https://nida.nih.gov. Additional support was provided through a Clinical and Translational Science Award (CTSA) from the National Center for Advancing Translational Sciences (NCATS), National Institutes of Health (NIH) under Grant Number KL2TR001862, received by M.I. (Mark Iscoe). Funder website: https://ncats.nih.gov. The funders had no role in the study design, data collection and analysis, decision to publish, or preparation of the manuscript.
Competing interests: The authors have declared that no competing interests exist.