DKW News

Machine Learning Provides a Quick Overview of Your Diagnoses

Machine Learning Provides a Quick Overview of Your Diagnoses

Researchers at Aalborg University have developed a model that can successfully map a patient's existing diagnoses on the basis of the person's medication list. Over time, this could enable healthcare staff to quickly get an overview of the patient’s pre-existing diseases.

Last modified: 14.10.2022


Everywhere in the healthcare system, staff use diagnosis codes in their contact with patients. These codes consist of a combination of letters and numbers linked to a specific diagnosis. The use of diagnosis codes ensures that healthcare staff can communicate safely and unambiguously with each other, while also making it possible to obtain statistics for use in research and for disease prevention.

However, despite the use of diagnosis codes, it can be difficult to get a quick overview of a patient's existing diagnoses. Studies have shown that mistakes are often made in the manual assignment of codes, and diagnoses are often stored in records in different systems. This can be a problem in a situation where patients are unconscious, confused or have no relatives by their side.

Now, researchers at Aalborg University have developed a model that by using machine learning can automatically identify existing diagnoses on the basis of the patient's medication list. Assistant Professor Tomer Sagi from the Department of Computer Science explains:

- When paramedics come to pick up a person, they often ask for the patient’s medication to take it to the doctors. The idea is that if a doctor can identify pre-existing diseases on the basis of the medication, a machine learning system might be able to do the same. And in this way, we can support healthcare staff in quickly determining what categories of patients are on their way in the ambulance.

Fixing human errors

In addition to faster identification of diagnoses, the model can in the long run also be helpful in correcting the human errors that are inevitable in diagnosis coding.

- The system can highlight if there are irregularities and point out errors. The bigger the error, the easier it is. If a person is given diabetes medication and the doctor states that the person has cancer, the system can very easily catch the error. It is much more difficult if the doctor has simply chosen a wrong subtype of diabetes, Tomer Sagi explains.

When preparing the model, the researchers worked together with colleagues from Aalborg University Hospital and the Department of Clinical Medicine at Aalborg University. They trained the model using an American data set as well as data from the Danish National Patient Register, and according to Tomer Sagi, the model basically works quite well, although it is far from being able to stand alone:

- The system can infer that if a patient has a prescription for insulin, that person probably has diabetes. And if the person is on heart medication, he or she probably has some form of heart disease. However, other diseases can be almost impossible to identify on the basis of medication, if for example, the disease is congenital - or if the person receives a drug that is used to treat several types of diseases.

Promising perspectives

According to Tomer Sagi, there are promising perspectives for working further with methods to diagnose on the basis of medication - and he would like to see even more collaboration with other researchers and with people within the healthcare system.

- There are a number of challenges within the field. To name but one example, it would be very useful if we could combine medication registers with medical records and pictures. But in Denmark, for example, medical records are written in Danish – and all the systems that can derive diagnosis codes based on text are trained in English. It is a problem and one of the issues that we would like to address.

Do you want to know more?


Assistant Professor Tomer Sagi
Data, Knowledge and Web Engineering,
Department of Computer Science, Aalborg University




Department of Computer Science, Aalborg University

Selma Lagerlöfs Vej 300  ・ 9220 Aalborg East, Denmark 
Telephone: +45 9940 9940  ・ Mail: