September 2, 2025

PrAna: an open-source R package for mapping and quantifying NHS primary care prescribing data

 

Introduction: Pharmaceutical pollution in the environment is an emerging concern, with prescription medications contributing significantly to aquatic contamination. After human consumption, active pharmaceutical ingredients (APIs) are excreted and enter wastewater systems, often persisting in surface waters despite treatment. Understanding the sources and trends of pharmaceutical emissions is essential for effective environmental risk assessment and pollution mitigation. To support this, we developed PrAna, an open-source R package designed to quantify and visualize prescribed API quantities in NHS primary care data, facilitating research on pharmaceutical pollution. 

Problem: Monitoring pharmaceutical pollution requires accurate data on how much of each drug is prescribed, as this directly influences environmental emissions. However, raw NHS prescription datasets are large and complex, making it difficult to extract API-specific information at a spatial and temporal scale relevant to environmental studies. Without efficient tools, estimating pharmaceutical loads entering wastewater and predicting their environmental impact remains a challenge. Additionally, variations in prescribing patterns across regions influence local pollution levels, yet these trends are not easily accessible for researchers and policymakers. 

Method: We have developed an R package, PrAna to process National Health Service (NHS) prescription datasets to calculate the total prescribed mass (kg) of APIs at the postcode level, providing a high-resolution estimate of pharmaceutical input into the environment. The results can be visualized in real-time using PrAnaViz, an interactive web-based tool that allows users to explore spatiotemporal trends by API, region, and time period. These insights enable researchers to estimate pharmaceutical emissions at local and national scales. 

Results: To demonstrate PrAna’s utility, we applied it to NHS prescription data (2015–2018) to analyse the distribution of 14 APIs in the Bath and North East Somerset (BANES) region. Using PrAnaViz, we identified monthly prescribing patterns, spatial distribution at the postcode level, and variations in drug formulations. The tool also supports non-targeted API analysis, exemplified by clarithromycin prescriptions across different regions. These applications highlight PrAna’s potential in estimating pharmaceutical loads entering wastewater systems and informing environmental monitoring efforts. 

Conclusion: PrAna and PrAnaViz enables the analysis of spatio-temporal and long-term trends with prescribed quantities of different APIs by postcode. This can be used as a support tool for policymakers, academics and researchers in public healthcare, and environmental scientist to monitor different group of pharmaceuticals emitted to the environment and for prospective risk assessment of pharmaceuticals in the environment. 

Paper (s):  

https://bmcmedinformdecismak.biomedcentral.com/articles/10.1186/s12911-021-01727-z 

Partners: Wessex Water 

Funders: EPSRC (EP/V028499/1), Wessex Water Services Ltd and EPSRC Impact Acceleration Account (Project number: EP/R51164X/1, ENTRUST IAA). 

CONTACT US

Want to know more about CWBE?

You want to help or join us? Either way let’s get in touch!

Get in touch