Research Appraisaldiagnostic

Automated ICD-10-Anchored Classification of Primary Care Text Data: Development and Evaluation of a Custom Multilabel Classifier

JMIR medical informaticsHaag, Christina, Grischott, Thomas, Burgstaller, Jakob M et al.6 Apr 2026DOI

Clinical Snapshot

85CEBM
Evidence: Moderatediagnostic

PICO Framework

P — PopulationPrimary care free-text notes from German-language electronic medical records (38,728 notes from FIRE database)
I — InterventionCustom multilabel classifier using fine-tuned large language model for automated ICD-10 coding
C — ComparatorManual ICD-10 coding (gold standard for training and validation)
O — OutcomesClassification performance measured by F1-scores (micro, macro, weighted), accuracy of automated ICD-10 code assignment

Bottom Line

This study demonstrates promising performance of automated ICD-10 coding for German primary care notes, achieving F1-scores of 0.84-0.86 across 48 diagnostic classes. The approach could significantly reduce manual coding burden in practices with large text datasets. However, the results are specific to German-language notes and a single institutional database. Australian implementation would require local validation with English-language data and alignment with local coding practices. While the technical approach is sound, clinicians should be cautious about direct application without proper validation and should maintain oversight of automated coding outputs. The study provides a useful framework for developing similar tools in other healthcare contexts, but external validation and comparison with existing coding methods remain necessary before widespread clinical deployment.

Evidence: Moderate

Key Findings

  • P Value: Not reported

  • Effect Size: F1-scores: 0.85 (micro), 0.86 (macro), 0.84 (weighted)

  • Primary Outcome: Automated ICD-10 classification performance across 48 diagnostic classes

  • Nnt Or Sensitivity: F1-scores indicate balanced sensitivity and positive predictive value performance

  • Confidence Interval: Not reported

Clinical Application

Requires technical infrastructure and validation for local coding practices and language Would require adaptation for English-language notes and validation against Australian primary care coding practices. Could support PBS item coding and clinical audit requirements if validated locally Primary care practices with large volumes of free-text clinical notes requiring systematic coding

Abstract

BACKGROUND: Electronic medical records are a vast and valuable source of information, useful for tasks such as estimating disease prevalence. However, in routine primary care, much of this information is in free-text format rather than in a structured form and, therefore, not readily amenable to analysis. Manual coding of this textual data is both time-consuming and resource-intensive, making it impractical for large datasets. Although powerful open-source language models offer new opportunities for automated coding, their use on short heterogeneous primary care notes, particularly in German-language settings, remains insufficiently studied. OBJECTIVE: By providing hands-on guidance for applied health researchers, this study aims to demonstrate the effective and accurate automatic classification of free-text notes using a language model fine-tuned for automated International Statistical Classification of Diseases, Tenth Revision (ICD-10) coding. METHODS: Building on the extensive Family Medicine Research Using Electronic Medical Records (FIRE) routine database from the Institute of Primary Care at the University Hospital Zurich and the University of Zurich, we trained a large language model-based multilabel classifier on a dataset of 38,728 free-text notes, which had been manually categorized into 47 classes using specific ICD-10 codes and code ranges or nondiagnostic/ad hoc labels (eg, "unclear diagnosis," "status post"). We stratified the labeled data into training (70%), validation (15%), and posttraining test (15%) sets, ensuring similar label distributions across these sets. Using the Transformers Python library, we trained the model over 10 epochs and evaluated it on the posttraining test dataset. RESULTS: Across 48 classes, the FIRE classifier achieved strong performance on the held-out posttraining set, with F1-scores of 0.85 (micro, overall across all predictions), 0.86 (macro, mean of per-class scores treating classes equally), and 0.84 (weighted, per-class scores weighted by class frequency). CONCLUSIONS: This study demonstrates steps for training open-source large language models and highlights the potential to streamline and scale the extraction of diagnostic information for practical applications. Our model can be robustly deployed, for example, for prescreening and labeling of free-text information, thus potentially reducing the burden of repetitive and error-prone manual handling.

References

  1. 1.Haag, C., Grischott, T., Burgstaller, J. M., Markun, S., Senn, O., & von Wyl, V. (2026). Automated ICD-10-Anchored Classification of Primary Care Text Data: Development and Evaluation of a Custom Multilabel Classifier. JMIR Medical Informatics. https://doi.org/10.2196/86533
Share:XLinkedIn

This content is for educational purposes for healthcare professionals only and does not constitute clinical advice. Clinical decisions should be based on individual patient assessment, current guidelines, and appropriate specialist consultation. Editorial Standards · Privacy Policy · Terms of Service