Related Experiment Video
Updated: Jan 21, 2026

Individualized Stem-positioning in Calcar-guided Short-stem Total Hip Arthroplasty
Published on: February 27, 2018
Development of Machine Learning Algorithms for Prediction of Sustained Postoperative Opioid Prescriptions After Total
Aditya V Karhade1, Joseph H Schwab1, Hany S Bedair1
1Department of Orthopedic Surgery, Massachusetts General Hospital, Harvard Medical School, Boston, MA.
Background:
Postoperative recovery after total hip arthroplasty (THA) can lead to the development of prolonged opioid use but there are few tools for predicting this adverse outcome. The purpose of this study is to develop machine learning algorithms for preoperative prediction of prolonged opioid prescriptions after THA.
Methods:
A retrospective review of electronic health records was conducted at 2 academic medical centers and 3 community hospitals to identify adult patients who underwent THA for osteoarthritis between January 1, 2000 and August 1, 2018. Prolonged postoperative opioid prescriptions were defined as continuous opioid prescriptions after surgery to at least 90 days after surgery. Five machine learning algorithms were developed to predict this outcome and were assessed by discrimination, calibration, and decision curve analysis.
Results:
Overall, 5507 patients underwent THA, of which 345 (6.3%) had prolonged postoperative opioid prescriptions. The factors determined for prediction of prolonged postoperative opioid prescriptions were age, duration of opioid exposure, preoperative hemoglobin, and preoperative medications (antidepressants, benzodiazepines, nonsteroidal anti-inflammatory drugs, and beta-2-agonists). The elastic-net penalized logistic regression model achieved the best performance across discrimination (c-statistic = 0.77), calibration, and decision curve analysis. This model was incorporated into a digital application able to provide both predictions and explanations (available at https://sorg-apps.shinyapps.io/thaopioid/).
Conclusion:
If externally validated in independent populations, the algorithms developed in this study could improve preoperative screening and support for THA patients at high risk for prolonged postoperative opioid prescriptions. Early identification and intervention in high-risk cases may mitigate the long-term adverse consequence of opioid dependence.
Level Of Evidence:
III.
Related Concept Videos
Sustainable Development
Opioid Analgesics: Synthetic and Semisynthetic Opioids
Opioid Receptors: Overview
Prescription, Nonprescription and Orphan Drugs
The misuse and addiction to prescription drugs is a growing problem that can affect people of all age groups, specifically teenagers. This can happen when prescription medications are used in ways not intended by the prescriber, such as taking someone else's prescription or using medication for...
Predicting Molecular Geometry
Opioid Analgesics: Morphine and Other Natural Cogeners

