title: Defining Disease Phenotypes in Primary Care Electronic Health Records by a Machine Learning Approach: A Case Study in Identifying Rheumatoid Arthritis.
abstract: 1) To use data-driven method to examine clinical codes (risk factors) of a medical condition in primary care electronic health records (EHRs) that can accurately predict a diagnosis of the condition in secondary care EHRs. 2) To develop and validate a disease phenotyping algorithm for rheumatoid arthritis using primary care EHRs.
  
  
  
  This study linked routine primary and secondary care EHRs in Wales, UK. A machine learning based scheme was used to identify patients with rheumatoid arthritis from primary care EHRs via the following steps: i) selection of variables by comparing relative frequencies of Read codes in the primary care dataset associated with disease case compared to non-disease control (disease/non-disease based on the secondary care diagnosis); ii) reduction of predictors/associated variables using a Random Forest method, iii) induction of decision rules from decision tree model. The proposed method was then extensively validated on an independent dataset, and compared for performance with two existing deterministic algorithms for RA which had been developed using expert clinical knowledge.
  
  
  
  Primary care EHRs were available for 2,238,360 patients over the age of 16 and of these 20,667 were also linked in the secondary care rheumatology clinical system. In the linked dataset, 900 predictors (out of a total of 43,100 variables) in the primary care record were discovered more frequently in those with versus those without RA. These variables were reduced to 37 groups of related clinical codes, which were used to develop a decision tree model. The final algorithm identified 8 predictors related to diagnostic codes for RA, medication codes, such as those for disease modifying anti-rheumatic drugs, and absence of alternative diagnoses such as psoriatic arthritis. The proposed data-driven method performed as well as the expert clinical knowledge based methods.
  
  
  
  Data-driven scheme, such as ensemble machine learning methods, has the potential of identifying the most informative predictors in a cost-effective and rapid way to accurately and reliably classify rheumatoid arthritis or other complex medical conditions in primary care EHRs.
authors.affiliation: Institute of Life Science, College of Medicine, Swansea University, Swansea, United Kingdom.
authors.forename: Shang-Ming
authors.initials: SM
authors.lastname: Zhou
authors.affiliation: Institute of Life Science, College of Medicine, Swansea University, Swansea, United Kingdom.
authors.forename: Fabiola
authors.initials: F
authors.lastname: Fernandez-Gutierrez
authors.affiliation: Institute of Life Science, College of Medicine, Swansea University, Swansea, United Kingdom.
authors.forename: Jonathan
authors.initials: J
authors.lastname: Kennedy
authors.affiliation: Institute of Life Science, College of Medicine, Swansea University, Swansea, United Kingdom.
authors.forename: Roxanne
authors.initials: R
authors.lastname: Cooksey
authors.affiliation: Institute of Life Science, College of Medicine, Swansea University, Swansea, United Kingdom.
authors.forename: Mark
authors.initials: M
authors.lastname: Atkinson
authors.affiliation: UCL Institute of Health Informatics and Farr Institute of Health Informatics Research, London, United Kingdom.
authors.forename: Spiros
authors.initials: S
authors.lastname: Denaxas
authors.affiliation: Institute of Infection, Immunity and Inflammation, University of Glasgow, Glasgow, United Kingdom.
authors.forename: Stefan
authors.initials: S
authors.lastname: Siebert
authors.affiliation: Arthritis Research UK Centre for Epidemiology, Institute of Inflammation and Repair, Faculty of Medical and Human Sciences, Manchester Academic Health Science Centre, University of Manchester, Manchester, United Kingdom.
authors.forename: William G
authors.initials: WG
authors.lastname: Dixon
authors.affiliation: Arthritis Research UK Centre for Epidemiology, Institute of Inflammation and Repair, Faculty of Medical and Human Sciences, Manchester Academic Health Science Centre, University of Manchester, Manchester, United Kingdom.
authors.forename: Terence W
authors.initials: TW
authors.lastname: O'Neill
authors.affiliation: Arthritis Research UK CREATE Centre and Welsh Arthritis Research Network, School of Medicine, Cardiff University, Cardiff, United Kingdom.
authors.forename: Ernest
authors.initials: E
authors.lastname: Choy
authors.affiliation: Centre for Clinical Brain Sciences, University of Edinburgh, Edinburgh, United Kingdom.
authors.forename: Cathie
authors.initials: C
authors.lastname: Sudlow
authors.affiliation: Institute of Life Science, College of Medicine, Swansea University, Swansea, United Kingdom.
authors.forename: Sinead
authors.initials: S
authors.lastname: Brophy
mesh_terms: D000465:Algorithms; D018501:Antirheumatic Agents / Q000627:therapeutic use; D001172:Arthritis, Rheumatoid / Q000188:drug therapy; D057286:Electronic Health Records; D006801:Humans; D000069550:Machine Learning; D011320:Primary Health Care
chemical_list: D018501:Antirheumatic Agents