Extracting Seizure Control Metrics from Clinic Notes of Patients with Epilepsy: a Natural Language Processing Approach (Preprint)
Preprint
- 15 November 2023
- preprint
- Published by JMIR Publications Inc. in JMIR Preprints
Abstract
BACKGROUND Monitoring seizure control metrics is key to clinical care of patients with epilepsy. Manually abstracting these metrics from unstructured text in electronic health records (EHR) is laborious. OBJECTIVE We aimed to abstract the date of last seizure and seizure frequency from clinical notes of patients with epilepsy using natural language processing (NLP). METHODS We extracted seizure control metrics from notes of patients seen in epilepsy clinics from two hospitals in Boston. Extraction was performed with the pretrained model RoBERTa_for_seizureFrequency_QA, for both date of last seizure and seizure frequency, combined with regular expressions. We designed the algorithm to categorize the timing of last seizure (“today”, “1 to 6 days ago”, “1 to 4 weeks ago”, “more than 1 to 3 months ago”, “more than 3 to 6 months ago”, “more than 6 to 12 months ago”, “more than 1 to 2 years ago”, “more than 2 years ago”) and seizure frequency (“innumerable”, “multiple”, “daily”, “weekly”, “monthly”, “once per year”, “less than once per year”). Our ground truth consisted of structured questionnaires filled out by physicians. Model performance was measured using the areas under the receiving operating characteristic curve (AUROC) and precision recall curve (AUPRC) for categorical labels, and median absolute error (MAE) for ordinal labels, with 95% confidence intervals (CI) estimated via bootstrapping. RESULTS Our cohort included 1,773 adult patients with a total of 5,658 visits with reported seizure control metrics, seen in epilepsy clinics between December 2018 and May 2022. The cohort average age was 42 years old, the majority were female (57%), White (81%) and non-Hispanic (85%). The models achieved an MAE (95% CI) for date of last seizure of 4 (4.00-4.86) weeks, and for seizure frequency of 0.02 (0.02-0.02) seizures per day. CONCLUSIONS Our NLP approach demonstrates that the extraction of seizure control metrics from EHR is feasible allowing for large-scale EHR research.Keywords
This publication has 14 references indexed in Scilit:
- Extracting seizure frequency from epilepsy clinic notes: a machine reading approach to natural language processingJournal of the American Medical Informatics Association, 2022
- Feasibility of using an automated analysis of formulation effort in patients’ spoken seizure descriptions in the differential diagnosis of epileptic and nonepileptic seizuresSeizure: European Journal of Epilepsy, 2021
- Establishing a learning healthcare system to improve health outcomes for people with epilepsyEpilepsy & Behavior, 2021
- Pre-trained models: Past, present and futureAI Open, 2021
- Using natural language processing to extract structured epilepsy data from unstructured clinic letters: development and validation of the ExECT (extraction of epilepsy clinical text) systemBMJ Open, 2019
- Quality improvement in neurologyNeurology, 2018
- The Precision-Recall Plot Is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced DatasetsPLOS ONE, 2015
- Strengthening the Reporting of Observational Studies in Epidemiology (STROBE): Explanation and elaborationInternational Journal of Surgery, 2014
- Assessing the Performance of Prediction ModelsEpidemiology, 2010
- Building applied natural language generation systemsNatural Language Engineering, 1997