Maintenance Notice

Due to necessary scheduled maintenance, the JMIR Publications website will be unavailable from Wednesday, July 01, 2020 at 8:00 PM to 10:00 PM EST. We apologize in advance for any inconvenience this may cause you.

Who will be affected?

Accepted for/Published in: Online Journal of Public Health Informatics

Date Submitted: Sep 3, 2025
Date Accepted: Dec 29, 2025

The final, peer-reviewed published version of this preprint can be found here:

A Comprehensive Approach to Days’ Supply Estimation in a Real-World Prescription Database: Algorithm Development and Validation Study

Malk M, Mooses K, Oja M, Holm J, Keidong H, Umov N, Tamm S, Reisberg S, Vilo J, Kolde R

A Comprehensive Approach to Days’ Supply Estimation in a Real-World Prescription Database: Algorithm Development and Validation Study

Online J Public Health Inform 2026;18:e83465

DOI: 10.2196/83465

PMID: 41672468

PMCID: 12936656

A Comprehensive Approach to Days’ Supply Estimation in a Real-World Prescription Database: Data Cleaning, Imputation, and Adherence Analysis

  • Maria Malk; 
  • Kerli Mooses; 
  • Marek Oja; 
  • Johannes Holm; 
  • Hanna Keidong; 
  • Nikita Umov; 
  • Sirli Tamm; 
  • Sulev Reisberg; 
  • Jaak Vilo; 
  • Raivo Kolde

ABSTRACT

Background:

For accurate medication usage statistics and medication adherence calculations, we need to have an accurate days’ supply (DS) for each prescription. Unfortunately, often the DS or information needed for calculating the DS is not provided. Therefore, other methods need to be applied to acquire missing values or substituting incorrect values.

Objective:

The aim of this study is to apply a variety of methods for managing incomplete and missing data to enhance the accuracy of calculating DS for all medications and drug forms alike. Furthermore, to describe the effect of applied methods on the medication adherence calculated on real-world data.

Methods:

A dataset comprising prescription records from a 10% random sample of the Estonian population between 2012 and 2019 was used. The workflow consisted of three steps – data cleaning, imputation and calculation of DS. For imputation, different methods were combined, such as calculating mode-based daily dose, or using usage guidelines from Summary of Product Characteristics (SPCs) or legislation. DS was calculated based on provided daily dose or imputed value. To evaluate the impact of data cleaning, medication adherence for baseline dataset and corrected dataset for two time periods 2012–2015 and 2017–2019 was calculated and compared.

Results:

The drug forms with the lowest proportion of correct DS provided were insulin injections (3.1%) and intravaginal contraceptives (8.0%) while the highest proportion of DS was provided for inhalation medication (57.5%), oral drops (53.0%) and tablets, capsules, suppositories (45.8%). As a result of applying different imputation approaches, we successfully found the DS for 98.3% (N=7,415,347) of dispensed prescriptions. For the remaining 1.7% (N=129,545) of prescriptions DS could not be imputed nor calculated with these methods. As for the medication adherence, the distinction between two observed time periods was more distinct in the baseline dataset compared with the corrected dataset for most of the drug groups, indicating that the applied correction methods had lessened the stark contrast.

Conclusions:

In summary, our study demonstrated that with a carefully designed imputation pipeline where data-driven imputation is combined with domain knowledge and literature information, it is possible to meaningfully improve the quality of prescription datasets and generate more accurate and consistent adherence metrics across various drug form. Nonetheless, future efforts should continue to refine imputation techniques, incorporate machine learning approaches where appropriate, and expand validation efforts using external benchmarks or clinical outcomes.


 Citation

Please cite as:

Malk M, Mooses K, Oja M, Holm J, Keidong H, Umov N, Tamm S, Reisberg S, Vilo J, Kolde R

A Comprehensive Approach to Days’ Supply Estimation in a Real-World Prescription Database: Algorithm Development and Validation Study

Online J Public Health Inform 2026;18:e83465

DOI: 10.2196/83465

PMID: 41672468

PMCID: 12936656

Download PDF


Request queued. Please wait while the file is being generated. It may take some time.

© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.