Abstract Utilizing electronic health records (EHRs) in prison settings offers a unique opportunity to establish a learning health system (LHS) aimed at enhancing healthcare quality for incarcerated individuals. Despite the challenges inherent in prison healthcare, leveraging EHRs can facilitate data-driven decision-making and foster continuous improvement initiatives. This study describes the results of an intervention aimed at improving EHR data quality in prisons and explores the potential to enhance the development of a robust LHS. We assessed EHR data quality in 2015 (38 prisons) and 2022 (35 prisons) in the Netherlands over six months. Data were extracted, de-identified, and analyzed across demographic, medication use, (history of) diagnosis, and healthcare usage categories. We measured indicator scores and evaluated variation between prisons in data quality. This project was commissioned by the Custodial Institutions Agency. In 2015, age and gender were recorded for 93% of prisoners, increasing to 100% in 2022. Diagnostic coding use rose from an average of 82% in 2015 to 98% in 2022, with reduced variation between prisons. Consultation frequency per inmate ranged from 3 to 13, reflecting challenges in constructing a uniform denominator due to institutional differences. Mental health problems accounted for 17.7% of recorded disease episodes in 2022. In addition, consultations were most often related to oral health (4.4%), drug abuse (3.2%), sleep (1.8%), fear of diseases (1.6%), and respiratory infections (1.5%). Our findings indicate improvements in EHR data quality in Dutch prisons between 2015 to 2022. Integrating EHR data reuse into prison healthcare systems is pivotal for realizing the vision of an LHS in correctional facilities. This study underscores the potential of advancing EHR recording habits and the reuse of EHR data to enhance healthcare quality in prison settings.