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

Knee Surg Sports Traumatol Arthrosc. 2022 Aug;30(8):2573-2581. doi: 10.1007/s00167-021-06812-4. Epub 2022 Jan 5.

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.

Keywords: Artificial intelligence; Extended opioid use; Machine learning; Primary total knee arthroplasty; Risk factors.

MeSH terms

  • Algorithms
  • Analgesics, Opioid / therapeutic use
  • Arthroplasty, Replacement, Knee* / adverse effects
  • Humans
  • Machine Learning
  • Opioid-Related Disorders*
  • Pain, Postoperative / drug therapy
  • Pain, Postoperative / etiology
  • Retrospective Studies

Substances

  • Analgesics, Opioid