Skip to main content
Log in

Machine learning algorithms predict extended postoperative opioid use in primary total knee arthroplasty

  • KNEE
  • Published:
Knee Surgery, Sports Traumatology, Arthroscopy Aims and scope

Abstract

Purpose

Adequate postoperative pain control following total knee arthroplasty (TKA) is required to achieve optimal patient recovery. However, the postoperative recovery may lead to an unnaturally extended opioid use, which has been associated with adverse outcomes. This study hypothesizes that machine learning models can accurately predict extended opioid use following primary TKA.

Methods

A total of 8873 consecutive patients that underwent primary TKA were evaluated, including 643 patients (7.2%) with extended postoperative opioid use (> 90 days). Electronic patient records were manually reviewed to identify patient demographics and surgical variables associated with prolonged postoperative opioid use. Five machine learning algorithms were developed, encompassing the breadth of state-of-the-art machine learning algorithms available in the literature, to predict extended opioid use following primary TKA, and these models were assessed by discrimination, calibration, and decision curve analysis.

Results

The strongest predictors for prolonged opioid prescription following primary TKA were preoperative opioid duration (100% importance; p < 0.01), drug abuse (54% importance; p < 0.01), and depression (47% importance; p < 0.01). The five machine learning models all achieved excellent performance across discrimination (AUC > 0.83), calibration, and decision curve analysis. Higher net benefits for all machine learning models were demonstrated, when compared to the default strategies of changing management for all patients or no patients.

Conclusion

The study findings show excellent model performance for the prediction of extended postoperative opioid use following primary total knee arthroplasty, highlighting the potential of these models to assist in preoperatively identifying at risk patients, and allowing the implementation of individualized peri-operative counselling and pain management strategies to mitigate complications associated with prolonged opioid use.

Level of evidence

IV.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3

Similar content being viewed by others

References

  1. Bedard NA, DeMik DE, Dowdle SB, Callaghan JJ (2018) Trends and risk factors for prolonged opioid use after unicompartmental knee arthroplasty. Bone Joint J 100B:62–67

    Article  Google Scholar 

  2. Bini SA (2018) Artificial intelligence, machine learning, deep learning, and cognitive computing: what do these terms mean and how will they impact health care? J Arthroplasty 33:2358–2361

    Article  Google Scholar 

  3. Bonner BE, Castillo TN, Fitz DW, Zhao JZ, Klemt C, Kwon Y-M (2019) Preoperative opioid use negatively affects patient-reported outcomes after primary total hip arthroplasty. J Am Acad Orthop Surg 16:38–47

    Google Scholar 

  4. Brummett CM, Waljee JF, Goesling J, Moser S, Lin P, Englesbe MJ, Bohnert ASB, Kheterpal S, Nallamothu BK (2017) New persistent opioid use after minor and major surgical procedures in US adults. JAMA Surg 152:e170504

    Article  Google Scholar 

  5. Van Calster B, McLernon DJ, van Smeden M, Wynants L, Steyerberg EW, Bossuyt P, Collins GS, Macaskill P, McLernon DJ, Moons KGM, Steyerberg EW, Van Calster B, van Smeden M, Vickers AJ, Initiative O behalf of TG ‘Evaluating diagnostic tests and prediction models’ of the S (2019) Calibration: the Achilles heel of predictive analytics. BMC Med 17:230

    Article  Google Scholar 

  6. Clarke H, Soneji N, Ko DT, Yun L, Wijeysundera DN (2014) Rates and risk factors for prolonged opioid use after major surgery: population based cohort study. BMJ 348:g1251

    Article  Google Scholar 

  7. Collins GS, Reitsma JB, Altman DG, Moons KGM (2015) Transparent reporting of a multivariable prediction model for individual prognosis or diagnosis (TRIPOD): the TRIPOD statement. BMJ 350:g7594

    Article  Google Scholar 

  8. Esteva A, Kuprel B, Novoa RA, Ko J, Swetter SM, Blau HM, Thrun S (2017) Dermatologist-level classification of skin cancer with deep neural networks. Nature 542:115–118

    Article  CAS  Google Scholar 

  9. Ferro CAT (2007) Comparing probabilistic forecasting systems with the Brier score. Weather Forecast 22:1076–1088

    Article  Google Scholar 

  10. Franklin PD, Karbassi JA, Li W, Yang W, Ayers DC (2010) Reduction in narcotic use after primary total knee arthroplasty and association with patient pain relief and satisfaction. J Arthroplasty 25:12–16

    Article  Google Scholar 

  11. Goesling J, Moser SE, Zaidi B, Hassett AL, Hilliard P, Hallstrom B, Clauw DJ, Brummett CM (2016) Trends and predictors of opioid use after total knee and total hip arthroplasty. Pain 157:1259–1265

    Article  CAS  Google Scholar 

  12. Greenwell BM, Boehmke BC, McCarthy AJ (2018) A simple and effective model-based variable importance measure. arXiv 1-27

  13. Gulshan V, Peng L, Coram M, Stumpe MC, Wu D, Narayanaswamy A, Venugopalan S, Widner K, Madams T, Cuadros J, Kim R, Raman R, Nelson PC, Mega JL, Webster DR (2016) Development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs. JAMA 316:2402–2410

    Article  Google Scholar 

  14. Hadlandsmyth K, Vander Weg MW, McCoy KD, Mosher HJ, Vaughan-Sarrazin MS, Lund BC (2018) Risk for prolonged opioid use following total knee arthroplasty in veterans. J Arthroplasty 33:119–123

    Article  Google Scholar 

  15. Haeberle HS, Helm JM, Navarro SM, Karnuta JM, Schaffer JL, Callaghan JJ, Mont MA, Kamath AF, Krebs VE, Ramkumar PN (2019) Artificial intelligence and machine learning in lower extremity arthroplasty: a review. J Arthroplasty 34:2201–2203

    Article  Google Scholar 

  16. Hannun AY, Rajpurkar P, Haghpanahi M, Tison GH, Bourn C, Turakhia MP, Ng AY (2019) Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nature 25:65–69

    CAS  Google Scholar 

  17. Helm JM, Swiergosz AM, Haeberle HS, Karnuta JM, Schaffer JL, Krebs VE, Spitzer AI, Ramkumar PN (2020) Machine learning and artificial intelligence: definitions, applications, and future directions. Curr Rev Musculoskelet Med 13:69–76

    Article  Google Scholar 

  18. Ingall E, Klemt C, Melnic CM, Cohen-Levy WB, Tirumala V, Kwon Y-M (2021) Impact of preoperative opioid use on patient-reported outcomes after revision total knee arthroplasty: a propensity matched analysis. J Knee Surg 13:79–86

    Google Scholar 

  19. Karhade AV, Ogink PT, Thio QCBS, Broekman MLD, Cha TD, Hershman SH, Mao J, Peul WC, Schoenfeld AJ, Bono CM, Schwab JH (2019) Machine learning for prediction of sustained opioid prescription after anterior cervical discectomy and fusion. Spine J 19:976–983

    Article  Google Scholar 

  20. Karhade AV, Schwab JH, Bedair HS (2019) Development of machine learning algorithms for prediction of sustained postoperative opioid prescriptions after total hip arthroplasty. J Arthroplasty 34:2272-2277.e1

    Article  Google Scholar 

  21. Karhade AV, Thio QCBS, Ogink PT, Bono CM, Ferrone ML, Oh KS, Saylor PJ, Schoenfeld AJ, Shin JH, Harris MB, Schwab JH (2019) Predicting 90-day and 1-year mortality in spinal metastatic disease: development and internal validation. Neurosurgery 85:E671–E681

    Article  Google Scholar 

  22. Katakam A, Karhade AV, Schwab JH, Chen AF, Bedair HS (2020) Development and validation of machine learning algorithms for postoperative opioid prescriptions after TKA. J Orthop 22:95–99

    Article  Google Scholar 

  23. Klemt C, Tirumala V, Smith EJ, Padmanabha A, Kwon Y-M (2020) Development of a preoperative risk calculator for re-infection following revision surgery for periprosthetic joint infection. J Arthroplasty 36:693–699

    Article  Google Scholar 

  24. Lopez CD, Gazgalis A, Boddapati V, Shah RP, Cooper HJ, Geller JA (2021) Artificial learning and machine learning decision guidance applications in total hip and knee arthroplasty: a systematic review. Arthroplast Today 11:103–112

    Article  Google Scholar 

  25. Manchikanti L, Singh A (2008) Therapeutic opioids: a ten-year perspective on the complexities and complications of the escalating use, abuse, and nonmedical use of opioids. Pain Physician 11:S63-88

    Article  Google Scholar 

  26. Mudumbai SC, Chung P, Nguyen N, Harris B, Clark JD, Wagner TH, Giori NJ, Stafford RS, Mariano ER (2020) Perioperative opioid prescribing patterns and readmissions after total knee arthroplasty in a national cohort of veterans health administration patients. Pain Med 21:595–603

    Article  Google Scholar 

  27. Namba RS, Singh A, Paxton EW, Inacio MCS (2018) Patient factors associated with prolonged postoperative opioid use after total knee arthroplasty. J Arthroplasty 33:2449–2454

    Article  Google Scholar 

  28. Navarro SM, Wang EY, Haeberle HS, Mont MA, Krebs VE, Patterson BM, Ramkumar PN (2018) Machine learning and primary total knee arthroplasty: patient forecasting for a patient-specific payment model. J Arthroplasty 33:3617–3623

    Article  Google Scholar 

  29. Obermeyer Z, Emanuel EJ (2016) Predicting the future—big data, machine learning, and clinical medicine. N Engl J Med 375:1216–1219

    Article  Google Scholar 

  30. Pryymachenko Y, Wilson RA, Abbott JH, Dowsey MM, Choong PFM (2020) Risk factors for chronic opioid use following hip and knee arthroplasty: evidence from New Zealand population data. J Arthroplasty 35:3099-3107.e14

    Article  Google Scholar 

  31. Ramkumar PN, Karnuta JM, Navarro SM, Haeberle HS, Iorio R, Mont MA, Patterson BM, Krebs VE (2019) Preoperative prediction of value metrics and a patient-specific payment model for primary total hip arthroplasty: development and validation of a deep learning model. J Arthroplasty 34:2228-2234.e1

    Article  Google Scholar 

  32. Ramkumar PN, Navarro SM, Haeberle HS, Karnuta JM, Mont MA, Iannotti JP, Patterson BM, Krebs VE (2019) Development and validation of a machine learning algorithm after primary total hip arthroplasty: applications to length of stay and payment models. J Arthroplasty 34:632–637

    Article  Google Scholar 

  33. Schoenfeld AJ, Jiang W, Chaudhary MA, Scully RE, Koehlmoos T, Haider AH (2017) Sustained prescription opioid use among previously opioid-naive patients insured through TRICARE (2006–2014). JAMA Surg 152:1175–1176

    Article  Google Scholar 

  34. Senders JT, Staples PC, Karhade AV, Zaki MM, Gormley WB, Broekman MLD, Smith TR, Arnaout O (2018) Machine learning and neurosurgical outcome prediction: a systematic review. World Neurosurg 109:476-486.e1

    Article  Google Scholar 

  35. Sheth DS, Ho N, Pio JR, Zill P, Tovar S, Namba RS (2020) Prolonged opioid use after primary total knee and total hip arthroplasty: prospective evaluation of risk factors and psychological profile for depression, pain catastrophizing, and aberrant drug-related behavior. J Arthroplasty 35:3535–3544

    Article  Google Scholar 

  36. Smith E, Klemt C, Sabeh K, Tirumala V, Kwon Y-M (2021) Patient-reported outcomes associated with preoperative opioid use in revision total hip arthroplasty: a propensity score-matched cohort study. J Am Acad Orthop Surg 29:e330–e336

    Article  Google Scholar 

  37. Sun EC, Darnall BD, Baker LC, Mackey S (2016) Incidence of and risk factors for chronic opioid use among opioid-naive patients in the postoperative period. JAMA Intern Med 176:1286–1293

    Article  Google Scholar 

  38. Waljee JF, Li L, Brummett CM, Englesbe MJ (2017) Iatrogenic opioid dependence in the United States: are surgeons the gatekeepers? Ann Surg 265:728–730

    Article  Google Scholar 

Download references

Funding

The study did not receive any funding. Data are available upon request. Only standard software was used for analysis.

Author information

Authors and Affiliations

Authors

Contributions

K: data collection, analysis, and write-up; H: data collection, analysis, and write-up; R: write-up; E: write-up; Y: data collection; K: analysis and write-up.

Corresponding author

Correspondence to Young-Min Kwon.

Ethics declarations

Conflict of interest

All authors report no conflict of interest or financial disclosures.

Ethical approval

The study was approvd by the Institutional Review Board (IRB).

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Klemt, C., Harvey, M.J., Robinson, M.G. et al. Machine learning algorithms predict extended postoperative opioid use in primary total knee arthroplasty. Knee Surg Sports Traumatol Arthrosc 30, 2573–2581 (2022). https://doi.org/10.1007/s00167-021-06812-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00167-021-06812-4

Keywords

Navigation