Skip to main content

Preparing for power outages at UEF


Poor glycemic control in patients with type 2 diabetes can be predicted from patient information systems with the help of machine learning

The risk for poor glycemic control in patients with type 2 diabetes can be predicted with confidence by using machine learning methods, a new study from Finland finds. The most important factors predicting glycemic control include prior glucose levels, duration of type 2 diabetes, and the patient’s existing anti-diabetic medicines.

The researchers examined glycaemic control in patients with type 2 diabetes in North Karelia, Finland, over a period of six years. Patients’ glycemic control was determined on the basis of long-term blood glucose, HbA1c. Three HbA1c trajectories were identified from the data, and based on these, patients were divided into two groups: patients with adequate glycemic control, and patients with inadequate glycemic control. Using machine learning methods, the researchers examined the association of patients’ baseline characteristics, clinical- and treatment-related factors and socio-economic status with glycemic control. The baseline characteristics included more than 200 different variables.

The results showed that by using data on the duration of type 2 diabetes, prior HbA1c levels, fasting blood glucose, existing anti-diabetic medicines and their number, it is possible to reliably identify patients with a persistent risk for hyperglycemia at any point of their disease. In other words, inadequate glycemic control can be predicted from data that is routinely collected as part of diabetes monitoring and management.

The primary objective of treatment in type 2 diabetes is to maintain good glycemic control in order to prevent complications associated with the disease. According to the Finnish Current Care Guidelines for Diabetes, glycemic control should be followed up annually, making it possible to monitor the long-term trajectory of the disease. Early identification of patients with poor glycemic control is of paramount importance in order to target treatment to those in need and to intensify it at the right time. Delayed intensification of treatment increases the risk of complications, which is also reflected in higher costs of care.

The study utilised data from the electronic patient information system of the Joint Municipal Authority for North Karelia Social and Health Services, Siun sote, from registers maintained by the Social Insurance Institution of Finland, as well as from Statistics Finland’s open postal code database, Paavo.  A total of 9,631 people with type 2 diabetes were selected for the study cohorts. The study was carried out in collaboration the University of Eastern Finland and the University of Oulu, and it was funded by the Finnish Diabetes Association, the Strategic Research Council at the Academy of Finland, Kuopio University Hospital (VTR funding) and the HTx project funded by the EU Horizon 2020 programme (

For further information, please contact:

Piia Lavikainen
Senior Researcher, Docent
School of Pharmacy, University of Eastern Finland

Janne Martikainen
School of Pharmacy, University of Eastern Finland

Gunjan Chandra
Doctoral Researcher
Biomimetics and Intelligent Systems Group, University of Oulu

Pekka Siirtola
Biomimetics and Intelligent Systems Group, University of Oulu

Research article:

Lavikainen P, Chandra G, Siirtola P, Tamminen S, Ihalapathirana AT, Röning J, Laatikainen T, Martikainen J. Data-Driven Identification of Long-Term Glycemia Clusters and Their Individualized Predictors in Finnish Patients with Type 2 Diabetes. Clin Epidemiol. 2023;15:13-29