Skip to main content
BMC Gastroenterology logoLink to BMC Gastroenterology
. 2026 Jul 11;26:614. doi: 10.1186/s12876-026-05080-1

Explainable early prediction of short-term severe deterioration in gallstone-related biliary disease using MIMIC-IV, eICU, and local real-world data

Qianli Chen 1, Xiaoxiong Wu 2,✉
PMCID: PMC13640388  PMID: 42436432

Abstract

Background

Patients with gallstone-related biliary disease may deteriorate rapidly before definitive source control. This study aimed to develop an interpretable 0-24-hour prediction model for short-term severe deterioration in gallstone-related biliary disease and validate it across eICU-CRD and a local real-world cohort.

Methods

MIMIC-IV was used for model development, eICU-CRD for primary external validation, and local clinical data for secondary validation. Eligible patients had gallstone disease, cholecystitis, cholangitis, or biliary obstruction. The outcome was a composite of in-hospital or ICU death, vasopressor use, mechanical ventilation, continuous renal replacement therapy, or prolonged ICU stay. Feature selection, imputation, scaling, model selection, and threshold determination were restricted to MIMIC-IV development data. Performance was assessed using AUROC, AUPRC, Brier score, calibration, decision curves, threshold consequences, subgroup analyses, bootstrap risk uncertainty, and SHAP explanations.

Results

The study included 2818 MIMIC-IV stays, 1492 eICU-CRD stays, and 115 local patients, with event rates of 58.4%, 65.7%, and 52.2%, respectively. The locked elastic net model retained 12 routine early predictors. AUROC was 0.70 in MIMIC-IV internal validation, 0.64 in eICU-CRD external validation, and 0.63 in local validation. Calibration, net benefit, threshold consequences, and SHAP analyses supported use as a bedside risk-support tool rather than a replacement for clinical judgment.

Conclusions

A routine early model captured multi-system deterioration signals in gallstone-related biliary disease and showed transportable, moderate discrimination across external cohorts.

Supplementary Information

The online version contains supplementary material available at https://doi.org/10.1186/s12876-026-05080-1.

Keywords: Gallstone-related biliary disease, Clinical deterioration, Prediction model, External validation, Explainable artificial intelligence

Introduction

Acute gallstone-related biliary disease is common, but the clinical danger is concentrated in a smaller group of patients who deteriorate early. At the bedside, the difficult question is not merely whether a patient has cholelithiasis, cholecystitis, cholangitis, or biliary obstruction; it is whether that patient will soon require vasopressors, invasive respiratory support, renal replacement therapy, prolonged intensive care, or will die before source control and organ support can reverse the trajectory. Contemporary reviews and the Tokyo Guidelines emphasize early recognition, infection control, and timely biliary drainage or surgery, yet they also acknowledge that deterioration is shaped by age, comorbidity, organ dysfunction, and local resource pathways [1–3].

Recent studies have made important progress in risk stratification for acute cholangitis and acute cholecystitis. Admission-based mortality scores, machine-learning models for cholelithiasis-induced acute cholangitis, and preoperative scores for severe acute cholecystitis show that routinely available variables contain prognostic information [4–6]. Surgical studies also show that early cholecystectomy risk is clinically heterogeneous, with morbidity and mortality depending on patient condition and disease complexity rather than on diagnosis labels alone [7]. These findings support a pragmatic clinical premise: an early prediction tool should help identify patients whose physiology has already begun to depart from a stable biliary disease course.

However, several gaps remain clinically important. First, many studies focus on a single diagnosis, a single center, or a single endpoint such as mortality, whereas ICU clinicians often face overlapping biliary phenotypes and treatment-linked deterioration outcomes. Second, markers such as procalcitonin, anion gap, lactate, and kidney injury have been associated with severity or adverse outcomes, but they are rarely integrated with vital signs, hepatobiliary injury, coagulation, and electrolyte information in a cross-database validation framework [8–10]. Third, model papers often emphasize discrimination alone, although clinical use requires calibration, threshold consequences, net benefit, and transparent explanations. Fourth, tools developed in one hospital system may not transport well to another because patient selection, timing of drainage, ICU admission practices, and treatment thresholds differ.

We therefore designed this study from a clinical decision perspective. We used MIMIC-IV as the development database and validated the locked model in eICU-CRD and a local real-world cohort [11, 12]. Predictors were restricted to the first 24 h after ICU admission so that the model would reflect early bedside information rather than downstream treatment consequences. Reporting and risk-of-bias assessment were aligned with TRIPOD + AI and PROBAST + AI principles [13, 14]. Our objective was to develop and externally validate an interpretable early prediction model for short-term severe deterioration in gallstone-related biliary disease and to evaluate whether its predictions were clinically usable through calibration, decision curves, threshold consequences, subgroup analyses, individual uncertainty, and SHAP-based explanations.

Methods

Study design and data sources

This retrospective multicohort prediction-model study used MIMIC-IV version 3.1 for model development, eICU-CRD for primary cross-database external validation, and a local clinical dataset for secondary real-world validation. MIMIC-IV and eICU-CRD contain de-identified data available to approved credentialed users. The local dataset was analyzed as a retrospective de-identified clinical dataset and was interpreted as a secondary feasibility validation cohort because of its small sample size. All feature selection, imputation, scaling, hyperparameter selection, and threshold determination were performed using MIMIC-IV development data only. eICU-CRD and the local cohort were used only after the model was locked. Reporting followed TRIPOD + AI, and model-bias considerations were checked against PROBAST + AI principles [13, 14].

Participants

The study was conducted in accordance with the Declaration of Helsinki. MIMIC-IV and eICU-CRD are de-identified public critical care databases available to credentialed users after completion of required data-use training and approval. The local retrospective dataset was approved by the Ethics Committee of Mengchao Hepatobiliary Hospital, and all local data were analyzed after removal of sensitive identifying information. The requirement for informed consent was waived because this study used retrospective de-identified data. The study population consisted of ICU patients with gallstone-related biliary disease. In MIMIC-IV, 94,458 ICU stays were screened. Eligible admissions were identified using ICD-10 codes K80, K81, K83.0, and K83.1, and ICD-9 codes 574 and 576.1, capturing gallstone disease, cholecystitis, cholangitis, and biliary obstruction. This yielded 3,331 biliary disease-related ICU stays. Repeated ICU stays within the same hospital admission were excluded (n = 513), leaving 2,818 first ICU stays for analysis. In eICU-CRD, 200,859 unit stays were screened using structured diagnosis and admission diagnosis text. Search terms included gallstone, cholelithiasis, choledocholithiasis, cholecystitis, cholangitis, biliary obstruction, common bile duct stone, and bile duct stone. This identified 1,625 biliary disease-related unit stays. Repeated unit stays within the same health-system stay were excluded (n = 133), leaving 1,492 first unit stays for external validation. The local standardized validation dataset contained 115 records; no patients were excluded for missing outcome status. The participant flow and validation design are shown in (Fig. 1).

Fig. 1.

Fig. 1

Participant eligibility flow and cohort drift. A Inclusion and exclusion flow for MIMIC-IV, eICU-CRD, and local validation cohorts. B Standardized mean difference love plot comparing validation cohorts with the development cohort

Outcome

The primary outcome was short-term severe clinical deterioration. It was defined as a composite of in-hospital death, ICU death, vasopressor use, mechanical ventilation or intubation-related invasive respiratory support, renal replacement therapy/CRRT, or ICU length of stay longer than 3 days. Outcome components were not used as predictors. Component distributions were additionally summarized for MIMIC-IV, eICU-CRD, and the local validation cohort to clarify how much of the composite endpoint was driven by death, organ support, renal replacement therapy, and prolonged ICU stay.

Candidate predictors and time window

Predictors were restricted to baseline variables and measurements obtained from 0 to 24 h after ICU admission. Candidate domains included demographics, biliary diagnosis flags, malignancy, vital signs, acid-base and perfusion markers, hepatobiliary laboratory tests, renal function and electrolytes, coagulation markers, and inflammatory markers. Repeated measurements were summarized as first, minimum, maximum, mean, and standard deviation values when available. Variables with likely information leakage were retained only for outcome construction or descriptive reporting and were excluded from model development.

Statistical analysis, model development, and validation

MIMIC-IV was split into a 70% development cohort and a 30% internal validation cohort using stratified sampling by outcome. Baseline characteristics were summarized as median [25th percentile, 75th percentile] or n (%), compared across cohorts, and accompanied by standardized mean differences. Missingness was evaluated with variable-level rates and pattern plots. Locked-feature missingness across cohorts was summarized separately in Supplementary Table S1. Candidate predictors were retained when missingness was no more than 80% in MIMIC-IV, no more than 85% in eICU-CRD, no more than 95% in the local cohort, and when the variable had more than one non-missing value in MIMIC-IV. Median imputation and standardization parameters were estimated in the MIMIC-IV development cohort and then applied unchanged to MIMIC internal validation, eICU-CRD, and local validation data.

Comparator models included traditional logistic regression, ridge logistic regression, LASSO logistic regression, elastic net logistic regression, random forest, extra trees, gradient boosting, support vector machine, XGBoost, LightGBM, and CatBoost when available. These models were fitted in the MIMIC development cohort and compared in the MIMIC internal validation cohort only. The final model was selected after this internal comparison using discrimination, calibration, parsimony, coefficient transparency, and clinical deployability. External cohorts were not used for model selection. The locked threshold was chosen in the MIMIC development cohort by the Youden index and then applied unchanged to MIMIC internal validation, eICU-CRD, and the local validation cohort.

Model performance was evaluated using AUROC with bootstrap 95% confidence intervals, AUPRC, Brier score, calibration intercept, calibration slope, calibration curves, decision curve analysis, clinical impact curves, and threshold tables reporting sensitivity, specificity, PPV, NPV, false positives, and missed events. Net benefit was calculated as TP/N - FP/N x threshold/(1 - threshold). Numerical decision-curve estimates were reported at selected thresholds in Supplementary Table S2. Additional threshold sensitivity analyses identified the threshold with maximum net benefit within the 0.30–0.70 range and the highest thresholds achieving at least 80% and 90% sensitivity in each validation cohort (Supplementary Table S3).

Results

Study population and cohort drift

Figure 1A shows the full eligibility process. In MIMIC-IV, 94,458 ICU stays were screened, 3,331 gallstone-related biliary disease ICU stays were identified, and 513 repeated ICU stays within the same hospital admission were excluded, leaving 2,818 first ICU stays. In eICU-CRD, 200,859 unit stays were screened, 1,625 eligible biliary disease unit stays were identified, and 133 repeated unit stays within the same health-system stay were excluded, leaving 1,492 external-validation stays. The local standardized cohort contributed 115 patients, with no exclusion for missing severe-outcome status. Severe deterioration occurred in 58.4% of MIMIC-IV stays, 65.7% of eICU-CRD stays, and 52.2% of local validation patients.

Baseline comparisons are shown in (Table 1). Median age was 69.00 [58.00, 80.00] years in the MIMIC development cohort, 67.00 [57.00, 78.00] years in MIMIC internal validation, 71.00 [58.00, 80.00] years in eICU-CRD, and 76.00 [65.74, 86.18] years locally. Male sex accounted for 55.60%, 56.40%, 56.10%, and 53.00% of the four cohorts, respectively. Cholangitis was more frequent in eICU-CRD (52.00%) than in the MIMIC development cohort (39.90%), whereas malignancy was more frequent in MIMIC (29.40%) than in eICU-CRD (5.00%) or the local cohort (5.20%). Median first lactate and creatinine were broadly similar across cohorts, while bicarbonate and several physiologic summaries showed drift. Figure 1B and Supplementary Figure S1 show standardized mean differences and missingness patterns, respectively.

Table 1.

Baseline characteristics across development and validation cohorts

Variable MIMIC development MIMIC internal validation eICU external validation Local validation P value Max SMD vs. development
age 69.00 [58.00, 80.00] 67.00 [57.00, 78.00] 71.00 [58.00, 80.00] 76.00 [65.74, 86.18] <0.001 0.47
gender 1096 (55.60%) 477 (56.40%) 837 (56.10%) 61 (53.00%) 0.91 0.05
has_cholangitis 787 (39.90%) 310 (36.60%) 776 (52.00%) 46 (40.00%) <0.001 0.24
has_malignancy 580 (29.40%) 240 (28.40%) 75 (5.00%) 6 (5.20%) <0.001 0.65
first_value__alanine_aminotransferase_alt 67.00 [29.00, 172.00] 66.50 [27.00, 157.75] 69.00 [35.00, 154.00] 145.90 [58.65, 236.02] <0.001 0.17
first_value__asparate_aminotransferase_ast 83.00 [40.25, 189.75] 82.00 [37.00, 176.50] 77.00 [40.00, 163.75] 123.89 [63.06, 246.88] <0.01 0.05
first_value__bicarbonate 22.00 [19.00, 25.00] 22.00 [19.00, 24.50] 23.00 [19.32, 26.00] 20.90 [17.94, 23.36] <0.001 0.23
first_value__creatinine 1.10 [0.80, 1.70] 1.10 [0.80, 1.70] 1.13 [0.80, 1.75] 1.13 [0.78, 1.71] 0.15 0.05
first_value__heart_rate 92.00 [78.00, 108.00] 93.00 [79.00, 106.00] 90.00 [77.00, 105.00] 90.12 [78.27, 106.80] 0.12 0.07
first_value__inrpt 1.40 [1.20, 1.80] 1.40 [1.20, 1.80] 1.40 [1.20, 1.80] 1.42 [1.25, 1.56] 0.46 0.29
first_value__lactate 2.00 [1.30, 3.00] 1.90 [1.35, 3.00] 1.90 [1.20, 3.00] 1.84 [1.38, 2.94] 0.29 0.09
first_value__o2_saturation_pulseoxymetry 97.00 [95.00, 99.00] 97.00 [95.00, 99.00] 97.00 [95.00, 99.00] 95.96 [93.93, 97.12] <0.01 0.18
first_value__platelet_count 173.50 [117.00, 248.75] 177.00 [120.00, 251.00] 180.00 [131.25, 243.75] 166.83 [124.31, 225.96] 0.19 0.13
first_value__potassium 4.00 [3.60, 4.50] 4.00 [3.60, 4.50] 4.00 [3.60, 4.40] 3.92 [3.59, 4.36] 0.06 0.15
first_value__respiratory_rate 20.00 [16.00, 24.00] 20.00 [16.00, 24.00] 20.00 [16.00, 24.00] 20.83 [16.87, 24.34] 0.16 0.07
first_value__sodium 138.00 [135.00, 141.00] 138.00 [135.00, 140.00] 138.00 [135.00, 141.00] 138.10 [135.99, 140.91] <0.01 0.12
first_value__urea_nitrogen 22.00 [14.00, 35.00] 21.00 [13.00, 35.00] 21.00 [13.00, 34.50] 21.52 [13.19, 32.79] 0.34 0.14
max_value__alanine_aminotransferase_alt 72.00 [31.00, 186.00] 70.00 [28.00, 168.50] 70.00 [35.00, 162.00] 151.56 [65.91, 239.23] <0.001 0.06
max_value__asparate_aminotransferase_ast 90.00 [43.00, 213.25] 88.00 [38.00, 192.50] 79.00 [41.25, 166.00] 135.97 [61.25, 250.25] <0.001 0.07
max_value__bicarbonate 23.00 [20.00, 25.00] 23.00 [20.00, 25.00] 23.00 [20.02, 26.00] 21.95 [19.71, 24.80] <0.001 0.17
max_value__creatinine 1.20 [0.80, 1.80] 1.10 [0.80, 1.80] 1.17 [0.82, 1.85] 1.16 [0.80, 1.95] 0.78 0.06
max_value__heart_rate 105.00 [91.00, 122.00] 106.00 [92.00, 119.00] 109.00 [94.00, 125.00] 104.95 [89.96, 119.77] <0.001 0.15
max_value__inrpt 1.50 [1.23, 1.90] 1.50 [1.30, 1.90] 1.40 [1.20, 1.86] 1.41 [1.28, 1.71] 0.33 0.29
max_value__lactate 2.10 [1.40, 3.40] 2.00 [1.40, 3.70] 2.00 [1.30, 3.30] 1.97 [1.43, 3.16] 0.15 0.17
max_value__o2_saturation_pulseoxymetry 100.00 [99.00, 100.00] 100.00 [99.00, 100.00] 100.00 [99.00, 100.00] 99.91 [98.07, 99.97] <0.001 0.13
max_value__platelet_count 180.00 [124.00, 253.00] 184.00 [124.00, 262.00] 182.00 [133.25, 245.00] 173.72 [127.79, 233.10] 0.66 0.12
max_value__potassium 4.20 [3.90, 4.70] 4.20 [3.90, 4.80] 4.10 [3.73, 4.50] 4.21 [3.87, 4.65] <0.001 0.24
max_value__respiratory_rate 28.00 [24.00, 32.00] 28.00 [24.00, 32.00] 30.00 [25.00, 36.00] 28.96 [24.15, 32.35] <0.001 0.33
max_value__sodium 139.00 [136.00, 142.00] 139.00 [136.00, 141.00] 139.00 [136.00, 141.25] 139.29 [136.97, 141.90] 0.40 0.08
max_value__urea_nitrogen 23.00 [15.00, 38.00] 23.00 [14.00, 39.00] 22.00 [14.00, 36.00] 22.41 [14.49, 35.55] 0.04 0.13
mean_value__alanine_aminotransferase_alt 69.00 [29.00, 171.00] 66.46 [27.00, 157.88] 69.00 [35.00, 158.50] 139.22 [59.68, 216.96] <0.001 0.11
mean_value__asparate_aminotransferase_ast 83.00 [41.00, 190.00] 81.83 [37.00, 170.75] 76.00 [40.00, 158.88] 117.37 [59.37, 202.58] <0.01 0.04
mean_value__bicarbonate 22.00 [19.00, 24.50] 22.00 [19.00, 24.67] 22.50 [19.51, 25.59] 20.94 [18.19, 23.74] <0.001 0.21
mean_value__creatinine 1.10 [0.80, 1.70] 1.07 [0.80, 1.70] 1.14 [0.80, 1.74] 1.15 [0.73, 1.77] 0.16 0.05
mean_value__heart_rate 87.08 [75.40, 98.94] 87.36 [75.78, 98.64] 86.36 [74.90, 98.42] 84.79 [72.97, 95.77] 0.73 0.09
mean_value__inrpt 1.40 [1.20, 1.79] 1.40 [1.20, 1.80] 1.40 [1.20, 1.77] 1.41 [1.25, 1.58] 0.68 0.27
mean_value__lactate 1.90 [1.33, 2.78] 1.83 [1.30, 2.90] 1.80 [1.16, 2.70] 1.85 [1.46, 2.76] 0.17 0.11
mean_value__o2_saturation_pulseoxymetry 96.60 [95.21, 97.88] 96.67 [95.30, 97.93] 96.77 [95.24, 98.21] 96.79 [95.01, 97.62] 0.08 0.05
mean_value__platelet_count 168.50 [113.91, 240.44] 172.00 [115.00, 246.50] 178.25 [130.62, 238.69] 160.72 [119.23, 218.54] 0.05 0.11
mean_value__potassium 4.00 [3.70, 4.40] 4.00 [3.70, 4.45] 4.00 [3.65, 4.40] 4.00 [3.68, 4.32] 0.09 0.08
mean_value__respiratory_rate 19.35 [17.08, 22.20] 19.30 [16.76, 22.21] 19.28 [16.49, 22.60] 19.94 [17.44, 22.20] 0.47 0.07
mean_value__sodium 138.00 [135.00, 140.50] 138.00 [135.00, 140.00] 138.00 [136.00, 141.00] 138.69 [135.98, 140.10] <0.001 0.12
mean_value__urea_nitrogen 22.00 [14.00, 35.50] 21.50 [13.00, 36.58] 21.50 [13.38, 35.00] 21.05 [13.39, 33.88] 0.27 0.13
min_value__alanine_aminotransferase_alt 63.00 [27.00, 154.00] 62.00 [26.00, 144.25] 67.00 [34.00, 150.00] 125.18 [53.98, 203.63] <0.001 0.16
min_value__asparate_aminotransferase_ast 75.00 [37.00, 162.00] 71.50 [35.25, 147.00] 72.00 [39.00, 150.75] 97.34 [50.95, 182.72] 0.07 0.07
min_value__bicarbonate 21.00 [18.00, 24.00] 21.00 [18.00, 24.00] 22.00 [18.50, 25.00] 20.03 [17.07, 22.78] <0.001 0.22
min_value__creatinine 1.00 [0.70, 1.60] 1.00 [0.70, 1.60] 1.10 [0.80, 1.70] 1.04 [0.71, 1.66] <0.01 0.08
min_value__heart_rate 72.00 [63.00, 84.00] 72.00 [62.50, 84.00] 72.00 [61.00, 83.00] 69.50 [61.57, 82.20] 0.23 0.13
min_value__inrpt 1.40 [1.20, 1.70] 1.40 [1.20, 1.70] 1.40 [1.20, 1.70] 1.37 [1.23, 1.51] 0.36 0.25
min_value__lactate 1.50 [1.20, 2.10] 1.60 [1.10, 2.10] 1.60 [1.00, 2.27] 1.54 [1.20, 2.15] 0.87 0.14
min_value__o2_saturation_pulseoxymetry 92.00 [90.00, 94.00] 92.00 [90.00, 94.00] 89.00 [84.00, 92.00] 91.80 [89.89, 93.95] <0.001 0.54
min_value__platelet_count 159.00 [104.00, 228.00] 162.00 [105.00, 234.00] 174.00 [125.00, 233.75] 148.54 [110.98, 205.57] <0.001 0.10
min_value__potassium 3.80 [3.40, 4.20] 3.80 [3.50, 4.20] 3.90 [3.50, 4.30] 3.77 [3.41, 4.15] <0.001 0.13
min_value__respiratory_rate 13.00 [10.00, 15.00] 13.00 [10.50, 15.00] 12.00 [9.00, 15.00] 13.03 [10.09, 15.10] <0.01 0.14
min_value__sodium 137.00 [134.00, 140.00] 137.00 [134.00, 139.00] 138.00 [135.00, 140.00] 137.30 [135.08, 139.07] <0.001 0.23
min_value__urea_nitrogen 20.00 [13.00, 33.00] 21.00 [12.00, 33.00] 21.00 [13.00, 33.00] 20.68 [12.45, 32.07] 0.67 0.12
sd_value__respiratory_rate 3.77 [3.00, 4.83] 3.74 [2.97, 4.79] 3.33 [2.45, 4.76] 3.78 [2.91, 4.87] <0.001 0.08

Outcome components and cross-cohort comparability

Additional cohort-definition and diagnostic-composition variables are summarized in Supplementary Table S4. Cholangitis was recorded in 38.9% of MIMIC-IV stays, 52.0% of eICU-CRD stays, and 43.5% of local validation patients. Malignancy was recorded in 29.1% of MIMIC-IV stays, 5.0% of eICU-CRD stays, and 20.9% of local validation patients. The supplied local table also recorded biliary obstruction (20/115, 17.4%), cholecystitis (26/115, 22.6%), and gallstone diagnosis (49/115, 42.6%).

Outcome-component distributions are shown in Supplementary Table S5. In MIMIC-IV overall, severe deterioration occurred in 1646 of 2818 stays (58.4%); among patients with severe deterioration, the most frequent components were vasopressor use (1025/1646, 62.3%), prolonged ICU stay (972/1646, 59.1%), mechanical ventilation or intubation (794/1646, 48.2%), in-hospital death (445/1646, 27.0%), ICU death (274/1646, 16.6%), and renal replacement therapy/CRRT (140/1646, 8.5%). In eICU-CRD, severe deterioration occurred in 980 of 1492 stays (65.7%); mechanical ventilation or intubation (764/980, 78.0%), prolonged ICU stay (452/980, 46.1%), vasopressor use (299/980, 30.5%), in-hospital death (159/980, 16.2%), ICU death (92/980, 9.4%), and renal replacement therapy/CRRT (90/980, 9.2%) contributed to the composite outcome. Local validation had 60 events among 115 patients (52.2%); among these events, mechanical ventilation or intubation (42/60, 70.0%), ICU length of stay > 3 days (38/60, 63.3%), vasopressor use (35/60, 58.3%), renal replacement therapy/CRRT (6/60, 10.0%), in-hospital death (0/60, 0.0%), and ICU death (0/60, 0.0%) contributed to the composite outcome.

Event-related clinical differences

In the MIMIC development cohort, patients with severe deterioration had more abnormal early physiologic and biochemical profiles than patients without severe deterioration (Table 2). Representative differences included lower first bicarbonate (21.00 [18.00, 24.00] vs. 23.00 [20.00, 25.00], P < 0.001), higher first creatinine (1.20 [0.80, 2.00] vs. 1.00 [0.70, 1.40], P < 0.001), higher first lactate (2.10 [1.40, 3.40] vs. 1.70 [1.20, 2.40], P < 0.001), lower first platelet count (169.00 [110.00, 247.00] vs. 179.00 [128.75, 250.00], P < 0.01), and higher respiratory rate (20.00 [16.00, 24.00] vs. 19.00 [16.00, 23.00], P < 0.01). These differences were consistent with a clinical pattern of systemic stress, impaired perfusion, renal dysfunction, and hematologic disturbance rather than isolated cholestasis alone.

Table 2.

Event versus non-event comparison in the MIMIC development cohort

Variable No severe deterioration Severe deterioration Statistic P value
age 70.50 [59.00, 81.00] 67.00 [57.00, 78.00] Mann-Whitney U <0.001
gender 435 (53.00%) 661 (57.40%) Fisher exact 0.06
has_cholangitis 336 (41.00%) 451 (39.10%) Fisher exact 0.43
has_malignancy 221 (27.00%) 359 (31.20%) Fisher exact 0.04
first_value__alanine_aminotransferase_alt 71.00 [30.00, 182.25] 65.00 [28.00, 159.00] Mann-Whitney U 0.20
first_value__asparate_aminotransferase_ast 77.00 [39.00, 180.50] 87.00 [42.00, 202.50] Mann-Whitney U 0.09
first_value__bicarbonate 23.00 [20.00, 25.00] 21.00 [18.00, 24.00] Mann-Whitney U <0.001
first_value__creatinine 1.00 [0.70, 1.40] 1.20 [0.80, 2.00] Mann-Whitney U <0.001
first_value__heart_rate 89.00 [76.00, 104.00] 93.00 [80.00, 110.00] Mann-Whitney U <0.001
first_value__inrpt 1.40 [1.20, 1.60] 1.50 [1.30, 1.90] Mann-Whitney U <0.001
first_value__lactate 1.70 [1.20, 2.40] 2.10 [1.40, 3.40] Mann-Whitney U <0.001
first_value__o2_saturation_pulseoxymetry 97.00 [95.00, 98.00] 97.00 [94.00, 99.00] Mann-Whitney U 0.04
first_value__platelet_count 179.00 [128.75, 250.00] 169.00 [110.00, 247.00] Mann-Whitney U <0.01
first_value__potassium 3.90 [3.60, 4.30] 4.10 [3.70, 4.60] Mann-Whitney U <0.001
first_value__respiratory_rate 19.00 [16.00, 23.00] 20.00 [16.00, 24.00] Mann-Whitney U <0.01
first_value__sodium 138.00 [135.00, 141.00] 138.00 [135.00, 140.00] Mann-Whitney U 0.10
first_value__urea_nitrogen 19.00 [12.00, 29.00] 25.00 [16.00, 40.00] Mann-Whitney U <0.001
max_value__alanine_aminotransferase_alt 73.00 [32.00, 186.00] 72.00 [30.00, 187.00] Mann-Whitney U 0.89
max_value__asparate_aminotransferase_ast 80.00 [40.00, 187.00] 96.00 [46.00, 230.50] Mann-Whitney U <0.01
max_value__bicarbonate 23.00 [21.00, 26.00] 22.00 [19.00, 25.00] Mann-Whitney U <0.001
max_value__creatinine 1.00 [0.70, 1.50] 1.30 [0.90, 2.20] Mann-Whitney U <0.001
max_value__heart_rate 100.00 [87.00, 115.00] 109.00 [94.00, 125.00] Mann-Whitney U <0.001
max_value__inrpt 1.40 [1.20, 1.70] 1.60 [1.30, 2.00] Mann-Whitney U <0.001
max_value__lactate 1.70 [1.30, 2.40] 2.40 [1.50, 4.10] Mann-Whitney U <0.001
max_value__o2_saturation_pulseoxymetry 100.00 [99.00, 100.00] 100.00 [99.00, 100.00] Mann-Whitney U <0.001
max_value__platelet_count 187.00 [131.75, 253.00] 176.00 [119.00, 252.00] Mann-Whitney U 0.04
max_value__potassium 4.10 [3.80, 4.50] 4.30 [4.00, 4.90] Mann-Whitney U <0.001
max_value__respiratory_rate 27.00 [23.00, 31.00] 29.00 [25.00, 33.00] Mann-Whitney U <0.001
max_value__sodium 139.00 [136.00, 141.00] 139.00 [136.00, 142.00] Mann-Whitney U 0.12
max_value__urea_nitrogen 20.00 [13.00, 30.00] 27.00 [17.00, 43.00] Mann-Whitney U <0.001
mean_value__alanine_aminotransferase_alt 69.75 [31.00, 175.38] 68.00 [28.00, 170.00] Mann-Whitney U 0.56
mean_value__asparate_aminotransferase_ast 76.00 [39.00, 170.50] 88.50 [42.00, 207.25] Mann-Whitney U <0.01
mean_value__bicarbonate 23.00 [20.00, 25.00] 21.00 [18.00, 24.00] Mann-Whitney U <0.001
mean_value__creatinine 1.00 [0.70, 1.40] 1.23 [0.85, 2.02] Mann-Whitney U <0.001
mean_value__heart_rate 83.53 [72.62, 94.31] 89.50 [77.47, 102.81] Mann-Whitney U <0.001
mean_value__inrpt 1.35 [1.20, 1.60] 1.50 [1.30, 1.90] Mann-Whitney U <0.001
mean_value__lactate 1.65 [1.20, 2.15] 2.00 [1.40, 3.16] Mann-Whitney U <0.001
mean_value__o2_saturation_pulseoxymetry 96.33 [95.16, 97.50] 96.81 [95.29, 98.23] Mann-Whitney U <0.001
mean_value__platelet_count 177.50 [126.50, 248.25] 163.22 [107.08, 235.00] Mann-Whitney U <0.001
mean_value__potassium 3.90 [3.65, 4.30] 4.10 [3.80, 4.50] Mann-Whitney U <0.001
mean_value__respiratory_rate 18.96 [16.83, 21.54] 19.75 [17.23, 22.81] Mann-Whitney U <0.001
mean_value__sodium 138.00 [135.00, 140.67] 138.00 [135.00, 140.33] Mann-Whitney U 0.09
mean_value__urea_nitrogen 19.00 [12.00, 29.00] 25.00 [15.81, 40.94] Mann-Whitney U <0.001
min_value__alanine_aminotransferase_alt 67.00 [29.00, 168.00] 60.00 [27.00, 144.00] Mann-Whitney U 0.11
min_value__asparate_aminotransferase_ast 71.00 [35.00, 153.50] 78.00 [38.00, 167.50] Mann-Whitney U 0.09
min_value__bicarbonate 22.00 [20.00, 25.00] 20.00 [17.00, 23.00] Mann-Whitney U <0.001
min_value__creatinine 0.90 [0.70, 1.30] 1.10 [0.80, 1.80] Mann-Whitney U <0.001
min_value__heart_rate 71.00 [62.00, 81.00] 74.00 [63.00, 86.00] Mann-Whitney U <0.001
min_value__inrpt 1.30 [1.20, 1.50] 1.40 [1.20, 1.70] Mann-Whitney U <0.001
min_value__lactate 1.40 [1.10, 1.90] 1.60 [1.20, 2.30] Mann-Whitney U <0.001
min_value__o2_saturation_pulseoxymetry 92.00 [90.50, 94.00] 92.00 [90.00, 94.00] Mann-Whitney U 0.04
min_value__platelet_count 171.50 [121.00, 241.00] 150.00 [93.00, 218.75] Mann-Whitney U <0.001
min_value__potassium 3.80 [3.50, 4.10] 3.80 [3.40, 4.20] Mann-Whitney U 0.14
min_value__respiratory_rate 13.00 [10.50, 15.00] 13.00 [10.00, 15.00] Mann-Whitney U 0.24
min_value__sodium 138.00 [134.00, 140.00] 136.00 [133.00, 139.00] Mann-Whitney U <0.001
min_value__urea_nitrogen 18.00 [11.00, 28.00] 23.00 [15.00, 39.00] Mann-Whitney U <0.001
sd_value__respiratory_rate 3.53 [2.86, 4.40] 3.98 [3.13, 5.08] Mann-Whitney U <0.001

Feature selection and conventional regression

The model-development workflow retained 12 early predictors after elastic net selection, bootstrap stability assessment, permutation importance, feature-level de-duplication, and correlation pruning: mean sodium, maximum lactate, minimum platelet count, maximum creatinine, mean pulse oximetry oxygen saturation, mean heart rate, minimum ALT, maximum respiratory rate, minimum AST, minimum blood urea nitrogen, age, and first INR. Feature selection paths and importance results are shown in Fig. 2, and the correlation clustering and feature-count AUROC plateau are shown in Supplementary Figure S2. In conventional multivariable logistic regression, higher maximum lactate (OR 1.81, 95% CI 1.50–2.18, P < 0.001), higher minimum AST (OR 1.76, 95% CI 1.23–2.52, P < 0.01), higher minimum blood urea nitrogen (OR 1.38, 95% CI 1.18–1.61, P < 0.001), higher mean heart rate (OR 1.30, 95% CI 1.16–1.45, P < 0.001), and higher maximum respiratory rate (OR 1.25, 95% CI 1.12–1.39, P < 0.001) were associated with severe deterioration. Lower platelet count (OR 0.87, 95% CI 0.79–0.96, P < 0.01) and lower minimum ALT (OR 0.62, 95% CI 0.48–0.81, P < 0.001) were also retained in the multivariable model. Collinearity, conventional multivariable regression, and stability/importance details are reported in Supplementary Table S6, Supplementary Table S7, and Supplementary Table S8, respectively.

Fig. 2.

Fig. 2

Feature selection. A Elastic net cross-validation. B LASSO coefficient paths. C Composite selected-predictor importance

Model performance and clinical utility

Figure 3 displays the five highest-AUROC machine-learning models: CatBoost, random forest, XGBoost, extra trees, and gradient boosting, with AUROC values of 0.73, 0.73, 0.73, 0.72, and 0.72, respectively. Supplementary Table S9 compares all candidate models during internal validation. Elastic net logistic regression, which was also included in the candidate-model comparison, achieved AUROC 0.70, AUPRC 0.78, Brier score 0.22, and calibration slope 0.95. Because the AUROC gain of the more complex machine-learning models was small and the study aimed to produce a transparent bedside tool, elastic net logistic regression was selected as the final locked model after internal comparison and before any eICU-CRD or local validation. The five machine-learning models in Fig. 3 were therefore retained as benchmark comparators and were not refitted, reselected, or tuned in external cohorts.

Fig. 3.

Fig. 3

Internal machine-learning benchmark performance. A ROC curves. B Calibration curves. C Decision curve analysis. D Clinical impact curves

The locked elastic net model was evaluated unchanged in all validation cohorts (Table 3). Performance was as follows: MIMIC internal validation: AUROC 0.70 (95% CI 0.66–0.73), AUPRC 0.78, Brier score 0.22; eICU external validation: AUROC 0.64 (95% CI 0.62–0.67), AUPRC 0.78, Brier score 0.24; Local validation: AUROC 0.63 (95% CI 0.53–0.73), AUPRC 0.67, Brier score 0.24. Validation ROC, calibration, decision curve, and clinical impact panels are shown in (Fig. 4). Supplementary Figure S3 provides the calibration belt.

Table 3.

Validation performance of the locked elastic net model and comparator scores

Cohort Model N Events Event rate AUROC AUROC 95% CI AUPRC AUPRC 95% CI Brier score Calibration intercept Calibration slope Threshold Sensitivity Specificity PPV NPV True positives False positives Missed events True negatives
MIMIC internal validation Elastic Net Logistic 846 494 0.58 0.70 0.66-0.73 0.78 0.74-0.82 0.22 0.36 0.95 0.45 0.66 0.63 0.71 0.57 326 130 168 222
MIMIC internal validation qSOFA proxy 846 494 0.58 0.60 0.57-0.63 0.64 0.61-0.68 0.32 -0.21 0.07 0.50 0.78 0.42 0.65 0.58 385 204 109 148
MIMIC internal validation SIRS proxy 846 494 0.58 0.60 0.56-0.64 0.65 0.62-0.69 0.26 0.16 0.09 0.50 0.65 0.48 0.64 0.50 322 183 172 169
MIMIC internal validation Lactate 567 393 0.69 0.64 0.59-0.69 0.82 0.77-0.85 0.55 2.12 0.48 0.50 0.03 1.00 1.00 0.31 13 0 380 174
MIMIC internal validation Low bicarbonate 835 488 0.58 0.67 0.63-0.71 0.75 0.71-0.79 0.23 0.25 0.88 0.50 0.62 0.63 0.70 0.54 303 127 185 220
MIMIC internal validation Total bilirubin 715 425 0.59 0.53 0.49-0.57 0.63 0.58-0.69 0.51 0.58 0.06 0.50 0.03 0.99 0.79 0.41 11 3 414 287
MIMIC internal validation Creatinine 835 488 0.58 0.65 0.61-0.69 0.71 0.66-0.76 0.43 1.48 0.52 0.50 0.04 0.98 0.77 0.42 20 6 468 341
eICU external validation Elastic Net Logistic 1492 980 0.66 0.64 0.62-0.67 0.78 0.76-0.81 0.24 0.65 0.68 0.45 0.61 0.57 0.73 0.43 597 218 383 294
eICU external validation qSOFA proxy 1492 980 0.66 0.57 0.54-0.60 0.69 0.66-0.72 0.29 0.41 0.04 0.50 0.66 0.48 0.71 0.42 642 268 338 244
eICU external validation SIRS proxy 1492 980 0.66 0.58 0.55-0.60 0.70 0.68-0.73 0.25 0.61 0.12 0.50 0.49 0.62 0.72 0.39 484 192 496 320
eICU external validation Lactate 598 439 0.73 0.60 0.55-0.64 0.82 0.79-0.86 0.61 2.00 0.33 0.50 0.04 1.00 1.00 0.27 16 0 423 159
eICU external validation Low bicarbonate 1330 911 0.68 0.60 0.57-0.63 0.77 0.73-0.80 0.26 0.81 0.33 0.50 0.44 0.74 0.78 0.38 400 110 511 309
eICU external validation Total bilirubin 1126 755 0.67 0.54 0.50-0.57 0.69 0.66-0.73 0.61 1.05 0.09 0.50 0.00 1.00 1.00 0.33 3 0 752 371
eICU external validation Creatinine 1382 927 0.67 0.64 0.61-0.67 0.78 0.75-0.81 0.55 2.08 0.50 0.50 0.02 0.99 0.83 0.33 15 3 912 452
Local validation Elastic Net Logistic 115 60 0.52 0.63 0.53-0.73 0.67 0.57-0.79 0.24 0.14 0.56 0.45 0.53 0.67 0.64 0.57 32 18 28 37
Local validation qSOFA proxy 115 60 0.52 0.51 0.46-0.57 0.53 0.43-0.62 0.47 -0.03 0.01 0.50 0.92 0.11 0.53 0.55 55 49 5 6
Local validation SIRS proxy 115 60 0.52 0.48 0.37-0.57 0.51 0.41-0.60 0.34 0.13 -0.01 0.50 0.85 0.18 0.53 0.53 51 45 9 10
Local validation Lactate 83 49 0.59 0.65 0.53-0.78 0.71 0.58-0.86 0.40 0.61 0.13 0.50 0.08 0.97 0.80 0.42 4 1 45 33
Local validation Low bicarbonate 115 60 0.52 0.66 0.57-0.77 0.73 0.62-0.83 0.23 0.15 0.23 0.50 0.53 0.82 0.76 0.62 32 10 28 45
Local validation Creatinine 115 60 0.52 0.61 0.51-0.73 0.64 0.54-0.79 0.37 0.12 0.02 0.50 0.10 0.96 0.75 0.50 6 2 54 53

Fig. 4.

Fig. 4

Locked-model validation. A ROC curves. B Calibration curves. C Decision curve analysis. D Clinical impact curves

Additional complete-case and subgroup sensitivity analyses are summarized in Supplementary Table S10.

The locked model also showed incremental discrimination compared with available bedside proxies and single markers (Table 3 and Supplementary Table S11). In MIMIC internal validation, AUROC was 0.70 for the locked model compared with 0.60 for qSOFA, 0.60 for SIRS, 0.64 for lactate, 0.67 for low bicarbonate, 0.65 for creatinine, and 0.53 for total bilirubin. In eICU-CRD, AUROC was 0.64 for the locked model compared with 0.57 for qSOFA, 0.58 for SIRS, 0.60 for lactate, 0.60 for low bicarbonate, 0.64 for creatinine, and 0.54 for total bilirubin. In the local cohort, the locked model AUROC was 0.63, compared with 0.51 for qSOFA, 0.48 for SIRS, 0.65 for lactate, 0.66 for low bicarbonate, and 0.61 for creatinine.

Subgroup performance across age, sex, cholangitis, malignancy, renal dysfunction, lactate measurement, and bicarbonate strata is reported in Supplementary Table S12.

Exploratory phenotype profiles are summarized in Supplementary Table S13, separating patients into clinically recognizable patterns of acid-base/perfusion disturbance, renal-electrolyte dysfunction, and vital-sign instability.

For transparent deployment, the locked model coefficients and simplified point-score translation are provided in Supplementary Table S14 and Supplementary Table S15. For the simplified score, each point value was calculated as the absolute standardized coefficient divided by the largest absolute standardized coefficient and multiplied by 10; coefficient signs are retained in the coefficient tables to indicate direction, whereas point values summarize relative weight.

At the locked threshold of 0.45, sensitivity/specificity were 0.66/0.63 in MIMIC internal validation, 0.61/0.57 in eICU external validation, and 0.53/0.67 in local validation. Threshold-specific consequences are provided in Supplementary Table S16, numerical decision-curve estimates in Supplementary Table S2, and threshold sensitivity analyses in Supplementary Table S3. At the locked threshold, model net benefit was 0.259 in MIMIC internal validation, 0.280 in eICU-CRD, and 0.149 locally, corresponding to positive net benefit versus treat-none in all validation cohorts. Relative to treat-all, the locked threshold produced small positive differences in MIMIC internal validation and local validation, and a negative difference in eICU-CRD, where the event rate was higher. The highest thresholds preserving at least 80% sensitivity were 0.38 in MIMIC internal validation, 0.38 in eICU-CRD, and 0.36 locally. These threshold analyses are reported descriptively and indicate variation in operating characteristics across cohorts.

Interpretation, uncertainty, phenotypes, and calculator

Figure 5 summarizes model interpretation. The SHAP beeswarm and bar plots ranked lactate, renal function, platelet count, sodium, oxygenation, heart rate, respiratory rate, and transaminase summaries among the most influential predictors. The representative waterfall plots showed how high predicted risk was usually produced by multiple small-to-moderate physiologic abnormalities rather than a single dominant measurement. Supplementary Figure S4 provides dependence plots for the retained predictors, supporting nonlinear-looking risk gradients for lactate, creatinine, platelet count, sodium, and vital-sign summaries.

Fig. 5.

Fig. 5

SHAP interpretation. A Global beeswarm plot. B Mean absolute SHAP importance. C-F Representative true-positive, false-positive, true-negative, and false-negative waterfall plots

Bootstrap patient-level uncertainty is reported in Supplementary Table S17 and Supplementary Figure S5. Predictions whose 95% risk interval crossed the locked threshold occurred in MIMIC internal validation: 27.78%; eICU external validation: 32.24%; Local validation: 26.09%, defining a clinically important gray zone. Supplementary Figure S6 provides the corresponding phenotype visualization. A local HTML calculator implementing the locked model was generated, with the manuscript screenshot shown in (Fig. 6).

Fig. 6.

Fig. 6

Web calculator screenshot for the locked elastic net model

Discussion

In this study, we developed and externally validated an interpretable early risk model for short-term severe clinical deterioration among ICU patients with gallstone-related biliary disease. Using routinely available variables from the first 24 h of ICU admission, the locked model showed reproducible discrimination across MIMIC-IV, eICU-CRD, and the local validation cohort, while retaining a compact structure suitable for clinical interpretation. These findings suggest that early physiological, inflammatory, hepatic, renal, and coagulation-related information can provide useful risk stratification for identifying patients at higher risk of organ support requirement or prolonged intensive care. The model is best interpreted as an adjunctive risk-estimation tool that complements established severity assessment and clinical judgment.

The clinical meaning of the retained predictors is important. Lactate, bicarbonate-related variables in descriptive analyses, respiratory rate, heart rate, oxygen saturation, creatinine, blood urea nitrogen, platelet count, INR, sodium, and transaminase summaries do not describe one organ in isolation. Together, they describe perfusion stress, acid-base disruption, respiratory compensation, kidney injury, coagulation or hematologic disturbance, and hepatobiliary injury. This pattern is consistent with recent cholangitis studies showing prognostic value for inflammatory, nutritional, acid-base, lactate, platelet, and renal markers [15–21]. It also helps explain why bilirubin or transaminases alone are insufficient as a bedside deterioration tool: patients deteriorate when biliary obstruction or infection becomes systemic, not simply when a hepatobiliary marker is abnormal.

Our findings align with recent work showing that admission variables can predict mortality or severe disease in acute cholangitis, but this study extends that literature in several clinically relevant ways. Recent models have focused on severe acute cholangitis occurrence, mortality, or cholelithiasis-induced acute cholangitis outcomes [4, 5, 15]. Other studies have refined TG18 application or evaluated novel ratios such as NLR, BUN-to-albumin, RDW-to-albumin, or neutrophil-to-albumin markers [17, 20–25]. Those efforts are valuable, but they often leave the clinician with either a single-marker signal or a model developed in a narrow population. By contrast, the present analysis intentionally used a broader gallstone-related biliary disease population, a fixed early ICU window, cross-database validation, and a composite endpoint reflecting escalation of organ support.

The decrease in AUROC during external testing is clinically and methodologically interpretable. MIMIC-IV, eICU-CRD, and the local cohort differed in diagnostic ascertainment, malignancy prevalence, cholangitis prevalence, ICU admission context, and observable outcome components. The component analysis showed that the MIMIC-IV composite was commonly driven by vasopressor use and prolonged ICU stay, whereas the eICU-CRD composite had a larger contribution from mechanical ventilation or intubation. In the supplied local component table, the composite was mainly driven by mechanical ventilation or intubation, prolonged ICU stay, and vasopressor use, with no recorded in-hospital or ICU deaths. These differences are compatible with variation in ICU admission thresholds, organ-support practices, and source-control pathways. Therefore, the external AUROC decrease should be read as a transportability signal rather than as simple model failure. It also explains why calibration, net benefit, threshold consequences, and gray-zone uncertainty are as important as AUROC for deciding how the model should be used.

For acute cholecystitis and adjacent gallstone-related disease, the broader literature similarly supports a need for early risk tools that complement surgical judgment. Recent studies have developed preoperative scores for severe acute cholecystitis, predicted morbidity and mortality after early cholecystectomy, examined relapse after non-operative management, and modeled subtotal cholecystectomy or complicated cholecystitis risk [6, 7, 26–30]. Explainable machine-learning models for gangrenous cholecystitis and models predicting ERCP after emergency laparoscopic cholecystectomy demonstrate growing interest in deployable, interpretable tools for biliary surgical decision-making [31–33]. Our study differs by centering on short-term critical deterioration rather than operative difficulty alone, which is the decision clinicians face when deciding who needs closer monitoring, urgent senior review, or earlier ICU-level intervention.

The clinical use case is therefore a risk-supported workflow. A high predicted risk should prompt active review for reversible drivers: inadequate source control, evolving sepsis, hypoperfusion, kidney injury, respiratory compromise, coagulopathy, or electrolyte derangement. It may support earlier repeat lactate, renal function, coagulation, and oxygenation assessment; escalation of monitoring; multidisciplinary discussion with endoscopy, interventional radiology, and surgery; and lower thresholds for ICU-level review. A low predicted risk should not delay antibiotics, biliary drainage, surgery, or other standard care when conventional indications are present. The bootstrap uncertainty analysis is particularly relevant because 26.1–32.2% of validation patients had confidence intervals crossing the locked threshold. For these gray-zone patients, the appropriate response is repeat clinical assessment, short-interval laboratory review, and senior decision-making rather than automatic escalation or automatic reassurance.

The study also has limitations. First, MIMIC-IV cases were identified by ICD codes, whereas eICU-CRD cases were identified through diagnosis text and the local cohort used a standardized local definition; this may introduce cohort-definition differences. Second, the outcome included treatment-based components such as vasopressor use, ventilation, CRRT, and prolonged ICU stay. These components are clinically meaningful but are partly practice-dependent, and the component distribution differed between MIMIC-IV and eICU-CRD. Third, biliary drainage timing, surgical strategy, TG18 severity grading, and full SOFA could not be reconstructed consistently across all three harmonized datasets, so qSOFA/SIRS proxies and core biomarkers were used as comparators. Fourth, the local validation cohort was small (n = 115, 60 events) and is best interpreted as secondary feasibility validation with wide uncertainty rather than as a definitive external validation. Fifth, the analysis was retrospective; prospective workflow testing and impact studies are required before deployment. Recent artificial intelligence applications in gallstone pancreatitis and cholelithiasis imaging underscore the broader movement toward data-driven biliary care, but also the need for transparent validation before clinical adoption [34, 35].

Conclusions

An interpretable 0-24-hour model using routine clinical variables was developed in MIMIC-IV and externally validated in eICU-CRD and a local real-world cohort for short-term severe deterioration in gallstone-related biliary disease. The model captures a clinically plausible multi-system deterioration pattern involving perfusion, renal function, platelets/coagulation, electrolytes, oxygenation, and vital-sign instability. Its role is best framed as an early warning and risk-communication aid that complements guideline-based diagnosis, source-control decisions, and bedside clinical judgment.

Supplementary Information

12876_2026_5080_MOESM1_ESM.docx (29KB, docx)

Supplementary Material 1: Table S1. Missingness of locked model predictors across cohorts.

12876_2026_5080_MOESM2_ESM.docx (30.2KB, docx)

Supplementary Material 2: Table S2. Numerical decision-curve analysis at selected risk thresholds.

12876_2026_5080_MOESM3_ESM.docx (29.5KB, docx)

Supplementary Material 3: Table S3. Threshold sensitivity analysis across validation cohorts.

12876_2026_5080_MOESM4_ESM.docx (29KB, docx)

Supplementary Material 4: Table S4. Cohort-definition and diagnostic-composition comparability across cohorts.

12876_2026_5080_MOESM5_ESM.docx (30.5KB, docx)

Supplementary Material 5: Table S5. Outcome-component distribution across cohorts.

12876_2026_5080_MOESM6_ESM.docx (38.6KB, docx)

Supplementary Material 6: Table S6. Collinearity analysis.

12876_2026_5080_MOESM7_ESM.docx (37.1KB, docx)

Supplementary Material 7: Table S7. Multivariable logistic regression.

12876_2026_5080_MOESM8_ESM.docx (39.3KB, docx)

Supplementary Material 8: Table S8. LASSO, bootstrap stability, and permutation importance.

12876_2026_5080_MOESM9_ESM.docx (38.5KB, docx)

Supplementary Material 9: Table S9. Internal-validation model screening.

12876_2026_5080_MOESM10_ESM.docx (40.1KB, docx)

Supplementary Material 10: Table S10. Sensitivity analyses.

12876_2026_5080_MOESM11_ESM.docx (37.5KB, docx)

Supplementary Material 11: Table S11. Single-marker and simple-score comparator performance.

12876_2026_5080_MOESM12_ESM.docx (42.4KB, docx)

Supplementary Material 12: Table S12. Subgroup performance.

12876_2026_5080_MOESM13_ESM.docx (36.6KB, docx)

Supplementary Material 13: Table S13. Exploratory phenotype profiles.

12876_2026_5080_MOESM14_ESM.docx (37.2KB, docx)

Supplementary Material 14: Table S14. Locked model coefficients.

12876_2026_5080_MOESM15_ESM.docx (36.9KB, docx)

Supplementary Material 15: Table S15. Simplified risk score.

12876_2026_5080_MOESM16_ESM.docx (38.4KB, docx)

Supplementary Material 16: Table S16. Threshold-specific decision consequences.

12876_2026_5080_MOESM17_ESM.docx (36.5KB, docx)

Supplementary Material 17: Table S17. Individual risk uncertainty.

12876_2026_5080_MOESM18_ESM.png (667.2KB, png)

Supplementary Material 18: Figure S1. Missingness rate and missingness pattern.

12876_2026_5080_MOESM19_ESM.png (597.1KB, png)

Supplementary Material 19: Figure S2. Correlation clustering and feature-count AUROC plateau.

12876_2026_5080_MOESM20_ESM.png (365KB, png)

Supplementary Material 20: Figure S3. Calibration belt.

12876_2026_5080_MOESM21_ESM.png (1.7MB, png)

Supplementary Material 21: Figure S4. SHAP dependence plots.

12876_2026_5080_MOESM22_ESM.png (94.3KB, png)

Supplementary Material 22: Figure S5. Individual risk uncertainty.

12876_2026_5080_MOESM23_ESM.png (507.7KB, png)

Supplementary Material 23: Figure S6. Exploratory phenotype clusters.

Acknowledgements

The authors thank Dr. Tu from Mengchao Hepatobiliary Hospital for providing the local clinical validation data. The authors also acknowledge the contributors and maintainers of the MIMIC-IV and eICU-CRD databases.

Authors’ contributions

Qianli Chen conceived the study, performed data extraction and analysis, generated tables and figures, and drafted the manuscript. Xiaoxiong Wu supervised the study, contributed to study design and clinical interpretation, critically revised the manuscript, and approved the final version. All authors read and approved the final manuscript.

Funding

This research received no specific grant from any funding agency in the public, commercial, or not-for-profit sectors.

Data availability

MIMIC-IV version 3.1 is available through PhysioNet for approved credentialed users (https://doi.org/10.13026/kpb9-mt58). The eICU Collaborative Research Database is available through PhysioNet for approved credentialed users who complete the required training and data-use agreements (https://physionet.org/content/eicu-crd/2.0/). The local validation dataset is not publicly available because of institutional and privacy restrictions, but may be made available from the corresponding author upon reasonable request and with appropriate ethical and institutional approval.

Code availability

Reproducible extraction and analysis scripts are available from the corresponding author upon reasonable request.

Declarations

Ethics approval and consent to participate

The study was conducted in accordance with the Declaration of Helsinki. MIMIC-IV and eICU-CRD are de-identified public critical care databases available to credentialed users after required data-use training and approval. The local retrospective dataset was approved by the Ethics Committee of Mengchao Hepatobiliary Hospital of Fujian Medical University (approval No. 2021-084-01). The local data were analyzed after removal of sensitive identifying information. The requirement for informed consent to participate was waived by the Ethics Committee of Mengchao Hepatobiliary Hospital of Fujian Medical University because this study used retrospective de-identified data.

Consent for publication

Not applicable because the analysis used de-identified data and reports no identifiable individual information.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

References

  • 1.Nve E, Badia JM, Amillo-Zaragueta M, et al. Early Management of Severe Biliary Infection in the Era of the Tokyo Guidelines. J Clin Med. 2023;12(14). 10.3390/jcm12144711. [DOI] [PMC free article] [PubMed]
  • 2.Kiriyama S, Kozaka K, Takada T, et al. Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholangitis (with videos). J Hepatobiliary Pancreat Sci. 2018;25(1):17–30. 10.1002/jhbp.512. [DOI] [PubMed] [Google Scholar]
  • 3.Yokoe M, Hata J, Takada T, et al. Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholecystitis (with videos). J Hepatobiliary Pancreat Sci. 2018;25(1):41–54. 10.1002/jhbp.515. [DOI] [PubMed] [Google Scholar]
  • 4.Hocine K, Briant AR, Chaigneau T, et al. Early prediction of mortality in acute cholangitis: elaboration of a new simple prognostic score. Hepatobiliary Pancreat Dis Int. 2025;24(5):535–42. 10.1016/j.hbpd.2025.06.006. [DOI] [PubMed] [Google Scholar]
  • 5.Huang S, Zhou Y, Liang Y, et al. Machine-learning-derived online prediction models of outcomes for patients with cholelithiasis-induced acute cholangitis: development and validation in two retrospective cohorts. EClinicalMedicine. 2024;76:102820. 10.1016/j.eclinm.2024.102820. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Kuhlenschmidt K, Taveras LR, Schuster KM, et al. A novel preoperative score to predict severe acute cholecystitis. J Trauma Acute Care Surg. 2024;96(6):870–5. 10.1097/TA.0000000000004308. [DOI] [PubMed] [Google Scholar]
  • 7.Fugazzola P, Cobianchi L, Di Martino M, et al. Prediction of morbidity and mortality after early cholecystectomy for acute calculous cholecystitis: results of the S.P.Ri.M.A.C.C. study. World J Emerg Surg. 2023;18(1):20. 10.1186/s13017-023-00488-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Huang Y, Yin Z, Han W. Anion gap associated with 28-days all-cause mortality in Acute cholangitis patients admitted to the intensive care unit in MIMIC-IV database: a retrospective cohort study. Front Med (Lausanne). 2025;12:1591096. 10.3389/fmed.2025.1591096. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 9.Oura H, Nishino T, Murakami D, et al. Diagnostic value of the serum lactate level as a predictor of bacteremia in patients with acute cholangitis. J Hepatobiliary Pancreat Sci. 2023;30(8):1055–64. 10.1002/jhbp.1343. [DOI] [PubMed] [Google Scholar]
  • 10.Tang L, Wan W, Zhang J, et al. Acute kidney injury following acute cholangitis: a risk multiplier for adverse outcomes and healthcare utilization. Shock. 2025;63(2):226–32. 10.1097/SHK.0000000000002462. [DOI] [PubMed] [Google Scholar]
  • 11.Johnson AEW, Bulgarelli L, Shen L, et al. MIMIC-IV, a freely accessible electronic health record dataset. Sci Data. 2023;10(1):1. 10.1038/s41597-022-01899-x. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 12.Pollard TJ, Johnson AEW, Raffa JD, et al. The eICU Collaborative research database, a freely available multi-center database for critical care research. Sci Data. 2018;5:180178. 10.1038/sdata.2018.178. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Collins GS, Moons KGM, Dhiman P, et al. TRIPOD + AI statement: updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ. 2024;385:e078378. 10.1136/bmj-2023-078378. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Moons KGM, Damen JAA, Kaul T, et al. PROBAST + AI: an updated quality, risk of bias, and applicability assessment tool for prediction models using regression or artificial intelligence methods. BMJ. 2025;388:e082505. 10.1136/bmj-2024-082505. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 15.Xu J, Xu ZX, Zhuang J, et al. A nomogram-based model for predicting the risk of severe acute cholangitis occurrence. Int J Gen Med. 2023;16:3139–50. 10.2147/IJGM.S416108. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 16.Ye S, Lyu Y, Wang B. The predictive value of different laboratory indicators based on the 2018 Tokyo guidelines for the severity of acute cholangitis. J Emerg Med. 2023;65(4):e280–9. 10.1016/j.jemermed.2023.05.013. [DOI] [PubMed] [Google Scholar]
  • 17.Li D, Sun J, Qi C, et al. Predicting severity of inpatient acute cholangitis: combined neutrophil-to-lymphocyte ratio and prognostic nutritional index. BMC Gastroenterol. 2024;24(1):468. 10.1186/s12876-024-03560-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 18.Yesil B, Caliskan AR, Kosar K, et al. Lymphocyte count and NLR as predictive value for the severity of acute cholangitis. Eur Rev Med Pharmacol Sci. 2023;27(18):8732–9. 10.26355/eurrev_202309_33795. [DOI] [PubMed] [Google Scholar]
  • 19.Zhang HY, Xiao HL, Wang GX, et al. Predictive value of presepsin and acylcarnitines for severity and biliary drainage in acute cholangitis. World J Gastroenterol. 2023;29(16):2502–14. 10.3748/wjg.v29.i16.2502. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 20.Liu J, Wang P, Ji J. Neutrophil percentage-to-albumin ratio is associated with 30-day all-cause mortality in septic cholangitis patients: a cohort study. Shock. 2025;63(6):863–9. 10.1097/SHK.0000000000002574. [DOI] [PubMed] [Google Scholar]
  • 21.Acehan F, Camli H, Kalkan C, et al. Red cell distribution width-to-albumin ratio is a simple promising prognostic marker in acute cholangitis requiring biliary drainage. Hepatobiliary Pancreat Dis Int. 2024;23(5):487–94. 10.1016/j.hbpd.2023.08.005. [DOI] [PubMed] [Google Scholar]
  • 22.Jung HM, Paik J, Lee M, et al. Clinical utility of the tokyo guidelines 2018 for acute cholangitis in the emergency department and comparison with novel markers (Neutrophil-to-Lymphocyte and Blood Nitrogen Urea-to-Albumin Ratios). J Clin Med. 2024;13(8). 10.3390/jcm13082306. [DOI] [PMC free article] [PubMed]
  • 23.Jaan A, Zubair A, Farooq U, et al. Impact of frailty on outcomes and biliary drainage strategies in acute cholangitis: a retrospective cohort analysis. Clin Res Hepatol Gastroenterol. 2025;49(4):102568. 10.1016/j.clinre.2025.102568. [DOI] [PubMed] [Google Scholar]
  • 24.Ganie BA, Javaid Wani S, Qadri U, et al. Diagnostic and therapeutic value of endoscopic retrograde cholangiopancreatography in acute cholangitis: a study from Kashmir Valley, India. Cureus. 2024;16(11):e74396. 10.7759/cureus.74396. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Hue NT, Thi Huyen Trang N, Anh Tuan N, et al. Delayed endoscopic retrograde cholangiopancreatography: a game-changer for acute cholangitis patients in a resource-limited setting. Ther Adv Gastroenterol. 2025;18:17562848251329868. 10.1177/17562848251329868. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Helenius L, Linder F, Osterman E. Relapse in gallstone disease after non-operative management of acute cholecystitis: a population-based study. BMJ Open Gastroenterol. 2025;12(1). 10.1136/bmjgast-2024-001680. [DOI] [PMC free article] [PubMed]
  • 27.Lucocq J, Hamilton D, Bakhiet A, et al. Derivation and validation of a predictive model for subtotal cholecystectomy. Surg Endosc. 2024;38(11):6551–9. 10.1007/s00464-024-11241-8. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 28.Kao CH, Liu YH, Chen WK, et al. Value of monocyte distribution width for predicting severe cholecystitis: a retrospective cohort study. Clin Chem Lab Med. 2023;61(10):1850–7. 10.1515/cclm-2023-0195. [DOI] [PubMed] [Google Scholar]
  • 29.Lee SW, Tsai CH, Lin HA, et al. Pericholecystic fat stranding as a predictive factor of length of stays of patients with acute cholecystitis: A Novel Scoring Model. J Clin Med. 2024;13(19). 10.3390/jcm13195734. [DOI] [PMC free article] [PubMed]
  • 30.Chen Y, Kuo N, Lin HA, et al. Clinical and imaging characteristics to discriminate between complicated and uncomplicated acute cholecystitis: a regression model and decision tree analysis. Diagnostics (Basel). 2025;15(14). 10.3390/diagnostics15141777. [DOI] [PMC free article] [PubMed]
  • 31.Hu Y, Chen Y, Zhao H. Development and validation of an explainable machine learning model for gangrenous cholecystitis prediction: a multicenter retrospective study. J Inflamm Res. 2025;18:17747–58. 10.2147/JIR.S552926. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 32.Ma Y, Luo M, Guan G, et al. An explainable predictive machine learning model of gangrenous cholecystitis based on clinical data: a retrospective single center study. World J Emerg Surg. 2025;20(1):1. 10.1186/s13017-024-00571-6. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Akabane S, Iwagami M, Bell-Allen N, et al. Machine learning-based prediction for incidence of endoscopic retrograde cholangiopancreatography after emergency laparoscopic cholecystectomy: A retrospective, multicenter cohort study. Surg Endosc. 2025;39(3):1770–7. 10.1007/s00464-024-11492-5. [DOI] [PubMed] [Google Scholar]
  • 34.Ma Y, Yue P, Zhang J, et al. Early prediction of acute gallstone pancreatitis severity: a novel machine learning model based on CT features and open access online prediction platform. Ann Med. 2024;56(1):2357354. 10.1080/07853890.2024.2357354. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Ahmed AS, Ahmed SS, Mohamed S, et al. Advancements in cholelithiasis diagnosis: a systematic review of machine learning applications in imaging analysis. Cureus. 2024;16(8):e66453. 10.7759/cureus.66453. [DOI] [PMC free article] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

12876_2026_5080_MOESM1_ESM.docx (29KB, docx)

Supplementary Material 1: Table S1. Missingness of locked model predictors across cohorts.

12876_2026_5080_MOESM2_ESM.docx (30.2KB, docx)

Supplementary Material 2: Table S2. Numerical decision-curve analysis at selected risk thresholds.

12876_2026_5080_MOESM3_ESM.docx (29.5KB, docx)

Supplementary Material 3: Table S3. Threshold sensitivity analysis across validation cohorts.

12876_2026_5080_MOESM4_ESM.docx (29KB, docx)

Supplementary Material 4: Table S4. Cohort-definition and diagnostic-composition comparability across cohorts.

12876_2026_5080_MOESM5_ESM.docx (30.5KB, docx)

Supplementary Material 5: Table S5. Outcome-component distribution across cohorts.

12876_2026_5080_MOESM6_ESM.docx (38.6KB, docx)

Supplementary Material 6: Table S6. Collinearity analysis.

12876_2026_5080_MOESM7_ESM.docx (37.1KB, docx)

Supplementary Material 7: Table S7. Multivariable logistic regression.

12876_2026_5080_MOESM8_ESM.docx (39.3KB, docx)

Supplementary Material 8: Table S8. LASSO, bootstrap stability, and permutation importance.

12876_2026_5080_MOESM9_ESM.docx (38.5KB, docx)

Supplementary Material 9: Table S9. Internal-validation model screening.

12876_2026_5080_MOESM10_ESM.docx (40.1KB, docx)

Supplementary Material 10: Table S10. Sensitivity analyses.

12876_2026_5080_MOESM11_ESM.docx (37.5KB, docx)

Supplementary Material 11: Table S11. Single-marker and simple-score comparator performance.

12876_2026_5080_MOESM12_ESM.docx (42.4KB, docx)

Supplementary Material 12: Table S12. Subgroup performance.

12876_2026_5080_MOESM13_ESM.docx (36.6KB, docx)

Supplementary Material 13: Table S13. Exploratory phenotype profiles.

12876_2026_5080_MOESM14_ESM.docx (37.2KB, docx)

Supplementary Material 14: Table S14. Locked model coefficients.

12876_2026_5080_MOESM15_ESM.docx (36.9KB, docx)

Supplementary Material 15: Table S15. Simplified risk score.

12876_2026_5080_MOESM16_ESM.docx (38.4KB, docx)

Supplementary Material 16: Table S16. Threshold-specific decision consequences.

12876_2026_5080_MOESM17_ESM.docx (36.5KB, docx)

Supplementary Material 17: Table S17. Individual risk uncertainty.

12876_2026_5080_MOESM18_ESM.png (667.2KB, png)

Supplementary Material 18: Figure S1. Missingness rate and missingness pattern.

12876_2026_5080_MOESM19_ESM.png (597.1KB, png)

Supplementary Material 19: Figure S2. Correlation clustering and feature-count AUROC plateau.

12876_2026_5080_MOESM20_ESM.png (365KB, png)

Supplementary Material 20: Figure S3. Calibration belt.

12876_2026_5080_MOESM21_ESM.png (1.7MB, png)

Supplementary Material 21: Figure S4. SHAP dependence plots.

12876_2026_5080_MOESM22_ESM.png (94.3KB, png)

Supplementary Material 22: Figure S5. Individual risk uncertainty.

12876_2026_5080_MOESM23_ESM.png (507.7KB, png)

Supplementary Material 23: Figure S6. Exploratory phenotype clusters.

Data Availability Statement

MIMIC-IV version 3.1 is available through PhysioNet for approved credentialed users (https://doi.org/10.13026/kpb9-mt58). The eICU Collaborative Research Database is available through PhysioNet for approved credentialed users who complete the required training and data-use agreements (https://physionet.org/content/eicu-crd/2.0/). The local validation dataset is not publicly available because of institutional and privacy restrictions, but may be made available from the corresponding author upon reasonable request and with appropriate ethical and institutional approval.

Reproducible extraction and analysis scripts are available from the corresponding author upon reasonable request.


Articles from BMC Gastroenterology are provided here courtesy of BMC

RESOURCES