Introducing OpenCodeCounts
- Posted:
- Written by:
- Categories:

Introducing OpenCodeCounts!
Have you ever wondered if a clinical event is recorded frequently enough in electronic health records (EHR) to answer your research question? Or if your codelist captures an expected level of activity? Or perhaps you wanted to know what difference the inclusion or exclusion of a specific code would make?
Knowing how frequently individual clinical codes are recorded could have helped. And now we’ve made it quick and easy to explore clinical coding trends in England, and as always, openly accessible. Drumrolls, please: it is our pleasure to introduce a new tool in the Open Family: OpenCodeCounts.
What is OpenCodeCounts?
OpenCodeCounts is an open-access, online interactive tool and an accompanying R package. It allows users to explore the English national clinical coding data captured in NHS-funded GP practices and admissions to acute hospitals. It visualises and analyses how frequently chosen clinical codes have been recorded each year since 2012. Users can search for individually entered codes or groups of codes, or any codelist you have created or found on OpenCodelists.
What is the underlying data that it exposes?
OpenCodeCounts exposes the annual counts of ICD-10 (diagnoses) and OPCS-4 (procedures) usage in acute hospital admissions, and SNOMED CT clinical code usage in GP practices in England. The SNOMED CT dataset summarises the recording of clinical, demographic and administrative information in GP practices, such as prescriptions, symptoms, measurements and ethnicity. This data has been publicly available as large spreadsheets, but we have downloaded, cleaned, standardised and combined them to allow fast visualisations and comparisons over time.
From spreadsheet to interactive tools: OpenCodeCounts allows for efficient exploration of individual code usage trends over time.
You can read more about the data, including some cautions in its interpretation (most important being that the recording counts do not equal the number of patients!) in our documentation and the upcoming paper.
How will it help in my research?
As we’ve already alluded to in the introduction, knowing the frequency of clinical code recording can be valuable in EHR research in many ways:
- It will help assess your study feasibility, by checking that variables of interest are sufficiently recorded
- It will help detect any unexpected year-to-year changes in coding activity (for example, due to financial incentives) that may affect your study design and interpretation
- It can help you make decisions about the inclusion and exclusion of specific codes in the codelists
- It will help verify that your codelist captures the expected level of activity
- It will provide an independent benchmark and contextualise the results from other data sources.
Sounds super helpful! How do I access it?
The online app is accessed at https://bennettoxford.github.io/opencodecounts/. You can also download the R package for bespoke analysis and visualisations by typing remotes::install_github("bennettoxford/opencodecounts")
in your R studio terminal.
Make sure to have a look at our brief documentation, the concise “How to use R package” guide, and the example use of the online tool.
What are the next steps and how can I contribute?
We will be maintaining and annually updating the underlying data. You can notify us of any bugs and make suggestions by submitting a ticket to our GitHub repo. Otherwise, go ahead and explore!
To acknowledge the use of our tool, please cite: Wiedemann M, Tamborska A, Higgins R, Kingsley V, Fisher L, Ojedele L, Oreagba K (2025). opencodecounts: Clinical Code Usage in England. R package version 0.1.0, https://github.com/bennettoxford/opencodecounts.