Assigning diagnosis codes using medication history.

Hansen, Emil Riis, Sagi, Tomer ORCID: 0000-0002-8916-0128, Hose, Katja ORCID: 0000-0001-7025-8099, Lip, Gregory YH ORCID: 0000-0002-7566-1626, Larsen, Torben Bjerregaard and Skjøth, Flemming
(2022) Assigning diagnosis codes using medication history. Artificial intelligence in medicine, 128. 102307-.

Access the full-text of this item by clicking on the Open Access link.


Diagnosis assignment is the process of assigning disease codes to patients. Automatic diagnosis assignment has the potential to validate code assignments, correct erroneous codes, and register completion. Previous methods build on text-based techniques utilizing medical notes but are inapplicable in the absence of these notes. We propose using patients' medication data to assign diagnosis codes. We present a proof-of-concept study using medical data from an American dataset (MIMIC-III) and Danish nationwide registers to train a machine-learning-based model that predicts an extensive collection of diagnosis codes for multiple levels of aggregation over a disease hierarchy. We further suggest a specialized loss function designed to utilize the innate hierarchical nature of the disease hierarchy. We evaluate the proposed method on a subset of 567 disease codes. Moreover, we investigate the technique's generalizability and transferability by (1) training and testing models on the same subsets of disease codes over the two medical datasets and (2) training models on the American dataset while evaluating them on the Danish dataset, respectively. Results demonstrate the proposed method can correctly assign diagnosis codes on multiple levels of aggregation from the disease hierarchy over the American dataset with recall 70.0% and precision 69.48% for top-10 assigned codes; thereby being comparable to text-based techniques. Furthermore, the specialized loss function performs consistently better than the non-hierarchical state-of-the-art version. Moreover, results suggest the proposed method is language and dataset-agnostic, with initial indications of transferability over subsets of disease codes.

Item Type: Article
Uncontrolled Keywords: Humans, Electronic Health Records, Machine Learning
Divisions: Faculty of Health and Life Sciences
Faculty of Health and Life Sciences > Institute of Life Courses and Medical Sciences
Depositing User: Symplectic Admin
Date Deposited: 26 Sep 2023 13:26
Last Modified: 26 Sep 2023 13:26
DOI: 10.1016/j.artmed.2022.102307
Open Access URL:
Related URLs: