BackgroundPhramongkutklao Hospital is one of the largest military hospitals in Thailand. Beginning in 2016, an institutional policy was implemented in which medication prescription length was increased from 30 to 90 days. However, there have been no formal investigations into how this policy has impacted medication adherence among patients in hospitals. As such, this study evaluated how prescription length impacted medication adherence among dyslipidemia and type-2 diabetes patients who were treated at Phramongkutklao Hospital.MethodsThis pre-post implementation study compared patients who received prescription lengths of 30 and 90 days based on information recorded in the hospital database between 2014 and 2017. Therein, we used the medication possession ratio (MPR) to estimate patient adherence. Focusing on patients with universal coverage insurance, we employed the difference-in-difference method to examine changes in adherence from before and after policy implementation, then conducted a logistic regression to test for associations between the predictors and adherence.ResultsWe analyzed data from a total of 2,046 patients, with equal amounts of 1,023 placed into the control group (no change to 90-day prescription length) and intervention group (change from 30 to 90-day prescription length). First, we found that increased prescription length was associated with 4% and 5% higher MPRs among dyslipidemia and diabetes patients in the intervention group, respectively. Second, we found that medication adherence was correlated with sex, comorbidities, history of hospitalization, and the number of prescribed medications.ConclusionIncreasing the prescription length from 30 to 90 days improved medication adherence in both the dyslipidemia and type-2 diabetes patients. This shows that the policy change was successful for patients in the hospital considered for this study.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12913-023-09530-4.