Ankara City Hospital's Gastrointestinal Endoscopy Colonoscopy Unit's patient count determined using G-power statistical software ensured that a sample size of at least 185 patients was adequate at a 95% confidence level with 80% power and an effect size of 0.5. Analyses were performed using the Power and Sample Size statistical program version 3.1.2 (Vanderbilt University, 2015).

187 patients scheduled for ERCP procedure under sedation during an 8-month period were included in the study. The study was planned as a randomized observational and prospective study. Patients were randomly allocated to either the nasal oxygen (NO) or High Flow Nasal Oxygen (HFNO) group in a 1:1 ratio using a computer-generated random code generator. It was not a blind study, as the oxygen delivery systems did not look the same. Endoscopists, anesthesiologists, and patients were not blinded. ERCP procedures were completed by one of two expert endoscopists and sedation was performed by one of two anesthesiologists trained in endoscopic sedation. The study and possible risks were explained to all patients participating in the study, and written informed consent was obtained from the patients. The patient's age, current chronic diseases, and duration of the procedure were recorded. Before the procedure, the frailty level of the patients was evaluated with the Modified Frailty Index-11 (mFI-11) and recorded. The mFI-11 is an 11-item index that assesses comorbidities to stratify patient risk. The simplified frailty index is calculated as the number of present comorbidities divided by the total number of 11 items used in the mFI-11 assessment, which includes diabetes mellitus, not independent functional status, chronic obstructive pulmonary disease, congestive heart failure, myocardial infarction, percutaneous coronary intervention or cardiac surgery, angina, hypertension medication, peripheral vascular disease, impaired sensorium, transient ischemic attack, and cerebrovascular accident. The resulting score ranges from 0 to 1. Patients were positioned prone and pulse oximetry, non-invasive blood pressure monitoring, electrocardiography, and Bispectral Index monitoring were performed, and baseline values were recorded in all cases. The NO group was preoxygenated with 100% oxygen for 3 min with an oxygen flow rate of 8 L.min-1 via a nasal cannula before induction and received 100% oxygen with a flow rate of 5 L.min-1 throughout the procedure. The HFNO group was preoxygenated with 100% oxygen with a flow rate of 40 L.min-1 for 3 min via an HFNO system (Inspired 02FLO High Flow Heated Respiratory Humidifier, VUN-001, Vincent Medical Manufacturing Co., Hong Kong) before induction and received 50% oxygen with a flow rate of 50 L.min-1. In case of a decrease in saturation (SpO2\<90), the flow was increased to 60 L.min-1, and if it did not resolve, FiO2 was increased to 100%. All patients were premedicated with iv midazolam and sedation was performed with iv 1 µg.kg-1 fentanyl and iv bolus dose of 0.5-1 mg.kg-1 %1 propofol followed by an iv infusion of propofol 3-4 mg.kg-1.hr-1 targeting a BIS value of 60-80. In case of apnea or desaturation, maneuvers such as patient stimulation, chin lifting, or increasing oxygen flow were performed and recorded. The lowest SpO2 values obtained for both groups were noted.

The data were analyzed using IBM SPSS Statistics ver. 25 (IBM Corporation, Armonk, NY, USA). The distribution of continuous numerical variables was tested for normality using the Kolmogorov-Smirnov test, and the homogeneity of variances was assessed with Levene's test. Descriptive statistics were expressed as mean ± standard deviation or range (minimum - maximum) for continuous variables, and as case number and percentage (%) for categorical variables. The significance of differences between the NO and HFNO groups for continuous variables that met the assumptions of parametric test statistics was evaluated using Student's t-test, whereas differences for those that did not meet these assumptions were assessed using the Mann-Whitney U test. The significance of changes over time in systolic, diastolic, and mean blood pressure, heart rate, oxygen saturation (SpO2), and BIS levels was examined using repeated measures analysis of variance with Wilks' Lambda test. Where Wilks' Lambda test results were found significant, the specific times causing the differences were identified using the Bonferroni-adjusted multiple comparison test. Comparisons between the NO and HFNO groups were made by calculating the changes in SpO2 and BIS from baseline at subsequent time points. Unless otherwise stated, Pearson's χ2 test was used for the analysis of categorical data. For 2x2 contingency tables where at least 25% of the expected frequencies were below 5, Fisher's exact test was used, and where expected frequencies were between 5 and 25, the continuity-adjusted χ2 test was employed. In RxC tables (where at least one of the categorical variables in the row or column had more than two outcomes), if at least 25% of the cells had expected frequencies below 5, the Fisher-Freeman-Halton test was applied. Unless stated otherwise, results were considered statistically significant at p\<0.05. However, to control for Type I error in all multiple comparisons, Bonferroni correction was applied.