Identifying lupus patients in electronic health records: Development and validation of machine learning algorithms and application of rule-based algorithms

Semin Arthritis Rheum. 2019 Aug;49(1):84-90. doi: 10.1016/j.semarthrit.2019.01.002. Epub 2019 Jan 4.


Objective: To utilize electronic health records (EHRs) to study SLE, algorithms are needed to accurately identify these patients. We used machine learning to generate data-driven SLE EHR algorithms and assessed performance of existing rule-based algorithms.

Methods: We randomly selected subjects with ≥ 1 SLE ICD-9/10 codes from our EHR and identified gold standard definite and probable SLE cases by chart review, based on 1997 ACR or 2012 SLICC Classification Criteria. From a training set, we extracted coded and narrative concepts using natural language processing and generated algorithms using penalized logistic regression to classify definite or definite/probable SLE. We assessed predictive characteristics in internal and external cohort validations. We also tested performance characteristics of published rule-based algorithms with pre-specified permutations of ICD-9 codes, laboratory tests and medications in our EHR.

Results: At a specificity of 97%, our machine learning coded algorithm for definite SLE had 90% positive predictive value (PPV) and 64% sensitivity and for definite/probable SLE, 92% PPV and 47% sensitivity. In the external validation, at 97% specificity, the definite/probable algorithm had 94% PPV and 60% sensitivity. Adding NLP concepts did not improve performance metrics. The PPVs of published rule-based algorithms ranged from 45-79% in our EHR.

Conclusion: Our machine learning SLE algorithms performed well in internal and external validation. Rule-based SLE algorithms did not transport as well to our EHR. Unique EHR characteristics, clinical practices and research goals regarding the desired sensitivity and specificity of the case definition must be considered when applying algorithms to identify SLE patients.

Keywords: Algorithms; Bioinformatics; Electronic health records; Systemic lupus erythematosus.

Publication types

  • Research Support, N.I.H., Extramural
  • Validation Study

MeSH terms

  • Adult
  • Aged
  • Algorithms
  • Databases, Factual
  • Electronic Health Records
  • Female
  • Humans
  • Lupus Erythematosus, Systemic / diagnosis*
  • Machine Learning
  • Male
  • Middle Aged
  • Natural Language Processing
  • Sensitivity and Specificity