Abstract
Aims:
To identify risk factors for hyperglycemia in emergency department visits within 1 year following type 2 diabetes diagnosis.
Methods:
In this retrospective cohort study, electronic medical record data from 3333 adult patients newly diagnosed with type 2 diabetes across 57 primary care clinics in West Michigan between April 2021 and January 2023 were analyzed. The primary outcome was hyperglycemia at ED encounters within 12 months of diagnosis. General linear/Cox regression models were used to identify risk factors, adjusting for demographics, clinical characteristics, and medications.
Results:
Of 3333 patients (mean age 61.8 years, 56.9% male), 68 (2.0%) experienced hyperglycemia-related ED visits during follow-up. Key risk factors included history of depression (aOR 3.01, 95% CI 1.64-5.52, P < .001), and higher initial HbA1c values (aOR 1.74 per percentage point increase, 95% CI 1.49-2.02, P < .001). Protective factors included metformin (aOR 0.21, 95% CI 0.11-0.39, P < 0.001) and sulfonylureas (aOR 0.11, 95% CI 0.02-0.53, P = .006) prescriptions. Other clinical and demographic factors showed no statistically significant associations.
Conclusions:
A history of depression emerged as a risk factor for hyperglycemia in emergency department visits following type 2 diabetes diagnosis. These findings emphasize the particular importance of addressing psychological distress in diabetes care during the vulnerable post-diagnosis period.
Keywords
Introduction
Type 2 diabetes mellitus represents a significant and growing public health challenge, accounting for approximately 90% of all diabetes cases, with substantial implications for both individual health outcomes and healthcare systems. 1 The economic burden of diabetes care in the United States (US) has risen dramatically in the past decade, 2 and is now estimated to be more than $412 billion.
The period following initial diabetes diagnosis represents a particularly vulnerable time for patients, where they must simultaneously manage multiple challenges: initiation of medications, lifestyle modifications, psychosocial coping with a new condition, blood glucose monitoring, and navigation of new healthcare services.3-5 On the other hand, not meeting glycemic goals within the first year after diagnosis is associated with increased long-term risk for microvascular and macrovascular complications and higher mortality. 6
Failing to manage all these various tasks can lead to adverse outcomes, with hyperglycemic emergencies requiring emergency department (ED) visits being one of the most feared as they can be potentially life threatening.7,8 Hyperglycemic emergencies include diabetic ketoacidosis (with higher risk in younger people with type 1 diabetes) and hyperglycemic hyperosmolar state (more common among older people with type 2 diabetes). 9 Various psycho-physical as well as socioeconomic factors have been identified as contributing to hyperglycemic emergencies, such as infections (particularly urinary tract infections and pneumonia), psychological stress, omission of insulin therapy, and limited access to primary care.10-12 The US Center for Disease Control (CDC) estimated a total of 267 000 ED treatments with diagnosed hyperglycemic crisis in the US in 2019, 1 other researchers have found increasing rates in the last decade and during the coronavirus disease-19 (COVID-19) pandemic.9,13
The intersection of diabetes and mental health problems adds another layer of complexity to patient care. Depression is common among patients with type 2 diabetes 14 and patients with diabetes are 2 times more likely to be diagnosed with a major depressive disorder. 15 Depressive mood can negatively impact disease self-management and increase healthcare utilization.7,16 A previous study has shown that nearly half of the patients with recurrent hyperglycemic emergencies had depressive moods and that these patients are more likely to discontinue antihyperglycemic medication. 17
While these associations are well-documented among established diabetes patients, this study aims to identify risk factors for hyperglycemia in emergency department encounters during the critical first year following type 2 diabetes diagnosis.
Methods
This retrospective cohort study utilized Electronic Medical Record (EMR) data from 57 primary care clinics, encompassing both family medicine and internal medicine clinics. This study was reviewed by the Corewell Health institutional review board and deemed non-human subject research (Decision #2022-337). Study results are reported in accordance with the STROBE (Strengthening the Reporting of Observational Studies in Epidemiology) guidelines for cohort studies. 18
Setting
This study was conducted within the Corewell Health West system, a large non-profit managed healthcare organization in West Michigan. The system comprises 22 hospitals and over 300 outpatient facilities. While most of the 57 primary care clinics in this study are located in the Grand Rapids-Kentwood-Muskegon Combined Statistical Area with approximately 1.4 million people residing in urban and suburban communities, a significant proportion of clinics are situated in more rural areas of Northern Michigan.
According to the state’s Behavioral Risk Factor Surveillance System, 10.8% of adult residents or approximately 855 000 people in Michigan had a diagnosed diabetes in 2021. 19 This is slightly above the national average of 10.0%. 20
Sample
The study included adult patients (≥18 years) who had an encounter between April 1, 2021, and January 31, 2023, in which either (a) type 2 diabetes was newly diagnosed (ICD-10: E11), or (b) a first-ever HbA1c value exceeding 6.5% (48 mmol/mol) was recorded. Patients were required to be established with a primary care provider in the system. Exclusion criteria were: type 1 diabetes diagnosis (ICD-10: E10), gestational diabetes (ICD-10: O24.4), age <18 years, ongoing prescribed systemic glucocorticoids exceeding 2.5mg prednisone equivalent (ATC H02A, H02B), Cushing’s syndrome diagnosis (ICD-10: E24), or being newly established in the clinic without previous visits. Patients with prediabetes (ICD-10: R73.03) were included if they met the above-mentioned criteria.
The data for this study was extracted from electronic medical records (EMR, Epic HYPERSPACE, Epic Systems Corporation, Verona WI, USA) by Corewell Health’s Honest Broker team. All personal health information was de-identified before it was provided to researchers. The data extract covered the period from April 1st, 2021, to March 31st, 2022, plus a 12-month follow-up period for each patient.
This study utilized a pragmatic approach to sample size, including all eligible subjects from the 57 participating primary care clinics within the specified time frame. As a full survey of the target population, formal power calculations were not conducted prior to data collection.
Outcome
The primary outcome of this study was the diagnosis of hyperglycemia in ED visits following 1 year of inclusion. This outcome was operationalized as any ED visit where one of the following ICD-10 diagnoses was issued: E11.65 (Type 2 diabetes mellitus with hyperglycemia, various specifications including with or without long-term insulin use and uncontrolled), R73.9 (Hyperglycemia), E11.00 (Type 2 diabetes with hyperosmolar hyperglycemic state), E11.10 (Diabetic ketoacidosis without coma associated with diabetes), and E13.10 (Diabetic ketoacidosis without coma associated with other specified diabetes mellitus). The occurrence of a hyperglycemia during an ED visit was treated as a binary outcome with patients classified as either having experienced such a visit or not.
Measures
Sociodemographic variables were extracted from the EMR at the time of inclusion and included age (in years), sex, race, and Hispanic ethnicity, and type of health insurance (Medicare, Medicaid, private, or none). Race and Hispanic ethnicity information was self-reported by patients upon enrollment at their respective clinics. Categories for race and ethnicity followed the grouping of the US Office of Management and Budget groups. Race and ethnicity were included as variables given their established associations with diabetes outcomes and healthcare utilization patterns, and to assess potential disparities in access and quality of care. 1 For the statistical analyses, Race and Hispanic ethnicity was grouped as follows: First, individuals identifying with Hispanic ethnicity were categorized as “Latino/Latina/Latinx” regardless of their racial identification. Those not identifying as Hispanic were then categorized based on their self-reported race: Non-Hispanic White, American Indian or Alaska Native, Asian, Black or African American, or Other. The last category included individuals who selected multiple races or chose not to identify with the provided categories as well as Native Hawaiian or Other Pacific Islanders due to their small group size in our sample.
Clinical covariates included comorbidities identified through ICD-10 codes present in the patient’s record prior to inclusion. These comprised hypertension (I10), hyperlipidemia (E78), chronic ischemic heart disease (I25), chronic inflammatory conditions (D89.9, M30-M36, K50-K52, K75.4), malignancies (C00-D48), and depression (F32). All comorbidities were required to be documented in the patient’s medical record prior to the diabetes diagnosis to establish temporal precedence and prevent the likelihood of reverse causation.
Diabetes medication prescriptions were categorized into 7 main classes based on their active ingredients: insulin, metformin, dipeptidyl peptidase-4 (DPP-4) inhibitors, sodium-glucose cotransporter-2 (SGLT2) inhibitors, glucagon-like peptide-1 (GLP-1) receptor agonists, sulfonylureas (including glinides), and glitazones. Combination products were coded according to their components (e.g., empagliflozin-metformin was coded as both SGLT2 inhibitor and metformin). For each medication class, a binary variable was created indicating whether the medication was prescribed at least once during the 12-month period.
Body mass index (BMI, kg/m²) was calculated using height and weight measurements taken during clinic visits at index encounter or in case of absence of value, in encounters following the first month of the index encounter. HbA1c values (%) were obtained at index encounter or in case of absence for the subsequent 3-month period. When multiple values were available, the mean was calculated to account for potential variability.
Statistics
Descriptive statistics were used to characterize the study population, with continuous variables presented as means and standard deviations, and categorical variables as frequencies and percentages. Bivariate analyses were conducted to compare characteristics between patients who experienced hyperglycemia-related ED visits and those who did not, using chi-square tests or the Fisher-Freeman-Halton test for categorical variables and the Mann-Whitney U test for continuous variables, where applicable.
The primary analysis employed binary general logistic regression models to assess factors associated with hyperglycemia-related ED visits. For the model, sociodemographic factors (age, sex, race/ethnicity, insurance type) were included to account for population characteristics, and clinical variables such as HbA1c, and comorbidities were incorporated due to their established associations with diabetes outcomes. Medication use was included as they directly modify blood glucose levels in various ways and with various efficacies. To account for the residential location and received care, we further adjusted for the respective clinic site.
Cases with missing values were excluded from the respective analyses, resulting in complete-case analyses. Tables characterizing the entire sample indicate missing values for each variable.
Furthermore three sensitivity analyses were conducted: (1) a modified logistic regression replacing the insurance type variable with a dichotomous indicator of coverage through the health system’s proprietary insurance, to address potential bias from unrecorded out-of-network emergency care, (2) a Cox proportional hazards model to account for time-to-event periods for hyperglycemic ED visits, and (3) a log-rank test was conducted to determine if there were differences in the distribution for hyperglycemic ED visits over time between patients with and without history of depression.
Results of regression analyses are indicated as adjusted odds ratios (aOR) and of the Cox regression as hazard ratios (HR) with corresponding 95% confidence intervals (CI). P-values <.05 were defined à priori as statistically significant. All analyses were performed using SPSS version 29 (IBM Corp., Armonk, NY).
Results
In total, data from n = 3333 patients of 57 primary care clinics were analyzed for this study. Each clinic provided on average data of 58.5 patients to the dataset (SD 54.1). Patients had a mean age of 61.8 years (SD 14.6), more often male sex (56.9%) and predominantly non-Hispanic White (83.4%). At their diabetes diagnosis, they had on average an HBA1c value of 7.6% (SD 1.4) and a BMI of 34.2 kg/m² (SD 7.5). Almost three-quarters of the patients received Metformin (64.6%) as part of their drug therapy. Of all diabetes medications, 56.8% were prescribed in the first 2 months following the diagnosis.
Of the n = 3333 patients, 68 (2.0%) had at least 1 ED visit coded with a state of hyperglycemia. These ED treatments were recorded after a mean of 140 days (SD 119) following the inclusion. Patients with hyperglycemic ED visits were significantly younger (mean age 55.6 vs. 62.0 years, P < .001) and had higher HbA1c levels at inclusion (mean 9.4% vs. 7.6%, P < .001) compared to those without such visits. Notably, a history of depression was more prevalent among patients with hyperglycemic ED visits (47.1% vs. 23.9%, P < .001). Regarding medication use, patients with hyperglycemic ED visits were less likely to be on metformin (30.9% vs. 65.3%, P < .001) or sulfonylureas (2.9% vs. 16.3%, P = .003), but more likely to be on insulin (33.8% vs. 19.4%, P = .003). All characteristics are shown in Table 1.
Characteristics of Enrolled Patients.
Missing values: Race and Ethnicity n = 32, Comorbidities n = 7, BMI n = 876.
Chi-Square/Fisher-Freeman-Halton test if not otherwise stated, hyperglycemic ED visits versus non-hyperglycemic ED visits.
Mann-Whitney U test.
Including Multiple Races, Chose not to identify, Native Hawaiian, or Other Pacific Islander.
Of 3333 eligible patients, 3295 (98.9%) had complete data and were included in the regression analyses. Applying a generalized linear regression model, a diagnosis of depression was associated with hyperglycemic ED visits, they had 3-times higher odds of experiencing a hyperglycemic ED visit than those without such an diagnosis (aOR 3.01, 95% CI 1.64-5.52, P < .001). HbA1c levels at inclusion were also significantly associated with increased risk, with each percentage point increase in HbA1c corresponding to 74% higher odds of a hyperglycemic ED visit (aOR 1.74, 95% CI 1.49-2.02, P < .001). Conversely, patients with a drug treatment of metformin had lower odds (aOR 0.21, 95% CI 0.11-0.39, P < .001), as well as those with prescriptions for sulfonylureas (aOR 0.11, 95% CI 0.02-0.53, P = .006) of experiencing a hyperglycemic ED visit. Demographic factors such as age, sex, race/ethnicity, and insurance type did not show statistically significant associations in the model that was further adjusted for the respective clinic. All aORs are displayed in Table 2.
Logistic Regression (n = 3295 Patients With Newly Diagnosed Type 2 Diabetes or First Ever HbA1c > 6.5%) With Dichotomy Outcome of having a Hyperglycemic ED Event in the Following Year.
Model further adjusted for primary care clinic (aORs omitted).
Including Native Hawaiian or Other Pacific Islander.
All dichotomous variables (hypertension, hyperlipidemia, chronic inflammatory/rheumatic diagnosis, chronic ischemic heart disease, malignancy/cancer diagnosis, depression, and medications) are coded as present vs. absent, with absence serving as the reference category.
To address potential bias from unrecorded out-of-network emergency care, a sensitivity analysis was conducted by adding a dichotomous variable indicating coverage through the health care system’s own insurance company. This modified regression model yielded results consistent with our primary analysis, maintaining the same statistical significance and similar effect sizes for all previously identified factors (regression table omitted).
As a further sensitivity analyses, a log-rank test was conducted to determine if there were differences in the distribution for hyperglycemic ED visits over time between patients with and without history of depression. The survival distributions for the two groups were statistically significantly different, χ²(1) = 19.465, P < .001. Figure 1 shows the cumulative hyperglycemic ED treatments over a time of 12 months. A Cox regression model that included the parameter of the generalized model yielded nearly same outcomes and effect sizes (hazard ratios [HR] are shown in Supplemental Table 1).

Cumulative hyperglycemic ED events among diabetic patients with and without history of depression over a 12 month period following diabetes diagnosis (n = 3333).
Discussion
Our study revealed, that while ED visits with hyperglycemia were sparse, patients with a history of depression were 3 times more likely to have those ED encounters in the year following their type 2 diabetes diagnosis than those without depression. These findings were robust in the bivariate and the adjusted regression models. Besides that, an association between initial HbA1c levels and hyperglycemic ED visits and protective effects in patients prescribed metformin and sulfonylurea was found.
Previous research has established a bi-directional link between depression and diabetes complications, whereas depression increases the risk of complications and complications increase the risk of depression. 21 Depression has been found to impede diabetes self-management, 22 with patients with depression being more likely to struggle with medication intake and lifestyle changes,17,23,24 both needed to prevent hyperglycemic incidents. Depression and increased HbA1c have been linked with increased odds of receiving ED treatment for hyperglycemic states. 14
Our findings add to the current literature that this risk is particularly pronounced in the period immediately following a new diabetes diagnosis, a time frame that has been described as particularly challenging and burdensome for patients when they must process their new chronic condition while learning disease management and establishing care relationships. 25 Other research has established changing self-care patterns among people with type 2 diabetes across the diabetes trajectory, for example, with more recently diagnosed patients monitoring their blood glucose less frequently. 26 The 3-fold increased risk of hyperglycemic emergencies in these patients thus likely reflects the additional mental burden that the diabetes diagnosis places on individuals already managing their diabetes health challenges. 27
Primary care physicians should acknowledge and discuss with patients how depression can add to the additional burden of managing diabetes. 3 Such discussions can help normalize patients’ struggles and create opportunities for collaborative problem-solving.24,28 Furthermore, our results support the American Diabetes Association Standards of Care comprehensive evaluation that includes initial and annual systematic mental health screening in diabetes care. 29 While routine depression screening in primary care is generally recommended 30 as providers struggle to recognize depressive symptoms in patients when not using standardized instruments 31 and screening rates remain often low. 32 Diabetic patients with comorbid depression should receive guideline-concordant treatment, 29 including antidepressant medication and collaborative treatment approaches, for example, with behavioral health specialists or diabetes care and education specialists.33,34 Studies have demonstrated that effective depression treatment not only improves mental health but also leads to better diabetes outcomes through improved self-management and glycemic control.35,36
Beyond depression screening, clinicians should also assess for diabetes distress, as these represent distinct but often overlapping conditions requiring different interventions.37,38 While diabetes distress may improve with targeted diabetes education and counseling, depression typically requires comprehensive mental health treatment.3,29
Several limitations should be considered when interpreting our results. First, we could not determine whether hyperglycemia was the primary reason for the emergency department treatment. However, in general significant hyperglycemia should not occur, and its presence indicates underlying management challenges. Hyperglycemia can contribute to various conditions necessitating emergency care treatments, including increased risk of falls, 39 impaired wound healing, 40 dehydration, 41 and many more. Therefore, the vast majority of emergency department visits involving hyperglycemia, whether as a primary or secondary diagnosis, represent a potentially preventable encounter.
Second, our reliance on a single health system’s EMR data may have missed emergency visits to other out-of-system hospitals and may limit its generalizability. The healthcare system, however, provides a comprehensive care network in the study area through 22 hospitals and numerous urgent-care centers, specialists, and primary care clinics. While some out-of-system visits may have been missed, this would likely affect patients with and without a history of depression equally, making a systematic bias unlikely. Furthermore, a sensitivity analysis where a variable for patients insured through the health care system’s proprietary insurance company was added and thus a variable for patients unlikely to seek out-of-system treatment to the regression model yielded similar results.
Third, the used data were limited to medication prescriptions and did not include information on whether prescriptions were actually dispensed or taken by patients. Hyperglycemic episodes may have resulted from either medication non-adherence or clinical inertia, particularly in cases where appropriate up-titration (e.g., of basal insulin) did not occur. The findings that lower hyperglycemia risk is associated with metformin and sulfonylurea prescriptions, require confirmation through future studies that include data on actual medication use in addition to prescription records.
The study’s key strengths are its large sample size and diverse clinical settings across 57 primary care clinics.
In conclusion, this study demonstrates that a history of depression significantly increases the risk of hyperglycemic complications in newly diagnosed type 2 diabetes patients. While hyperglycemic emergencies were relatively rare events, they occurred disproportionately among patients with a history of depression, highlighting the need for targeted support during the vulnerable post-diagnosis period.
Supplemental Material
sj-docx-1-jpc-10.1177_21501319251366123 – Supplemental material for Risk Factors for Hyperglycemic Emergency Department Visits in Newly Diagnosed Type 2 Diabetes: History of Depression as a Key Predictor
Supplemental material, sj-docx-1-jpc-10.1177_21501319251366123 for Risk Factors for Hyperglycemic Emergency Department Visits in Newly Diagnosed Type 2 Diabetes: History of Depression as a Key Predictor by Frank Müller, Michael J. Bouthillier, Jepkoech Kottutt, Omayma Alshaarawy and Harland T. Holman in Journal of Primary Care & Community Health
Footnotes
Acknowledgements
None
Ethical Considerations
This study was reviewed by the Corewell Health institutional review board and deemed non-human subject research (Decision #2022-337), hence informed consent was not required.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: FM received funding as Peter C. and Pat Cook Endowed Clinical Research Fellow.
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Data Availability Statement
Datasets analyzed in this manuscript are not publicly available due to a decision to the responsible IRB.
Supplemental Material
Supplemental material for this article is available online.
References
Supplementary Material
Please find the following supplemental material available below.
For Open Access articles published under a Creative Commons License, all supplemental material carries the same license as the article it is associated with.
For non-Open Access articles published, all supplemental material carries a non-exclusive license, and permission requests for re-use of supplemental material or any part of supplemental material shall be sent directly to the copyright owner as specified in the copyright notice associated with the article.
