Introduction
Dehydration Mechanism and Heat Stroke/HHS Pathophysiology:
Dehydration represents a central pathophysiological mechanism underlying both heat stroke and HHS in the context of Hajj pilgrims. While these represent distinct clinical syndromes with separate diagnostic criteria, they share severe dehydration and thermoregulatory failure as primary pathogenic drivers, particularly when exposed to extreme heat exceeding 50 °C combined with osmotic diuresis from hyperglycemia. Extreme heat combined with sweating, osmotic diuresis from hyperglycemia, and reduced fluid intake results in profound fluid loss that destabilizes glycemic control and precipitates acute metabolic decompensation.[
1]
Hajj as a Unique High-Risk Setting:
Hajj, the annual Islamic pilgrimage to Makkah, represents one of the largest recurring mass gatherings worldwide, with millions of pilgrims converging over a short period to perform physically demanding rituals in a setting characterized by extreme heat, crowding, and constrained logistics. A substantial proportion of pilgrims live with diabetes mellitus, many treated with insulin or other glucose-lowering therapies. These individuals face heightened risk of acute metabolic complications, including DKA, HHS, and severe hypo-/hyperglycemia.
Multiple Risk Factors During Hajj:
Multiple factors contribute to this elevated risk during Hajj: (1) high ambient temperatures and Heat Index values, (2) prolonged walking and intense physical exertion, (3) sleep disruption, (4) irregular access to meals and medications, (5) constrained opportunities for close medical supervision, and (6) limited healthcare infrastructure in remote pilgrimage sites. Observational data suggest heat exposure is associated with increased hospitalizations for DKA, HHS, and hypoglycemia among people with diabetes.[
2,
3]
Escalating Climate-Related Health Risks:
Escalating climate-related health risks have been documented among Hajj pilgrims over successive years. Recent analyses demonstrate that ambient temperatures at Hajj have increased, with peak Heat Index values reaching critical thresholds (often exceeding 55–60 °C) that significantly amplify the risk of metabolic decompensation, particularly in individuals with diabetes. This environmental trend underscores the urgent need for innovative prediction and prevention strategies to protect vulnerable pilgrims.[
14]
Current State of AI and CGM Technology:
Significant advances have been made in continuous glucose monitoring (CGM) technologies and the application of artificial intelligence (AI) and machine learning (ML) models to predict hypoglycemia and other glycemic patterns. Studies using CGM-driven ML models have demonstrated feasibility of predicting impending hypoglycemia 30–60 minutes in advance. Broader reviews of AI in diabetes care highlight potential of integrating CGM, physiological, and contextual data into personalized decision-support systems.[
5,
8]
Unmet Need and Study Rationale:
Despite these advances, there is scarcity of data on AI-assisted prediction of acute metabolic crises in real-world, high-risk environments such as Hajj. Specific challenges include intermittent connectivity, variable adherence, environmental extremes, and diverse cultural and linguistic backgrounds. There exists a clear, unmet need for a robust, field-validated predictive system that can anticipate acute glycemic deterioration and trigger timely interventions, including early referral to nearby healthcare facilities.
Study Objective:
This study protocol describes a two-phase, prospective investigation to: (1) develop and internally validate a predictive model for acute glycemic crises among pilgrims with diabetes during Hajj, using CGM, physiological, clinical, and environmental data; and (2) conduct a pilot interventional study to evaluate feasibility, acceptability, and preliminary effectiveness of an AI-assisted alert system compared with standard care.
Methods
Study Design
This will be a two-phase, prospective study conducted among adult pilgrims with diabetes during the Hajj season.
Phase 1 – Prospective Cohort Study (Model Development and Internal Validation): A prospective observational cohort will be established to collect continuous glucose monitoring (CGM), physiological, clinical, and environmental data in real time during Hajj. These data will be used to develop and internally validate a machine learning-based predictive model for short-term risk of severe hypo- and hyperglycemic events and hyperglycemic crises (DKA/HHS).
Phase 2 – Pilot Interventional Study (Model Implementation and Feasibility): In a subsequent Hajj season, the validated predictive model will be embedded into a decision-support platform that generates alerts to patients and healthcare providers. Outcomes in pilgrims managed with the AI-assisted platform will be compared with those receiving standard care to assess feasibility, usability, and preliminary effectiveness.
Setting
The study will be conducted during the Hajj period in:
Pilgrim camps and clinics in the holy sites (Mina, Arafat, Muzdalifah)
Associated mobile medical units
Nearby secondary and tertiary care hospitals receiving pilgrims with acute metabolic decompensation
All participating centers will follow a harmonized protocol for recruitment, monitoring, data collection, and event adjudication.
Participants
Inclusion Criteria:
Adults aged ≥18 years
Established diagnosis of type 1 or type 2 diabetes mellitus
Performing Hajj during study year
Able to provide written informed consent
Willing and able to wear a CGM device (and wearable vital-sign monitor where applicable) throughout monitoring period
Exclusion Criteria:
Known severe cognitive impairment or psychiatric illness limiting ability to follow study procedures
Advanced terminal illness or severe cardiorespiratory instability deemed incompatible with safe participation
Pregnancy (exclusion criterion per Saudi Arabia ethical guidelines for Hajj studies)
Known allergy or intolerance to CGM sensors or wearable devices
Recruitment and Sample Size:
Phase 1: ~800–1000 pilgrims with diabetes
Phase 2: ~300–400 pilgrims allocated to AI-assisted care or standard care
Participants will be recruited through Hajj medical missions, pre-Hajj assessment clinics, and educational sessions in multiple languages.
Study Procedures and Data Collection
Baseline Assessment: At enrollment, a structured case report form will capture sociodemographic data (age, sex, nationality, education), diabetes-related variables (type, duration, therapy, recent HbA1c), history of DKA/HHS and severe hypoglycemia, comorbidities (hypertension, ischemic heart disease, chronic kidney disease, obesity), and baseline vital signs.
Monitoring During Hajj – Phase 1 (Cohort): All enrolled participants will be fitted with:
CGM devices providing interstitial glucose readings at standard intervals (5–15 minutes)
Wearable vital-sign monitors recording heart rate, physical activity (step count, accelerometry), and optionally skin temperature and peripheral oxygen saturation (SpO₂)
Intermittent clinical measurements (blood pressure, fingerstick glucose) at predefined time points and when clinically indicated
Laboratory measurements: Blood ketones and/or venous blood gases in participants with suspected DKA; serum osmolality in those with suspected HHS (per local clinical protocols)
Environmental data (ambient temperature, humidity, Heat Index) from meteorological sources or environmental sensors
Contextual data on meals, insulin/other medications, and fluid intake via logs or app-based entries
Data Transmission and Connectivity: Given the logistically challenging environment of Hajj, data transmission protocols must account for intermittent connectivity. CGM and wearable devices will utilize automatic cloud synchronization with local storage buffers. Real-time data upload will occur when cellular/Wi-Fi connectivity is available; data will be securely transmitted for analysis at predefined intervals (minimum every 6 hours). All data transfer will employ end-to-end encryption (minimum AES-256) and comply with Saudi Arabia healthcare data protection requirements.
Outcome Definitions
Primary Acute Metabolic Outcomes:
Severe hypoglycemia: CGM value <54 mg/dL with or without need for external assistance due to neuroglycopenic symptoms
Severe hyperglycemia: Sustained CGM values ≥300–350 mg/dL for ≥30 consecutive minutes with associated symptoms or clinical concern
Diabetic Ketoacidosis (DKA): Diagnosed per 2024 consensus guidelines: hyperglycemia (>250 mg/dL), documented ketosis, metabolic acidosis, and compatible clinical features [
1]
Hyperosmolar Hyperglycemic State (HHS): Diagnosed per 2024 consensus guidelines: marked hyperglycemia (>600 mg/dL), high effective serum osmolality (>320 mOsm/kg), severe dehydration, and minimal or absent ketosis [
2]
Secondary Outcomes:
Unscheduled clinic and emergency visits for glycemic disturbances
Hospital and ICU admissions related to acute glycemic events
Length of hospital stay
All-cause mortality during Hajj
Event Adjudication: All suspected DKA and HHS cases will be independently adjudicated by at least two physicians experienced in diabetes care.
Data Management and Feature Construction
CGM, wearable, and environmental data will be transmitted to secure server or downloaded at regular intervals and linked to anonymized study identifiers.
Candidate Predictors (Features) will include:
Demographic/Clinical: age, sex, BMI, diabetes type and duration, HbA1c, comorbidities, prior DKA/HHS, prior severe hypoglycemia, baseline therapy
Time-Varying CGM Features: current glucose, rate and direction of change, short-term moving averages, and variability indices
Physiological: heart rate and heart rate variability (if available), periodic blood pressure readings, SpO₂
Environmental: ambient temperature, humidity, Heat Index, time of day, location segment
Activity: step count, intensity categories, duration of sustained walking/standing
Self-Reported Context: timing and size of meals, timing and dosing of medications, reported fluid intake
Labels will be defined as occurrence of severe hypoglycemia or severe hyperglycemia within short prediction horizon (30–60 minutes) based on preceding data window.
Predictive Model Development (Phase 1)
The prospective cohort dataset will be randomly partitioned into training/internal validation set (~70%) and hold-out test set (~30%). Multiple supervised machine learning algorithms will be evaluated, including regularized logistic regression, gradient boosting machines, random forests, and recurrent neural networks (LSTM/GRU) where data volume allows.
Model Performance Assessment:
Discrimination: Area under receiver operating characteristic curve (AUC-ROC) ≥0.80 with 95% CI
Accuracy Metrics: Sensitivity ≥80%, specificity, positive and negative predictive values
Calibration: Calibration slope 0.9–1.1 with intercept near zero
Clinical Utility: Decision curve analysis across clinical risk thresholds
Addressing Class Imbalance: Given anticipated low prevalence of DKA/HHS (0.1–0.5% of monitored events), models will incorporate techniques including:
Stratified sampling with oversampling of minority class events
Synthetic Minority Over-sampling Technique (SMOTE) for balanced training sets
Weighted loss functions emphasizing prediction of rare events during training
Threshold optimization using decision curve analysis
Internal validation will be based on k-fold cross-validation and bootstrapping.
Pilot Interventional Study (Phase 2)
In Phase 2, eligible pilgrims with diabetes will be equipped with CGM and wearable devices. Participants will be allocated into two groups:
1. Intervention group (AI-assisted care): Model outputs will be used to generate real-time alerts when predicted risk of severe hypo-/hyperglycemia within next 30–60 minutes exceeds a threshold. Alerts will be delivered to patients and supervising clinical team with standardized response protocols.
2. Control group (standard care): Participants will receive usual Hajj diabetes care; predictive alerts will not be visible to patients or clinicians.
Feasibility, acceptability, and preliminary effectiveness will be quantified by comparing incidence of severe hypo-/hyperglycemic events, DKA/HHS, healthcare utilization, and user satisfaction between groups.
Statistical Analysis
Descriptive statistics will summarize baseline characteristics and event rates. Continuous variables will be reported as means (SD) or medians [IQR].
For model development, performance metrics (AUC-ROC, sensitivity, specificity, PPV, NPV, calibration) will be reported with 95% confidence intervals.
In Phase 2, incidence of severe hypo-/hyperglycemia and DKA/HHS will be compared using rate ratios with 95% confidence intervals. Time-to-first event analyses (Kaplan–Meier curves and Cox proportional hazards models) may be performed. Analyses will follow the intention-to-treat principle with per-protocol sensitivity analyses.
Sample Size Justification: Based on Riley RD criteria for multivariable prediction model development, with approximately 10–15 events per candidate predictor variable and 40–50 candidate features, minimum of 400–600 events is required for stable model training.[
11,
12] For Phase 2, assuming baseline incidence of 8–10% in control group, enrolling 300–400 participants will provide 80% power to detect 30% relative risk reduction.
Ethical Considerations
The study protocol will be submitted to the Institutional Review Board (IRB) of the Riyadh First Health Cluster, Ministry of Health, Saudi Arabia, and any additional regulatory authorities as required.
Written informed consent will be obtained from all participants before any study-specific procedures.
Data will be de-identified and stored on secure, access-controlled servers, in accordance with applicable data protection laws and HIPAA standards where applicable.
Participants will be free to withdraw from the study at any time without any impact on their usual medical care.
Data Safety Monitoring Board (DSMB): An independent DSMB will review safety data at interim analyses conducted at 25%, 50%, and 75% enrollment in Phase 2. The DSMB will assess: (1) device-related adverse events, (2) study procedure-related serious adverse events, (3) alert system false alarm rates and clinical consequences, and (4) overall risk-benefit profile. Pre-specified stopping rules will address device safety signals, false positive rates >30%, or causally-related serious adverse events.
Discussion
This protocol describes a comprehensive, two-phase approach to AI-assisted prediction and prevention of acute glycemic crises in pilgrims with diabetes during Hajj. By combining CGM, wearable vital-sign monitoring, environmental data, and contextual information on meals, medications, and physical activity, the study seeks to capture the complex interplay of factors that influence glycemic control in this unique and challenging setting.
The preliminary feasibility analysis (Reference 13) established the pathophysiological basis linking dehydration to hyperglycemic crises in Hajj pilgrims. The current protocol extends this foundational work by conducting a rigorous, prospective validation study with large sample sizes, comprehensive data integration, and formal evaluation of an AI-assisted intervention system. This represents the first formal validation study of AI-assisted glycemic crisis prediction in mass gathering settings.
If successful, the predictive model developed in Phase 1 could provide clinicians and patients with a powerful tool to anticipate and mitigate impending severe hypo-/hyperglycemia, and potentially DKA/HHS, before clinical deterioration occurs. The pilot interventional study in Phase 2 will offer crucial insights into feasibility, usability, and preliminary effectiveness of deploying such a system under real-world Hajj conditions.
Beyond Hajj, the concepts and tools developed here may be applicable to other mass gatherings, hot climates, and high-risk populations where rapid fluctuations in environmental and behavioral factors impact glycemic control. This work aligns with broader efforts to harness AI and digital health technologies to improve outcomes in chronic diseases, particularly in logistically complex settings.
Limitations
Several limitations should be acknowledged:
1. Data Capture Completeness: The demanding nature of Hajj may result in incomplete data capture due to device removal, sensor failure, or poor connectivity, potentially introducing bias. Mitigation strategies include redundant storage buffers, frequent data synchronization, and participant education on device maintenance.
2. Rare Event Frequency: Event rates for rare outcomes such as DKA and HHS may be relatively low within single Hajj season. Historical Hajj data show DKA/HHS incidence of 0.1–0.5% among pilgrims with diabetes, potentially limiting model training for these specific endpoints. Primary focus will be on severe hypo-/hyperglycemia, with DKA/HHS as exploratory endpoints.
3. Generalizability: Generalizability may be affected by differences in healthcare infrastructure, patient characteristics, and environmental conditions across Hajj seasons and countries of origin of pilgrims.
4. Implementation Challenges: Success of AI-assisted intervention will depend not only on model performance but also on user engagement and capacity of healthcare teams to respond promptly to alerts in crowded, time-pressured environment.
5. Technical Challenges: Intermittent connectivity, variable sensor adherence, and diverse device specifications across participants may introduce technical challenges during data collection and analysis.
Conclusion
This study aims to establish an AI-enabled framework for predicting and preventing acute glycemic crises in pilgrims with diabetes during Hajj. By rigorously developing and validating a predictive model and then testing an AI-assisted alert system in pilot interventional study, the project seeks to generate evidence that can inform large-scale implementation and guide best practices for digital diabetes care in mass gatherings and other high-risk settings.
The integration of CGM technology, advanced AI algorithms, wearable monitoring, and environmental data represents a novel approach to managing diabetes in extreme conditions. Success would demonstrate feasibility and effectiveness of AI-assisted systems in protecting vulnerable populations in logistically challenging environments.
Ethics Approval and Consent to Participate
This study protocol will be submitted to the Institutional Review Board (IRB) of the Riyadh First Health Cluster, Ministry of Health, Saudi Arabia, and any additional regulatory authorities as required. Written informed consent will be obtained from all study participants prior to enrollment. The study will be conducted in accordance with the Declaration of Helsinki and Good Clinical Practice guidelines.
Funding
No external funding has been secured at time of protocol preparation. Study may be supported by internal resources from Public Health Department of Riyadh First Health Cluster. Future funding sources, if obtained, will be disclosed accordingly.
Authors’ Contributions
A.A. (Amr Ahmed): Conceived study concept, designed methodology, drafted manuscript, primary responsibility for revisions. M.M.A. (Maher M. Akl): Contributed to scientific oversight, refined methodology, provided critical review. S.R. (Sharifa Rodaini): Clinical expertise in primary care diabetes management, contributed to participant recruitment strategies, protocol implementation planning, and local context adaptation. All authors have read and approved the final version of the manuscript.
Conflicts of Interest
The authors declare that they have no competing interests related to this study.
Data Availability
No datasets have yet been generated or analyzed for this protocol. Upon completion of study, de-identified datasets may be made available upon reasonable request to corresponding author in accordance with ethical and legal regulations.
References
- Umpierrez GE, et al. Hyperglycemic crises in adults with diabetes: a consensus report. Diabetes Care. 2024;47(8):1257–1275. [CrossRef]
- Dhatariya K, et al. Hyperglycaemic crises in adults with diabetes: a consensus report. Diabetologia. 2024;67(8):1547–1560. [CrossRef]
- Alahmad B, et al. Association between heat exposure and hospitalization for diabetic ketoacidosis, hyperosmolar hyperglycemic state and hypoglycemia. Environ Int. 2022;166:107323. [CrossRef]
- Ibrahim M, et al. Recommendations for management of diabetes and its complications during Hajj. BMJ Open Diabetes Res Care. 2018;6(1):e000574. [CrossRef]
- Rizzo A, et al. Hypoglycemia event prediction from continuous glucose monitoring using ensemble learning. Front Clin Diabetes Healthc. 2022;3:1066744. [CrossRef]
- Giammarino F, et al. A machine learning model for week-ahead hypoglycemia prediction. J Diabetes Sci Technol. 2024;18(3):e13891. [CrossRef]
- Shao J, et al. Generalization of a deep learning model for continuous glucose monitoring across populations with type 1 diabetes. JMIR Mhealth Uhealth. 2024;12(1):e45821. [CrossRef]
- Guan Z, Li H, Liu R, Cai C, Hou X. Artificial intelligence in diabetes management: recent progress and future perspectives. Cell Rep Med. 2023;4(10):101213. [CrossRef]
- Peixoto H, et al. Ambient heat and risk of serious hypoglycemia in older adults with diabetes. Diabetes Care. 2024;47(3):412–420. [CrossRef]
- Rowlands AV, et al. Ambient heat and diabetes hospitalizations: does the timing of heat matter? Sci Total Environ. 2023;857:159430. [CrossRef]
- Riley RD, et al. Calculating the sample size required for developing a clinical prediction model. BMJ. 2020;368:m441. [CrossRef]
- Riley RD, et al. Minimum sample size for developing a multivariable prediction model: Part II—binary and time-to-event outcomes. Stat Med. 2019;38(7):1276–1296. [CrossRef]
- Ahmed A, Akl M, Mahmoud E. Heat stroke and hyperosmolar hyperglycemia state: two faces of the same coin (dehydration) in the Hajj journey. Int J Travel Med Glob Health. 2024;12(4):225–228. [CrossRef]
- Escalating climate-related health risks for Hajj pilgrims to the Kingdom of Saudi Arabia. BMJ. 2024;385:e077584. [CrossRef]
- Ji C, et al. Continuous glucose monitoring combined with artificial intelligence: a systematic review of applications in diabetes management. J Diabetes Investig. 2025;16(3):e13758. [CrossRef]
|
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).