240: Predicting New Persistent Opioid Use After Total Joint Replacement Using Machine Learning Methods
Topic: Clinical Science
Subtopic: Pain category (ICD-11), Chronic postsurgical pain, Artificial Intelligence/Machine Learning, Epidemiology
Background and Aims: New persistent opioid use (NPOU), defined as prolonged opioid use beyond the expected recovery period (typically three months) after surgery in patients with no prior opioid exposure, is an increasingly recognized postoperative complication of total joint arthroplasty. For opioid-naive patients, surgical exposure may predispose them to prolonged opioid use, misuse, and, in some cases, opioid use disorder. Despite its clinical significance, preoperative identification of opioid-naive patients at risk for NPOU remains challenging. Existing prediction models are limited by small sample sizes, outdated data, a lack of stratification by prior opioid exposure, insufficient representation of the multidimensional nature of NPOU, and reliance on single or narrow sets of machine learning (ML) algorithms that are suboptimal for complex, high-dimensional data. Accordingly, there is a critical need for a reliable, rigorous, and interpretable prediction model of NPOU in opioid-naïve patients undergoing primary total joint arthroplasty.
Methods: This retrospective cohort study included adults (age ≥18) who underwent primary total joint arthroplasty between 2018 and 2023 at a large urban academic health system in the United States. Patients who underwent revision or partial arthroplasty were excluded. Electronic health record (EHR) data were extracted, encompassing 82 clinical features such as sociodemographic characteristics, pain severity, preoperative functional status, social support, surgical characteristics, laboratory values, preoperative diagnoses and medication profiles, and substance use history. The binary outcome variable represented NPOU status following the index surgical encounter. ML modeling was conducted using STREAMLINE (v0.3.4), an automated end-to-end ML pipeline. Ten ML algorithms were systematically trained, evaluated, and compared using 10-fold stratified cross-validation. Given the class imbalance in the dataset, the area under the precision-recall curve (AUPRC) was selected as the primary performance metric. Feature importance was estimated using permutation-based methods across all algorithms to identify clinically relevant predictors of NPOU.
Results: Of the total sample (n=5,868), the mean age was 63.6 years, 60.2% were female (n=3,533), and 61.6% were White (n=3,614), followed by 29.8% who were Black or African American (n=1,750). Overall, 794 patients (13.5%) developed NPOU. Among multiple algorithms, logistic regression achieved the highest area under the receiver operating characteristic curve (AUROC: 0.633), comparable to previously reported logistic regression models (AUROC: 0.65–0.67). AUPRC ranged from 0.174 to 0.253 across algorithms, with Naïve Bayes achieving the highest value (0.253). AUPRC should be interpreted relative to the no-skill baseline of 0.135 (reflecting the 13.5% NPOU incidence in this cohort), against which all models demonstrated meaningful improvement. Significant predictors included disability employment status, average and worst pain scores on postoperative day 1, preoperative muscle relaxant use, preoperative neck/back pain diagnosis, cigarette smoking, and hospital length of stay.
Conclusions: This study demonstrates that ML-based prediction of NPOU use among opioid-naïve patients undergoing total joint replacement is feasible, though overall model discrimination remains modest. This likely reflects the inherent complexity of predicting post-surgical opioid behavior, which is largely affected by post-discharge social context, psychological factors, and patient behavior that are not readily captured in perioperative EHR data. Nevertheless, the consistent identification of significant predictors across multiple algorithms highlights their clinical relevance and supports their incorporation into preoperative risk stratification assessments. Future work should explore feature engineering, class-imbalance correction techniques, and external validation. Overall, findings from this study have the potential to assist clinicians in prospectively identifying high-risk patients prior to surgery, enabling early identification of individuals at risk for transitioning from short-term to long-term opioid use after arthroplasty.
References: References
- Brummett CM, Waljee JF, Goesling J, Moser S, Lin P, Englesbe MJ, Bohnert ASB, Kheterpal S, Nallamothu BK. New persistent opioid use after minor and major surgical procedures in US adults. JAMA Surgery. 2017;152(6):e170504.
- Gabriel RA, Harjai B, Prasad RS, Simpson S, Chu I, Fisch KM, Said ET. Machine learning approach to predicting persistent opioid use following lower extremity joint arthroplasty. Reg Anesth Pain Med. 2022;47(5):313-319. doi:10.1136/rapm-2021-103299
- Gessner KH, Preisser JS, Pfaff E, Wang R, Walters K, Bradford R, Clark M, Ehlers M, Nielsen M. Predictors of new persistent opioid use after surgery in adults. Anesthesiol Perioper Sci. 2025;3(1):2. doi:10.1007/s44254-024-00083-1
- Urbanowicz RJ, Bandhey H, Keenan BT, Maislin G, Hwang S, Mowery DL, Lynch SM, Mazzotti DR, Han F, Li QY, Penzel T, Tufik S, Bittencourt L, Gislason T, de Chazal P, Singh B, McArdle N, Chen NH, Pack A, Schwab RJ, Cistulli PA, Magalang UJ. STREAMLINE: An automated machine learning pipeline for biomedicine applied to examine the utility of photography-based phenotypes for OSA prediction across international sleep centers. arXiv. 2023;arXiv:2312.05461.
Presenting Author: Yoonjae Lee
Submitting Author: Yoonjae Lee
Senior Author: Danielle Mowery, Ryan Urbanowicz (co-senior authors)
IASP 2026 Global Year theme of Neuropathic Pain: Yes
Co-Authors:
- Yoonjae Lee: DNP, APRN - School of Nursing, University of Pennsylvania, Philadelphia, PA, USA
- Harsh Bandhey: MS - Department of Computational Biomedicine, Cedars-Sinai Medical Center, Los Angeles,CA, USA
- Sunil Thomas: MBA - Institute for Biomedical Informatics, Perelman School of Medicine University of Pennsylvania, Philadelphia, PA, USA
- Heather Williams: NA - Institute for Biomedical Informatics, Perelman School of Medicine University of Pennsylvania, Philadelphia, PA, USA
- Heath D. Schmidt: PhD - School of Nursing and Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, USA
- Peggy Compton: PHD, RN, FAAN - School of Nursing, University of Pennsylvania, Philadelphia, PA, USA
- Rosemary Polomano: PhD, RN, FAAN - School of Nursing and Perelman School of Medicine, University of Pennsylvania, Philadelphia, PA, USA
- Christopher A. Anthony: MD - Department of Orthopaedic Surgery, Pennsylvania Hospital, Philadelphia, PA, USA
- Neil P. Sheth: MD, FACS - Department of Orthopaedic Surgery, Pennsylvania Hospital, Philadelphia, PA, USA
- Danielle Mowery: PhD, MS, MS, FAMIA, FACMI - Institute for Biomedical Informatics, Perelman School of Medicine University of Pennsylvania, Philadelphia, PA, USA
- Ryan Urbanowicz: PhD - Department of Computational Biomedicine, Cedars-Sinai Medical Center, Los Angeles, CA, US
Predicting New Persistent Opioid Use After Total Joint Replacement Using Machine Learning Methods
Category
Poster
Description
Session Type: Posters
Room: Exhibit Hall EH102-103
28/10/2026
09:30 AM - 11:00 AM