The association of depression and sleep disorders in patients with type 1 diabetes in Taiwan

The association between depression and sleep disorders in patients with type 1 diabetes mellitus (T1DM) in Taiwan is underexplored. We used a nationwide population-based dataset to evaluate the association of T1DM with these conditions in Taiwan from 2001 to 2019. Patients with T1DM were identified as cases, and 2 control groups were used for comparison: patients with type 2 diabetes mellitus (T2DM) and nondiabetic patients. Age, sex, date of diagnosis, and multiple comorbidities were included and matched using propensity score matching between cases and controls. The primary outcome of this study was to identify new occurrences of the first diagnosis of depression or sleep disorders. After matching, this study included 27,029 T1DM cases, 54,058 T2DM controls, and 108,116 nondiabetic controls. Patients with T1DM exhibited a 1.55-fold higher risk of developing depression (hazard ratio [HR] 1.55, 95% confidence intervals [CI] 1.48–1.61) and a 1.41-fold higher risk of experiencing sleep disorders (HR 1.41, 95% CI 1.37–1.46) compared to nondiabetic controls. Similarly, patients with T2DM displayed elevated risks of both depression (HR 1.39, 95% CI 1.34–1.43) and sleep disorders (HR 1.40, 95% CI 1.37–1.44) relative to non-diabetic controls. When comparing the T1DM and T2DM groups, T1DM patients demonstrated a slightly higher risk of depression (HR 1.11, 95% CI 1.07–1.16) but no significant difference in the risk of sleep disorders compared to T2DM patients. These results were consistent regardless of different ages or sexes. This study demonstrates a significant association between diabetes mellitus and the risk of depression and sleep disorders in a large cohort of Taiwanese patients.


Introduction
The prevalence of type 1 diabetes mellitus (T1DM) in Taiwan is increasing, [1] particularly affecting young children and persisting as a lifelong condition. [2][5][6][7] Mental health disorders, particularly depression and sleep disorder, have a documented prevalence in the general population and are known to compromise quality of life and functional capacity. [8,9]12] However, while the link between type 2 diabetes mellitus (T2DM) and mental health issues is well-established, [13][14][15][16] the specific challenges and prevalence of such disorders in T1DM have been underexplored. [17,18]This oversight persists despite evidence suggesting that the psychological burden may be even greater in T1DM due to the early onset and lifelong management challenges associated with the disease. [19,20][23] In response to this critical gap, our study utilizes populationbased dataset from the National Health Insurance Research Database (NHIRD) to systematically evaluate the risk of mental disorders among individuals with T1DM in Taiwan.By comparing these individuals with non-diabetic individuals and those with T2DM, this study aims to elucidate the psychological comorbidities associated with T1DM.

Data source
This study utilized the Taiwan NHIRD, which was released and audited by the Department of Health and the Bureau of the National Health Insurance Program for scientific research purposes.Taiwan's National Health Insurance, a mandatory universal health insurance program, was implemented in 1995 and provides comprehensive medical care coverage to nearly 99% of the Taiwanese population.In this study, we analyzed NHIRD dataset from January 1, 2011, to December 31, 2019.The Health and Welfare Data Science Center, part of Taiwan's Ministry of Health and Welfare, consolidates the NHIRD with other health databases to enhance data management and analytical processes.The NHIRD compiles comprehensive datasheets, including beneficiary registries, ambulatory and inpatient claims, diagnostic codes, pharmacy prescriptions, and medical facility details.The International Classification of Diseases, 9th Revision (ICD-9-CM) and International Classification of Diseases, 9th Revision (ICD-10-CM) coding system for disease diagnoses was employed to identify patients with T1DM and T2DM.All patient credentials and social security numbers were encrypted to ensure privacy and confidentiality.The study protocol was approved by the Institutional Review Board of Chung Shan Medical University Hospital, identified by the Institutional Review Board number CS17153.

Study group
In this study, cases comprised patients diagnosed with T1DM, as determined by clinical doctors during professional medical consultations, utilizing specific diagnostic codes from the ICD-9-CM: 250.x1, 250.x3;ICD-10-CM: E10.For comparison, 2 control groups were selected: patients with T2DM and nondiabetic individuals.T2DM patients were identified through diagnostic codes (ICD-9-CM: 250.xx, excluding 250.x1, 250.x3; ICD-10-CM: E11-E13).The index date was defined as the initial available visit indicating T1DM or T2DM diagnosis within the study period.To ensure the representativeness of the selected cohort, stringent criteria were applied.This included the requirement for both cases and control patients in the database to have attended outpatient departments a minimum of 3 times and to have been hospitalized at least once.For instance, patients with T1DM cases should have had at least 3 outpatient departments visit and at least one admission record.The same criteria were applied to the control groups to maintain consistency and comparability across the study population.
To ensure the accuracy of diabetes duration within this database, patients appearing before 2012 were excluded.This approach enables the identification of newly diagnosed diabetes patients, as those whose first appearance is in 2012 or later are considered as such.By implementing this criterion, we mitigate the inclusion of individuals with preexisting diabetes diagnoses, thus facilitating a more precise assessment of diabetes duration and its associated factors within the study population.
Comorbidities that could potentially influence the study were selected for analysis, including sex, age, urbanization status, insurance type, and yearly income.Additionally, disease comorbidities such as asthma, atopic dermatitis, and chronic conditions like hypertension, diabetes, cardiovascular disease, heart failure, and malignancy were included in the analysis.The rationale behind this comprehensive selection is to account for various factors that may confound the relationship between the primary outcomes of depression and sleep disorders and other variables of interest.By including these comorbidities and baseline medication data from the 6 months preceding the index date, we aim to control for potential confounders and enhance the accuracy and validity of our study findings.Detailed coding of diagnoses and comorbidities for this study is provided in Table S1, Supplemental Digital Content, http://links.lww.com/MD/N236.

Statistical analysis
All data were encrypted and analyzed by an independent statistician.Data analysis was conducted using SAS 9.4 software (SAS Institute Inc., Cary, NC).Descriptive statistics were utilized to summarize the demographic characteristics of the study population, presenting mean and standard deviation for continuous variables, and frequencies and percentages for categorical variables.Propensity score matching (PSM) was employed to match cases and controls.Given the higher incidence rates of depression and sleep disorders in both type 1 DM and type 2 DM patients, we chose a 1:2 matching ratio by age, sex, and diagnosis year to match between type 1 DM patients with type 2 DM patients.Additionally, considering the lower incidence rates of depression and sleep disorders in non-diabetic controls, we chose a 1:4 matching ratio for type 1 DM patients with nondiabetic controls.
For both PSM processes, the ATE of type 1 DM was calculated by logistic regression using the PROC PSMATCH procedure in SAS software.The ATE was calculated using covariates of age, sex, and year of DM diagnosis, and the matching algorithm was conducted using nested greedy matching with a caliper of 0.01.An absolute standardized mean difference (ASD) of <0.1 between the 2 groups after PSM was considered as well-balanced.
Table S2, Supplemental Digital Content, http://links.lww.com/MD/N237 demonstrates that most demographic and socioeconomic characteristics have similar distributions among the 3 groups, with an ASD of <0.1, indicating well-balanced groups.However, it is worth noting that, compared to non-DM individuals, patients with diabetes have slightly higher comorbidities and medication prescription proportions, as indicated by an ASD > 0.1.
The primary outcome variable, the occurrence of first diagnosis of depression or sleep disorders, underwent analysis using survival analysis techniques.Kaplan-Meier survival curves were generated to illustrate the cumulative incidence of depression and sleep disorders over time.The log-rank test was employed to assess differences in survival distributions between subgroups.
To evaluate the association between potential risk factors and the occurrence of depression and sleep disorders, univariate and multivariate Cox proportional hazards regression models were utilized.Hazard ratios (HRs) and 95% confidence intervals (CIs) were calculated to estimate the strength of association between each risk factor and the outcome, while adjusting for potential confounders.All statistical tests were two-tailed, and P-values <.05 were deemed statistically significant.

Results
The data analysis encompassed a total of 27,480,717 patients.Prior to matching, the study identified 60,167 new onset cases of T1DM.The T2DM control group comprised 2726,245 patients, while the non-diabetic group consisted of 24,694,305 patients.Following PSM, the cohort was refined to include 27,029 T1DM cases, 54,058 T2DM controls, and 108,116 non-diabetic controls (Fig. 1).
Table 1 presents the baseline characteristics of the matched diabetes population in this study.Across the index years from 2012 to 2018, the distribution of cases remained consistent, demonstrating well-matched cohorts throughout the study period.Sex distribution was balanced, with males accounting for 51.2% and females 48.8% of the cohort.Age distribution also exhibited homogeneity, with a comparable mean age at index across all groups, predominantly falling between 40-64 years old (51%).Urbanization status indicated a majority residing in urban areas (approximately 60%).The prevalence of comorbidities such as hypertension (40%) and hyperlipidemia (28%) was notably higher in diabetic groups, with corresponding medication usage also elevated.
Table 2 illustrates the risk of new occurrences of depression and sleep disorders within cohorts of T1DM, T2DM, and non-diabetic controls.The incidence rates of both depression and sleep disorders were notably elevated among individuals with diabetes compared to non-diabetic controls.Following adjustment for confounding variables, individuals with T1DM exhibited a 1.55-fold (HR 1.55, 95% CI 1.48-1.61)higher risk of developing depression and a 1.41-fold (HR 1.41, 95% CI 1.37-1.46)higher risk of experiencing sleep disorders compared to non-diabetic controls.Similarly, individuals with T2DM displayed elevated risks of both depression (1.39-fold) with HR 1.39, 95% CI 1.34-1.43and sleep disorders (1.40-fold) with HR 1.40, 95% CI 1.37-1.44relative to non-diabetic controls.Interestingly, when comparing T1DM and T2DM groups, T1DM patients demonstrated a slightly higher risk of depression (1.11-fold) with HR 1.11, 95% CI 1.07-1.16but no significant difference in the risk of sleep disorders compared to T2DM patients.
Figure 2A presents a Kaplan-Meier curve comparing the incidence of depression among patients with T1DM, T2DM, and non-diabetic patients.The curve diverges after 6 months of follow-up, indicating a higher risk of depression in both T1DM and T2DM compared to non-diabetic patients.Similarly, Figure 2B displays a Kaplan-Meier curve illustrating the incidence of sleep disorders among the same groups.While the association between T1DM and T2DM is comparable, both groups exhibit a significantly higher risk of sleep disorders compared to non-diabetic patients.
Table 3 presents a subgroup analysis of sex-stratified risk for depression and sleep disorders among individuals with T1DM and T2DM, compared to non-diabetic controls.The findings from this analysis align consistently with the main results, demonstrating that both male and female patients with diabetes exhibit significantly elevated risks of depression and sleep disorders compared to non-diabetic controls.After adjusting for confounding factors, patients with T1DM consistently displayed higher risks of depression compared to those with T2DM and non-diabetic controls, regardless of gender.Specifically, males with T1DM had an HR of 1.73 (95% CI: 1.65-1.82)for depression, while females had an HR of 1.52 (95% CI: 1.44-1.60).Similarly, for sleep disorders, individuals with T1DM exhibited slightly higher risks compared to those with T2DM.In females, the risk was notably higher, with an HR of 1.05 (95% CI: 1.00-1.10)compared to T2DM.
Table 4 presents the age-stratified risk of depression and sleep disorders among patients with T1DM and T2DM, compared to non-diabetic controls.The data is divided into 4 subgroups: <20, 20-40, 40-65, and ≥65.For depression, individuals with diabetes consistently exhibited higher incidence rates across all age categories compared to non-diabetic controls.After adjusting for confounding factors, individuals with T1DM consistently displayed elevated risks of depression compared to those with T2DM and non-diabetic controls across all age groups.Notably, the risk was particularly pronounced in the older age groups, with individuals aged 65 and above showing the highest risk, with an HR of 1.64 (95% CI: 1.55-1.73).However, for sleep disorders, while individuals with diabetes exhibited elevated risks across all age categories, the difference in risk between T1DM and T2DM was not statistically significant.

Discussion
This study demonstrated a significant association between diabetes mellitus and the risk of depression and sleep disorders in a large cohort of Taiwanese patients.Our findings underscore the substantial burden of mental health disorders among diabetic patients, revealing consistently elevated risks of depression and sleep disorders across different age and sex strata.Notably, individuals with T1DM exhibited a particularly heightened vulnerability to depression.Furthermore, while the risk of sleep disorders was elevated in both T1DM and T2DM groups compared to non-diabetic controls, differences between T1DM and T2DM were less pronounced.
While our study demonstrated the association between depression, sleep disorders, and diabetes, it is important to note baseline differences, particularly in the prevalence of hypertension, cardiovascular diseases, and the use of benzodiazepines.Despite our meticulous efforts to match cases and controls, these discrepancies persisted and may have influenced our observed outcomes.These variations in baseline characteristics could reflect underlying differences in health status, medication use, and comorbidity burden among the study cohorts, potentially confounding our results.However, it is noteworthy that our findings are in line with existing literature, which consistently reports a higher prevalence of depression among patients with both type 1 and type 2 diabetes. [24]reover, this study showed a slightly elevated risk of depression in patients with T1DM compared to those with T2DM, with a HR of 1.11 (95% CI: 1.07-1.16).This finding is consistent with the distinct challenges faced by T1DM patients, including the immediate initiation of exogenous insulin therapy upon diagnosis, lifelong disease management, and heightened psychological distress, particularly among younger age groups. [25]Conversely, T2DM patients, often initiating treatment with lifestyle modifications and oral antidiabetic medications, may experience a less immediate impact on mental well-being, given the older age at diagnosis and prevalence of comorbidities. [26]Interestingly, our study did not find a significantly increased risk of sleep disorders in T1DM patients (HR: 1.01, 95% CI: 0.97-1.04).
The relationship between age and the risk of depression and sleep disorders differs between T1DM and T2DM (table 4).In T1DM, the risk of depression remains consistently elevated across all age groups, indicating a stable association regardless of age.However, in T2DM, there is a notable decreasing trend in the risk of depression with increasing age, suggesting that older individuals with T2DM may face relatively lower risks of depression compared to younger counterparts.Similarly, for sleep disorders, the pattern is distinct between T1DM and T2DM.In T1DM, younger age groups exhibit a higher risk of sleep disorders, with the risk decreasing as age advances.Conversely, in T2DM, there is also a decreasing trend in the risk of sleep disorders with increasing age, indicating a similar pattern to depression.
Previous studies have established a bidirectional relationship between diabetes mellitus and depression, with each condition exacerbating the other's severity and prognosis. [5]Our study contributes to this understanding by revealing a particularly heightened vulnerability to depression among individuals with T1DM.This finding highlights the need for targeted mental health screening and management strategies within diabetes care protocols, especially for patients with T1DM who may be at increased risk of developing depression. [27,28]dditionally, this study indicates that the risk of sleep disorders is elevated in both T1DM and T2DM groups compared to non-diabetic controls.While this association has been documented previously, [29,30] our study adds nuance by demonstrating that the differences in risk between T1DM and T2DM were less evident.This can be attributed by various physiological and psychological mechanisms.For sleep disorders, both T1DM and T2DM patients experience similar risks due to several shared factors.Blood glucose fluctuations in both types of diabetes can disrupt sleep, with nocturnal hypoglycemia or hyperglycemia  affecting sleep quality.Diabetes-related complications such as neuropathy, which causes pain and discomfort, can also impair sleep in both groups.Furthermore, both T1DM and T2DM patients may experience frequent urination due to polyuria, a common symptom in diabetes that disrupts sleep.These shared disruptions can lead to a similar prevalence of sleep disorders among T1DM and T2DM patients, explaining the lack of significant difference in this aspect. [30]he strengths of our study lie in its comprehensive methodology.Firstly, the utilization of a nationwide population-based dataset ensures a large and diverse sample, enhancing the generalizability of our findings to the broader Taiwanese population.Secondly, our study spanned an extended period, allowing for a longitudinal analysis of the relationship between diabetes mellitus and mental health outcomes, providing valuable insights into temporal trends and trajectories.Additionally, the meticulous matching of cases and controls, along with the adjustment for confounding variables, enhances the internal validity of our results.Finally, the inclusion of a wide range of potential confounders and comorbidities in our analyses ensures a thorough examination of the association between diabetes and mental health outcomes.
Despite its strengths, our study has several limitations that should be acknowledged.Firstly, as with any observational study, we cannot establish causality between diabetes mellitus and mental health outcomes due to the potential for unmeasured confounding factors.Secondly, like any large administrative database, the NHIRD has certain limitations that must be considered when interpreting our study results, including data accuracy.The NHIRD uses ICD-9-CM and ICD-10-CM coding systems for disease diagnoses, which carry a potential risk of coding errors or misclassification.To address this, we refer to data validation studies.For instance, the sensitivity and positive predictive value (PPV) for diabetes in the NHIRD have been reported as 90.9% and 92.0%, respectively. [31]owever, the validation of depression diagnoses in administrative data indicates a lower accuracy, with a sensitivity of 61.4% and a PPV of 69.7%. [32]Therefore, the diagnosis of depression may have lower diagnostic accuracy compared to diabetes.Thirdly, although we adjusted for various confounders, residual confounding may still exist, which could influence the observed associations.Additionally, the lack of detailed clinical information, such as disease severity or treatment adherence, limits our ability to explore potential mechanisms underlying the observed associations.Lastly, our study was conducted in the Taiwanese population, and thus, the generalizability of our findings to other populations may be limited.However, the physiological mechanisms linking diabetes and depression are likely universal.Cultural differences in the perception and management of diabetes and mental health may influence depression and sleep disorder prevalence.Studies in the United States and Europe, as well as multicenter cohort studies like the Diabetes Attitudes, Wishes and Needs (DAWN) study, have reported similar associations, suggesting our findings may be applicable to other contexts. [33]hile our study provides valuable insights into the association between diabetes mellitus and mental health outcomes, there are several prioritized avenues for future research.High priority should be given to prospective cohort studies to examine the temporal relationship between diabetes diagnosis and mental health outcomes over time.Randomized controlled trials should also be prioritized to evaluate the effectiveness of integrated care models that combine diabetes management with mental health support.Additionally, medium priority should be assigned to cross-sectional and longitudinal studies investigating underlying mechanisms, such as glucose control, socioeconomic status, and frequency of insulin injections.Finally, randomized controlled trials and observational studies assessing the effectiveness of psychoeducation programs and pharmacological interventions in managing depression, sleep disorders, and other mental health concerns among individuals with diabetes are also important.These research designs will help to address the remaining gaps and advance our understanding of the complex interplay between diabetes and mental well-being.
In conclusion, our study highlights the significant association between diabetes mellitus and mental health outcomes, particularly depression and sleep disorders, in a large cohort of Taiwanese patients.These findings underscore the critical importance of integrating mental health screening and management into routine diabetes care protocols.The heightened vulnerability observed, especially among patients with T1DM, necessitates proactive measures by healthcare providers to address mental health concerns effectively.Moreover, our results emphasize the need for continued research and clinical efforts to better understand and mitigate the impact of mental health issues in diabetic populations, thereby enhancing overall diabetes care and public health outcomes.

Figure 1 .
Figure 1.Flow diagram of this study population.

Table 1
Baseline characteristics of matched diabetes population inTaiwan.

Table 2
Association of depression and sleep disorders among patients with type 1 diabetes mellitus, type 2 diabetes mellitus, and nondiabetic controls.

Table 3
Subgroup analysis of sex-stratified risk of depression and sleep disorders among patients with type 1 diabetes mellitus, type 2 diabetes mellitus, and non-diabetic controls.= adjusted hazard ration (adjusted by age, sex, and year of diagnosis), DM = diabetes mellitus, T1DM = type 1 diabetes mellitus, T2DM = type 2 diabetes mellitus.

Table 4
Subgroup analysis of age-stratified risk of depression and sleep disorders among patients with type 1 diabetes mellitus, type 2 diabetes mellitus, and non-diabetic controls.= adjusted hazard ration (adjusted by age, sex, and year of diagnosis), DM = diabetes mellitus, T1DM = type 1 diabetes mellitus, T2DM = type 2 diabetes mellitus.