Introduction

Gastric cancer incidence and mortality have been declining in the last few decades [1], trends that parallel the decline in Helicobacter pylori infection prevalence [2]. However, data from cancer registries have indicated a recent increase in gastric cancer incidence among younger generations globally, suggesting risk factors other than H. pylori are involved [3,4,5].

A possible explanation for increasing gastric cancer risk is a concomitant rise in the prevalence of autoimmune conditions, especially in high-income countries [6,7,8]. Autoimmune conditions frequently cause inflammation, which has been found to precede the initiation of many cancers [9, 10]. Gastric cancer, in particular, has been strongly associated with pernicious anaemia [11, 12]. Pernicious anaemia is the result of advanced autoimmune gastritis, a condition involving the destruction of HCl-secreting gastric parietal cells [13,14,15]. Hypergastrinaemia arising from loss of parietal cells drives development of enterochromaffin cell hyperplasia that can further develop into gastric carcinoids [14, 16]. Also, when parietal cells are lost, less intrinsic factor is produced, and the body’s ability to bind vitamin B12 is diminished [17]. If this gastritis becomes chronic, the resulting exposure to cytokines and other immune system modulators can lead to atrophy. Similar to the well-established cascade of carcinogenesis triggered by chronic H. pylori infection [18], autoimmune atrophic gastritis may progress to adenocarcinoma [14].

The “hygiene hypothesis” suggests that more recent generations may lack exposure to microbes such as H. pylori early in life due to improved sanitation and increased use of antibiotics and that this absence of exposure may predispose them to allergic and autoimmune conditions later in life [19]. Notably, autoimmunity is associated with gastric adenocarcinoma in addition to carcinoid (i.e., neuroendocrine) tumours [15]. In recent decades, the distribution of gastric cancer incidence has shifted from older male populations toward younger female populations [3, 12, 20]. Autoimmune gastritis disproportionately affects females, which corresponds to the aforementioned trend [21].

Few previous studies have evaluated the association between gastric cancer and multiple autoimmune conditions. The ones that did were limited by the number of exposures they assessed, restricted to older age groups or males, or without consideration of female-specific associations [22,23,24,25]. In this longitudinal population-based database, we aimed to examine associations between autoimmune disease and gastric cancer among males and females in a population that includes participants of younger ages and captures exposure at an early age.

Methods

Study population

We conducted a nested case-control study within the Clinical Practice Research Datalink (CPRD) GOLD database, a large longitudinal database in the United Kingdom of primary care records linkable to other data sources [26]. Up to ten cancer-free controls, as available, were individually matched to each gastric cancer case on age (single years), sex, general practice, and year of cohort entry. Of 6586 gastric adenocarcinoma cases, only 44 were matched to fewer than ten controls, and only one case was matched to just one control. To ensure that the length of observation was the same within every case-control set, the start of observation for cases and controls was defined as the latest clinic registration date, up-to-standard date, or 1/1/1990 within each case-control set. All observed gastric cancer cases, from the start of data collection in 1987 until the most recent data release in 2017, were included. Incident gastric cancers were ascertained from medical records and/or the cancer registry. Thirty-nine common autoimmune conditions were considered for this study, to be analyzed individually and in the following grou**s: systemic/connective tissue (ankylosing spondylitis, Behçet’s disease, polymyalgia rheumatica, polymyositis/dermatomyositis, systemic lupus erythematosus, Reiter’s syndrome, rheumatoid arthritis, sarcoidosis, systemic sclerosis, Sjögren’s syndrome), blood (aplastic anaemia, hemolytic anaemia, pure red cell aplasia, thrombocytopenic purpura), cardiovascular (temporal arteritis, chronic rheumatic heart disease, polyarteritis nodosa, Wegener’s granulomatosis), endocrine (Addison’s disease, type 1 diabetes, Graves’ disease, Hashimoto’s thyroiditis), skin and eye (discoid lupus erythematosus, erythema nodosum, psoriasis, scleritis, localized scleroderma, vitiligo), gastrointestinal including pernicious anaemia (celiac disease, primary sclerosing cholangitis, primary biliary cirrhosis, Crohn’s disease, autoimmune hepatitis, pernicious anaemia, ulcerative colitis), gastrointestinal excluding pernicious anaemia, and nervous system (amyotrophic lateral sclerosis, Guillain-Barré syndrome, multiple sclerosis, myasthenia gravis). Exposure to an autoimmune condition was defined as ever having had a clinical diagnosis of the condition at least two years prior to the index date (i.e., date of matched case’s diagnosis with gastric cancer). The two-year lag between exposure and outcome was implemented to reduce the risk of reverse causation bias. Outcomes and exposures were determined by the International Classification of Diseases, Tenth Revision (ICD-10) code, CPRD MEDCODE, and CPRD Read codes. Smoking status was also determined by CPRD MEDCODE and Read code. A list of MEDCODES and Read codes used in this study is included in Supplementary Tables 1 and 2. Obesity was defined as the last available weight and height recorded at least at age 18 years.

Due to the unequal sex proportion of autoimmune diseases (more frequent in females) and gastric cancer (more frequent in males), we stratified analyses by sex. We also stratified by age at cancer diagnosis (<50 vs. ≥50 years old) because early-onset gastric cancer may have a different etiology and clinical characteristics from cancer arising at an older age [27]. Finally, we stratified the outcome by three anatomical subsites to explore whether their associations with certain autoimmune conditions differed: cardia (ICD-10 code: C160; MEDCODES: 22894, 32022, 37859, 94278, 96094, 97499, 100584), non-cardia (ICD-10 codes: C161-C166; MEDCODES: 19318, 21620, 32362, 41215, 42193, 43572, 48237, 55434, 59092, 65312, 96802), and overlap**/unspecified (ICD-10 codes: C168-C169; MEDCODES: 8386, 10368, 14800, 51690, 55019, 65372).

Many autoimmune conditions co-occur in an individual [28]. To investigate whether a specific autoimmune condition association with gastric cancer was independent or co-occurred with more direct pathologic changes occurring in pernicious anaemia, we assessed the association between autoimmune conditions and pernicious anaemia.

We conducted four sensitivity analyses: (i) analyses of the associations between gastric cancer and autoimmune conditions adjusted for pernicious anaemia; (ii) a complete case analysis of the association between autoimmune conditions and gastric cancer, owing to a relatively large proportion of missing data on covariates including smoking status (28.4%) and body mass index (BMI; 35.4%); (iii) an analysis defining exposure as having had at least two diagnoses of a given autoimmune condition, to ensure that the condition was not misdiagnosed the first time; and (iv) an analysis with a five-year lag between pernicious anaemia diagnosis and gastric cancer diagnosis to minimize reverse causation.

Finally, we also undertook a fixed-effect meta-analysis of large prospective cohorts in which associations between at least five specific autoimmune conditions and gastric cancer had been made [22,23,24,25]. Heterogeneity in the meta-analysis was tested via I2 and Cochrane’s Q, for which p values were reported.

Statistical analysis

Conditional logistic regression was used to calculate odds ratios (OR) and 95% confidence intervals (CI) for the association between autoimmune conditions (all together, individually, and grouped by organ site) and incident gastric cancer. ORs were adjusted for age, sex, BMI (< 20, 20–24, 25–29, 30–39, ≥40 kg/m2, missing), and smoking status (never, former, current, unspecified). Adjusting for matching factors can be important in case the matching itself introduces a relationship between the confounder and the exposure that would not otherwise have been present [29]. Five autoimmune conditions (hemolytic anaemia, pure red cell aplasia, polyarteritis nodosa, primary sclerosing cholangitis, and amyotrophic lateral sclerosis) were not analyzable as individual conditions for the association with gastric cancer due to having zero observations among cases but were included as part of the analysis of exposure to any autoimmune condition. A Bonferroni correction to account for multiple hypothesis testing (for each of the analyzable autoimmune conditions) was applied to the regression model results based on the number of analyzable autoimmune conditions (n = 34; pBonferroni = 0.05/34 = 0.00147). ORs with p-values <0.05 prior to, but not significant at Bonferroni corrected level were considered nominally significant. Heterogeneity by sex, age at cancer diagnosis (<50 vs. ≥50 years), and anatomical subsite (cardia, non-cardia, overlap**/unspecified) was separately tested via a Wald test at the 95% confidence level using interaction terms in the logistic regression models [29]. In addition, we estimated associations between pernicious anaemia and autoimmune conditions via logistic regression among controls. All analyses were conducted in R statistical software (version 4.1.2) except for the fixed-effect meta-analyses of previous studies of autoimmunity and gastric cancer as well as pernicious anaemia, for which we used Stata version 17.

Patient and public involvement

Patients and the public were not explicitly involved in the conception or design of this study.

Results

Females comprised 37% of cases and controls (Table 1). The median age for both cases and controls was 75 years (IQR, 67–82). 11.5% of cases (n = 758) had been diagnosed with any autoimmune condition, compared with 10.2% of controls (n = 6670). Co-occurrence of conditions (i.e., two or more) was more common in cases than controls (1.5% vs. 1.0%; p < 0.001). Cases were more likely than controls to be current smokers (17.3% vs. 13.5%; p < 0.001) but less likely to be overweight ( ≥25 kg/m2; 36.5% vs. 42.1%; p < 0.001) and obese ( ≥30 kg/m2; 12.8% vs. 15.4%; p < 0.001). The median follow-up time for the whole data set was 11.2 years (IQR: 6.6–14.7).

Table 1 Descriptive characteristics of gastric cancer cases and matched cancer-free controls in the Clinical Research Practice Datalink (n = 72,273).

Autoimmune conditions and gastric cancer

Having ever had any autoimmune condition was nominally associated with increased odds of gastric cancer (OR = 1.10, 95% CI: 1.01–1.20; Table 2). However, this association was attenuated when pernicious anaemia was excluded (OR = 1.00, 95% CI: 0.92–1.10). In the disease group analysis, only gastrointestinal conditions, including pernicious anaemia, were significantly associated with gastric cancer (OR = 1.68, 95% CI: 1.40–2.00), which also attenuated when excluding pernicious anaemia (OR = 0.92, 95% CI: 0.69–1.23). Pernicious anaemia was significantly associated with gastric cancer (OR = 2.75, 95% CI: 2.19–3.44). Aplastic anaemia was nominally associated (p < 0.05): (OR = 14.00, 95% CI: 2.33–84.20).

Table 2 Association between autoimmune conditions and gastric cancer in the Clinical Practice Research Datalink (n = 72,273).

Autoimmune conditions and gastric cancer by sex and age

The association between any autoimmune condition and gastric cancer was similar for both sexes, as was the magnitude of association between pernicious anaemia and gastric cancer (Table 3). Associations were also similar by age group. No associations were significant among the younger age group. Among older individuals, significant findings were observed for pernicious anaemia (OR = 2.74, 95% CI: 2.18–3.43), but no evidence of a difference was observed between the older and younger groups (pheterogeneity = 0.62), and the point estimate was greater among younger individuals (OR = 4.30, 95% CI: 0.39–47.70).

Table 3 Associations between autoimmune conditions and gastric cancer in the Clinical Practice Research Datalink, stratified by sex and age (n = 72,273)

Autoimmune conditions and anatomical subsites of gastric cancer

Among gastric cancer cases, 17.6% (n = 1152) were cardia, 16.8% (n = 1100) were non-cardia tumours, and 65.8% (n = 4334) were overlap** (n = 71) or unspecified (n = 4263) tumours (Table 4). Associations with any autoimmune condition were statistically significant for non-cardia tumours but not for cardia tumours (pheterogeneity = 0.10). Pernicious anaemia was significantly associated with non-cardia gastric cancer (OR = 3.91; 95% CI, 2.31–6.62) but not with cardia cancer (OR = 1.71, 95% CI: 0.80–3.65; pheterogeneity = 0.07). Overlap**/unspecified tumours were also significantly associated with pernicious anaemia (OR = 2.70, 95% CI: 2.07–3.53) and nominally associated with aplastic anaemia (OR = 9.82, 95% CI: 1.38–70.00).

Table 4 Associations between autoimmune conditions and different gastric cancer anatomical subsites (n = 72,273).

Sensitivity analyses

When adjusted for pernicious anaemia, the associations between gastric cancer and aplastic anaemia (OR = 14.00, 95% CI: 2.33–84.30) remained nominally significant (Supplementary Table 3).

In the complete-case analysis (N = 44,762; 62% of the entire study population), any autoimmune condition was nominally associated with gastric cancer (OR = 1.17, 95% CI: 1.06–1.29; Supplementary Table 4) with similar magnitude of association using the entire analytical set (OR = 1.10, 95% CI: 1.01–1.20; Table 2). Pernicious anaemia was also significantly associated with gastric cancer (OR = 2.62, 95% CI: 2.05–3.35). Other gastrointestinal autoimmune conditions were not significantly associated with gastric cancer. Having had any systemic/connective tissue autoimmune condition was also nominally associated with gastric cancer (OR = 1.20, 95% CI: 1.02–1.40). Among these, rheumatoid arthritis was nominally associated with gastric cancer (OR = 1.36, 95% CI: 1.08–1.72).

The association between pernicious anaemia and gastric cancer was stronger when restricted to individuals with at least two diagnoses of the same autoimmune condition (OR = 3.78; 2.46–5.81; Supplementary Table 5). Nominal associations with gastric cancer were observed for erythema nodosum (OR = 4.38, 95% CI: 1.13–17.00) and Reiter’s syndrome (OR = 18.40, 95% CI: 1.67–204.00).

When a five-year lag between pernicious anaemia diagnosis and gastric cancer diagnosis was considered instead of a two-year lag, the association remained statistically significant (OR, 2.79; 95% CI, 2.14–3.65).

Meta-analysis of Published Literature of Prospective Studies on Autoimmune Diseases and Gastric Cancer

After meta-analyzing the risk estimates from the current CPRD and previously published SEER-Medicare, the Swedish cohort, and the Veterans Affairs’ cohort, including 46,716 cases, the association for any autoimmune condition with gastric cancer risk was ORmeta = 1.17 (95% CI: 1.14–1.21; Supplementary Table 6). The pooled association for pernicious anaemia with any subsite was ORmeta = 2.05 (95% CI: 1.92–2.17). Cardia tumours were also positively associated with pernicious anaemia (ORmeta = 1.28, 95% CI: 1.10–1.46), although less strongly than non-cardia tumours (ORmeta = 2.04, 95% CI: 1.87–2.22). Graves’ disease was significantly positively associated with any gastric cancer (ORmeta = 1.28, 95% CI: 1.11–1.45) and with non-cardia tumours specifically (ORmeta = 1.48, 95% CI: 1.14–1.83). Having any gastric tumour was also positively associated with primary biliary cirrhosis (ORmeta = 1.66, 95% CI: 1.35–1.97) and myasthenia gravis (ORmeta = 1.26, 95% CI: 1.06–1.47). Multiple sclerosis was significantly inversely associated with gastric cancer (ORmeta = 0.73, 95% CI: 0.56–0.90), as was celiac disease (ORmeta = 0.65, 95% CI: 0.44–0.87) and temporal arteritis (OR = 0.80, 95% CI: 0.63–0.97).

Autoimmune conditions and pernicious anaemia among controls

Eighteen percent of controls with pernicious anaemia had one or more other autoimmune conditions. Two disease groups were positively associated with pernicious anaemia –systemic/connective tissue conditions (OR = 1.90, 95% CI: 1.31–2.67) and gastrointestinal conditions (OR = 4.41, 95% CI: 2.71–6.77; Table 5). Seven individual autoimmune conditions were associated with pernicious anaemia at Bonferroni significant level: hemolytic anaemia (OR = 29.80, 95% CI: 1.51–206.00), Crohn’s disease (OR = 7.09, 95% CI: 3.17–13.70), vitiligo (OR = 7.09, 95% CI: 2.76–14.90), Sjögren’s disease (OR = 6.76, 95% CI: 1.64–18.50), celiac disease (OR = 6.40, 95% CI: 2.69–12.80), type 1 diabetes (OR = 3.78, 95% CI: 1.48–7.85), and rheumatoid arthritis (OR = 2.21, 95% CI: 1.26–3.58).

Table 5 Association between autoimmune conditions and pernicious anaemia in controls in the Clinical Practice Research Datalink (n = 65,687).

In a meta-analysis of our CPRD findings with those of our previous SEER-Medicare study (Supplementary Table 7), five autoimmune conditions were significantly associated with pernicious anaemia: Crohn’s disease (ORmeta = 3.84, 95% CI: 2.50–5.17), celiac disease (ORmeta = 3.00, 95% CI: 1.21–4.80), rheumatoid arthritis (ORmeta = 1.77, 95% CI: 1.53–2.00), ulcerative colitis (ORmeta = 1.62, 95% CI: 1.03–2.21), and polymyalgia rheumatica (ORmeta = 1.33, 95% CI: 1.01–1.65) [24].

Discussion

In this large nested case-control study, we confirmed a positive association between pernicious anaemia and gastric cancer and, additionally, expanded on the associations between pernicious anaemia and other autoimmune conditions. Although not statistically significant after Bonferroni correction, we observed a suggestive positive gastric cancer association with aplastic anaemia. Autoimmune conditions positively associated with pernicious anaemia included type 1 diabetes, hemolytic anaemia, Crohn’s disease, celiac disease, Sjögren’s disease, rheumatoid arthritis, and vitiligo. These results imply the role of autoimmune conditions in inflammation, which involves increased cell proliferation and DNA damage, both of which contribute to carcinogenesis [22, 30, 31].

Our study replicated the association between pernicious anaemia and gastric cancer established in previous research [12, 17, 23, 24]. Pernicious anaemia results from the gradual loss of gastric parietal cells via autoimmune destruction, hampering the ability to absorb vitamin B12 [15, 22, 23]. In the course of this atrophic gastritis, chronic inflammation may increase the risk of gastric cancer [9, 10]. In accordance with the distribution of the parietal cells in the stomach, pernicious anaemia has a stronger association with non-cardia gastric cancer [32]. Pernicious anaemia was not associated with gastric cardia cancer in our study but, when combined with a previous study of elderly adults in the United States, the pooled estimate was significant, although the magnitude of association was smaller than in non-cardia gastric cancer [24]. Some non-cardia tumours may have been misclassified as cardia as the tumour margins may have expanded to that area of the stomach. Although our study did not find a significant association in individuals < 50 years of age, the point estimate was larger among younger individuals than in the older group. To our knowledge, this is the first study to evaluate the age-specific association between pernicious anaemia and gastric cancer. One piece of supporting evidence can be found in a prospective study reporting a significant association between anti-parietal cell antibody and gastric cancer risk among young females [33]. Assessment of subsite- and age-specific associations merits further investigation. Future studies should also examine associations with autoimmune conditions in different age categories within the sexes.

In this study, aplastic anaemia was nominally associated with gastric cancer, although they have not previously been linked directly. However, an association between aplastic anaemia and pernicious anaemia has been observed [24]. In our meta-analysis, significant positive pooled associations with gastric cancer were found for primary biliary cirrhosis, Graves’ disease and myasthenia gravis, but none of these associations was observed in our study.

Autoimmune conditions arise in a constellation where one individual can experience multiple such conditions simultaneously [28]. Thus, autoimmune conditions associated with pernicious anaemia may indirectly be linked to the risk of gastric cancer. In CPRD, we observed positive associations between pernicious anaemia and type 1 diabetes, hemolytic anaemia, Crohn’s disease, celiac disease, Sjögren’s disease, rheumatoid arthritis, and vitiligo, despite none of these conditions being significantly associated with gastric cancer. When we meta-analyzed these results with our recent SEER-Medicare study, Crohn’s disease, celiac disease, rheumatoid arthritis, ulcerative colitis, and polymyalgia rheumatica remained positively associated with pernicious anaemia [24]. Although no association was found in our study, including in our meta-analysis, another recent meta-analysis estimated that the relative risk of gastric cancer among people with type 1 diabetes was 46% greater than those without [34]. This observation may be evidence that pernicious anaemia mediates the association between other autoimmune conditions and gastric cancer.

Strengths and limitations

The CPRD GOLD dataset’s large sample size is a strength that made our risk estimates precise and enabled us to conduct subgroup analyses. This database is also known for its high accuracy in cancer diagnoses [35]. The prospective design and the fact that information on exposures and diseases is collected from clinical records before any study hypothesis was developed also reduce the risk of recall bias [36]. Notably, we had a relatively large dataset that included young people ( < 50 years) who are prone to the onset of autoimmune diseases and often underrepresented in gastric cancer studies.

This study was limited by the lack of data on H. pylori infection and family history of gastric cancer. Furthermore, pernicious anaemia in the UK is often defined by vitamin B12 deficiency [37]. We did not have a variable for vitamin B12 deficiency or treatment and, therefore, only considered individuals to be exposed to pernicious anaemia if they had a specific medical provider code for pernicious anaemia, which may mean that we missed some people who truly had that autoimmune condition but only had a coded diagnosis of vitamin B12 deficiency. Nevertheless, we believe that our more strict definition of pernicious anaemia ensured that those considered exposed truly had that autoimmune condition. Additionally, a large proportion of BMI and smoking data were missing. However, BMI is not strongly associated with non-cardia gastric adenocarcinoma [38]. Our complete-case analysis results did not differ from our main results, suggesting that these covariates did not strongly bias the effect measure estimate. Finally, the prevalence of autoimmune conditions may have been underestimated in our dataset because people may be more likely to seek clinical care only after the onset of symptoms. Autoimmune conditions also tend to be diagnosed considerably earlier in life than gastric cancer, and the symptoms of such conditions can be managed or even put into remission at older ages.

Conclusion

Our study and our large meta-analysis confirmed the positive association between autoimmune conditions and gastric cancer risk. Approximately 1-in-5 individuals with pernicious anaemia have at least one other autoimmune condition. Individuals with pernicious anaemia may benefit from gastric cancer screening. International consensus diagnostic criteria for autoimmune conditions and their co-occurrence are needed, as well as the establishment of large international registries linking individuals with autoimmune conditions to cancer incidence and mortality data, to improve our understanding of the effects of autoimmunity on cancer. In addition, further research is necessary to elucidate the biological mechanisms underlying the associations between autoimmune conditions and gastric cancer, with a particular focus on autoimmune gastritis as a potential pathway, while also considering other possible carcinogenic mechanisms.