- 1Department of Orthopedic Surgery, Orthopedic Research Institute, West China Hospital, Sichuan University, Chengdu, China
- 2Department of Pediatric Surgery, West China Hospital, Sichuan University, Chengdu, China
- 3Department of Orthopedics Surgery, West China Sanya Hospital, Sichuan University, Sanya, China
- 4Department of Orthopedic Surgery, The Fifth People’s Hospital of Sichuan Province, Chengdu, China
Background: In elderly individuals suffering from hip fractures, a prolonged hospital length of stay (PLOS) not only heightens the probability of patient complications but also amplifies mortality risks. Yet, most elderly hip fracture patients present compromised baseline health conditions. Additionally, PLOS leads to increased expenses for patient treatment and care, while also diminishing hospital turnover rates. This, in turn, jeopardizes the prompt allocation of beds for urgent cases.
Methods: A retrospective study was carried out from October 2021 to November 2023 on 360 elderly hip fracture patients who underwent surgical treatment at West China Hospital. The 75th percentile of the total patient cohort’s hospital stay duration, which was 12 days, was used to define prolonged hospital length of stay (PLOS). The cohort was divided into training and testing datasets with a 70:30 split. A predictive model was developed using the random forest algorithm, and its performance was validated and compared with the Lasso regression model.
Results: Out of 360 patients, 103 (28.61%) experienced PLOS. A Random Forest classification model was developed using the training dataset, identifying 10 essential variables. The Random Forest model achieved perfect performance in the training set, with an area under the curve (AUC), balanced accuracy, Kappa value, and F1 score of 1.000. In the testing set, the model’s performance was assessed with an AUC of 0.846, balanced accuracy of 0.7294, Kappa value of 0.4325, and F1 score of 0.6061.
Conclusion: This study aims to develop a prognostic model for predicting delayed discharge in elderly patients with hip fractures, thereby improving the accuracy of predicting PLOS in this population. By utilizing machine learning models, clinicians can optimize the allocation of medical resources and devise effective rehabilitation strategies for geriatric hip fracture patients. Additionally, this method can potentially improve hospital bed turnover rates, providing latent benefits for the healthcare system.
1 Background
In recent years, the global aging population has resulted in a steady increase in the number of elderly individuals experiencing hip fractures. These fractures present significant risks to the elderly and are regarded as the most serious type of fracture (1). The rising occurrence of hip fractures is frequently associated with higher mortality and disability rates in the elderly, severely affecting their quality of life and carrying substantial healthcare and societal consequences (2, 3). The risk of hip fractures increases with age, largely due to the rising prevalence of osteoporosis among the elderly, which leads to fragile bones. Osteoporosis, characterized by decreased bone density and strength, significantly increases the likelihood of hip fractures in older adults (4). In those with osteoporosis, fragile bones are prone to breaking from low-energy trauma, unlike the high-energy impacts typically required to cause fractures in younger individuals. Hip fractures in the elderly result in reduced mobility and an elevated mortality rate. In addition to osteoporosis, various factors contribute to the heightened risk of hip fractures in the elderly, such as decreased physical function, polypharmacy, visual impairment, poor coordination and balance, slower reaction times, reduced muscle strength around the hip joint, and ligamentous laxity (5, 6).
The delayed discharge of elderly patients with hip fractures has significant impacts on both the patients and healthcare institutions. Prolonged hospital stays impose substantial burdens on the physical and mental well-being of elderly patients and may strain their economic resources. Shortening hospital stays can reduce early mortality rates (7). Studies show that hospital stays longer than 14 days significantly increase the risk of postoperative mortality within 30 days for elderly patients undergoing hip surgery (7). Additionally, PLOS challenges the healthcare system’s ability to deliver comprehensive and integrated care. Elderly patients with hip fractures have high healthcare demands and require support for early mobilization. Extended hospital stays also increase the risk of various inpatient complications, adding strain to healthcare and nursing services (8). In trauma medicine centers, hospital beds are a vital resource for providing timely and effective care to emergency patients. The constant demand for available beds remains a challenge for healthcare institutions. Beyond delivering high-quality and timely healthcare, medical facilities face the challenge of reducing PLOS and increasing bed turnover rates (BTR) to optimize patient flow and resource utilization (9). While extending hospitalization may initially seem beneficial in reducing early mortality rates, research by Schneider et al. (7) found that PLOS actually significantly increased the risk of mortality within 30 days after surgery for elderly hip fracture patients. Various factors associated with delayed discharge of elderly hip fracture patients have been studied, including delayed surgical timing, gender, cerebrovascular diseases, smoking status, arthritis, postoperative analgesia, ASA classification, age, cognitive decline, multiple fractures, depression, and non-clinical factors (10, 11). Variations in surgical interventions and care occur across different regions, patient populations, and hospitals, leading to differing definitions of PLOS. In our institution’s context, we define PLOS as the 75th percentile of the entire patient cohort in this study, which is 12 days.
The aim of this study is to perform feature selection to identify key variables for predicting delayed discharge in elderly hip fracture patients and to develop a predictive model for PLOS. We will employ the random forest algorithm for model construction and validation, comparing its performance with conventional logistic regression models. The random forest prediction model has significant potential to improve clinical workflows, optimize resource allocation, and enhance medical care for prioritized patients. Healthcare professionals can use the model to tailor personalized rehabilitation plans for high-risk patients, involving interdisciplinary teams to provide comprehensive and timely medical care. This approach can help reduce hospital stays, decrease susceptibility to complications, and improve the efficient use of healthcare resources.
2 Materials and methods
2.1 Population
This study adopts a retrospective observational cohort design, with the study population comprising individuals whose data were collected from the West China Hospital’s Electronic Health Record (HIS) system between November 2021 and December 2023. Inclusion criteria are defined as follows: (1) inclusion of hip patients aged 65 years and above, (2) patients undergoing surgical treatment during their hospitalization, and (3) patients undergoing surgical procedures involving intramedullary nail fixation or artificial joint replacement. Exclusion criteria are as follows: (1) old fractures, (2) pathological fractures, (3) rapid discharge due to non-clinical factors, (4) transferred patients who have undergone standardized treatment, (5) in-hospital deaths, (6) patients opting for discharge to receive end-of-life care, and (7) patients transferring to other departments for continued treatment. Based on these criteria, a total of 360 patients were included and then randomized into a training set (70% of the cohort) and a testing set (30%).
This study collected factors influencing delayed discharge, primarily encompassing four domains: demographic variables, fracture-related variables, surgery-related variables, medical history variables, and laboratory examination variables. Demographic variables include gender, age, and BMI. Fracture-related variables encompass time from injury to admission, high-energy trauma status, preoperative immobilization, multiple traumas (hip fracture with fractures in other areas), and fracture type. Surgery-related variables cover surgery type, preoperative waiting time, surgery duration, intraoperative bleeding, and transfusion status. Medical history variables list smoking history, alcohol consumption history, osteoporosis, lower limb vascular diseases (venous thrombosis and vascular wall sclerosis), diabetes, hypertension, Alzheimer’s or dementia, heart failure, cardiovascular diseases, chronic obstructive pulmonary disease or pulmonary fibrosis, cerebrovascular diseases, Parkinson’s disease, malignancy, paralysis, and arrhythmias. The variables related to medical history in this study all refer to the patients’ preoperative medical history. Laboratory examination variables were utilized for diagnostic purposes or collection through the assessment of laboratory indicators, encompassing an array of parameters such as anemia, hypoalbuminemia, renal insufficiency, electrolyte imbalances, hepatic dysfunction, hyperlipidemia, total protein (TP), platelets (PLT), white blood cells (WBC), and D-dimer. Laboratory blood test results acquired throughout the patient’s hospitalization were consistently leveraged for diagnosing physiological imbalances and associated disorders. Then, through univariate and multivariate analyses, a preliminary screening identified variables such as anemia, hypoalbuminemia, renal insufficiency, electrolyte imbalances, hepatic dysfunction, and hyperlipidemia. The specific laboratory values were derived by averaging the laboratory blood test results obtained at the time of admission and on the first postoperative day, initially identifying indicators such as TP, PLT, WBC, and D-dimer. This study comprehensively considered the significant impact of surgery on the physical condition of elderly patients, along with the need for timely interventions based on predictions of PLOS post-surgery. Therefore, we have incorporated the results of blood tests conducted on the first day after surgery for the patients. Orthopedic practitioners use physical examinations in conjunction with medical imaging to diagnose hip fractures, further delineating their classification and formulating surgical strategies. Patients undergo clinical auxiliary examinations, encompassing both imaging studies and laboratory analyses, to diagnose complications and medical histories. In this study, continuous variables included age, BMI, preoperative waiting time, surgical duration, intraoperative bleeding, length of stay, TP, PLT, WBC, and D-dimer levels. The remaining variables were categorized as binary inputs.
2.2 Statistical analysis
In Tables 1–3 of this study, we conducted inter-group comparisons for categorical variables using the chi-square test or Fisher’s exact test, with numerical values and percentages (%) employed to express categorical variables. Subsequently, for continuous variables, we initially assessed whether they adhered to a normal distribution. In cases where continuous variables exhibited a normal distribution, group comparisons were conducted using the mean with the addition and subtraction of the standard deviation (SD), and independent sample t-tests were employed. For continuous variables deviating from a normal distribution, descriptive statistics, including the median (interquartile range), were utilized, and inter-group differences were examined through non-parametric tests.
Table 1. Baseline clinical characteristics of the entire cohort of elderly hip fracture patients overall, in the PLOS and no-PLOS groups.
Table 2. Baseline clinical characteristics of the overall, PLOS and no-PLOS groups of the training set of elderly hip fracture patients.
Table 3. Baseline clinical characteristics of the overall, PLOS, and no-PLOS groups of the test set of elderly hip fracture patients.
The Random Forest algorithm utilized multiple decision trees for prediction, falling under the umbrella of ensemble learning methodologies. Through a bootstrapping process, each decision tree was trained on a subset of the data, introducing diversity among the trees. During the training process, each split was corresponded to a random subset of features, a characteristic that aids in preventing overfitting and ensuring the significance of all features in the model. This contributed to a more robust and accurate overall prediction of the model. The entire patient cohort was randomly divided into training and testing sets in a 70:30 ratio. We used the randomly acquired training set to construct the Random Forest predictive model. The Bootstrapping resampling/Bagging method involved the random extraction and replacement of data to create multiple training sample sets, each undergoing individual decision tree training. Due to the inherent nature of the Bootstrapping method, which may result in unsampled data, it is aptly referred to as out-of-bag (OOB). Utilizing this subset of data to derive the OOB error rate served as a means to assess the generalization capability of the constructed model. Each decision tree within the Random Forest ensemble contributed its “vote” to the PLOS outcomes, with the aggregation of these votes culminating in the ultimate predictive result. Feature selection was orchestrated through sophisticated techniques of “feature bagging” or “attribute bagging,” a pivotal step in the realm of the Random Forest algorithm. This process obtained crucial variables, ranking them based on the average reduction rates of accuracy and Gini coefficients. Subsequently, these vital variables were employed to craft the requisite predictive model. The Random Forest predictive model in question was trained with 500 decision trees, each node of which randomly selected four variables.
We subjected the data from both the training and testing datasets to scrutiny using the completed Random Forest algorithm model. Simultaneously, we constructed a Lasso regression model, examining the data from both the training and testing datasets. The resultant outcomes were further juxtaposed against the Random Forest predictive model. It is widely acknowledged that Lasso regression introduces L1 regularization, serving as a preventive measure against overfitting. When the λ (lambda) parameter was sufficiently large, it shrunk certain coefficients to zero, encouraging sparsity and facilitating the identification of the most influential features. Determining the optimal penalty coefficient λ for the Lasso regression model involved selecting the value that minimizes the error plus one standard error using a 10-fold cross-validation approach. This method ensures robustness in model selection and parameter tuning. The Lasso regression model, with its selected features and assigned non-zero coefficients, allows for the interpretation and examination of the relative importance of variables screened by the Random Forest. Subsequently, the model was validated from various perspectives. The AUC was computed for both the Random Forest algorithm model and the Lasso regression model, followed by a comparative analysis. The Random Forest predictive model underwent validation on the training and testing datasets, assessing accuracy through Balanced Accuracy, and examining the model’s reliability using Kappa statistics and F1 scores.
In this study, statistical analyses were conducted using R Studio (R-4.3.2, 64-bit). The R packages employed encompassed caret, Boruta, randomForest, corrplot, ggplot2, and glmnet. The construction of the random forest predictive model was achieved through the utilization of the Boruta, caret, and randomforest packages. The Lasso regression model, on the other hand, was implemented using the glmnet package. Statistical significance was confirmed at a threshold of <0.05.
3 Results
3.1 Patient characteristics
This study presents the baseline characteristics of the entire patient cohort in Table 1. The establishment and validation of the Random Forest predictive model in this study are shown in Figure 1. The entire patient cohort underwent a random allocation into training and testing datasets, preserving a ratio of 70:30. The distinctive baseline characteristics of these cohorts are expounded upon in Tables 2, 3. The median age (interquartile range) of the entire patient cohort is 81 (71, 87) years, with 66.39% comprising 239 females. Among the selected 360 patients, the occurrence rate of PLOS, defined by the 75th percentile, is 28.61%. Visual representations of continuous variables in the PLOS and no-PLOS groups are illustrated in Figure 2. For binary variables, the top 16, ranked based on feature selection through the Random Forest algorithm, are visualized in Figure 3. Important variables identified through univariate analysis (p < 0.05) include Time from injury to admission (p < 0.001), Lower extremity vascular disease (p < 0.001), Preoperative waiting time (p < 0.001), Duration of surgery (p < 0.022), Blood transfusion (p < 0.002), Cardiovascular disease (p < 0.021), Cerebrovascular disease (p < 0.001), Hemiplegia (p < 0.007), Anemia (p < 0.001), Hypoproteinemia (p < 0.001), Renal insufficiency (p < 0.001), Electrolyte disorders (p < 0.001), Type of surgery (p < 0.001), Liver dysfunction (p < 0.015), WBC (p < 0.001), Heart failure (p < 0.002), and D-dimer (p < 0.001). Subsequently, a correlation analysis was conducted on all variables, and a correlation heatmap was prepared (Figure 4). During feature selection, post-admission preoperative waiting time was excluded because it was positively correlated with the total hospitalization period. Despite its exclusion, preoperative preparation time remains a crucial aspect for assessing the length of hospital stay, as it indicates the patient’s overall health and influences medical planning decisions.
Figure 1. The figure presents the workflow for constructing the random forest prediction model for extended hospital stays in elderly hip fracture patients. Additionally, a Lasso regression prediction model was developed to validate and compare the random forest algorithm.
Figure 2. The study visually presents the distribution of continuous variables such as age, BMI, preoperative waiting time, surgical duration, intraoperative bleeding, length of stay, TP, PLT, WBC, and D-dimer levels. It also displays the results for both the PLOS group and the no-PLOS group for comparison.
Figure 3. Based on the feature ranking from the random forest algorithm (illustrated in Figure 5), we identified the top 16 binary variables. These 16 binary variables were then subjected to visual analysis, comparing their distributions across the PLOS and no-PLOS groups.
Figure 4. The figure presents a correlation analysis of all variables mentioned in this study, depicted as correlation heatmap.
3.2 Important variables selection
Upon inputting all variables, the commencement of feature selection emerged as the pivotal stride in constructing the random forest predictive model. The algorithm orchestrates the meticulous curation and prioritization of features, culminating in the process and outcomes delineated in Figures 5A,B. The findings unequivocally identified ten pivotal variables, encompassing lower extremity vascular disease, time from injury to admission, WBC, D-dimer, type of surgery, hypoproteinemia, electrolyte disorders, anemia, cerebrovascular disease, and heart failure. Subsequently, this inquiry undertaken feature selection through Lasso regression, aiming to substantiate and ascertain the relative significance of the results gleaned from random forest feature selection. Leveraging L1 regularization and robust shrinkage capabilities, Lasso regression discerned variables of substantial influence. Figures 5C,D showcase the outcomes of Lasso regression, unveiling the most influential variables, predominantly encompassing the type of surgery, lower extremity vascular disease, heart failure, cerebrovascular disease, anemia, hypoproteinemia, electrolyte disorders, time from injury to admission, WBC, and D-dimer. Notably, these variables exhibit a complete overlap with the previously established crucial variables in random forest analysis. This attests to the discernment of robust and reliable features, augmenting the interpretability and generalizability of the predictive model, while mitigating the risk of overfitting. Figure 6 illustrates the hierarchical arrangement of important variables generated by the Random Forest algorithm, showcasing their sorting based on Mean Decrease Accuracy and Mean Decrease Gini.
Figure 5. (A) The results of the decision to reject or accept features by the Random Forest algorithm using the Boruta function run 100 times. (B) Random forest algorithm for feature screening and importance ranking. The box-and-line plot shows the random forest algorithm features selected as important, tentative and unimportant variables in red, yellow and red, respectively. (C) The figure illustrates the Lasso regression model employing L1 regularization and robust shrinkage capabilities to perform feature selection. By using the plus one standard error and ten-fold cross-validation criterion, the optimal tuning parameter λ was determined to identify the variables with the most significant impact (10 variables of major influence). (D) The figure shows the distribution of Lasso coefficients for the feature variables in this study.
Figure 6. (A) The 10 variables selected using the metrics mean decrease accuracy. These variables have been ordered according to their importance. (B) The 10 variables selected using the metrics mean decrease Gini. These variables have been ordered according to their importance.
3.3 Random forest prediction model performance tests
Founded upon the discernment of ten verified pivotal variables utilizing the random forest algorithm, this study culminates in the construction of a predictive model. This meticulously crafted model comprises 500 decision trees, each attempt at variable splitting involving four variables. Subsequently, the Out-of-Bag (OOB) assessment of the error rate served as a metric for assessing the model’s generalization capacity, revealing a remarkably diminutive OOB of 12.25%, signifying minimal generalization error. Model validation occurs through the utilization of both the training dataset, instrumental in constructing the model, and a distinct testing dataset (Figures 7, 8). The AUC for the training dataset attained perfection at 1.000, while the testing dataset registered a commendable 0.846. In the realm of scrutinizing discriminative prowess, this study also introduced a Lasso logistic regression predictive model. The AUC resulted for the training and testing groups stand at 0.871 and 0.732, attesting to the commendable discriminative acumen of the random forest predictive model. In this study, the random forest predictive model showcased flawless performance on the training dataset, achieving balanced accuracy, Kappa value, and F1 score, each peaking at 1.000. Correspondingly, on the testing dataset, these metrics materialize as 0.7294, 0.4325, and 0.6061.
Figure 7. In the training dataset, the 10 most important variables selected through feature selection are used to generate ROC curves (as depicted in the first 10 figures). The final two figures in the bottom right corner illustrate the ROC curves obtained from the prediction models of the random forest and Lasso regression on the training data. These visualizations assist in evaluating the discriminatory performance of both models.
Figure 8. The figure presents ROC curves generated using the testing dataset, following a similar process as in Figure 7. It evaluates the discriminatory performance of the random forest and Lasso regression prediction models.
4 Discussion
Amid the growing aging population, the rise in hip fractures among elderly patients has become a critical concern in orthopedic science (4). Despite improvements in surgical approaches and faster postoperative recovery, extended hospitalization periods have substantial impacts on both patients and healthcare institutions. Prolonged hospital stays increase economic burdens, raise the risk of complications, and elevate mortality risks for patients (1). The mutual progression of complications and extended hospitalization highlights the interdependence of these factors (12). Moreover, prolonged hospital stays lead to inefficient use of healthcare resources, heighten the challenges faced by medical professionals in management, decrease hospital bed turnover rates, and lower patient satisfaction (13). To address this issue, we have developed a random forest predictive model to forecast and assess the factors associated with extended hospital stays for elderly hip fracture patients undergoing surgical intervention.
The “important variables” identified in this study have demonstrated their significance in other related works, further underscoring their value in clinical applications. In this study, lower extremity vascular disease includes thrombosis and arteriosclerosis in the lower limb, causing vascular occlusion or narrowing. Studies suggest a link between lower extremity vascular disease in elderly hip fracture surgical patients and extended hospital stays. Thrombosis and arteriosclerosis in the lower limbs lead to reduced mobility, prolonged hospitalization, and higher risks of infection, pressure ulcers, and pneumonia in elderly hip fracture patients (14). Similarly, patients with prolonged hospital stays after medical care are at risk of complications such as urinary tract infections, pneumonia, and deep vein thrombosis (15, 16). The study by Chen et al. (17), identifies hip fractures in elderly patients as potential factors for prolonged bed rest, which can lead to acute conditions such as stroke, pressure sores, lung infections, and deep vein thrombosis (DVT) in the lower limbs. These complications are noted as significant risk factors for mortality in elderly hip fracture patients. Feng et al.’s study on preoperative independent risk factors for DVT suggests that hospitalization may need to be appropriately extended for high-risk patients, with recommendations for proactive postoperative care, chemical prophylaxis (such as low molecular weight heparin), and physical therapy to reduce the risk of complications (18). Peripheral arterial occlusive disease (PAOD) is a leading manifestation of chronic arterial occlusive pathology, mainly resulting from atherosclerosis. Its clinical presentation is characterized by a gradual and progressive restriction of blood flow due to vascular constriction, obstruction, or spasm, leading to insufficient oxygen supply to tissues (19). Besides PAOD, anemia and hypoxia can increase the risk of ulceration. As symptoms worsen, patients may experience ulceration and necrosis in the lower extremities, leading to severe and persistent pain that can cause secondary infections, cardiovascular events, and toxemia. Research shows that antithrombotic therapy (such as low molecular weight heparin) can slow disease progression and decrease the incidence of cardiovascular events in elderly heart failure patients at risk of developing PAOD (20, 21). Research by Birişik et al. (22) indicates that preoperative detection of femoral artery calcification in hip fracture patients can be used as a radiological parameter and an independent predictor of mortality in elderly hip fracture patients. Similarly, Alison et al. (23) conducted a study that aligns treatment time and length of hospital stay (LOS) with the postoperative needs of hip fracture patients to optimize discharge outcomes and manage costs. The study demonstrates that LOS is linked to the functional capacity of patients undergoing postoperative rehabilitation and their ability to perform self-care tasks.
Numerous studies have shown that prompt surgical intervention after a fracture significantly reduces patient mortality. The time from fracture occurrence to hospital admission is a crucial factor in ensuring early surgery for elderly individuals with hip fractures. For example, Klestil et al. (24) found that performing surgery within 48 h for elderly hip fracture patients led to a 20% reduction in 1 year mortality and a lower rate of perioperative complications. Tulic et al. (25) noted that a preoperative stay exceeding 72 h increased the overall complication rate. This suggests that a shorter interval between hip fracture occurrence and hospital admission enables early admission and subsequent timely surgical intervention, which is essential for reducing complications and mortality risk. This, in turn, can influence the length of hospitalization. In choosing between internal fixation and joint arthroplasty, existing research emphasizes the importance of considering the patient’s overall health, type of fracture, and potential for postoperative functional recovery. While there is no clear direct correlation established in the literature, the selection between these surgical options can influence surgical outcomes, postoperative care, and rehabilitation approaches, which can help optimize the patient’s hospital stay duration. Ahmed’s et al. study, published in ScienceDirect, highlights that joint replacement surgery offers an advantageous approach for patients aged 80 and older with compromised bone quality who must adhere to weight-bearing restrictions (26). A comparative study assessing internal fixation, hemiarthroplasty, and total hip arthroplasty (THA) found that THA initially exhibited a higher incidence of complications (27). However, it showed positive results in both short-term and long-term postoperative periods, supporting early patient recovery and reducing hospital stay length.
In elderly patients undergoing hip fracture surgery, there is a link between cerebrovascular diseases, specifically acute cerebral infarction, and prolonged hospitalization. A study by Yuan et al. (28) examined patients with hip fractures who also experienced acute cerebral infarction. The findings reveal a negative impact on patients’ neurological recovery, leading to extended hospital stays, increased complication rates, and higher 1 year mortality rates. Despite these challenges, surgical intervention can enhance the prognosis for patients with hip fractures and acute cerebral infarction. Lim et al. (29) discuss the heightened risk associated with surgical intervention for hip fractures in patients who also have a stroke, resulting in poor expected functional recovery, recurrent strokes, myocardial infarction, and even death. This indicates that a careful approach is needed when managing patients with both stroke and hip fractures, as the coexistence can lead to longer hospital stays and worsening complications. Espinosa et al. (30) explore the increased incidence of stroke in elderly patients following hip fractures, which can lead to extended hospitalization and increased treatment demands. Heart failure is a common clinical condition characterized by symptoms such as fatigue, dyspnea, reduced exercise capacity, hypotension, refractory volume overload, and poor organ perfusion. Cullen et al. (31) conducted groundbreaking research that examined the relationship between heart failure and postoperative hospitalization length after hip fractures. Their study found a significant increase in the average hospital stay for patients with a preoperative heart failure diagnosis. Research by Cha et al. (32) indicates that impaired left ventricular systolic function is the primary risk factor for higher early postoperative mortality rates in elderly hip fracture patients. In this patient group, the 30 day mortality rate is 4.01 times higher in cases of severe heart failure compared to mild heart failure. The study by You et al. (33) emphasizes several risk factors that contribute to the onset of postoperative heart failure, including hypertension, hypoalbuminemia, anemia, age ≥ 70 years, and surgery duration ≥120 min. This research highlights the importance of thoroughly understanding the factors that influence heart failure after surgery to improve patient outcomes and minimize risks.
Postoperative anemia following hip joint surgery can result in a higher incidence of complications and delayed functional recovery in patients, leading to prolonged hospital stays and increased healthcare costs (34). Current research largely investigates the impact of hemoglobin levels on interventions for elderly patients undergoing hip fracture surgery. The study by Cao et al. (21) suggests that anemia in elderly hip fracture patients significantly affects the length of hospital stay. This is mainly due to the negative impact of blood volume supplementation in anemic patients on immune and coagulation system functions. Moreover, severe postoperative anemia can impede patient recovery after surgery. Furthermore, Willems et al. (35) found that an increase in hemoglobin levels postoperatively in elderly hip fracture patients was associated with shorter hospital stays. However, they noted that preoperative hemoglobin levels did not show a clear correlation, warranting further exploration through future randomized clinical trials. In contrast, earlier research by Halm et al. (36) indicated that higher preoperative hemoglobin levels were linked to shorter hospital stays, as well as lower mortality rates and fewer rehospitalizations within 60 days after discharge. Their study also underscored a relationship between postoperative hemoglobin levels and hospitalization duration or rehospitalization rates. Treatment for anemic patients often involves medication such as erythropoiesis-stimulating agents and iron supplements, as well as blood transfusions.
There are four crucial variables representing the outcomes of laboratory examinations, including WBC, D-dimer, hypoproteinemia, and electrolyte disorders. WBC and D-dimer values are derived by averaging admission and on the first postoperative day blood test results to provide a comprehensive overview of patients’ conditions during hospitalization. Elevated WBC levels are typically indicative of infection and may also occur in response to autoimmune diseases, bone marrow dysfunction, stress, or trauma. In elderly patients who experience hip fractures or undergo surgery, an increase in WBC is a common response to trauma or surgery. According to Gregory et al. (37), in the absence of abnormal clinical signs and symptoms, a post-hip replacement surgery rise in WBC levels may not immediately necessitate further investigation for infection. However, Tang et al.’s findings suggest that preoperative elevation of white blood cells does not have a clear correlation with adverse postoperative outcomes for patients (38). This underscores the importance of monitoring postoperative changes in WBC levels and providing appropriate medical care. A rise in WBC levels postoperatively can also signal the possible onset of infection, requiring prompt attention and management. Research by Yu et al. (39) demonstrates that elderly patients with hip fractures face various postoperative risk factors such as diabetes, hypoalbuminemia, general anesthesia, and surgical duration ≥120 min, increasing the likelihood of pneumonia. Healthcare professionals can proactively address these risk factors. However, other factors like prolonged hospitalization, worsening nutritional status, and increased bedridden time may lead to opportunistic pulmonary infections (40). Current research on hip fractures in the elderly primarily identifies D-dimer as a crucial predictor of deep vein thrombosis (DVT), which may explain its relationship with extended hospital stays. The study by Tian et al. (11) suggests that elevated D-dimer levels are a key factor for predicting prolonged hospital stays in elderly hip fracture patients. This predictive approach, using machine learning, aids in the efficient allocation and utilization of medical resources. Hypoproteinemia and electrolyte disorders stem from diagnostic criteria based on laboratory findings. Post-diagnosis, both conditions exert a profound influence on the overall duration of hospitalization. Therefore, our inclusion criteria revolve around diagnoses made during hospitalization or persisting until discharge. In elderly hip surgery patients, the occurrence of hypoalbuminemia (≤35 g/L) signifies a slower postoperative recovery, diminished functional outcomes, and a lower quality of life (41). Additionally, postoperative hypoalbuminemia in elderly hip fracture patients increases the risk of postoperative respiratory failure (PRF), which is associated with respiratory infections and extended hospital stays (42). Research by Cho et al. (43) highlights the prevalence of inadequate protein intake among elderly hip fracture patients, which can result in decreased muscle strength. After hip fracture surgery, insufficient physical rehabilitation can slow postoperative recovery and increase the likelihood of complications. To address hypoalbuminemia, medical care should involve individualized plans for oral, enteral, or parenteral protein intake, aiming to quickly restore normal protein levels and support the recovery process. Advanced age in elderly hip fracture patients is a risk factor for fluid and electrolyte imbalances, which can lead to an increased risk of pre- and postoperative delirium, particularly when associated with low sodium and calcium levels (44). Prolonged postoperative electrolyte imbalance can negatively impact patient prognosis. A study by Rudge et al. (45) found that postoperative hyponatremia is common in traumatic hip fracture patients and is associated with extended hospital stays, suggesting that the surgical process itself may be a contributing risk factor. Kemal et al. (46) reported a 20.5% incidence of hyponatremia in hip fracture patients, with similar mortality rates compared to patients with normal sodium levels. However, these patients experienced longer hospital stays, emphasizing the need to carefully manage hyponatremia. Proper perioperative preparation for elderly hip surgery patients includes vigilant monitoring of electrolyte levels, early identification of imbalances, and prompt management to improve patient outcomes and reduce hospitalization duration.
The aim of this study is to develop a predictive computational model for assessing the likelihood of PLOS in elderly patients undergoing hip surgery. The study identified 10 critical variables during the construction of the random forest predictive model, including lower extremity vascular disease, time from injury to hospital admission, white blood cell count, D-dimer levels, type of surgery, hypoproteinemia, electrolyte imbalances, anemia, cerebrovascular disease, and heart failure. These key factors play a crucial role in determining the outcome of PLOS for elderly hip fracture patients and serve as strong predictive elements. Healthcare practitioners should pay special attention to these variables and prioritize early prevention strategies. Efficient allocation of medical resources to high-risk patients can enhance clinical effectiveness and reduce hospital stays, subsequently preventing complications associated with extended hospitalizations such as aspiration pneumonia, urinary tract infections, nosocomial infections, thrombosis, and intestinal obstruction. These measures are essential for improving the prognosis of elderly patients undergoing hip surgery. Among the ten critical variables, particular attention and monitoring should be given to patients with high-risk factors such as time from injury to admission, cerebrovascular disease, and heart failure. For other key variables like white blood cell count, D-dimer, hypoproteinemia, electrolyte imbalances, and anemia, clinicians should promptly intervene to prevent further deterioration. In patients without lower extremity vascular disease, health education, physical therapy, and pharmacological prevention should be emphasized; in those who have already developed the condition, immediate pharmacological treatment is necessary. Moreover, the study’s random forest algorithm was verified and compared using the Lasso regression model, lending significant clinical utility and practical application. This random forest predictive model furnishes clinicians with timely insights into the demands and risks associated with elderly hip fracture inpatients, enabling proactive interventions. It alleviates the risk factors associated with delayed hospital stays and enhances patient prognosis. In summary, this predictive model aids in optimizing bed turnover rates, reducing operational costs for healthcare facilities, minimizing unnecessary resource wastage, lowering treatment expenses for hospitalized patients, and enhancing postoperative outcomes.
Primarily, this study is inherently confined by its retrospective nature. Subsequently, the variation in hospitalization duration stems from disparities among different medical and caregiving systems. Thirdly, the study exclusively incorporates elderly hip fracture patients subjected to surgical interventions, revealing the discovery of individuals with a more extended temporal gap between data collection and non-surgical interventions. Regrettably, an analysis of this subgroup is absent. Despite the inclusion of an extensive array of variables, comprehensiveness remains elusive. R studio performs a data queue random assignment process, which is subject to uncertainty. The predictive model constructed in this study necessitates further validation through prospective research with a multicenter approach and a substantial sample size.
5 Conclusion
This study constructs a Random Forest predictive model, which is refined and validated through Lasso regression. This precise algorithm serves as a valuable tool for assessing personalized risk in elderly hip fracture patients. By applying the model, clinicians can develop tailored rehabilitation plans to improve patient prognosis. The model provides critical insights for clinical practitioners, aiding informed decision-making in the allocation of medical resources and the planning of healthcare interventions. This predictive model holds promise for providing clinicians with a theoretical basis for preventive interventions. Additionally, it facilitates the clinical translation of the model, enhancing its integration into practical medical use.
Data availability statement
The original contributions presented in the study are included in the article/supplementary material, further inquiries can be directed to the corresponding authors.
Ethics statement
The studies involving humans were approved by West China Hospital of Sichuan University. The studies were conducted in accordance with the local legislation and institutional requirements. Written informed consent for participation was not required from the participants or the participants’ legal guardians/next of kin in accordance with the national legislation and institutional requirements.
Author contributions
HL: Writing – original draft. FX: Conceptualization, Methodology, Writing – original draft, Writing – review & editing. JJ: Investigation, Methodology, Project administration, Supervision, Writing – review & editing. ZC: Investigation, Methodology, Project administration, Writing – review & editing. ZX: Conceptualization, Supervision, Writing – review & editing. XD: Conceptualization, Data curation, Investigation, Project administration, Supervision, Writing – review & editing.
Funding
This work was supported by the National Natural Science Foundation of China (32371420, 82202705), Sichuan Science and Technology Program (No. 2023NSFSC1738), China Postdoctoral Science Foundation (2023 M742485), Sichuan University-Luzhou Municipal People’s Government Strategic Cooperation Project (2022CDLZ-19), Sichuan Provincial Cadre Health Research Project (2023-401), Sanya Science and Technology Innovation Project (2022KJCX09), and Clinical Research Incubation project of West China Hospital of Sichuan University (2019HXFH041).
Conflict of interest
The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1. Xing, F, Luo, R, Liu, M, Zhou, Z, Xiang, Z, and Duan, X. A new random forest algorithm-based prediction model of post-operative mortality in geriatric patients with hip fractures. Front Med. (2022) 9:829977. doi: 10.3389/fmed.2022.829977
2. Long, Y, Wang, T, Xu, X, Ran, G, Zhang, H, Dong, Q, et al. Risk factors and outcomes of extended length of stay in older adults with intertrochanteric fracture surgery: a retrospective cohort study of 2132 patients. J Clin Med. (2022) 11:47366. doi: 10.3390/jcm11247366
3. Lin, C, Liang, Z, Liu, J, and Sun, W. A machine learning-based prediction model pre-operatively for functional recovery after 1-year of hip fracture surgery in older people. Front Surg. (2023) 10:60085. doi: 10.3389/fsurg.2023.1160085
4. Wiklund, R, Toots, A, Conradsson, M, Olofsson, B, Holmberg, H, Rosendahl, E, et al. Risk factors for hip fracture in very old people: a population-based study. Osteoporos Int. (2016) 27:923–31. doi: 10.1007/s00198-015-3390-9
5. Al-Algawy, AAH, Baiee, HA, Hasan, S, Jassim, I, Razaq, M, Kamel, F, et al. Risk factors associated with hip fractures among adult people in Babylon City., Iraq. Open Access Maced J Med Sci. (2019) 7:3608–14. doi: 10.3889/oamjms.2019.734
6. Yu, Y, Wang, Y, Hou, X, and Tian, F. Recent advances in the identification of related factors and preventive strategies of hip fracture. Front Public Health. (2023) 11:6527. doi: 10.3389/fpubh.2023.1006527
7. Schneider, AM, Mucharraz, C, Denyer, S, and Brown, NM. Prolonged hospital stay after arthroplasty for geriatric femoral neck fractures is associated with increased early mortality risk after discharge. J Clin Orthop Trauma. (2022) 26:101785. doi: 10.1016/j.jcot.2022.101785
8. Salvador Marín, J, Ferrández Martínez, FJ, Fuster Such, C, Seguí Ripoll, JM, Orozco Beltrán, D, Carratalá Munuera, MC, et al. Marzo Campos, risk factors for high length of hospital stay and in-hospital mortality in hip fractures in the elderly. Revista Española de Cirugía Ortopédica y Traumatología (English Edition). (2021) 65:322–30. doi: 10.1016/j.recote.2021.05.009
9. Tan, ST, Tan, WP, Jaipaul, J, Chan, SP, and Sathappan, SS. Clinical outcomes and hospital length of stay in 2,756 elderly patients with hip fractures: a comparison of surgical and non-surgical management. Singapore Med J. (2017) 58:253–7. doi: 10.11622/smedj.2016045
10. Schneider, AM, Denyer, S, and Brown, NM. Risk factors associated with extended length of hospital stay after geriatric hip fracture. J Am Acad Orthop Surg Glob Res Rev. (2021) 5:e21.00073. doi: 10.5435/JAAOSGlobal-D-21-00073
11. Tian, CW, Chen, XX, Shi, L, Zhu, HY, Dai, GC, Chen, H, et al. Machine learning applications for the prediction of extended length of stay in geriatric hip fracture patients. World J Orthop. (2023) 14:741–54. doi: 10.5312/wjo.v14.i10.741
12. Hua, Y, Yuan, Y, Wang, X, Liu, L, Zhu, J, Li, D, et al. Risk prediction models for postoperative delirium in elderly patients with hip fracture: a systematic review. Front Med. (2023) 10:1226473. doi: 10.3389/fmed.2023.1226473
13. Li, Y, Chen, M, Lv, H, Yin, P, Zhang, L, and Tang, P. A novel machine-learning algorithm for predicting mortality risk after hip fracture surgery. Injury. (2021) 52:1487–93. doi: 10.1016/j.injury.2020.12.008
14. Luksameearunothai, K, Sa-ngasoongsong, P, Kulachote, N, Thamyongkit, S, Fuangfa, P, Chanplakorn, P, et al. Usefulness of clinical predictors for preoperative screening of deep vein thrombosis in hip fractures. BMC Musculoskelet Disord. (2017) 18:208. doi: 10.1186/s12891-017-1582-5
15. Mathew, PJ, Jehan, F, Kulvatunyou, N, Khan, M, O’Keeffe, T, Tang, A, et al. The burden of excess length of stay in trauma patients. Am J Surg. (2018) 216:881–5. doi: 10.1016/j.amjsurg.2018.07.044
16. Castronuovo, E, Pezzotti, P, Franzo, A, Di Lallo, D, and Guasticchi, G. Early and late mortality in elderly patients after hip fracture: a cohort study using administrative health databases in the Lazio region, Italy. BMC Geriatr. (2011) 11:37. doi: 10.1186/1471-2318-11-37
17. Chen, J, Wang, X, Qian, H, Ye, J, Qian, J, and Hua, J. Correlation between common postoperative complications of prolonged bed rest and quality of life in hospitalized elderly hip fracture patients. Ann Palliative Med. (2020) 9:1125–33. doi: 10.21037/apm-20-891
18. Feng, L, Xu, L, Yuan, W, Xu, Z, Feng, Z, and Zhang, H. Preoperative anemia and total hospitalization time are the independent factors of preoperative deep venous thromboembolism in Chinese elderly undergoing hip surgery. BMC Anesthesiol. (2020) 20:72. doi: 10.1186/s12871-020-00983-2
19. Bokrantz, T, Manhem, K, Lorentzon, M, Karlsson, M, Ljunggren, Ö, Ohlsson, C, et al. The association between peripheral arterial disease and risk for hip fractures in elderly men is not explained by low hip bone mineral density. Osteoporos Int. (2022) 33:2607–17. doi: 10.1007/s00198-022-06535-3
20. Hussain, MA, Al-Omran, M, Mamdani, M, Eisenberg, N, Premji, A, Saldanha, L, et al. Efficacy of a guideline-recommended risk-reduction program to improve cardiovascular and limb outcomes in patients with peripheral arterial disease. JAMA Surg. (2016) 151:742–50. doi: 10.1001/jamasurg.2016.0415
21. Cao, H, Yu, J, Chang, Y, Li, Y, and Zhou, B. Construction and validation of a risk prediction model for delayed discharge in elderly patients with hip fracture. BMC Musculoskelet Disord. (2023) 24:66. doi: 10.1186/s12891-023-06166-7
22. Birisik, F, Bilgin, Y, Bayram, S, and Ozturkmen, Y. Does presence of femoral arterial calcification have an effect on postoperative complication and mortality in patients with hip fracture? Cureus. (2021) 13:e14878. doi: 10.7759/cureus.14878
23. Cogan, AM, Weaver, JA, McHarg, M, Leland, NE, Davidson, L, and Mallinson, T. Association of length of stay, recovery rate, and therapy time per day with functional outcomes after hip fractures surgery. JAMA Network Open. (2020) 3:e1919672. doi: 10.1001/jamanetworkopen.2019.19672
24. Klestil, T, Röder, C, Stotter, C, Winkler, B, Nehrer, S, Lutz, M, et al. Impact of timing of surgery in elderly hip fracture patients: a systematic review and meta-analysis. Sci Rep. (2018) 8:13933. doi: 10.1038/s41598-018-32098-7
25. Tulic, G, Dubljanin-Raspopovic, E, Tomanovic-Vujadinovic, S, Sopta, J, Todorovic, A, and Manojlovic, R. Prolonged pre-operative hospital stay as a predictive factor for early outcomes and mortality after geriatric hip fracture surgery: a single institution open prospective cohort study. Int Orthop. (2018) 42:25–31. doi: 10.1007/s00264-017-3643-7
26. Ahmed, M, Tirimanna, R, Ahmed, U, Hussein, S, Syed, H, Malik-Tabassum, K, et al. A comparison of internal fixation and hemiarthroplasty in the management of un- or minimally displaced hip fractures in patients over 60 years old. Injury. (2023) 54:1180–5. doi: 10.1016/j.injury.2022.11.065
27. Ravikumar, KJ, and Marsh, G. Internal fixation versus hemiarthroplasty versus total hip arthroplasty for displaced subcapital fractures of femur—13 year results of a prospective randomised study. Injury. (2000) 31:793–7. doi: 10.1016/S0020-1383(00)00125-X
28. Yuan, J, Zhu, G, Zhao, Y, and Huang, J. Effect of hip fracture on prognosis of acute cerebral infarction. Clinics. (2021) 76:e3059. doi: 10.6061/clinics/2021/e3059
29. Lim, JW, and Ang, GC. Approach to patients with hip fracture and concurrent stroke. BMJ Case Rep. (2021) 14:e236064. doi: 10.1136/bcr-2020-236064
30. Lamo-Espinosa, JM, Mariscal, G, Gómez-Álvarez, J, and San-Julián, M. Incidence and risk factors for stroke after hip fracture: a meta-analysis. Sci Rep. (2023) 13:17618. doi: 10.1038/s41598-023-44917-7
31. Cullen, MW, Gullerud, RE, Larson, DR, Melton, LJ III, and Huddleston, JM. Impact of heart failure on hip fracture outcomes: a population-based study. J Hosp Med. (2011) 6:507–12. doi: 10.1002/jhm.918
32. Cha, Y-H, Ha, Y-C, Ryu, H-J, Lee, Y-K, Park, SH, Lee, KJ, et al. Effect of heart failure on postoperative short and long-term mortality in elderly patients with hip fracture. Injury. (2020) 51:694–8. doi: 10.1016/j.injury.2020.01.004
33. You, F, Ma, C, Sun, F, Liu, L, and Zhong, X. The risk factors of heart failure in elderly patients with hip fracture: what should we care. BMC Musculoskelet Disord. (2021) 22:832. doi: 10.1186/s12891-021-04686-8
34. Jiang, Y, Lin, X, Wang, Y, Li, J, Wang, G, Meng, Y, et al. Preoperative anemia and risk of in-hospital postoperative complications in patients with hip fracture. Clin Interv Aging. (2023) 18:639–53. doi: 10.2147/CIA.S404211
35. Willems, JM, de Craen, AJM, Nelissen, RGHH, van Luijt, PA, Westendorp, RGJ, and Blauw, GJ. Haemoglobin predicts length of hospital stay after hip fracture surgery in older patients. Maturitas. (2012) 72:225–8. doi: 10.1016/j.maturitas.2012.03.016
36. Halm, EA, Wang, JJ, Boockvar, K, Penrod, J, Silberzweig, SB, Magaziner, J, et al. The effect of perioperative anemia on clinical and functional outcomes in patients with hip fracture. J Orthop Trauma. (2004) 18:369–74. doi: 10.1097/00005131-200407000-00007
37. Deirmengian, GK, Zmistowski, B, Jacovides, C, O’Neil, J, and Parvizi, J. Leukocytosis is common after total hip and knee arthroplasty. Clin Orthop Relat Res. (2011) 469:3031–6. doi: 10.1007/s11999-011-1887-x
38. Tang, SP-K, Moy, L-T, Wan, KH-M, Wong, H-C, Wong, KK-H, and Wong, K-K. Preoperative leukocytosis and postoperative outcomes in geriatric hip fracture patients: a retrospective cohort study. Curr Orthopaedic Pract. (2022) 33:324–8. doi: 10.1097/BCO.0000000000001129
39. Yu, Y, and Zheng, P. Determination of risk factors of postoperative pneumonia in elderly patients with hip fracture: what can we do? PLoS One. (2022) 17:e0273350. doi: 10.1371/journal.pone.0273350
40. Yuan, Y, Tian, W, Deng, X, Yue, R, Ge, X, Wu, X, et al. Elderly patients with concurrent hip fracture and lower respiratory tract infection: the pathogens and prognosis over different bedridden periods. J Orthop Surg Res. (2021) 16:246. doi: 10.1186/s13018-021-02399-1
41. Sim, SD, Sim, YE, Tay, K, Howe, TS, Png, MA, Chang, CCP, et al. Preoperative hypoalbuminemia: poor functional outcomes and quality of life after hip fracture surgery. Bone. (2021) 143:115567. doi: 10.1016/j.bone.2020.115567
42. Chen, J, Tian, Z, Zhang, H, Shi, L, Bao, W, Huang, T, et al. Risks of postoperative respiratory failure in elderly patients after hip surgery: a retrospective study. J Orthop Surg Res. (2022) 17:140. doi: 10.1186/s13018-022-02909-9
43. Choi, KA, Heu, E, Nam, HC, Park, Y, Kim, D, and Ha, YC. Relationship between low muscle strength, and protein intake: a preliminary study of elderly patients with hip fracture. J Bone Metab. (2022) 29:17–21. doi: 10.11005/jbm.2022.29.1.17
44. Wang, L-H, Xu, D-J, Wei, X-J, Chang, H-T, and Xu, G-H. Electrolyte disorders and aging: risk factors for delirium in patients undergoing orthopedic surgeries. BMC Psychiatry. (2016) 16:418. doi: 10.1186/s12888-016-1130-0
45. Rudge, JE, and Kim, D. New-onset hyponatraemia after surgery for traumatic hip fracture. Age Ageing. (2014) 43:821–6. doi: 10.1093/ageing/afu069
Keywords: machine learning, random forest, hip fracture, prolonged hospital length of stay, prediction mode, elderly
Citation: Liu H, Xing F, Jiang J, Chen Z, Xiang Z and Duan X (2024) Random forest predictive modeling of prolonged hospital length of stay in elderly hip fracture patients. Front. Med. 11:1362153. doi: 10.3389/fmed.2024.1362153
Edited by:
Zhenyu Zhou, Cornell University, United StatesReviewed by:
Carlos Lam, Taipei Medical University, TaiwanMengcun Chen, Thomas Jefferson University, United States
Liangyuan Na, Massachusetts Institute of Technology, United States
Copyright © 2024 Liu, Xing, Jiang, Chen, Xiang and Duan. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Zhou Xiang, eGlhbmd6aG91aTVAaG90bWFpbC5jb20=; Xin Duan, ZHhiYWFsQGhvdG1haWwuY29t
†These authors have contributed equally to this work and share first authorship