Machine Learning Algorithms Predict Prolonged Opioid Use in Opioid-Naïve Primary Hip Arthroscopy Patients. (May 2021) - Kunze, Kyle N.
Abstract : Introduction: Excessive opioid use after orthopaedic surgery procedures remains a concern because it may result in increased morbidity and imposes a financial burden on the healthcare system. The purpose of this study was to develop machine learning algorithms to predict prolonged opioid use after hip arthroscopy in opioid-naïve patients. Methods: A registry of consecutive hip arthroscopy patients treated by a single fellowship-trained surgeon at one large academic and three community hospitals between January 2012 and January 2017 was queried. All patients were opioid-naïve and therefore had no history of opioid use before surgery. The primary outcome was prolonged postoperative opioid use, defined as patients who requested one or more opioid prescription refills postoperatively. Recursive feature elimination was used to identify the combination of variables that optimized model performance from an initial pool of 17 preoperative features. Five machine learning algorithms (stochastic gradient boosting, random forest, support vector machine, neural network, and elastic-net penalized logistic regression) were trained using 10-fold cross-validation five times and applied to an independent testing set of patients. These algorithms were assessed by calibration, discrimination, Brier score, and decision curve analysis. Results: A total of 775 patients were included, with 141 (18.2%) requesting and using one or more opioid refills after primary hip arthroscopy. The stochastic gradient boosting model achieved the best performance (c-statistic: 0.75, calibration intercept: −0.02, calibration slope: 0.88, and Brier score: 0.13). The five most important variables in predicting prolonged opioid use were the preoperative modified ones: Harris hip score, age, BMI, preoperative pain level, and worker's compensation status. The final algorithm was incorporated into an open-access web application available here: https://orthoapps.shinyapps.io/HPRG_OpioidUse/ . Conclusions: Machine learning algorithms demonstrated good performance for predicting prolonged opioid use after hip arthroscopy in opioid-naïve patients. External validation of this algorithm is necessary to confirm the predictive ability and performance before use in clinical settings.