Development of a predictive model for hypoxia due to sedatives in gastrointestinal endoscopy: a prospective clinical study in Korea
Article information
Abstract
Background/Aims
Sedation has become a standard practice for patients undergoing gastrointestinal (GI) endoscopy. However, considering the serious cardiopulmonary adverse events associated with sedatives, it is important to identify patients at high risk. Machine learning can generate reasonable prediction for a wide range of medical conditions. This study aimed to evaluate the risk factors associated with sedation during GI endoscopy and develop a predictive model for hypoxia during endoscopy under sedation.
Methods
This prospective observational study enrolled 446 patients who underwent sedative endoscopy at the Korea University Ansan Hospital. Clinical data were used as predictor variables to construct predictive models using the random forest method that is a machine learning algorithm.
Results
Seventy-two of the 446 patients (16.1%) experienced life-threatening hypoxia requiring immediate medical intervention. Patients who developed hypoxia had higher body weight, body mass index (BMI), neck circumference, and Mallampati scores. Propofol alone and higher initial and total dose of propofol were significantly associated with hypoxia during sedative endoscopy. Among these variables, high BMI, neck circumference, and Mallampati score were independent risk factors for hypoxia. The area under the receiver operating characteristic curve for the random forest-based predictive model for hypoxia during sedative endoscopy was 0.82 (95% confidence interval, 0.79–0.86) and displayed a moderate discriminatory power.
Conclusions
High BMI, neck circumference, and Mallampati score were independently associated with hypoxia during sedative endoscopy. We constructed a model with acceptable performance for predicting hypoxia during sedative endoscopy.
INTRODUCTION
Sedation refers to the use of sedative drugs to suppress consciousness. In endoscopy, sedation minimizes the anxiety of the patient about the examination or procedure, helps to perform endoscopy efficiently, and has the advantage of increasing compliance with repeated follow-up examinations by removing unpleasant memories for a certain period of time.1 In addition, reducing the pain associated with endoscopy enhances the satisfaction of the patient and the endoscopist.2 Currently, various drugs such as midazolam, propofol, diazepam, meperidine, pethidine, and fentanyl are used for sedative endoscopy.3 The amount of each drug is determined based on the weight and age of the patient.4 However, even when drugs are administered at the recommended dose, emergency situations often occur unexpectedly owing to cardiopulmonary adverse events (AEs), such as hypoxia, tachycardia/bradycardia, and hypertension/hypotension.5,6 These types of AEs can pose challenges for clinicians when determining both the choice of sedative agents and the appropriate dosage. In addition, if AEs occur during sedation, it can lead to legal disputes between the doctor and the patient. Therefore, it is important to determine the dosages of individual drugs that can induce adequate sedation and prevent serious AEs during sedative endoscopy.
This study aimed to elucidate the incidence and risk factors for serious AEs caused by sedative agents during endoscopy under sedation. Another goal was the development of a predictive model for serious AEs using machine learning based on artificial intelligence.
METHODS
Study population
This prospective cohort study included patients who underwent sedative endoscopy (esophagogastroduodenoscopy [EGD], colonoscopy, or both) at a tertiary hospital in Korea. Patients who underwent endoscopic procedures between January 2021 and June 2021 were enrolled.
Baseline characteristics included age, sex, underlying disease, American Society of Anesthesiologists physical status classification, body mass index (BMI), neck circumference, history of snoring or sleep apnea, Mallampati score (relative size of the base of the tongue compared to the oropharyngeal opening)7 (Fig. 1) to predict obstructive sleep apnea, history of alcohol and smoking intake, history of abnormal response to sedative agents, and use of sedative agents.
Sedation procedure and sedative dosages
This endoscopy unit is routinely used at our hospital to sedate patients undergoing sedative endoscopy using propofol alone or in combination with midazolam. Sedative agents were administered intravenously by registered nurses under the direction of the endoscopist. Based on the Korean clinical practice guidelines for endoscopic sedation, the initial dose of sedative agents was determined by the age and weight of the patient, as well as the recommendation of the endoscopist.8 Additional doses were titrated based on the assessment of patient tolerance by the endoscopist. All patients were monitored by using continuous electrocardiography, heart rate, pulse oximetry, and non-invasive blood pressure monitoring at 5-minute intervals during the procedure. Supplemental oxygen via nasal cannula (2 L/min) was provided to all patients before the onset of sedation. A designated recording assessor not involved in the procedure was tasked with recording the data. Specifically, blood pressure measurements were automatically taken at 5-minute intervals using a digital blood pressure monitor. The recording assessor reviewed the values at each interval and reported them to the operator if the systolic blood pressure was <90 mm Hg. Pulse oximetry was performed on the index finger with continuous monitoring of desaturation events and the presence of tachycardia and bradycardia. Additional measurements of blood pressure, heart rate, and oxygen saturation were recorded if signs of bradycardia, tachycardia, or hypoxia were observed within 5-minute intervals. In cases where the oxygen saturation dropped below 90%, proper attachment of the finger probe was verified to rule out equipment errors. When necessary, a portable pulse oximeter was attached to each finger to confirm the readings. To ensure patient safety, adjustment to the lifting of the chin was performed simultaneously.
Definitions of sedative-related events and life-threatening AEs
Sedative-related events included hypoxemia (defined as peripheral oxygen saturation [SpO2] <90% for any duration), hypotension (defined as systolic blood pressure <90 mmHg), tachycardia (heart rate >100 beats per minute [bpm]), paradoxical reactions, and drug hypersensitivity. Paradoxical reactions include increased talkativeness, emotional release, excitement, excessive movement, and even hostility and rage during and after procedures. In this study, life-threatening AEs were defined as clinical occurrences that posed a significant threat to the patient and arose from the use of sedative agents. Among the various sedative-related AEs, transient hypoxia that occurred frequently and was resolved immediately by itself or via a chin lift, tachycardia/bradycardia without accompanying hypotension, and paradoxical reactions were excluded from the category of life-threatening AEs. Consequently, life-threatening AEs were defined to include sustained hypoxia necessitating an increase in oxygen supply via nasal cannula (up to 6 L/min), bag-mask ventilation, or mechanical ventilation, pneumonia, sedation-related hypotension, and tachycardia/bradycardia-induced hemodynamic instability.
Procedure- and sedation-related measurements
Total procedure time was defined as the time interval between “insertion of endoscope” and “removal of endoscope”. The recovery time was defined as the time interval between the “removal of endoscope” and “discharge from the endoscopy unit”. A modified Aldrete test score was used as a simple and reliable test for determining recovery and discharge after sedation.9 Discharge was deemed possible if the Aldrete test score was ≥8 points. After recovery, a questionnaire was administered to confirm the degree of sedation. The patients were classified into 3 categories: no memory of pain during the procedure, partial memory, and no sedation at all. A survey of the satisfaction of the endoscopist with the sedative procedure was conducted at the end of the procedure and had a 5-point response scale, with 5 points indicating “very satisfied” and 0 point implying “very dissatisfied”.
Development of a random forest algorithm-based predictive model for hypoxia during sedation
Random forest is a machine learning algorithm that creates multiple decision trees for making predictions.10 The algorithm creates several training sets for the decision trees, where each tree is built based on a bootstrap sample drawn randomly from the original dataset, using the classification and regression trees method. Furthermore, at each branching point, only a given number of randomly selected features are considered as candidates, ensuring diversity among the trees. A random forest model is then constructed using 10-fold cross-validation, wherein the original training dataset is divided into 10 parts, with 9 used for training and one for validation. This process is repeated 50 times, each time producing an area under the curve (AUC) metric as a performance measure. The AUC is a metric that represents the area under the receiver operating characteristic (ROC) curve that assesses the classification performance of the model. Among the AUC values obtained in each iteration, the model that produced an AUC closest to the average is considered the best-trained model. A random forest model optimized as described above was chosen as the final predictive model.
Statistical analysis
Data were considered statistically significant if p-values were below 0.05. All statistical analyses were performed using R software ver. 4.0.2 (R Foundation). For statistical comparison of the groups, the Student t-test or Mann-Whitney U-test was used for continuous variables, and the χ2 test or Fisher exact test was used for categorical variables. Comparative data for continuous variables are reported as means and standard deviations. Univariate logistic regression analysis was first conducted to investigate the crude odds ratio (OR) for each factor. A multivariate logistic regression analysis was conducted using the variables with p-values below 0.05 that were used in the univariate logistic regression. The results were expressed as ORs with 95% confidence intervals. The AUC, sensitivity, specificity, and accuracy of the ROC curve were measured.
Ethical statement
This study was approved by the Institutional Review Board of the Korea University Ansan Hospital (approval number: 2020AS0337) and the research was conducted in accordance with the Declaration of Helsinki.
RESULTS
Patients
The baseline characteristics of the enrolled patients are shown in Table 1. The mean age of the 446 patients was 55.3 years, and 282 (63.2%) were male. A total of 278 patients underwent EGD alone, and 168 patients underwent both EGD and colonoscopy. Regarding sedative agents, propofol alone was used in 178 patients, and propofol and midazolam in combination were used in 268 patients. The initial dose of propofol was 46.1 mg, and the initial dose of midazolam was 1.53 mg (Table 2). After the initial use of sedative agents, additional sedatives were needed during the endoscopic examination on average 1.02 times, and the final doses of propofol and midazolam used during the procedure were 68.0 mg and 1.72 mg, respectively. Among the 446 patients, 89 experienced a drop in SpO2 below 90%, but in 17 of these patients, SpO2 normalized immediately by itself or with a chin lift (Table 3). However, 68 patients required an increase in supplemental O2 up to 6 L/min by nasal prong, and 4 patients showed a reduction in SpO2 below 70%; therefore, ambu-bagging was temporarily performed. There were no patients whose SpO2 recovery was not sustainable and required intubation. There were no cases of pneumonia among these patients. Sixty patients showed tachycardia ranging between 100 and 160 bpm, but there was no decrease in blood pressure, and the heart rate returned to normal during follow-up or recovery, without any special measures. Four patients showed a paradoxical reaction to midazolam but recovered after administration of flumazenil. The procedure was then conducted in its entirety with propofol use alone and without employing midazolam.
Regarding the memory of pain during sedation, 398 patients (89.2%) had no memory and 46 patients complained of a partial memory of pain, while 2 patients complained of no sedation at all. The satisfaction of the endoscopist with the sedation procedure was 4.3 points out of 5 points, and all sedative endoscopic examinations were performed to the end, with a mean procedure time of 10.9 minutes. After an average recovery period of 25.3 minutes, the patients were discharged from the recovery room.
Comparison of patients with hypoxia and without hypoxia
In this study, life-threatening AEs excluded transient hypoxia that recovered by itself or with a chin lift, tachycardia that did not induce hypotension, and paradoxical reactions. Thus, the category of patients with life-threatening AEs during sedative endoscopy included 72 (16.1%) patients who exhibited hypoxia requiring active intervention. When comparing the patient groups with and without life-threatening hypoxia, no differences were observed in terms of age, sex, or height (Table 1). However, body weight, BMI, neck circumference, and Mallampati grade III to IV score ratio were higher in the hypoxia (+) group. In the hypoxia (+) group, the proportion of patients with chronic obstructive pulmonary disease (COPD) as a comorbidity was high; however, there were no differences in other underlying diseases. In the hypoxia (+) group, the proportion of cases with propofol use alone was higher than that of administering a combination of propofol and midazolam. The initial and total doses of propofol administered during the procedure were higher in the hypoxia (+) group; however, the initial and total doses of midazolam did not show any difference between the with and without hypoxia groups. There was no difference in the total procedure time between the two groups; however, recovery took longer in the patients with hypoxia (+) group. There was no difference between the two groups in terms of patient satisfaction with the degree of sedation or endoscopist satisfaction with the smooth progress of the procedure as recorded in the patient and endoscopist questionnaire surveys.
Risk factors for hypoxia
Logistic regression analysis was performed to identify the clinically significant risk factors for hypoxia (Table 4). In univariate analysis, the risk of AEs increased with weight and BMI. In addition, the higher the neck circumference and the higher the Mallampati score, the higher the risk of AEs. Regardless of whether the sedative agents were used alone or in combination, the initial dose of propofol, initial dose of midazolam, and total dose of midazolam did not significantly increase the risk of hypoxia. However, life-threatening AEs occurred significantly more frequently when the total dose of propofol was high. In patients with COPD, there was an association with AEs. In the multivariate analysis, higher BMI, neck circumference, and Mallampati score were identified as independent risk factors for AEs.
Performance of the predictive models for hypoxia during sedative endoscopy
To construct predictive models for life-threatening AEs during sedative endoscopy, we used a random forest algorithm with all the clinical data of the patients, including baseline characteristics and procedure- and sedation-related measurements. We trained the prediction model using clinical data from 400 of the 446 patients. Subsequently, validation was performed using the clinical data from the remaining 46 patients. The mean AUC for the model developed in our study was 0.82 (interquartile range, 0.78–0.86) (Fig. 2). It demonstrated moderate discriminatory power and, therefore, potential utility as a classifier for determining patients at high risk of hypoxia during sedative endoscopy.
DISCUSSION
In this study, the incidence of hypoxia during sedative endoscopy and the related risk factors were analyzed. Clinically significant AEs that could lead to life-threatening conditions occurred in 72 (16.1%) patients and included hypoxia. The independent risk factors for hypoxia during sedative endoscopy were a high BMI, a high neck circumference, and a high Mallampati score. A machine learning-based model to predict hypoxia using various clinical indicators served as a classifier with 82% accuracy.
Recently, interest in personal health has been increasing in the Korean population, and the number of endoscopy examinations has been steadily increasing due to their use in screening tests for gastric cancer and colorectal cancer in this country, and the number of sedative endoscopy cases is also increasing.8 Sedation is widely used for endoscopic procedures worldwide to reduce patient anxiety and discomfort, consequently improving their tolerability and satisfaction with the procedure.1 Endoscopic sedation also allows endoscopists to perform endoscopy more efficiently and has improved the quality of the examination. Although sedative endoscopy has these advantages, it carries the potential risk of sedation-related AEs. It is essential to prevent AEs in advance and prepare for emergencies that may occur owing to AEs. In particular, risk assessment of AEs in patients before sedative endoscopy is very important.
Sedation-related events include hypoxia, hypotension, hypertension, arrhythmias, drug hypersensitivity, and paradoxical reactions. In our study, tachycardia occurred in 60 (13.5%) patients, but its clinical significance was minimal, and the patients recovered without any intervention. No patients had hypotension, hypertension, or hypersensitivity reactions to sedative agents; however, paradoxical reactions to midazolam occurred in 4 patients that were resolved upon administration of flumazenil, an antidote to midazolam. Given prior evidence supporting the safety and efficacy of propofol-based sedation for patients exhibiting paradoxical reactions to midazolam, our study exclusively employed propofol for subsequent sedative endoscopic examinations in the four patients post-sedation recovery. Notably, none of these patients experienced a recurrence of paradoxical reactions.11
In our study, hypoxia was a clinically problematic AE associated with sedative endoscopy. This is the most common cause of endoscopy-related death, since sedative agents induce central nervous system suppression and respiratory depression.12 When oxygen saturation falls below 90%, hypoxia may result in cardiac events such as myocardial ischemia and cardiac arrhythmias.13 The frequency of hypoxia during sedative endoscopy is reported to be about 6-18% depending on the dose and drug used, while serious cardiopulmonary AEs are known to occur in about 1 in 1,000 people.5,6 In our study, 72 (16.1%) patients presented with hypoxia during sedative endoscopy, with 68 requiring an increase in oxygen supply via nasal prongs and 4 needing ambu-bagging. However, there were no occurrences of serious cardiopulmonary AEs that required intubation or mechanical ventilation in this study. Furthermore, there were no cases of sedative endoscopy-related mortality in this study.
Risk factors for hypoxemia have been evaluated in several studies.14 Our study showed that factors associated with obesity, such as a high BMI, a high neck circumference, and a high Mallampati score significantly increased the incidence of hypoxia during sedative endoscopy. Pharmacologically, the distribution area of fat-soluble drugs, such as propofol and fentanyl, increases in obese persons due to a high percentage of body fat.15 Therefore, the drug requirement for moderate sedation increases, and the effect lasts for a long time. Concomitantly, there are cases where it is difficult to wake up from sedation. Moreover, obesity itself can cause mechanical problems related to airway tissues or anatomical changes associated with sleep apnea.16 Patients with obesity tend to have a high a Mallampati score that implies significant difficulties during airway intubation due to structural deformation of the respiratory system, and they have frequent occurrence of sleep apnea.17 The frequency of hypoxia during sedation in patients with sleep apnea is 15%, and this is much higher than the rate of 4% in patients without sleep apnea.18 Therefore, obesity-high Mallampati score-sleep apnea can work in conjunction with each other as a combination of risk factors that can cause hypoxia due to airway obstruction during sedation. Additionally, a higher neck circumference could potentially lead to compromised airway patency that may increase the risk of hypoxia when sedatives are administered. Several studies have also found that neck circumference is a useful and important predictor of sleep apnea and is independently associated with the obstructive sleep apnea syndrome.19,20
In the present study, we found that patients with COPD comorbidity had a higher risk of developing hypoxia during sedative endoscopy. One study demonstrated that patients with COPD often exhibit symptoms such as cough, phlegm, and respiratory insufficiency that can result in decreased SpO2 during endoscopic procedures with sedation.21 This is due to the dysfunction of the cough reflex and blockage of the respiratory tract by phlegm that contributes to a higher risk of hypoxic events during gastrointestinal endoscopy in these individuals.
For safe and high-quality sedative endoscopy, it is necessary to develop a model that predicts the risk of hypoxia based on clinical data. Although other pre-existing prediction models may be effective, especially in less complex situations, the use of machine learning for prediction models has several advantages. One key reason for this is their ability to recognize complex data patterns, particularly in cases where traditional predictive models or statistical methods may not be effective. Machine learning automatically learns and identifies intricate patterns, leading to high predictive accuracy. Another important factor is its ability to handle diverse variables. Medical situations often involve multiple variables with complex relationships. Machine learning is well suited for processing various types of data and extracting features to model these intricate relationships. Real-time updates and continuous improvements are additional benefits. Machine-learning models can be updated in real time as new data accumulate, allowing for ongoing learning and adaptation to new information. This flexibility contributes to the continual improvement of the model. In response to this need, we developed machine-learning-based classifiers to predict hypoxia during sedative endoscopy. To construct prediction models for AEs of sedative agents, we used a random forest algorithm and trained the model on individual characteristics. The AUC value was 0.82 with a moderate accuracy for prediction of hypoxia during sedative endoscopy. This predictive model is expected to play a significant role in reducing the frequency of AEs caused by sedative agents, providing psychological stability to patients and endoscopists. We are currently conducting a prospective study to evaluate the predictive efficiency of this model in patients undergoing endoscopic examinations. Ultimately, in the future, we intend to develop an appropriate sedative agent dose adjustment program for each patient through further studies beyond this study of risk assessment of sedative agents for AEs.
This study has some limitations. First, this study was conducted at a single center with a relatively small number of patients. Therefore, it is difficult to generalize these results. Second, it is possible that patients with relatively high-risk factors were excluded because the study was performed on an outpatient basis. Third, enrolled patients underwent screening or simple endoscopic procedures. Advanced therapeutic endoscopic procedures that are more invasive and require long procedure times were excluded. In future studies, it will be necessary to include a larger number of patients for various endoscopic procedures. Finally, there were no cases of hypotension as an AE. The monitoring method employed in this study that involved intermittent blood pressure measurements at 5-minute intervals or additional measurements in the presence of signs such as bradycardia or tachycardia, may have limitations in accurately capturing every hypotensive event. Continuous monitoring of arterial blood pressure allows continuous measurement but is limited by its invasive nature.
In conclusion, a high BMI, neck circumference, and Mallampati score are independent risk factors for hypoxia during sedative endoscopy. We developed a machine-learning-based classifier program to predict hypoxia with a moderate accuracy of 82%. Therefore, it is necessary to validate these results in large-scale studies.
Notes
Conflicts of Interest
The authors have no potential conflicts of interest.
Funding
This research was supported by the 2020 Weolbong grant from the Korean Gastrointestinal Endoscopy Research Foundation.
Author Contributions
Conceptualization: JWC, SJS; Data curation: JWC; Formal analysis: SJS, SHL; Funding acquisition: JWC; Investigation: JWC; Methodology: SJS, SHL; Project administration: JWC; Supervision: JJH; Writing–original draft: JWC; Writing–review & editing: JJH, SJS, SHL.