Abstract
Introduction
The majority of total hip arthroplasty (THA) patients are discharged home postoperatively, however, many still require continued medical care. We aimed to identify important characteristics that predict nonhome discharge in geriatric patients undergoing THA using machine learning. We hypothesize that our analyses will identify variables associated with decreased functional status and overall health to be predictive of non-home discharge.
Materials and Methods
Elective, unilateral, THA patients above 65 years of age were isolated in the NSQIP database from 2018-2020. Demographic, pre-operative, and intraoperative variables were analyzed. After splitting the data into training (75%) and validation (25%) data sets, various machine learning models were used to predict non-home discharge. The model with the best area under the curve (AUC) was further assessed to identify the most important variables.
Results
In total, 19,840 geriatric patients undergoing THA were included in the final analyses, of which 5194 (26.2%) were discharged to a non-home setting. The RF model performed the best and identified age above 78 years (OR: 1.08 [1.07, 1.09], P < .0001), as the most important variable when predicting non-home discharge in geriatric patients with THA, followed by severe American Society of Anesthesiologists grade (OR: 1.94 [1.80, 2.10], P < .0001), operation time (OR: 1.01 [1.00, 1.02], P < .0001), anemia (OR: 2.20 [1.87, 2.58], P < .0001), and general anesthesia (OR: 1.64 [1.52, 1.79], P < .0001). Each of these variables was also significant in MLR analysis. The RF model displayed good discrimination with AUC = .831.
Discussion
The RF model revealed clinically important variables for assessing discharge disposition in geriatric patients undergoing THA, with the five most important factors being older age, severe ASA grade, longer operation time, anemia, and general anesthesia.
Conclusions
With the rising emphasis on patient-centered care, incorporating models such as these may allow for preoperative risk factor mitigation and reductions in healthcare expenditure.
Keywords
Introduction
The demand for total hip arthroplasty (THA) continues to rise throughout the United States, driven largely by an aging population and rising obesity rates. 1 Considered to be the most effective treatment for advanced arthritis of the hip, THA procedures have increased from approximately 160,000 procedures per year in 2000 to nearly 375,000 in 2014 accounting for approximately $7 billion in U.S. expenditures. 2 In an attempt to reduce healthcare costs, the United States Centers for Medicare and Medicaid Services (CMS) removed THA from the “Inpatient-Only” procedure list in 2019. 3 However, the shift towards bundled payment models provides further incentives for orthopaedic surgeons and hospitals to reduce costs associated with postoperative care while limiting complications, readmissions, and reoperations. 4
Although the majority of THA patients are discharged home postoperatively, many, especially older patients, still require continued medical care or additional rehabilitation at post-acute care facilities, such as skilled nursing facilities and inpatient rehabilitation centers. 5 Discharge to such facilities often leads to prolonged hospital length of stay (LOS), resulting in greater costs in addition to increased patient morbidity and mortality. 6 In studying Medicare beneficiaries following total joint arthroplasty (TJA), Bozic et al found that this post-discharge time period was responsible for about 36% of payments, with costs related to post-acute care facilities accounting for 70% of post-discharge payments. 4 Therefore, identifying patients likely to require non-home discharge may allow necessary arrangements to be made preoperatively and/or mitigate certain modifiable risk factors. However, evidence remains limited on factors associated with non-home discharge in Medicare-eligible, geriatric patients (≥65 years of age) undergoing THA.
Machine learning is a branch of artificial intelligence that produces complex models to iteratively advance its predictive capacity based on the quantity of data input. Through its ability to learn complex non-linear or linear relationships, machine learning reduces bias and can provide more accurate results when compared to traditionally used logistic regression. 7 Machine learning has only recently started to gain traction in orthopaedics, with one recent study utilizing 2 popular techniques, boosted decision tree and artificial neural networks (ANN), to predict non-home discharge after elective total shoulder arthroplasty (TSA). 8 There is, however, a paucity of research applying machine learning techniques to predict non-home discharge in geriatric patients following THA.
The purpose of this study is to develop trained machine learning models, cross-referenced with conventional multivariable logistic regression, to determine the most important pre- and perioperative variables that may predict non-home discharge in geriatric patients undergoing THA. We hypothesize that the machine learning models will identify variables associated with decreased functional status and overall health to be predictive of non-home discharge.
Materials and Methods
Data Source
Data was obtained from the American College of Surgeons National Quality Improvement Program (ACS-NSQIP) database from the years 2018 to 2020. ACS-NSQIP is a large clinical database that collects over 150 pre-, peri-, and post-operative variables up to 30 days following surgery in over 680 US hospitals combined. Rigorous data collection and auditing by the American College of Surgeons has allowed for high-quality data with inter-reviewer reliability greater than 98%. 9 This study was conducted according to The Strengthening the Reporting of Observational Studies in Epidemiology (STROBE) guidelines. 10
Study Population and Variable Selection
Patients aged 65 years and older with elective, unilateral THA procedures were identified in the NSQIP database using Current Procedural Terminology code 27130, corresponding to the replacement of both the femoral and acetabular components of the hip joint by prosthesis or artificial hip joint, with or without using an autograft or allograft. Patients were subsequently classified as discharged to home or non-home locations, based on definitions provided by the ACS-NSQIP user guide. 11 Home destinations include the following: home, facility which was home, and multilevel senior community. Non-home locations include the following: skilled nursing facility, unskilled facility, separate acute care, and rehabilitation. Patients who were discharged against medical advice (n = 8), who were discharged to hospice care (n = 13), who expired during hospitalization (n = 31), or without documented discharge destination (n = 44) were excluded.
Baseline patient demographics, including sex, race, age, and body mass index (BMI), were collected. Patient comorbidities and preoperative variables that were collected include diabetes mellitus requiring medication, chronic dyspnea status, smoking, chronic obstructive pulmonary disease (COPD), hypertension requiring medication, chronic steroid use, >10% weight loss in the 6 months preceding surgery, current need for dialysis, history of disseminated cancer, current open/infected wound, congestive heart failure within 30 days prior to surgery, and history of bleeding disorder. Additionally, patient functional status (classified as either independent or partially/totally dependent), preoperative anemia based on hematocrit (Hct) level (classified using World Health Organization (WHO) guidelines into normal, mildly anemic (Hct 33%-36% for women and 33%-39% for men), and moderate-severely anemic (Hct <33% for both men and women), and American Society of Anesthesiologists (ASA) grade (classified as either ASA grade 1 to 2 or ASA grade 3 to 5) were collected.12,13 Lastly, intraoperative variables were collected and include primary anesthetic type and operating time. All variables are defined in the ACS-NSQIP user guide. 11
Data Analysis and Clinical Prediction Model Development
Baseline characteristics were calculated as percentages for categorical variables, whereas mean and standard deviation were calculated for continuous variables. Logistic regression was performed using independent-sample t-tests and Pearson’s chi-square tests to evaluate continuous and categorical variables, respectively. Statistically significant variables were subsequently examined using multivariable logistic regression through a backward, stepwise procedure until all variables in the model were statistically significant. An alpha of .05 was used for statistical significance.
Prior to developing the machine learning models, the data was first randomly divided into training (75%) and validation (25%) datasets. Four popular machine learning models were then created using Stochastic Gradient Boosting (SGB), Random Forest (RF), Support Vector Machine (SVM), and ANN. When developing the RF model, a grid search was used to determine the best combination of tuning parameters, including the number of trees and the number of features at each split. These models were chosen based on previous machine learning studies that focused on binary classifications.8,14,15
Model Performance
The predictive capacity of each model was assessed and compared using the area under the receiver operating characteristics curve (AUC), which is the gold-standard metric of machine-learning assessment. The AUC ranges from .5 to 1, with an AUC of .50 indicating that the model being studied has a 50% chance of predicting the outcome, and thus cannot distinguish between patients who were discharged home and patients who were discharged to a non-home destination. In general, an AUC of .7 to .8 is considered acceptable, .8-.9 is considered excellent, and more than .9 is considered outstanding. 16 The model with the greatest AUC was further analyzed to determine the ten most important variables for predicting non-home discharge in geriatric patients, rated based on their contribution to the model. 17 All analyses were completed using Stata, version 16.1 (Stata Corp, College Station, Texas, USA).
Results
Logistic regression and multivariable logistic regression analysis comparing demographics, comorbidities, and preoperative and intraoperative variables between geriatric patients with non-home and home discharge disposition following THA.
ASA = American Society of Anesthesiologists; BMI = body mass index; CHF = congestive heart failure; CI = confidence interval; COPD = chronic obstructive pulmonary disease; LOS = length of stay, MAC/IV = monitored anesthetic care/intravenous; SD = standard deviation; THA = total hip arthroplasty; WHO = World Health Organization.
Multivariable logistic regression analysis (Table 1) identified the following variables as having a significant association with discharge disposition: age (OR: 1.08 [1.07, 1.09], P < .0001), sex (OR: 1.30 [1.20, 1.41], P < .0001), race (OR: 1.42 [1.24, 1.62], P < .0001), diabetes (OR: 1.35 [1.23, 1.48], P < .0001), smoking history (OR: 1.39 [1.22, 1.59], P < .0001), bleeding disorder (OR: 1.36 [1.16, 1.60], P = .0001), COPD (OR: 1.33 [1.16, 1.53], P < .0001), dialysis (OR: 1.91 [1.14, 3.18], P = .0135), disseminated cancer (OR: 1.54 [1.06, 2.24], P < .0001), open wound/wound infection (OR: 1.08 [1.07, 1.09], P < .0001), dependent functional status (OR: 2.98 [2.49, 3.58], P < .0001), mild (OR: 1.48 [1.36, 1.60], P < .0001) and moderate/severe anemia (OR: 2.20 [1.87, 2.58], P < .0001), severe ASA grade (OR: 1.94 [1.80, 2.10], P < .0001), operating time (OR: 1.01 [1.00, 1.02], P < .0001), and anesthesia type (OR: .61 [.56, .66], P < .0001).
Summary of model training and validation results.
ANN = artificial neural network; AUC = area under the curve; RF = random forest; SGB = stochastic gradient boosting; SVM = support vector machine.

Normalized importance of demographic, clinicopathological, and treatment variables based on the random forest model. Importance is the degree to which the model is dependent on the factor. ASA = American Society of Anesthesiologists; BMI = body mass index.
Discussion
In order to determine characteristics for appropriate patient categorization, this study applied various machine learning strategies to predict non-home discharge in geriatric patients following THA. Among all five tested models, the RF model yielded the highest AUC in the training and validation datasets, demonstrating superior accuracy and predictability when compared to multivariable logistic regression. Random forest is a regression-based classification algorithm that aggregates a large number of decision trees trained on randomly sampled subsets of a complex dataset.18,19 Prior literature has identified RF to be more accurate to other machine learning models in handling a large number of variables and nonlinear data. As such, RF seems to be the machine learning algorithm of choice in many clinical studies.20-22 The results from our RF model suggest that older age (>78 years), severe ASA classification (ASA Class 3 and 4), operation time, anemia, use of general anesthesia, functional status, higher BMI, sex, diabetes, and hypertension are most predictive of non-home discharge. All of these variables, except for BMI, were also found to be statistically significant risk factors in the conventional multivariable logistic regression model.
Older age and higher ASA classification were identified as important by the RF model and significant by the multivariable logistic regression model. These 2 factors likely increase non-home discharge disposition following THA due to their correlation with higher frailty. Frailty has been previously reported to be associated with poor outcomes following THA, and as such, older patients and patients with a high ASA classification may benefit from continued inpatient care in a facility, allowing providers to more closely monitor the postoperative course.23-25 Prolonged operative time, also highlighted in both models, may simply be an indication of case complexity. 26 However, operative time has also been independently associated with postoperative complications, including cardiac complications, infection, and renal failure. 27 As such, based on our model, when a longer operative time is anticipated, the orthopaedic surgeon should be aware of the likelihood of a non-home discharge for their patient.
We also found dependent functional status to be emphasized in both models. In elderly patients, dependent functional status has previously been associated with increased medical costs and mortality, in addition to postoperative adverse outcomes across a range of surgical specialties.28-31 Similarly, Curtis et al found that functionally dependent patients were more likely to experience longer operative times, hospital stays, non-home discharge, reoperation, readmission, and various complications following THA. 32 It is likely that a reduced ability to independently accomplish activities of daily living such as bathing, feeding, and getting dressed, may lead to discharge to an extended care facility.
We found that type of anesthesia, particularly neuraxial anesthesia, was also protective against non-home discharge in both models. When compared to general anesthesia, neuraxial anesthesia has been previously reported by Turcotte et al to result in decreased LOS, short-term complications, and blood transfusions, while facilitating home discharge following THA. 33 Neuraxial anesthesia has superior facilitation of early mobilization compared to general anesthesia due to reduced postoperative nausea, vomiting, drowsiness, and fatigue, thus, allowing for home discharge. 34 While neuraxial anesthesia appears to facilitate discharge to home, it is important to consider that there may be differences in the patients chosen for neuraxial anesthesia which may account for this variation.
With the recent promotion of bundled payment models, healthcare facilities and physicians are incentivized now more than ever to discharge patients in a safe and timely manner. Accurate preoperative determination of patient discharge disposition can allow surgeons the early opportunity to make required arrangements and improve patient outcomes. As such, models that can accurately identify patients at risk for non-home discharge may be extremely beneficial. The machine learning methods used in this study have previously been used to predict non-home discharge in patients with TSA, however, to the best of our knowledge, this is the first study applying them in the context of geriatric patients and THA. Orthopaedic surgeons can apply these machine learning models when preoperatively counseling their patients.
Our study has limitations. First, our analyses may be biased by the retrospective nature of this study, however, this approach has allowed for a large sample size, greatly enhancing the accuracy and predictability of the models tested. 35 Second, as with any database study, we are limited by the number of variables included in the dataset as well as the quality of the dataset. However, ACS-NSQIP is a large dataset with numerous variables and previous studies have found it to be of high quality, with high inter-reviewer reliability. 9 Third, our study included both preoperative and intraoperative variables meaning that the exact prediction of non-home discharge may not be accurate preoperatively if intraoperative variables, such as operating time and anesthesia type, are different than anticipated. Furthermore, some variables included are modifiable, including anemia status and BMI, while others are not, suggesting that there may not be interventions to meaningfully improve discharge disposition for patients based on the results of this study. Fourth, the patients included in the study underwent THA at a tertiary care center rather than at ambulatory surgery centers (ASC) as the NSQIP does not include data from ASCs. The patients included are likely sicker at baseline and less likely to be discharged home, indicating that this data may not be generalized to all patients undergoing THA. Additionally, as the proportion of outpatient and same-day cases is constantly changing, this prediction tool may be less accurate as more patients are discharged home after THA. Finally, external validation of this machine learning model on a prospective data set is warranted.
The application of machine learning to medicine is still relatively novel. As such, the exact nature of the importance of the features identified by the RF model is difficult to interpret. However, in this study, we have also provided analysis from conventionally used multivariable logistic regression for comparison, allowing for greater clarification as to the importance of certain factors. Our findings should help shared decision-making, expectation setting, and optimization of modifiable risk factors for patients. Identifying factors that predict non-home discharge may allow for a streamlined discharge process, minimizing prolonged inpatient LOS.
Conclusions
The machine learning models developed in this study, especially RF, displayed excellent accuracy for the prediction of non-home discharge following THA in this important patient population. Once cross-referenced with conventional multivariable logistic regression, the most predictive variables included age, operating time, ASA classification, anesthesia type, and anemia. With the rising emphasis on value-based care, outpatient surgical practice is rapidly expanding across all healthcare subspecialties.36-38 Incorporating models such as these can allow orthopaedic surgeons to better understand the factors which contribute to non-home discharge, allowing for improved preoperative planning and patient outcomes.
Footnotes
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.
