Towards semantic interoperability in resource-limited settings: A free and open-source ICD-10 coding tool for OpenMRS
Details
- Supervisors
- Faculty
- Degree label
- Abstract
- ICD coding is the process of assigning standardised diagnostic codes to clinical documents, such as discharge notes. It is essential for billing, epidemiological surveillance, and health data interoperability; however, it remains a largely manual process that is time consuming, costly, and error-prone. This thesis investigates automated ICD-10-CM coding along two complementary axes: machine learning model development and open-source clinical deployment. On the modelling side, two coding scenarios are addressed. For the short excerpt task, four lexical baselines and four neural models are evaluated on a new synthetic dataset of 2,567 examples generated from UMLS and MIMIC-IV, as no annotated dataset exists for this subtask. The results indicate that self-alignment pretraining is the primary driver of performance: SapBERT achieves a Mean Reciprocal Rank of 0.477, compared to 0.181 for the unaligned PubMedBERT and 0.373 for the best lexical baseline. For the full discharge note task, a progressive series of models culminates in a multi-task PubMedBERT encoder that jointly predicts ICD-10-CM codes at three granularity levels (chapter, 3-character, and full code), using label attention over chunk representations and a hierarchical prediction strategy. Despite operating at chunk level rather than word level, the model achieves a macro-F1 of 0.123 and a recall@50 of 0.708 on the MIMIC-IV dataset. This means 70% of correct codes appear in the top-50 suggestions, which is the most relevant outcome for a coding-assistance workflow. On the deployment side, we integrate both models into an OpenMRS module: ICDHelper. The module performs inference entirely offline using ONNX Runtime, resolves predictions against the CIEL concept dictionary, and surfaces code suggestions within the existing clinical workflow. It has been released under the Mozilla Public License v2 and has already been reviewed by members of the OpenMRS community, including Partners in Health and the director of the CIEL dictionary.