Main findings of the present study are that in both men and women, for all ages and major subtypes of cancer, a cancer diagnosis is associated with an increased incidence of new-onset AF. Second, cancer and future AF seems to be independently associated. Finally and importantly, AF appears more frequent in cancer patients up to 5 years following cancer diagnosis.
Other studies and mechanism(s)
Knowledge upon this topic is sparse. No previous studies have investigated the incidence of AF in an unselected cohort of patients with different forms of cancer. The association between cancer and AF has only previously been examined within subgroups of cancer or in connection with surgeries in smaller clinical studies. Thus there are many open issues concerning the burden of AF in cancer patients . Our findings do, therefore, add significant clinical data to the knowledge on the relationship between cancer and new-onset AF. The mechanism(s) underlying the association between cancer and AF cannot be deduced based on our results and may differ between the different cancer forms, e.g. the strong correlation between lung cancer and AF suggests an influence of direct tumor growth. It has also been shown, that inflammatory markers such as C-reactive protein are elevated in AF. As inflammation also plays a large role in cancer, it is possible that cancer could lead to AF through a systemic inflammatory state [7,8,9]. Finally the presence of paraneoplastic syndromes and neurohormonal activity could also lead to AF [10, 11]. The statistical association is, therefore, biological plausible and more research in the mechanism(s) are needed.
Incidence of AF
The incidence of AF stratified according to time and subtypes of cancer is shown in Figs. 2 and 3. It may be speculated that the observed difference is explained by age, since cancer patients were older than the general population (Table 1). We, therefore, performed age and sex stratified analyses which confirmed that incidence of AF was greatest in the cancer population (Figs. 4 and 5). We observed a smaller difference in the incidence of AF between cancer patients and the general population than previously observed . This may be explained by differences in design, since we excluded known AF which was not the case in the aforementioned study. Despite the inherent limitations in our study, incidence rates (both within the first 90 days and beyond) are markedly increased and should raise concern from physicians treating patients with malignancies. Rates of AF in patients with cancer are equivalent to rates found in patients with diabetes and rheumatoid arthritis [16, 21].
When looking at our entire study population, cancer patients as well as non-cancer patients, we observed a little lower incidence of AF than observed in other AF studies [22, 23]. However, this can be explained by the several factors; first of all by the differences in how AF is defined. We defined AF by ICD10 codes, while the Framingham Heart Study  had access to e.g. Holter monitoring and electrocardiograms for all of their participants. Additionally the participants of the Framingham Heart Study were between 50 and 89 years of age and thus comparably older. As such, the observed incidence of AF also reflects the correlation of age with risk of AF. We observed the same incidence of AF in elderly (> 80 years) general population as in the Rotterdam Study (23).
The association between cancer and AF
Our findings support the current evidence  that an association between cancer and future AF exists. The correlation has up until now primarily been investigated with regards to colorectal and breast cancer, but our results demonstrates that 12 out the 13 examined cancer forms (including pulmonary cancer, prostate cancer, urinary tract cancer and hematological cancer) were associated with increased risk of developing AF (Additional file 3: Table S3). Additionally, the non-significant association between endocrine cancer and future AF could be due to under powering; hence incidence of endocrine cancer was rare in our population (data not shown).
Notably, two prior studies [13, 14] demonstrated that the greater risk of AF in cancer patients was limited to the initial 90 following cancer diagnosis; thus, indicating that the association could be due to observations bias. This bias would emerge as asymptomatic cancer patients have a greater chance of being diagnosed with AF than asymptomatic otherwise healthy individuals. To minimize the hazard of such bias we studied time from date of cancer diagnosis until time of potential AF. Our results show the same tendency; association between cancer and AF is strongest within the first 90 days following the cancer diagnosis, thus also indicating the presence of some degree of observation bias. However, the association within our study remains significant as long as 5 years following the cancer diagnosis. Therefore, the presence of surveillance bias is unlikely to be the solely explanation of our findings. The reason that we find a significant association beyond 90 days could be due to larger sample size (316,040 cancer patients).The prognosis of cancer improves considerably these years  and with a considerable burden of AF in the elderly showed in our study among others, awareness of the development of AF is important even in cancer patients surviving a 5 year milestone.
As seen in Additional file 2: Table S2 and Additional file 3: Table S3 the strongest association between subtype of cancer and AF goes for lung cancer despite a poor prognosis in these patients. On the other hand, prostate cancer has the lowest significantly association to AF despite a relatively good prognosis. It may, therefore, be argued that severity of the cancer disease or anatomical location of the tumor is important factors for development of AF. Also, time from the diagnosis of cancer is an important factor to consider, especially concerning cancer in the abdominal region.
Another possible explanation is the effect of specific treatment for specific cancers, first line therapies for prostate cancer includes local radiation, hormonal therapy and less invasive surgery (prostatectomy), which all should be relatively less linked with development of AF.
It is plausible, that the reason for the observed increase in incidence of AF the first 90 days following cancer diagnosis could be related to the subclinical progression of cancer prior to diagnosis. Patients presenting with newly diagnosed cancer are predominantly subject to the accumulated effects of prolonged disease activity. As such, the debut of AF shortly after cancer diagnosis could reflect the result of such prolonged exposure.
Radiation and chemotherapy
Whether AF could emerge as a side effect to other sorts of treatments of the cancer disease, such as radiation therapy or chemotherapy have not been investigated in this study. Especially with regards to lung cancer and breast cancer it is possible that radiation therapy could be involved in causing AF due to direct radiation against the heart. However, looking at the individual IRR of the cancer types, the association is actually higher for cancer in the digestive system and cancer in the central nervous system than for breast cancer suggesting that the association in some cancer types must be explained by other factors than radiation therapy.
Furthermore, due to the fact that chemotherapy is considered in-hospital treatment in Denmark, our registries do unfortunately not contain exact data with regards to type of chemotherapy or the duration of treatment. Although AF incidence was especially pronounced within the first 90 days, which could be the possible effect of certain types of chemotherapies, the association of AF risk and cancer was still elevated beyond 90 days. The scope of this study was to assess the association (and not the causal path way) between different types of cancers AF on a population level. Studies on the impact of specific chemotherapies on AF risk are needed as no information on chemotherapies was available for the current study. This important limitation should be recognized when interpreting our findings.
Strengths and limitations
The strengths of this study include the inclusion of the complete Danish population independent of age, gender, ethnicity and participation in health insurance programs. Due to these aspects the risk of information and referral bias is reduced. Still, some limitations should be considered when interpreting the results.
The largest limitation in the present study is the dependence on registry data. The identification of our study end point, AF, relied on the presence of an AF discharge code, but not by a validated electrocardiogram. However, the positive predictive value of the diagnosis of atrial fibrillation and flutter has been reported to be 93%  and the accuracy of other hospital registry diagnoses are similar high .
In general, post-operative AF is one of the most common complications to surgeries, cardiac as well as none cardiac surgeries. However, we have sought to eliminate this potential confounding by adjusting for all major surgeries The association is, therefore, not likely to be driven only by former surgeries.
Since the symptoms of AF are perceived in very individual ways, and sometimes not at all, it is very likely that some people were suffering from subclinical AF, which may have resulted in misclassification of AF. It may be speculated that cancer patients are more aware of symptoms, and subclinical AF, therefore, is more frequent in the general population, who ignore symptoms. This may have biased our results in favor of an association between cancer and AF towards one. Further, due to more regular medical examinations in patients with cancer, the risk of surveillance bias will emerge in relation to subclinical AF in the no AF group of cancer patients. When the analyses were limited to cases where AF was the primary cause to hospitalization and thus trying to eliminate AF cases randomly diagnosed in relation to cancer control, the association was less strong, possibly due to a smaller number of outcomes. However, tendency of the results were overall the same. Our results are, therefore, not solely the effect of surveillance bias and misclassification.
As seen in Table 1 the groups differ from each other with respect to clinical characteristics; however the multivariable regression analyses have been adjusted for these differences in characteristics.
Furthermore, our registries do not provide information regarding AF diagnoses solely treated by general practitioners. Patients with uncomplicated and subclinical AF who never have been hospitalized in relation to AF will therefore not be included in our study. This could potentially lead to an underestimation of the incidence of AF in both groups.
Thus, residual confounding cannot be excluded since clinical parameters such as blood pressure and HBA1C were not measured. We were unable to adjust for potential clinical confounders such as obesity and smoking and as some cancer forms are associated with a higher prevalence of smoking or obesity, availability of such information could have changed the risk estimates. We did not echocardiographic data on valve disease. Some of this unmeasured confounding was probably accounted for in the analyses by adjustment for lifestyle associated diseases. It is, therefore, unlikely that our results only originate from lack of data on other potential confounders.