Abstract Introduction Between 10-15% of patients undergoing percutaneous coronary intervention (PCI) have a history of atrial fibrillation (AF), and require both oral anticoagulant (OAC) as well as antiplatelet therapy following PCI. However this combination puts the patient at a high risk of serious or fatal bleeding complications. Using big data from electronic health records (EHR) provides the unique opportunity to observe to what extent AF and anticoagulant therapy affect the outcome of patients undergoing PCI in routine clinical practice. Purpose We analysed whether a history of AF and the use of OAC upon discharge was independently associated with short-term, mid-term and long-term mortality in large single institution cohort of patients undergoing PCI. Methods This retrospective EHR study was approved by the institutional review board and data privacy officer. The study population comprised all patients undergoing either planned or urgent PCI between 2012 and 2018. SNOMED time coded past and current medical diagnosis, procedures and drug therapy were extracted from the medical correspondence using natural language processing, procedural characteristics were obtained from the PCI database, and hospital admission data, billing cost, length of stay and vital status were added from the hospital administrative software. Vital status was obtained in all patients. The independent predictors of mortality were analysed using a stepwise multivariate logistic linear regression analysis, with automated forward selection of variables. For each variable the odds ratio with confidence intervals were derived from the regression model. The validity of the model was tested with the Hosmer and Lemeshow test. Results During a 6 year period 5223 patients were identified who underwent a total of 6854 PCI’s, of which 74% were men with a median age of 71 years. At the time of PCI, 256 patients had AF and were not treated with OAC, 549 patients had AF and were treated with OAC, 284 patients developed AF during follow up and 5765 were in sinus rhythm. Patients with a history of AF or ensuing AF were older, more often had multivessel coronary disease, a history of CABG and MI, renal failure, diabetes mellitus and a lower ejection fraction. AF was found to be a strong independent predictor of mortality at 30 days (OR: 2,8), 120 days (OR: 2), 1 year (OR: 1,9) and 5 years (OR: 1,7) following PCI. By contrast OAC was associated with lower odds ratios of mortality at 30 days (OR: 0,4), 120 days (OR: 0,4), 1 year (OR: 0,7) and 5 years (OR: 0,7). Also the occurence of AF post PCI was linked with an increased mortality Conclusions In this large data set of patients undergoing PCI in routine clinical practice, a history of AF was independently associated with increased short-term, mid-term and long-term mortality. On the other hand, OAC was associated with improved short-term, mid-term and long-term mortality survival following PCI. Abstract Figure.