From text to code – Leveraging machine learning for neurology outpatient clinical coding - 28/01/26

Doi : 10.1016/j.neuri.2026.100257 
Elena Purcaru a, b, , Michael George a, Matthew Stammers a, b, Christopher Kipps a, b
a Department of Neurology, University Hospital Southampton NHS Foundation Trust, Southampton, UK 
b University of Southampton Faculty of Medicine, Southampton, UK 

Corresponding author. Neurology Department, Wessex Neuroscience Centre, University Hospital Southampton, Tremona Road, Southampton, SO166YD, UK. Neurology Department Wessex Neuroscience Centre University Hospital Southampton Tremona Road Southampton SO166YD UK

Benvenuto su EM|consulte, il riferimento dei professionisti della salute.
Articolo gratuito.

Si connetta per beneficiarne

Abstract

Background

Most neurological care is delivered in outpatient settings without mandated clinical coding. The clinical records remain stored as unstructured text with inconsistent formatting. There is a significant opportunity to increase the value of these data through automated clinical coding utilising natural language processing (NLP). While existing models for full ICD-10 clinical coding lack sufficient accuracy for clinical use, 60 % of neurology outpatient cases fall into just five diagnostic categories. This suggests that a simplified coding system could enhance feasibility and serve as a foundation for more complex coding schemes.

Objective

We propose a simplified coding system of 29 codes for neurology outpatient episodes. We evaluate several machine learning methods in a supervised single-label classification task on real-world outpatient care notes.

Methods

We collected outpatient care notes created between 15 November 2018 and 2 December 2022. The training dataset included 14,917 care notes, most of which were annotated with ICD-10 codes during routine care and subsequently mapped to 29 simplified diagnostic categories. An external validation set of 1,042 randomly selected encounters was retrospectively coded.

Models included logistic regression, support vector machine, bidirectional LSTM, BERT-based models (DistilBERT, RoBERTa), and a generative large language model (LLM), Mistral 7B. All but the LLM were trained via 10-fold stratified cross-validation; final models were trained on the complete dataset.

Results

DistilBERT and RoBERTa outperformed traditional models, with F1-scores of 81.73 (95 % CI: 79.02–84.13) and 81.16 (95 % CI: 78.84–83.76), respectively. The LLM–DistilBERT hybrid performed worse than all but BiLSTM and produced “medical hallucinations,” making it unsuitable for clinical use. The training data were highly imbalanced. BERT-based models showed strong performance on high-frequency categories, with F1-scores over 85 % for the top five classes. At a 0.85 confidence threshold, DistilBERT achieved 96 % accuracy on 64 % of the external validation set.

Conclusions

BERT-based NLP models perform well in classifying neurology outpatient clinic notes when a reduced set of diagnostic categories is used. In a human-in-the-loop workflow, such models can meaningfully reduce the manual coding workload while preserving accuracy. To our knowledge, this is the first applied study of automated clinical coding in neurology outpatient care.

Il testo completo di questo articolo è disponibile in PDF.

Highlights

Developed and evaluated open-source NLP models for automated clinical coding of neurology outpatient letters.
Introduced a simplified coding system of 29 diagnostic categories to address data sparsity and class imbalance.
Fine-tuned DistilBERT achieved an F1-score of 81.7 %, and 82.4 % accuracy on external validation.
BERT-based models outperformed logistic regression, SVM, BiLSTM for clinical text classification.
Large Language Models (e.g. Mistral-7B) underperformed due to medical hallucinations and lack of output structure.

Il testo completo di questo articolo è disponibile in PDF.

Keywords : Neurology, Clinical coding, Clinical text classification, Natural language processing


Mappa


Crown Copyright © 2026  Pubblicato da Elsevier Masson SAS. Tutti i diritti riservati.
Aggiungere alla mia biblioteca Togliere dalla mia biblioteca Stampare
Esportazione

    Citazioni Export

  • File

  • Contenuto

Vol 6 - N° 1

Articolo 100257- marzo 2026 Ritorno al numero
Articolo precedente Articolo precedente
  • Integrating cross-sectional imaging data into functional outcome prediction models for acute ischemic stroke of the anterior circulation
  • Frank te Nijenhuis, Matthijs van der Sluijs, Pieter Jan van Doormaal, Wim van Zwam, Jeannette Hofmeijer, Xucong Zhang, Sandra Cornelissen, Danny Ruijters, Ruisheng Su, Theo van Walsum
| Articolo seguente Articolo seguente
  • A proof-of-concept study on the use of large language models for assessing research methodology in neuroimaging
  • Brock Pluimer, Apeksha Sridhar, Ishtiaq Mawla, Helen Mengxuan Wu, Roshni Lulla, Sarah Hennessy, Patrick Sadil, Rishab Iyer, Eric Ichesco, Anson Kairys, Max Egan, Jonas Kaplan, Richard E. Harris

Benvenuto su EM|consulte, il riferimento dei professionisti della salute.

@@150455@@ Voir plus

Il mio account


Dichiarazione CNIL

EM-CONSULTE.COM è registrato presso la CNIL, dichiarazione n. 1286925.

Ai sensi della legge n. 78-17 del 6 gennaio 1978 sull'informatica, sui file e sulle libertà, Lei puo' esercitare i diritti di opposizione (art.26 della legge), di accesso (art.34 a 38 Legge), e di rettifica (art.36 della legge) per i dati che La riguardano. Lei puo' cosi chiedere che siano rettificati, compeltati, chiariti, aggiornati o cancellati i suoi dati personali inesati, incompleti, equivoci, obsoleti o la cui raccolta o di uso o di conservazione sono vietati.
Le informazioni relative ai visitatori del nostro sito, compresa la loro identità, sono confidenziali.
Il responsabile del sito si impegna sull'onore a rispettare le condizioni legali di confidenzialità applicabili in Francia e a non divulgare tali informazioni a terzi.


Tutto il contenuto di questo sito: Copyright © 2026 Elsevier, i suoi licenziatari e contributori. Tutti i diritti sono riservati. Inclusi diritti per estrazione di testo e di dati, addestramento dell’intelligenza artificiale, e tecnologie simili. Per tutto il contenuto ‘open access’ sono applicati i termini della licenza Creative Commons.