Academic Journal
SPELL: A scalable NLP method using regular expressions and large language models for clinical information extraction.
| Τίτλος: | SPELL: A scalable NLP method using regular expressions and large language models for clinical information extraction. |
|---|---|
| Συγγραφείς: | Kleinlein R; Department of Anesthesiology, Perioperative and Pain Medicine, Brigham and Women's Hospital, Harvard Medical School, Boston, MA, USA., Bates DW; Division of General Internal Medicine and Primary Care, Brigham and Women's Hospital, Boston, MA, USA; Department of Health Care Policy and Management, Harvard T. H. Chan School of Public Health, Boston, MA, USA., Guan C; Department of Anesthesiology, Perioperative and Pain Medicine, Brigham and Women's Hospital, Harvard Medical School, Boston, MA, USA., Gray KJ; Department of Obstetrics and Gynecology, University of Washington, Seattle, WA, USA., Kovacheva VP; Department of Anesthesiology, Perioperative and Pain Medicine, Brigham and Women's Hospital, Harvard Medical School, Boston, MA, USA. Electronic address: vkovacheva@bwh.harvard.edu. |
| Πηγή: | Computer methods and programs in biomedicine [Comput Methods Programs Biomed] 2026 Oct; Vol. 285, pp. 109517. Date of Electronic Publication: 2026 Jun 14. |
| Τύπος έκδοσης: | Journal Article |
| Γλώσσα: | English |
| Στοιχεία περιοδικού: | Publisher: Elsevier Scientific Publishers Country of Publication: Ireland NLM ID: 8506513 Publication Model: Print-Electronic Cited Medium: Internet ISSN: 1872-7565 (Electronic) Linking ISSN: 01692607 NLM ISO Abbreviation: Comput Methods Programs Biomed Subsets: MEDLINE |
| Imprint Name(s): | Publication: Limerick : Elsevier Scientific Publishers Original Publication: Amsterdam : Elsevier Science Publishers, c1984- |
| Ιατρικοί όροι (MeSH): | Information Storage and Retrieval*/methods , Large Language Models* , Natural Language Processing* , Electronic Health Records*, Data Mining/methods ; Humans |
| Περίληψη: | Background and Objectives: Electronic health records (EHRs) contain valuable information for research and decision-making, but much resides in unstructured notes that are challenging to analyze at scale. We developed SPELL (Snippet-Primed rEgex LLM Pipeline), a scalable natural language processing workflow that combines regular-expression-based snippet retrieval with locally hosted large language model (LLM) inference to extract structured variables from large collections of clinical narratives. Methods: SPELL uses task-specific regular expressions to retrieve short context windows ("snippets") from unstructured texts and applies task-prompted LLM inference on snippets rather than full documents. All processing occurs within institutional computing environments. Accuracy was evaluated on randomly sampled, clinician-annotated benchmark sets of 50 documents per obstetric task, with separate retrieval-recall audits of 20 regex-negative documents per task. We evaluated accuracy and efficiency across three obstetric information-extraction tasks: numerical value (blood loss volume), date (estimated due date), and diagnosis (hemolysis, elevated liver enzymes, and low platelets [HELLP] syndrome). We quantified computational scalability using elapsed time, out-of-memory events, energy consumed, and GPU telemetry, and audited retrieval recall using clinician-annotated regex-negative notes enriched with relevant structured metadata. Generalizability was assessed on the public MT Samples corpus (5013 notes across 40 specialties) for ventricular tachycardia detection. Results: SPELL processed 31 million clinical notes spanning 1976-2024 from eight hospitals. Snippet-based inference reduced processing time by 71-87% versus full-document LLM inference and by >95% versus manual physician annotation. On the 50-document benchmark sets, snippet-based evaluation achieved 98% exact-match accuracy for blood-loss extraction, 92% exact-match accuracy for estimated-due-date extraction, and 94% accuracy with an F1-score of 0.97 for HELLP syndrome classification. As an exploratory external evaluation on MT Samples, ventricular tachycardia detection achieved 84% accuracy and an F1-score of 0.67. Conclusions: A hybrid regex-snippet-LLM pipeline can enable accurate and computationally efficient extraction from unstructured EHR narratives. (Copyright © 2026 Elsevier B.V. All rights reserved.) |
| Competing Interests: | Declaration of competing interest The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Vesela Kovacheva, Kathryn Gray reports financial support was provided by National Institutes of Health. Vesela Kovacheva reports a relationship with Avania CRO that includes: consulting or advisory. Vesela Kovacheva reports a relationship with PPD Thermo Fisher Scientific that includes: consulting or advisory. Kathryn Gray reports a relationship with Aetion that includes: consulting or advisory. Kathryn Gray reports a relationship with Roche that includes: consulting or advisory. Kathryn Gray reports a relationship with BillionToOne Inc that includes: consulting or advisory. Kathryn Gray reports a relationship with Janssen Global that includes: consulting or advisory. Kathryn Gray reports a relationship with Pfizer that includes: consulting or advisory. David Bates reports a relationship with Early Sense that includes: consulting or advisory and funding grants. David Bates reports a relationship with CDI Negev that includes: consulting or advisory. David Bates reports a relationship with Valera Health that includes: equity or stocks. David Bates reports a relationship with CLEW that includes: equity or stocks. David Bates reports a relationship with MDClone that includes: equity or stocks. David Bates reports a relationship with AESOP Technology that includes: consulting or advisory and equity or stocks. David Bates reports a relationship with Feel Better that includes: consulting or advisory and equity or stocks. David Bates reports a relationship with IBM Watson Health that includes: funding grants. Vesela Kovacheva has patent #WO2021119593A1 issued to Mass General Brigham. If there are other authors, they declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. |
| Σχόλια: | Update of: medRxiv. 2025 Jul 25:2025.07.25.25332130. doi: 10.1101/2025.07.25.25332130.. (PMID: 40778122) |
| References: | J Am Med Inform Assoc. 2013 Jan 1;20(1):144-51. (PMID: 22733976) BMC Med Res Methodol. 2025 Jan 28;25(1):23. (PMID: 39871166) Int J Med Inform. 2023 Sep;177:105122. (PMID: 37295138) J Biomed Inform. 2015 Apr;54:213-9. (PMID: 25791500) Stud Health Technol Inform. 2024 Jan 25;310:1460-1461. (PMID: 38269696) J Am Med Inform Assoc. 2010 Sep-Oct;17(5):507-13. (PMID: 20819853) AMIA Annu Symp Proc. 2006;:1040. (PMID: 17238659) Bioinformatics. 2020 Feb 15;36(4):1234-1240. (PMID: 31501885) J Biomed Inform. 2017 Sep;73:14-29. (PMID: 28729030) J Am Med Inform Assoc. 2010 Mar-Apr;17(2):124-30. (PMID: 20190053) Brief Bioinform. 2021 Jan 18;22(1):146-163. (PMID: 31838514) NPJ Digit Med. 2023 Nov 30;6(1):212. (PMID: 38036723) Brief Bioinform. 2014 Mar;15(2):327-40. (PMID: 23255168) NPJ Digit Med. 2024 Sep 20;7(1):257. (PMID: 39304709) J Biomed Inform. 2018 Sep;85:106-113. (PMID: 30092358) NPJ Digit Med. 2024 Aug 24;7(1):222. (PMID: 39182008) IEEE J Biomed Health Inform. 2025 Oct;29(10):7657-7667. (PMID: 40424107) Proc AMIA Symp. 2001;:17-21. (PMID: 11825149) J Biomed Inform. 2015 Apr;54:186-90. (PMID: 25746391) BMC Health Serv Res. 2019 Mar 12;19(1):158. (PMID: 30866908) Nature. 2023 Jul;619(7969):357-362. (PMID: 37286606) BMC Bioinformatics. 2024 Mar 14;25(1):112. (PMID: 38486137) JAMA Surg. 2024 Aug 01;159(8):928-937. (PMID: 38837145) Sci Rep. 2024 Nov 5;14(1):26783. (PMID: 39500759) NPJ Digit Med. 2025 Jan 19;8(1):45. (PMID: 39828800) Radiology. 2025 Jan;314(1):e240895. (PMID: 39807977) JAMA Oncol. 2016 Jun 1;2(6):797-804. (PMID: 27124593) Artif Intell Med. 2024 May;151:102847. (PMID: 38658131) |
| Grant Information: | K08 HL161326 United States HL NHLBI NIH HHS; OT2 OD038029 United States OD NIH HHS; R01 HD117802 United States HD NICHD NIH HHS; R03 HL162756 United States HL NHLBI NIH HHS |
| Contributed Indexing: | Keywords: Electronic health records; Large language models; Natural language processing; Phenotyping; Regular expressions |
| Entry Date(s): | Date Created: 20260624 Date Completed: 20260806 Latest Revision: 20260922 |
| Update Code: | 20260922 |
| PubMed Central ID: | PMC13380079 |
| DOI: | 10.1016/j.cmpb.2026.109517 |
| PMID: | 42341359 |
| Βάση Δεδομένων: | MEDLINE |
καταχωρήστε σχόλιο πρώτοι!