BackgroundThe brain and gastrointestinal (GI) tract are strongly connected via neural, endocrine, and immune pathways. Previous studies suggest that headaches, especially migraines, may be associated with various GI disorders. However, upper GI endoscopy in migraineurs has shown a low prevalence of abnormal findings. Also, the majority of studies have not demonstrated an association between Helicobacter pylori (HP) infection and migraine, although a pathogenic role for HP infection in migraines has been suggested. Further knowledge concerning the relation between headaches and GI disorders is important as it may have therapeutic consequences. Thus, we sought to investigate possible associations between GI disorders and common primary headaches, such as migraines and tension-type headaches (TTH), using the Smart Clinical Data Warehouse (CDW) over a period of 10 years.MethodsWe retrospectively investigated clinical data using a clinical data analytic solution called the Smart CDW from 2006 to 2016. In patients with migraines and TTH who visited a gastroenterology center, GI disorder diagnosis, upper GI endoscopy findings, and results of HP infection were collected and compared to clinical data from controls, who had health checkups without headache. The time interval between headache diagnosis and an examination at a gastroenterology center did not exceed 1 year.ResultsPatients were age- and sex-matched and eligible cases were included in the migraine (n = 168), the TTH (n = 168), and the control group (n = 336). Among the GI disorders diagnosed by gastroenterologists, gastroesophageal reflux disorder was more prevalent in the migraine group, whereas gastric ulcers were more common in the migraine and TTH groups compared with controls (p < 0.0001). With regard to endoscopic findings, there were high numbers of erosive gastritis and chronic superficial gastritis cases in the migraine and TTH groups, respectively, and the severity of gastritis was significantly higher in patients with TTH compared with controls (p < 0.001). However, no differences were observed in the prevalence of HP infection between the groups.ConclusionThe observed association in this study may suggest that primary headache sufferers who experience migraines or TTH are more prone to GI disorders, which may have various clinical implications. Further research concerning the etiology of the association between headaches and GI disorders is warranted.