Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: JMIR Medical Informatics

Date Submitted: Jun 12, 2024
Date Accepted: Apr 11, 2025

The final, peer-reviewed published version of this preprint can be found here:

A Machine Learning Approach for Identifying People With Neuroinfectious Diseases in Electronic Health Records: Algorithm Development and Validation

Singh A, Sartipi S, Sun H, Milde R, Turley N, Quinn C, Harrold GK, Gillani RL, Turbett SE, Das S, Zafar S, Fernandes M, Westover MB, Mukerji SS

A Machine Learning Approach for Identifying People With Neuroinfectious Diseases in Electronic Health Records: Algorithm Development and Validation

JMIR Med Inform 2025;13:e63157

DOI: 10.2196/63157

PMID: 40882236

PMCID: 12396800

A Machine Learning Approach for Identifying People with Neuroinfectious Diseases in Electronic Health Records: Algorithm Development and Validation

  • Arjun Singh; 
  • Shadi Sartipi; 
  • Haoqi Sun; 
  • Rebecca Milde; 
  • Niels Turley; 
  • Carson Quinn; 
  • G Kyle Harrold; 
  • Rebecca L. Gillani; 
  • Sarah E. Turbett; 
  • Sudeshna Das; 
  • Sahar Zafar; 
  • Marta Fernandes; 
  • M Brandon Westover; 
  • Shibani S Mukerji

ABSTRACT

Background:

Identifying NID cases using International Classification of Diseases (ICD) billing codes is often imprecise, while manual chart reviews are labor-intensive. ML models can leverage unstructured electronic health records (EHR) to detect subtle NID indicators, process large data volumes efficiently, and reduce misclassification. While accurate NID classification is needed for research and clinical decision support, using unstructured notes for this purpose remains underexplored.

Objective:

To develop and validate a machine learning (ML) model to identify neuroinfectious diseases (NID) from unstructured patient notes.

Methods:

Clinical notes from patients who had undergone lumbar puncture were obtained using the EHR of an academic hospital network (Mass General Brigham, MGB), with half associated with NID-related diagnostic codes. Ground-truth was established by chart review with six NID-expert physicians. NID keywords were generated with regular expressions, and extracted texts were converted into bag-of-words representations using n-grams (n=1, 2, 3). Notes were randomly split into training (80%) and hold-out testing (20%) sets. Feature selection was performed using logistic regression with L1 regularization. An extreme gradient boosting (XGBoost) model classified NID cases, and performance was evaluated using the Area Under the Receiver Operating Curve (AUROC) and the Precision-Recall Curve (AUPRC). Performance of the natural language processing (NLP) model was contrasted with LLaMA 3.2 auto-regressive model on the MGB test set. The NLP model was additionally validated on external data from an independent hospital (Beth Israel Deaconess Medical Center, BIDMC).

Results:

This study included 3,000 patient notes from MGB from January 22, 2010, to September 21, 2023. Of 1,284 initial n-gram features, 342 were selected, with the most significant features being ‘meningitis,’ ‘ventriculitis,’ and ‘meningoencephalitis.’ The XGBoost model achieved an AUROC of 0.98 (95% CI: 0.96 - 0.99) and AUPRC of 0.89 (95% CI: 0.83 - 0.94) on MGB test data. In comparison, NID identification using ICD-billing codes showed high sensitivity (0.97) but poor specificity (0.59), overestimating NID cases. LLaMA 3.2 improved specificity (0.94) but had low sensitivity (0.64) and an AUROC of 0.80. In contrast, our NLP model balanced specificity (0.96) and sensitivity (0.84), outperforming both methods in accuracy and reliability on MGB data. When tested on external data from BIDMC, the NLP model maintained an AUROC of 0.98 (95% CI: 0.96 - 0.99), with an AUPRC of 0.78 (95% CI: 0.66 - 0.89).

Conclusions:

The NLP model accurately identifies NID cases from clinical notes. Validated across two independent hospital datasets, the model demonstrates feasibility for large-scale NID research and cohort generation. With further external validation, our results could be more generalizable to other institutions.


 Citation

Please cite as:

Singh A, Sartipi S, Sun H, Milde R, Turley N, Quinn C, Harrold GK, Gillani RL, Turbett SE, Das S, Zafar S, Fernandes M, Westover MB, Mukerji SS

A Machine Learning Approach for Identifying People With Neuroinfectious Diseases in Electronic Health Records: Algorithm Development and Validation

JMIR Med Inform 2025;13:e63157

DOI: 10.2196/63157

PMID: 40882236

PMCID: 12396800

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.