A machine learning model built from the electronic health records of more than 234,000 joint replacement patients can estimate a person’s risk of dying within one year of hip or knee replacement surgery using variables that are routinely available before the operation. The model, developed by researchers using the TriNetX Research Network and released as a free web-based calculator, achieved an internally validated AUROC of 0.761 and identified age, male sex, kidney function, hemoglobin, and body mass index as its strongest predictors.
The retrospective cohort study, published in the journal Arthroplasty, addressed a gap the authors see in how surgical technology has evolved. Robotic assistance, navigation, and implant design have refined what happens inside the operating room, but the decision of who should undergo elective total joint arthroplasty, and when, still relies heavily on categorical risk instruments developed decades ago. Tools such as the ASA Physical Status classification and the Charlson Comorbidity Index assign similar risk to every patient within a category, while the ACS-NSQIP Surgical Risk Calculator has shown poor calibration in arthroplasty populations, with predicted event rates diverging from observed outcomes.
To build the model, the team queried TriNetX, a federated platform aggregating de-identified records from U.S. health systems covering more than 160 million patients across 111 healthcare organizations. They identified patients undergoing primary total hip or total knee arthroplasty using ICD-10-PCS procedure codes, with surgeries performed between 2000 and 2025. Because patients who disappear from a health system might appear as survivors even if they died outside the network, the researchers restricted the primary cohort to patients with confirmed death within 365 days of surgery or at least 365 days of documented follow-up. That restriction excluded 75,277 patients, 24.3 percent of an initial cohort of 309,529, whose survival status could not be verified.
The final analysis cohort comprised 234,252 patients, including 140,204 total knee replacements and 94,048 total hip replacements. The median age at surgery was 66 years, and the median body mass index was 30.4 kg/m2. The observed one-year all-cause mortality rate was 0.574 percent, or 1,344 deaths. Mortality was significantly higher after hip replacement, at 0.647 percent, than after knee replacement, at 0.525 percent. Among patients who died, the median time from surgery to death was 188 days, with 9.7 percent of deaths occurring within 30 days and 25.5 percent within 90 days.
The researchers trained an XGBoost gradient-boosted tree classifier on 43 preoperative variables, including demographics, eight laboratory values, vital signs, sixteen comorbidity flags, an approximated ASA class, and prior healthcare utilization. Missing laboratory values were imputed with training-cohort medians, and binary missingness indicators were included as features because absent preoperative testing itself may signal differential risk. Hyperparameters included 500 estimators, a learning rate of 0.05, and a maximum tree depth of 5. Class imbalance, a consequence of the rare outcome, was handled with isotonic regression for probability calibration, and all performance metrics were computed from out-of-fold predictions within a nested, stratified fivefold cross-validation framework to minimize optimism bias.
On internal validation, the model achieved an AUROC of 0.761, with fold-level results ranging from 0.744 to 0.787. Subgroup AUROCs were 0.778 for hip and 0.746 for knee replacements, and the model improved discrimination by 0.113 AUC over comorbidity count alone. The Brier score was 0.006, and average precision was 0.037, a value the authors note is mathematically bounded by the 0.574 percent event rate rather than a reflection of model weakness. Calibration tracked observed event rates closely across risk deciles, with mean absolute error below 0.15 percentage points in nine of ten deciles and modest overprediction of 0.16 percentage points confined to the highest-risk decile.
Risk stratification showed mortality rising monotonically with predicted risk. Patients in the highest predicted quintile had an observed mortality rate of 1.488 percent, 2.6 times the cohort baseline; the highest decile reached 2.50 percent, a 4.4-fold enrichment; and the top 5 percent reached 3.57 percent, 6.2 times baseline. Feature importance analysis using SHAP values identified age at surgery as the dominant predictor, followed by male sex, serum creatinine, hemoglobin, and body mass index. Laboratory values collectively accounted for roughly 28 percent of the model’s predictive weight and demographics for 24 percent. Partial dependence analysis showed predicted mortality climbing from 0.374 percent at age 60 to 1.908 percent at age 85, and rising with creatinine while falling with higher hemoglobin and albumin levels.
The team derived three operating thresholds from the cross-validated predictions. A sensitivity-anchored threshold of 0.235 percent captured 90.1 percent of all deaths at 33.2 percent specificity, flagging about two-thirds of patients for enhanced surveillance. A decision-curve-analysis threshold of 0.500 percent identified 30 percent of patients as elevated risk with balanced sensitivity and specificity near 70 percent, and a Youden-optimal threshold of 0.767 percent flagged 16.3 percent of patients with 83.9 percent specificity. Decision curve analysis showed the model’s net benefit exceeded both treat-all and treat-none strategies across the entire prespecified risk range of 0.5 to 10 percent.
The authors frame the work against the backdrop of value-based care, noting that the Centers for Medicare & Medicaid Services has progressively expanded episode-based payment models for joint replacement, culminating in the Transforming Episode Accountability Model, a mandatory five-year model running from January 1, 2026 through December 31, 2030 for selected hospitals. Within such frameworks, they argue, individualized mortality estimates could inform medical optimization and surgical timing rather than blunt patient selection, helping distinguish patients with potentially reversible risk factors, such as anemia or poor nutritional status, from those whose risk reflects more global frailty. They emphasize that the derived thresholds should guide rather than govern decisions, and that model-derived markers of limited reserve are not hard contraindications.
The study carries substantial limitations. The model has not been externally validated in an independent dataset, which the authors call a prerequisite before clinical adoption; all participating institutions share TriNetX infrastructure and coding conventions, so performance in claims data or non-U.S. settings cannot be assumed. Mortality dates were available only by month and year, cohort identification relied on procedure codes that may incompletely capture qualifying surgeries, and the two-decade study period spans substantial evolution in surgical technique and perioperative care. Excluding patients without verifiable follow-up likely makes the observed 0.574 percent mortality rate conservative, since patients with fragmented care were more likely to be excluded. Formal frailty indices and socioeconomic variables were unavailable. The deployed calculator, built with Streamlit and trained on the full cohort, is intended to facilitate the prospective validation studies the authors say must come next, testing whether integrating the risk estimate into preoperative pathways actually changes provider behavior and patient outcomes.
Subject of Research: Development and internal validation of a machine learning model predicting one-year mortality after total hip and knee arthroplasty
Article Title: Advancing preoperative planning technology in total joint arthroplasty with a real-time machine learning calculator: 1-year mortality risk in a value-based care era
Article References: King, A. H., Joachim, K., Hamad, C. D., Abernethy, C., Cheng, A., Ko, T., Gettleman, B., Lin, A., Perrotta, A., Jeong, S., Dingle, E., Wiener, J. M., Stavrakis, A., & Christ, A. B. (2026). Advancing preoperative planning technology in total joint arthroplasty with a real-time machine learning calculator: 1-year mortality risk in a value-based care era. Arthroplasty, 8(1), Article 70. https://doi.org/10.1186/s42836-026-00428-0
Image Credits: AI Generated
DOI: 10.1186/s42836-026-00428-0
Keywords: total joint arthroplasty, machine learning, mortality prediction, XGBoost, TriNetX, preoperative risk calculator, value-based care, electronic health records, risk stratification, SHAP, decision curve analysis, Advancing
Cite Scienmag News
Teresa Odom. (October 29, 2026). Machine Learning Calculator Estimates One-Year Mortality Risk Before Joint Replacement. Scienmag. https://scienmag.com/machine-learning-calculator-estimates-one-year-mortality-risk-before-joint-replacement/
Teresa Odom. "Machine Learning Calculator Estimates One-Year Mortality Risk Before Joint Replacement." Scienmag, 29 October 2026, https://scienmag.com/machine-learning-calculator-estimates-one-year-mortality-risk-before-joint-replacement/. Accessed 29 October 2026.
Teresa Odom. "Machine Learning Calculator Estimates One-Year Mortality Risk Before Joint Replacement." Scienmag. October 29, 2026. https://scienmag.com/machine-learning-calculator-estimates-one-year-mortality-risk-before-joint-replacement/








