Abstract
Background Irritable bowel syndrome (IBS) and inflammatory bowel disease (IBD) commonly coexist with depression; however, large-scale data on this relationship remain limited. We conducted a retrospective cohort study utilizing the TriNetX database to evaluate direction-specific associations between gastrointestinal (GI) disorders and depression. Methodology Adults aged 18-65 years with new diagnoses of IBS, IBD, and depression were included. Cohorts were matched to controls without the index condition, and the one-year incidence of new-onset depression after IBS or IBD and new-onset IBS or IBD after depression was assessed. We also examined the one-year depression risk among IBD patients treated with sulfasalazine compared with those treated with no sulfasalazine and mesalamine. Results Within one year, 6.2% of IBS patients developed depression versus 3.1% of controls (absolute risk difference = 3.1 percentage points; risk ratio (RR) = 2.00, 95% confidence interval (CI) = 1.97-2.03), and 3.9% of IBD patients developed depression versus 2.8% of controls (absolute risk difference = 1.1 percentage points; RR = 1.38, 95% CI = 1.35-1.41). In patients with depression, 0.83% developed IBS versus 0.37% of controls (absolute risk difference = 0.46 percentage points; RR = 2.25, 95% CI = 2.21-2.28), and 0.24% developed IBD versus 0.16% of controls (absolute risk difference = 0.08 percentage points; RR = 1.47, 95% CI = 1.44-1.51). In IBD patients, sulfasalazine use was associated with a higher incidence of depression compared with no sulfasalazine (12.9% vs. 3.1%; RR = 4.14, 95% CI = 3.53-4.85) and mesalamine (12.8% vs. 10.6%; RR = 1.21, 95% CI = 1.09-1.34). Conclusions In this large retrospective cohort study, GI disorders and depression were associated with increased risk of subsequent diagnoses in separate temporal analyses. These findings support existing literature and highlight the need for further research to clarify these mechanisms.