All consecutive patients who meet the inclusion criteria and none of the exclusion criteria will be offered participation in the study. They will be informed by one of the investigators from each center and will sign an informed consent form. A data collection sheet will be completed to record demographic data, the indication for the procedure, and technical variables.
The procedures will be performed by endoscopists with at least 200 ERCPs and more than 5 years of experience. All patients, except in cases of allergy, will receive 1 suppository of indomethacin or diclofenac before the procedure. In cases of allergy, pre-procedure hydration with Ringer's lactate will be administered if there is no contraindication (consider the protocol proposed by the ESGE: 3 mL/kg/hour during ERCP, 20 mL/kg as a bolus after ERCP, and 3 mL/kg/hour for 8 hours post-ERCP). The use of a pancreatic stent should be considered when indicated.
After the procedure, patients will remain hospitalized for at least 24 hours in the hospital. The patient's medical record will be reviewed 7 days after the procedure to check for any adverse effects, and a follow-up phone call will be made to detect any adverse effects.
Initially, a pilot study will be conducted with 600 patients, assessing based on the results-that is, the percentage of patients with difficult cannulation. At the beginning of the examination, at least three endoscopic images and three radiological images of the second portion of the duodenum will be captured for each patient. In patients undergoing endoscopic ultrasound (EUS), three additional images of the second portion of the duodenum at the level of the pancreatic head and common bile duct (CBD) will be obtained.
These images will be labeled as "CBD yes" or "CBD no" according to ESGE criteria, which will serve as the gold standard. Once labeled, the images will be used to train a convolutional neural network (CNN) capable of predicting, just before attempting biliary cannulation, whether it will be a CBD or not.
The prediction of the trained CNN will be able to be combined with the predictive model of difficult biliary cannulation obtaned from the study PRECABIDO NCT06591364 in order to improve the prediction.