# Identifying high-risk patients having ERCP as a day surgery with an online prediction platform: Multicohort validation of a machine learning model

**Authors:** 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

PMC · DOI: 10.1055/a-2733-1387 · Endoscopy International Open · 2025-12-16

## TL;DR

This study developed a machine learning model to predict complications after ERCP for bile duct stones, validated across multiple datasets and available as an online tool.

## Contribution

A validated logistic regression model and online prediction tool for ERCP complication risk in day surgery patients.

## Key findings

- The logistic regression model achieved an AUC of 0.819 in external validation.
- Seven key risk factors were identified for predicting post-ERCP complications.
- An online calculator was developed to stratify patients into high- and low-risk groups.

## Abstract

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.

Retrospective 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.

A 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/
).

The 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.

## Full-text entities

- **Genes:** GPT (glutamic--pyruvic transaminase) [NCBI Gene 2875] {aka AAT1, ALT, ALT1, GPT1, SGPT}
- **Diseases:** stones (MESH:D007669), CBDs (MESH:D042882), bile duct dilation (MESH:D001649)
- **Species:** Homo sapiens (human, species) [taxon 9606]

## Full text

_Full body text omitted from this summary view._ Fetch the complete paper as Markdown: https://tomesphere.com/paper/PMC12817187/full.md

## Figures

4 figures with captions in the complete paper: https://tomesphere.com/paper/PMC12817187/full.md

## References

22 references — full list in the complete paper: https://tomesphere.com/paper/PMC12817187/full.md

---
Source: https://tomesphere.com/paper/PMC12817187