This study aimed to develop a clinical prediction model to assess the 24-hour post-ERCP complication risk in patients with common bile duct stones (CBDs), guiding clinical decision-making for ERCP as a day surgery.
Patients and methodsRetrospective data from The First Hospital of Lanzhou University (2010–2019) and prospective multicenter data on post-ERCP complications (2020–2023) were collected and registered on ClinicalTrials.gov (NCT04234126, NCT04242394). The ADASYN method was used for dataset balancing. Machine learning algorithms, including KNN, XGBoost, RF, SVM, and NB, were compared with traditional models. External validation was performed with retrospective data from other ERCP centers (2015–2017) and The First Hospital of Lanzhou University (2019–2020), with registration under NCT02510495. The optimal model was selected based on the ROC curve (AUC), and an online prediction tool was developed.
ResultsA logistic regression (LR) model incorporating seven feature variables—mechanical lithotripsy, pancreatic duct cannulation, bile duct dilation, residual stones, white blood cell count, alanine aminotransferase (ALT) level, and pancreatic duct stent placement—was identified as the optimal model, The model yielded specificity, sensitivity, accuracy, and AUC values of 0.835, 0.655, 0.807, and 0.819 in the external validation set, with a second external validation set providing additional results of 0.799, 0.714, 0.784, and 0.805. Patients were stratified into high- and low-risk groups. An online calculator was developed (https://borujin.shinyapps.io/dynnomapp/).
ConclusionsThe results indicate that the proposed LR model, utilizing the top seven risk factors, could serve as an effective tool for predicting occurrence of complications in day surgery.
Keywords Pancreatobiliary (ERCP/PTCD) - Quality and logistical aspects - Performance and complications - GI surgery Publication HistoryReceived: 27 May 2025
Accepted after revision: 22 October 2025
Accepted Manuscript online:
27 October 2025
Article published online:
16 December 2025
© 2025. The Author(s). This is an open access article published by Thieme under the terms of the Creative Commons Attribution License, permitting unrestricted use, distribution, and reproduction so long as the original work is properly cited. (https://creativecommons.org/licenses/by/4.0/).
Georg Thieme Verlag KG
Oswald-Hesse-Straße 50, 70469 Stuttgart, Germany
Bibliographical Record
Boru Jin, Yi Wang, Xu Zhang, Jinyu Zhao, Wangping He, Kecheng Jin, Zhen Liu, Ruyang Zhong, Yuhu Ma, Chunlu Dong, Yanyan Lin, Xiaoliang Zhu, Kexiang Zhu, Lei Zhang, Ping Yue, Shuyan Li, Jinqiu Yuan, Xun Li, Wenbo Meng. Identifying high-risk patients having ERCP as a day surgery with an online prediction
platform: Multicohort validation of a machine learning model. Endosc Int Open 2025; 13: a27331387.
DOI: 10.1055/a-2733-1387
Comments (0)