Extracting seizure frequency from epilepsy clinic notes: a machine reading approach to natural language processing. (22nd February 2022) - Xie, Kevin; Gallagher, Ryan S; Conrad, Erin C; Garrick, Chadric O; Baldassano, Steven N; Bernabei, John M; Galer, Peter D; Ghosn, Nina J; Greenblatt, Adam S; Jennings, Tara; Kornspun, Alana; Kulick-Soper, Catherine V; et al.
Abstract: Objective: Seizure frequency and seizure freedom are among the most important outcome measures for patients with epilepsy. In this study, we aimed to automatically extract this clinical information from unstructured text in clinical notes. If successful, this could improve clinical decision-making in epilepsy patients and allow for rapid, large-scale retrospective research. Materials and Methods: We developed a finetuning pipeline for pretrained neural models to classify patients as being seizure-free and to extract text containing their seizure frequency and date of last seizure from clinical notes. We annotated 1000 notes for use as training and testing data and determined how well 3 pretrained neural models, BERT, RoBERTa, and Bio_ClinicalBERT, could identify and extract the desired information after finetuning. Results: The finetuned models (BERTFT, Bio_ClinicalBERTFT, and RoBERTaFT ) achieved near-human performance when classifying patients as seizure free, with BERTFT and Bio_ClinicalBERTFT achieving accuracy scores over 80%. All 3 models also achieved human performance when extracting seizure frequency and date of last seizure, with overall F1 scores over 0.80. The best combination of models was Bio_ClinicalBERTFT for classification, and RoBERTaFT for text extraction. Most of the gains in performance due to finetuning required roughly 70 annotated notes. Discussion and Conclusion: Our novel machine reading approach to extracting important clinical outcomes performed at or near human performance on several tasks. This approach opens new possibilities to support clinical practice and conduct large-scale retrospective clinical research. Future studies can use our finetuning pipeline with minimal training annotations to answer new clinical questions.