Abstract
Purpose
This study aimed to develop and validate a machine learning model to predict the risk of prolonged length of stay (PLOS) in patients undergoing day-case surgery for urolithiasis.
Methods
A retrospective study design was used to analyze data from 1,317 patients who underwent day-case surgery for urolithiasis. Demographic characteristics, comorbidities, stone features, surgical details, and preoperative blood test results were extracted from medical records. Feature selection was performed using the Boruta algorithm. Five machine learning algorithms—Tabular Prior-Data Fitted Network (TabPFN), Random Forest (RF), Gradient Boosting, eXtreme Gradient Boosting (XGBoost), and Categorical Boosting (CatBoost)—were then trained to develop predictive models using 10-fold cross-validation. Model performance was evaluated using multiple metrics, including the area under the receiver operating characteristic curve (AUC), accuracy, sensitivity, specificity, positive and negative predictive values, F1-score, Cohen’s kappa coefficient, and confusion matrices. SHapley Additive exPlanations (SHAP) analysis was applied to interpret the best-performing model, explaining both global feature importance and individual prediction rationales. An interactive nomogram was constructed to present the final model’s predictions in an intuitive and clinically accessible format.
Results
Neutrophil count (NEUT), hemoglobin (Hb), surgical method, serum calcium (Ca), platelet count (PLT), and red blood cell count (RBC) were identified as significant predictors by the Boruta algorithm. Among the machine learning models evaluated, the Gradient Boosting model achieved the highest performance on the test set, with an accuracy of 95.96%, sensitivity of 78.57%, specificity of 99.69%, an F1-score of 87.32%, and an AUC of 0.727. Notably, SHAP analysis confirmed that Surgical Method, Ca, NEUT, RBC, PLT, and Hb were the dominant features driving the model’s predictive decisions.
Conclusion
Using demographic and clinical data, this study developed a machine learning-based model to predict PLOS after day-case urolithiasis surgery. The Gradient Boosting model achieved acceptable discriminative performance on an internal test set, with good sensitivity and good specificity. While this model shows potential for early risk stratification, prospective multicenter external validation is required before it can be recommended for clinical practice.
Funding
This research was supported by the National Natural Science Foundation of China (82370766).
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Ethics approval and consent to participate
This study, involving human participants, was reviewed and approved by the Ethics Committee (Institutional Review Board) of the First Affiliated Hospital of Guangzhou Medical University (Approval No.: ES-2023–082-01). The study was conducted in accordance with the ethical principles of the Declaration of Helsinki. As the research was designed as a fully retrospective investigation using exclusively anonymized data extracted from the electronic medical record system, the need to obtain written informed consent from participants or their legal guardians was waived by the aforementioned Ethics Committee (IRB). This waiver is in accordance with both the committee’s specific guidelines and relevant national regulations governing retrospective medical research in China.
Consent for publication
Not applicable.
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Electronic supplementary material
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Liu, C., Zhang, G., Feng, Y. et al. Predicting prolonged length of stay after day-case urolithiasis surgery: a machine learning approach. BMC Med Inform Decis Mak (2026). https://doi.org/10.1186/s12911-026-03755-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s12911-026-03755-z