Related Experiment Video
Updated: Nov 7, 2025

An Experimental Paradigm for the Prediction of Post-Operative Pain PPOP
Published on: January 27, 2010
Prediction of Prolonged Opioid Use After Surgery in Adolescents: Insights From Machine Learning
Andrew Ward1, Trisha Jani2, Elizabeth De Souza3
1From the Department of Electrical Engineering, Stanford University, Stanford, California.
Background:
Long-term opioid use has negative health care consequences. Patients who undergo surgery are at risk for prolonged opioid use after surgery (POUS). While risk factors have been previously identified, no methods currently exist to determine higher-risk patients. We assessed the ability of a variety of machine-learning algorithms to predict adolescents at risk of POUS and to identify factors associated with this risk.
Methods:
A retrospective cohort study was conducted using a national insurance claims database of adolescents aged 12-21 years who underwent 1 of 1297 surgeries, with general anesthesia, from January 1, 2011 to December 30, 2017. Logistic regression with an L2 penalty and with a logistic regression with an L1 lasso (Lasso) penalty, random forests, gradient boosting machines, and extreme gradient boosted models were trained using patient and provider characteristics to predict POUS (≥1 opioid prescription fill within 90-180 days after surgery) risk. Predictive capabilities were assessed using the area under the receiver-operating characteristic curve (AUC)/C-statistic, mean average precision (MAP); individual decision thresholds were compared using sensitivity, specificity, Youden Index, F1 score, and number needed to evaluate. The variables most strongly associated with POUS risk were identified using permutation importance.
Results:
Of 186,493 eligible patient surgical visits, 8410 (4.51%) had POUS. The top-performing algorithm achieved an overall AUC of 0.711 (95% confidence interval [CI], 0.699-0.723) and significantly higher AUCs for certain surgeries (eg, 0.823 for spinal fusion surgery and 0.812 for dental surgery). The variables with the strongest association with POUS were the days' supply of opioids and oral morphine milligram equivalents of opioids in the year before surgery.
Conclusions:
Machine-learning models to predict POUS risk among adolescents show modest to strong results for different surgeries and reveal variables associated with higher risk. These results may inform health care system-specific identification of patients at higher risk for POUS and drive development of preventative measures.
More Related Videos
04:09Predicting Treatment Response to Image-Guided Therapies Using Machine Learning: An Example for Trans-Arterial Treatment of Hepatocellular Carcinoma
Published on: October 10, 2018
09:54Combining Laser Capture Microdissection and Microfluidic qPCR to Analyze Transcriptional Profiles of Single Cells: A Systems Biology Approach to Opioid Dependence
Published on: March 8, 2020
Related Concept Videos
Opioid Analgesics: Synthetic and Semisynthetic Opioids
Opioid Analgesics: Morphine and Other Natural Cogeners
Analgesia and Pain Management