A Comprehensive Approach to Days’ Supply Estimation in a Real-World Prescription Database: Algorithm Development and Validation Study
Open Access
- 11 February 2026
- journal article
- Published by JMIR Publications Inc. in Online Journal of Public Health Informatics
- Vol. 18, e83465
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 the information needed for calculating the DS is not provided. Therefore, other methods need to be applied to acquire missing values or substitute incorrect values. Objective: This study aims 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% (150,824 patients) random sample of the Estonian population between 2012 and 2019 was used. The workflow consisted of 3 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 the Summary of Product Characteristics or legislation. DS was calculated based on the provided daily dose or imputed value. To evaluate the impact of data cleaning, medication adherence for the baseline dataset and corrected dataset for 2 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 (2601/82,867, 3.1%) and intravaginal contraceptives (1692/21,145, 8%) while the highest proportion of DS was provided for inhalation medication (78,541/126,588, 62%), oral drops (52,085/98,221, 53%) and tablets, capsules, suppositories (2,828,617/6,176,585, 45.8%). As a result of applying different imputation approaches, we successfully found the DS for 98.3% (7,415,347/7,544,892) of dispensed prescriptions. For the remaining 1.7% (129,545/7,544,892) of prescriptions, DS could not be imputed nor calculated with these methods. As for the medication adherence, the distinction between 2 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 forms. 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.Keywords
All Related Versions
This publication has 23 references indexed in Scilit:
- Adherence to treatment in dermatology: Literature reviewJEADV Clinical Practice, 2024
- Improving medication adherence in cardiovascular diseaseNature Reviews Cardiology, 2024
- A data preparation framework for cleaning electronic health records and assessing cleaning outcomes for secondary analysisInformation Systems, 2022
- Prescription Market Share and Treatment Patterns in Atopic Dermatitis: A Retrospective Observational Study Using US Insurance ClaimsAdvances in Therapy, 2022
- Defined daily doses (DDD) do not accurately reflect opioid doses used in contemporary chronic pain treatmentPharmacoepidemiology and Drug Safety, 2017
- Evaluation of methods to estimate missing days’ supply within pharmacy data of the Clinical Practice Research Datalink (CPRD) and The Health Improvement Network (THIN)European Journal of Clinical Pharmacology, 2016
- Measuring drug exposure: concordance between defined daily dose and days' supply depended on drug classJournal of Clinical Epidemiology, 2016
- The Nordic prescription databases as a resource for pharmacoepidemiological research—a literature reviewPharmacoepidemiology and Drug Safety, 2013
- Variation in the days supply field for osteoporosis medications in OntarioArchives of Osteoporosis, 2013
- Prescription Errors and Outcomes Related to Inconsistent Information Transmitted Through Computerized Order EntryArchives of internal medicine (1960), 2009