title: Automated identification of drug and food allergies entered using non-standard terminology.
abstract: OBJECTIVE
  An accurate computable representation of food and drug allergy is essential for safe healthcare. Our goal was to develop a high-performance, easily maintained algorithm to identify medication and food allergies and sensitivities from unstructured allergy entries in electronic health record (EHR) systems.
  
  
  METHODS
  An algorithm was developed in Transact-SQL to identify ingredients to which patients had allergies in a perioperative information management system. The algorithm used RxNorm and natural language processing techniques developed on a training set of 24 599 entries from 9445 records. Accuracy, specificity, precision, recall, and F-measure were determined for the training dataset and repeated for the testing dataset (24 857 entries from 9430 records).
  
  
  RESULTS
  Accuracy, precision, recall, and F-measure for medication allergy matches were all above 98% in the training dataset and above 97% in the testing dataset for all allergy entries. Corresponding values for food allergy matches were above 97% and above 93%, respectively. Specificities of the algorithm were 90.3% and 85.0% for drug matches and 100% and 88.9% for food matches in the training and testing datasets, respectively.
  
  
  CONCLUSIONS
  The algorithm had high performance for identification of medication and food allergies. Maintenance is practical, as updates are managed through upload of new RxNorm versions and additions to companion database tables. However, direct entry of codified allergy information by providers (through autocompleters or drop lists) is still preferred to post-hoc encoding of the data. Data tables used in the algorithm are available for download.
  
  
  CONCLUSIONS
  A high performing, easily maintained algorithm can successfully identify medication and food allergies from free text entries in EHR systems.
authors.affiliation: Department of Anesthesiology, Jefferson Medical College, Philadelphia, Pennsylvania, USA.
authors.forename: Richard H
authors.initials: RH
authors.lastname: Epstein
authors.forename: Paul
authors.initials: P
authors.lastname: St Jacques
authors.forename: Michael
authors.initials: M
authors.lastname: Stockin
authors.forename: Brian
authors.initials: B
authors.lastname: Rothman
authors.forename: Jesse M
authors.initials: JM
authors.lastname: Ehrenfeld
authors.forename: Joshua C
authors.initials: JC
authors.lastname: Denny
mesh_terms: D000465:Algorithms; D057225:Data Mining / Q000379:methods*; D004342:Drug Hypersensitivity; D057286:Electronic Health Records; D005512:Food Hypersensitivity; D006801:Humans; D016347:Medical Records Systems, Computerized
keywords: Allergies; Electronic health records; Electronic medical records; Hypersensitivity; Natural language processing; RxNorm