Abstract
Purpose
Although the average length of hospital stay following revision total knee arthroplasty (TKA) has decreased over recent years due to improved perioperative and intraoperative techniques and planning, prolonged length of stay (LOS) continues to be a substantial driver of hospital costs. The purpose of this study was to develop and validate artificial intelligence algorithms for the prediction of prolonged length of stay for patients following revision TKA.
Methods
A total of 2512 consecutive patients who underwent revision TKA were evaluated. Those patients with a length of stay greater than 75th percentile for all length of stays were defined as patients with prolonged LOS. Three artificial intelligence algorithms were developed to predict prolonged LOS following revision TKA and these models were assessed by discrimination, calibration and decision curve analysis.
Results
The strongest predictors for prolonged length of stay following revision TKA were age (> 75 years; p < 0.001), Charlson Comorbidity Index (> 6; p < 0.001) and body mass index (> 35 kg/m2; p < 0.001). The three artificial intelligence algorithms all achieved excellent performance across discrimination (AUC > 0.84) and decision curve analysis (p < 0.01).
Conclusion
The study findings demonstrate excellent performance on discrimination, calibration and decision curve analysis for all three candidate algorithms. This highlights the potential of these artificial intelligence algorithms to assist in the preoperative identification of patients with an increased risk of prolonged LOS following revision TKA, which may aid in strategic discharge planning.
Level of evidence
IV.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Avoid common mistakes on your manuscript.
Introduction
Although the average length of hospital stay following TKA has decreased over recent years due to enhanced perioperative and intraoperative management, length of stay (LOS) continues to be a substantial driver of costs [2]. A recent study investigating hospital costs for patients with different LOS highlighted that hospital costs increase by 5–8% for every additional night spent in the hospital [27]. The projected rise in the number of primary TKA procedures will be accompanied by a concomitant increase in revision TKA surgeries, with modeling studies forecasting around half a million revision TKAs to be performed over the next decade [20, 21]. Prolonged length of stay, defined as the LOS greater than the 75th percentage of the length of stay for all revision TKA patients [22], provides a particular challenge in terms of cost containment as it increases the average total hospital costs by almost 40% [27]. Therefore, understanding modifiable risk factors for prolonged LOS will be essential to make bundled payment models cost-effective.
Prior retrospective studies have identified numerous modifiable and non-modifiable risk factors for prolonged length of stay following primary and revision TKA [3, 24]. However, these studies do not address the weight of each of these risk factors for prolonged LOS following knee arthroplasty surgery [3, 24]. Therefore, statistical models that can predict patients who will require prolonged length of stay have the potential to help optimizing patients preoperatively.
Artificial intelligence (AI) algorithms, such as artificial neural networks (ANN), represent valuable tools for analyzing and interpreting large and complex datasets, thus these were applied in many medical fields [4, 23]. Although AI algorithms were used in prior literature to predict clinical and functional outcomes for patients following arthroplasty surgery [15,16,17], AI algorithms have yet to be used for the prediction of prolonged length of stay. Therefore, the aim of this study was to develop and validate artificial intelligence algorithms for identifying patients at higher risk of prolonged length of stay following revision total knee arthroplasty. The authors hypothesize that artificial intelligence algorithms can accurately predict prolonged length of stay following revision total knee arthroplasty.
Materials and methods
This study received Institutional review Board approval for the retrospective review of medical health records. A consecutive series of 2577 patients that underwent revision total knee arthroplasty at a single tertiary institution between 2010 and 2017 was identified. Exclusion criteria included (1) patients with prior revision surgeries, (2) bilateral revision TKA procedures and (3) incomplete data. A total of 2512 revision TKA patients remained for evaluation and inclusion for the development of artificial intelligence algorithms to predict prolonged length of hospital stay following revision TKA.
Primary outcome and candidate variables
The primary outcome was the prediction of prolonged length of stay for patients following revision total knee arthroplasty. Length of stay was defined as time between hospital admission and discharge [3]. Prolonged length of hospital stay was defined in concordance with previous literature as length of hospital stays that exceed the 75th percentile of all length of stays following revision TKA [22, 25]. The secondary outcome of interest was the comparison of clinical outcomes between patients with prolonged LOS and those patients without a prolonged LOS following revision TKA.
Candidate variables were collected and included patient, surgical and implant factors which were associated with prolonged LOS in prior studies [24, 25]. Patient variables included for analysis involved: age, gender, body mass index (BMI), insurance status, marital status, ethnicity, medical comorbidities, American Society of Anesthesiologist Physical Status score (ASA score), Charlson comorbidity index (CCI) and preoperative opioid use. Surgical variables included for analysis involved: laterality, indication for revision surgery, type of revision TKA (single component vs all components revision), anesthesia type, tranexamic acid usage, component fixation method (cemented vs non-cemented), tourniquet use, operation time and blood loss [3]. To compare clinical outcomes between patients with prolonged LOS and those without a prolonged LOS following revision TKA, patient charts were also reviewed with regards to readmission rates and re-revision rates. All patients had a minimum follow-up time of 36 months.
Artificial intelligence algorithm development and data analysis
A 80:20 stratified split ratio was applied to the study cohort to create a training dataset (n = 2070 patients) and an independent testing dataset (n = 518 patients). Random forest recursive feature elimination was used to extract variables with the greatest predictive value [7, 11]. Three artificial intelligence algorithms were developed and applied to the training set: (1) neural network (NN), (2) support vector machine (SVM), and (3) elastic-net penalized logistic regression (EPLR). These three artificial intelligence algorithms were chosen based on prior literature demonstrating the high accuracy of these algorithms for the prediction of clinical outcomes [12, 13]. The training dataset underwent a fivefold cross-validation five times and each model was subsequently assessed using standardized metrics of model performance to identify the artificial intelligence algorithm with the best predictive analytics. We applied a coarse-grained grid-search algorithm with repeated random sub-sampling to tune each algorithm’s hyper-parameters during the training phase of each cross-validation round (ANN: number of hidden layer nodes; SVM: number of trees and boosting parameter; EPLR: mixing parameter α (Ridge regularization α = 0; Lasso regularization α = 0) and regularization penalty λ). The grid-search algorithm was constrained to pre-defined lower bounds, upper bounds, and step sizes for each hyper-parameter.
Four methods for model assessment were applied: (1) discrimination (area under the receiver operating curve [AUC]), (2) calibration (calibration plot—intercept and slope), (3) Brier score, and (4) decision curve analysis. Relative variable importance plots were utilized to determine the most important predictors for the algorithm with the best overall performance.
Discrimination of artificial intelligence candidate algorithms utilized the AUC, with AUCs greater than 0.80 representing excellent algorithm performances. Artificial intelligence algorithm calibration was ascertained through a calibration plot, with perfect candidate algorithms having a calibration slope of 1 and a calibration intercept of 0 [12]. Overall algorithm performance was assessed through the Brier Score [8], which is defined as mean squared difference between predicted probabilities and observed frequencies. Perfect artificial intelligence candidate algorithms have a Brier score of 0.
The interpretability of all artificial intelligence algorithms was performed at both local and global levels [9]. Global explanations were provided through the use of variable importance plots, which show the relative importance of variables used for prediction indexed against the most important variable (normalized to 100 points). In contrast, local explanations were provided for individual patients to demonstrate which variables for specific patients in question contributed to the prediction of the artificial intelligence algorithms [26]. All analyses were performed using Matlab (MathWorks Inc., Natick, MA, USA), Anaconda (Anaconda Inc., Austin, TX, USA) and Python (Python Software Foundation, Wilmington, DE, USA) (Fig. 1).
Ethical approval
The retrospective review of electronic health records for this present study was approved by our Institutional Review Board (IRB; P2020P003315). Additionally, recommendations of the Transparent Reporting of a multivariable prediction model for Individual Prognosis or Diagnosis were followed for all data analysis [5].
Results
A total of 2512 consecutive patients (1347 males (53.6%), 1165 females (46.4%) underwent revision total knee arthroplasty (Table 1). Patient demographics and surgical variables for the revision TKA cohort are summarized in Table 1. Patients with prolonged LOS following revision TKA demonstrated a significantly higher re-revision rate (141 TKA patients (11.4%) vs 72 TKA patients (7.5%), p < 0.01), 30-day readmission rate (137 TKA patients (9.0%) vs 57 TKA patients (7.2%), p = 0.01), 60-day readmission rate (149 TKA patients (11.3%) vs 71 TKA patients (9.5%), p = 0.04) and 90-day readmission rate (203 TKA patients (14.0%) vs 88 TKA patients (10.7%), p = 0.03), when compared to patients without prolonged length of stay following revision TKA (Table 2).
Model performance
The optimal ANN had two hidden layers with 18 neurons each. The optimal SVM consisted of 100 trees, with the number of predictors for each node set to default. The optimal SVM learning rate was 0.35 with a subsampling coefficient of 0.75. The optimal EPLR used a mixing parameter α = 0.4 and a regularization penalty term of λ = 0.6.
The artificial intelligence algorithms identified numerous patients and surgical factors to be associated with prolonged length of stay following revision total knee arthroplasty (Fig. 2). These include age (> 75 years; p < 0.001), Charlson Comorbidity Index > 6 (p < 0.001), body mass index (> 35 kg/m2; p < 0.001), operative time (> 154 min; p < 0.001), type of revision TKA (revision of all components; p < 0.01), American Society of Anesthesiology score 3/4 (p < 0.01), revision surgery for peri-prosthetic joint infection or peri-prosthetic fracture (p < 0.01), renal disease, preoperative anemia (< 12 g/dL; p < 0.01), diabetes (p < 0.01), female gender (p = 0.02) and smoking status (p = 0.03). The greatest impact on the risk of a prolonged length of stay following revision TKA was observed for age (> 75 years), Charlson Comorbidity Index and body mass index (> 35 kg/m2; Fig. 2).
The performance for all three artificial intelligence candidate algorithms in both training and testing set is summarized in Tables 3 and 4. In the training phase, the AUCs for the three artificial intelligence candidate algorithms ranged from 0.86 for support vector machines to 0.88 for neural networks (Table 3; Fig. 3). In the testing phase, all three candidate algorithms achieved an excellent AUC. The greatest AUC was achieved by neural networks (AUC 0.87) as shown in Table 4. Decision curve analysis demonstrated that the three artificial intelligence candidate algorithms all achieved higher net benefits for the prediction of prolonged length of hospital stay for patients following revision TKA, when compared to the default strategies of changing management for all patients or no patients (Fig. 4).
Clinical application
Utilizing the artificial neural network algorithm, a local patient-level explanation for the model predictions is shown in Fig. 5. For a 76-year-old female patient (Charlson comorbidity index 6, ASA score 2, history of diabetes, preoperative anemia < 12 g/dL, BMI 31 kg/m2) who underwent all component revision TKA due to aseptic loosening (operation time 118 min), the predicted probability of prolonged length of hospital stay is 33.6% (Fig. 5). Age, Charlson comorbidity index, operation time, type of revision TKA, preoperative anemia, history of diabetes and female gender all increased the probability of prolonged length of stay following revision TKA, whereas body mass index, revision surgery indication, American Society of Anesthesiology score as well as no prior history of renal disease and smoking decreased the probability of prolonged length of stay following revision TKA surgery.
Discussion
The main findings of the current study were that (1) the three developed artificial intelligence algorithms to predict prolonged LSO following revision TKA demonstrated excellent model performance on discrimination, calibration and decision curve analysis, and (2) through recursive feature elimination it was found that age (> 75 years), Charlson Comorbidity Index and body mass index (> 35 kg/m2) were the strongest clinical parameters for prolonged LOS following revision TKA. As the number of revision TKA continues to increase due to an increase of primary TKAs [19], identification of patients at increased risk of prolonged LOS is increasingly important to identify modifiable risk factors and their relative significance. In a retrospective review using the National Inpatient Sample (NIS) database, Sloan et al. reported that from 2000 to 2014, length of stay among revision TKA patients decreased from 4.3 to 2.8 days [28]. In an attempt to identify patients at risk of prolonged length of hospital stay following revision TKA, prior retrospective studies aimed to identify numerous modifiable and non-modifiable patient and surgical risk factors [3, 24, 25]. However, these prior works did not address the weight of each of these risk factors on the probability of prolonged length of stay [3, 24, 25]. In contrast, artificial intelligence algorithms possess the ability to analyze large datasets with high accuracy through an efficient and automated analysis of complex and non-linear relationships between numerous patients and surgical variables [10], thus AI algorithms have the potential to assist in clinical practice through preoperative patient-specific quantification of increased risk of prolonged length of stay following revision TKA.
The present study identified patient factors including age (> 75 years), Charlson Comorbidity Index and body mass index (> 35 kg/m2) as the strongest predictors for a prolonged length of stay following revision TKA. Similar observations were made in previous retrospective analyses [25]. In a retrospective study including 1,112 revision TKA patients aged over 75 years, Raut et al. reported numerous patient risk factors to be associated with a prolonged length of stay [25]. Similarly, Keswani et al. also identified older age, female gender, high body mass index, high Charlson Comorbidity Index, high ASA score, preoperative anemia and the preoperative use of walking aids as risk factors for prolonged length of stay following both primary and revision TKA [6, 25]. The significance of patient’s comorbid status and body mass index was highlighted by Raut et al., elaborating that patients with a high Charlson Comorbidity Index, high ASA score or high body mass index may struggle with rapid postoperative mobilization, which may hinder the recovery process, thereby increasing their length of hospital stay following revision TKA.
Although there is a strong agreement between risk factors for prolonged length of hospital stay between prior retrospective studies and the present artificial intelligence study analysis [24, 25], the present study illustrates that the type of revision TKA plays a significant role for the risk of patients to have a prolonged length of stay. Previous retrospective analyses by did not identify all component revision TKA as a risk factor for prolonged LOS following revision TKA [24, 25]. This may be due to the use of conventional logistic regression analysis in their studies, with artificial intelligence demonstrating higher accuracies for the analysis of large and complex datasets through the identification of non-linear relationships between numerous clinical variables, an aspect disregarded in conventional statistical analysis methods [10]. Additionally, artificial intelligence algorithms were shown to provide highly accurate analyses for datasets with incomplete data as well as noisy data, when compared to conventional statistical methods, making artificial intelligence an attractive option for data analysis, when compared to conventional statistical methods [10]. As artificial intelligence algorithms also provide estimates in real-time, these computational tools have strong potential to assist in clinical decision-making for patients with total knee arthroplasty.
The present study also reported that patients with prolonged length of stay following revision TKA demonstrated higher postoperative complication rates in terms of re-revision rates and readmission rates, when compared to patients without prolonged LOS following revision TKA. This further demonstrates the clinical utility of the artificial intelligence algorithms as it provides useful information for patient counseling prior to revision surgery. The association between prolonged length of stay and increased postoperative complication rates has also been reported in prior literature. Collins et al. reported that cases with prolonged LOS from 11 elective operations using the National VA Surgical Quality Improvement Program demonstrated increased postoperative complication rates, when compared to patients without prolonged LOS [6]. For patients following hip and knee arthroplasty surgery, Collins et al. showed increased odds of return to the hospital within 90 days as well as operating room for patients with prolonged LOS [6]. Similarly, Krell et al. reported higher inpatient complication rates as well as postoperative complications for patients with prolonged LOS following colorectal resection, utilizing a study population of 22,664 patients from the American College of Surgeons National Surgical Quality Improvement Program registry [18].
The findings of this present study need to be interpreted in light of several limitations. First, this present study utilizes a retrospective study design which is associated with inherent limitations [1]. Additionally, the study population includes patients from only a single large tertiary referral center which may limit the generalizability of the artificial intelligence algorithms in clinical practice. Second, the inclusion of revision TKA procedures from multiple surgeons and uncertain adherence to clinical pathways of care do introduce additional variability. However, this represents a common limitation of prior retrospective studies investigating risk factors for prolonged length of stay following revision TKA [14, 24]. Third, this present study investigated a large number of potential patient and surgical risk factors; however, functional measures such as patient-reported outcome measures were not included. Additionally, most of the potential risk factors were binary; thus, the effect of disease severity was not evaluated in this study. Furthermore, due to the retrospective nature of the study, specific comorbidities, such as the presence of chronic neuropathic pain and mental health, were not analyzed.
Conclusion
This study developed and validated artificial intelligence algorithms for the prediction of patient-specific prolonged length of hospital stay following revision total knee arthroplasty, demonstrating excellent model performance on discrimination, calibration and decision curve analysis. This indicates the potential of these artificial intelligence algorithms to aid in strategical discharge planning and resource allocations.
Data availability
Data are available upon request. Only standard software was used for analysis.
References
Allahbakhshi K, Khorasani-Zavareh D, Jazani RK, Ghomian Z (2019) Preparedness components of health systems in the Eastern Mediterranean Region for effective responses to dust and sand storms: a systematic review. F1000Research 8:146–151
Burn E, Edwards CJ, Murray DW, Silman A, Cooper C, Arden NK, Pinedo-Villanueva R, Prieto-Alhambra D (2018) Trends and determinants of length of stay and hospital reimbursement following knee and hip replacement: evidence from linked primary care and NHS hospital records from 1997 to 2014. BMJ Open 8:019146–019152
Carter EM, Potts HWW (2014) Predicting length of stay from an electronic patient record system: a primary total knee replacement example. BMC Med Inform Decis Mak 14:26–33
Ching T, Zhu X, Garmire LX (2018) Cox-nnet: an artificial neural network method for prognosis prediction of high-throughput omics data. PLoS Comput Biol 14:1006076–1006082
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:7594–7599
Collins TC, Daley J, Henderson WH, Khuri SF (1999) Risk factors for prolonged length of stay after major elective surgery. Ann Surg 230:251–259
Darst BF, Malecki KC, Engelman CD (2018) Using recursive feature elimination in random forest to account for correlated variables in high dimensional data. BMC Genet 19:1–6
Ferro CAT (2007) Comparing probabilistic forecasting systems with the Brier score. Weather Forecast 22:1076–1088
Greenwell BM, Boehmke BC, McCarthy AJ (2018) A simple and effective model-based variable importance measure. arXiv 1–27
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
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
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
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:671–681
Keswani A, Lovy AJ, Robinson J, Levy R, Chen D, Moucha CS (2016) Risk factors predict increased length of stay and readmission rates in revision joint arthroplasty. J Arthroplasty 1:603–608
Klemt C, Harvey MJ, Robinson MG, Esposito JG, Yeo I, Kwon Y-M (2022) Machine learning algorithms predict extended postoperative opioid use in primary total knee arthroplasty. Knee Surg Sports Traumatol Arthrosc. https://doi.org/10.1007/s00167-021-06812-4
Klemt C, Laurencin S, Uzosike AC, Burns JC, Costales TG, Yeo I, Habibi Y, Kwon Y-M (2021) Machine learning models accurately predict recurrent infection following revision total knee arthroplasty for periprosthetic joint infection. Knee Surg Sports Traumatol Arthrosc. https://doi.org/10.1007/s00167-021-06794-3
Klemt C, Uzosike AC, Harvey MJ, Laurencin S, Habibi Y, Kwon Y-M (2021) Neural network models accurately predict discharge disposition after revision total knee arthroplasty? Knee Surg Sports Traumatol Arthrosc. https://doi.org/10.1007/s00167-021-06778-3
Krell RW, Girotti ME, Dimick JB (2014) Extended length of stay after surgery: complications, inefficient practice, or sick patients? JAMA Surg 149:815–820
Kurtz S, Ong K, Lau E, Mowat F, Halpern M (2007) Projections of primary and revision hip and knee arthroplasty in the United States from 2005 to 2030. J Bone Jt Surg Am 89:780–785
Labek G, Thaler M, Janda W, Agreiter M, Stöckl B (2011) Revision rates after total joint replacement: cumulative results from worldwide joint register datasets. J Bone Jt Surg Br 93:293–297
Lavernia C, Lee DJ, Hernandez VH (2006) The increasing financial burden of knee revision surgery in the United States. Clin Orthop Relat Res 446:221–226
Lyman S, Fields KG, Nocon AA, Ricciardi BF, Boettner F (2015) Prolonged length of stay is not an acceptable alternative to coded complications in assessing hospital quality in elective joint arthroplasty. J Arthroplasty 30:1863–1867
Panesar SS, D’Souza RN, Yeh F-C, Fernandez-Miranda JC (2019) Machine learning versus logistic regression methods for 2-year mortality prognostication in a small, heterogeneous Glioma database. World Neurosurg X 2:100012–100019
Piuzzi NS, Strnad GJ, Sakr Esa WA, Barsoum WK, Bloomfield MR, Brooks PJ, Higuera-Rueda CA, Joyce MJ, Kattan MW, Klika AA, Krebs V, Mesko NW, Mont MA, Murray TG, Muschler GF, Nickodem RJ, Patel PD, Schaffer JL, Spindler KP, Stearns KL, Suarez JC, Zajichek A, Molloy RM (2019) The main predictors of length of stay after total knee arthroplasty: patient-related or procedure-related risk factors. J Bone Jt Surg Am 101:1093–1101
Raut S, Mertes SC, Muniz-Terrera G, Khanduja V (2012) Factors associated with prolonged length of stay following a total knee replacement in patients aged over 75. Int Orthop 36:1601–1608
Ribeiro MT, Singh S, Guestrin C (2016) Model-agnostic interpretability of machine learning. Int Orthop 19:173–179
Schwartz AJ, Clarke HD, Sassoon A, Neville MR, Etzioni DA (2020) The clinical and financial consequences of the centers for medicare and medicaid services’ two-midnight rule in total joint arthroplasty. J Arthroplasty 35:1–6
Sloan M, Sheth NP (2018) Length of stay and inpatient mortality trends in primary and revision total joint arthroplasty in the United States, 2000–2014. J Orthop 15:645–649
Funding
The study did not receive any funding.
Author information
Authors and Affiliations
Contributions
CK: data collection, analysis, write-up. VT: data collection. AB: analysis. WBC-L: write-up. MGR: write-up. Y-MK: study design, write-up.
Corresponding author
Ethics declarations
Conflict of interest
All authors report no conflict of interest or financial disclosures.
Ethical approval
We acknowledge that this study was approved 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
About this article
Cite this article
Klemt, C., Tirumala, V., Barghi, A. et al. Artificial intelligence algorithms accurately predict prolonged length of stay following revision total knee arthroplasty. Knee Surg Sports Traumatol Arthrosc 30, 2556–2564 (2022). https://doi.org/10.1007/s00167-022-06894-8
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00167-022-06894-8