Towards Assigning Diagnosis Codes Using Medication History

Tomer Sagi, Emil Riis Hansen, Katja Hose, Gregory Y.H. Lip, Torben Bjerregaard Larsen, Flemming Skjøth

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review


Prior studies have manually assessed diagnosis codes and found them to be erroneous/incomplete between 4–30% of the time. Previous methods to validate and suggest missing codes from medical notes are limited in the absence of these, or when the notes are not written in English. In this work, we propose using patients’ medication data to suggest and validate diagnosis codes. Previous attempts to assign codes using medication data have focused on a single condition. We present a proof-of-concept study using MIMIC-III prescription data to train a machine-learning-based model to predict a large collection of diagnosis codes assigned on four levels of aggregation of the ICD-9 hierarchy. The model is able to correctly recall 58.2% of the ICD-9 categories and is precise in 78.3% of the cases. We evaluate the model’s performance on more detailed ICD-9 levels and examine which codes and code groups can be accurately assigned using medication data. We suggest a specialized loss function designed to utilize ICD-9’s natural hierarchical nature. It performs consistently better than the non-hierarchical state-of-the-art.

Original languageEnglish
Title of host publicationArtificial Intelligence in Medicine - 18th International Conference on Artificial Intelligence in Medicine, AIME 2020, Proceedings
EditorsMartin Michalowski, Robert Moskovitch
PublisherSpringer Science and Business Media Deutschland GmbH
Number of pages11
ISBN (Print)9783030591366
StatePublished - 2020
Externally publishedYes
Event18th International Conference on Artificial Intelligence in Medicine, AIME 2020 - Minneapolis, United States
Duration: 25 Aug 202028 Aug 2020

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume12299 LNAI
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Conference18th International Conference on Artificial Intelligence in Medicine, AIME 2020
Country/TerritoryUnited States

Bibliographical note

Publisher Copyright:
© 2020, Springer Nature Switzerland AG.

ASJC Scopus subject areas

  • Theoretical Computer Science
  • General Computer Science


Dive into the research topics of 'Towards Assigning Diagnosis Codes Using Medication History'. Together they form a unique fingerprint.

Cite this