ADHD diagnosis and medication coding in England: findings from an integrated masters research project
- Posted:
- Written by:
- Categories:
A project shaped by rising demand
Attention-Deficit Hyperactivity Disorder (ADHD) services are under pressure. According to the National Institute for Health and Care Excellence (NICE), 5% of children and 3-4% of adults live with an ADHD diagnosis, but far less are able to access treatment. Many patients experience very long waiting times, adding pressure on clinicians and NHS services.
As a Biomedical Sciences (Neuroscience) student student at Exeter College, I was particularly interested in whether key events such as the COVID-19 pandemic, Right to Choose policy, and medication shortages impacted ADHD diagnosis and the use of medication clinical codes - numeric identifiers corresponding to a specific piece of clinical or personal information in a person’s electronic health record.
I knew ADHD data could be useful for health service planning, but relatively little work had been done using publicly available aggregate data. Because GPs cannot diagnose ADHD, patients are referred to their local NHS ADHD service or Right to Choose – NHS-funded private or out of area services – or they can self-refer to private care. Care pathways vary regionally, so no single dataset can capture all diagnosis and treatment activity.
Finding, cleaning, and analysing multiple publicly available NHS datasets can be challenging, but at the Bennett Institute, I’ve been able to use various openly available tools – such as OpenCodeCounts, OpenPrescribing, and OpenPrescribing Hospitals to show that ADHD diagnosis and medication coding increased in the last 10-15 years in an efficient and reproducible way.
My approach: building the picture from public data
I first created codelists for ADHD diagnosis and medications in OpenCodelists.
Then, I analysed ADHD diagnosis and medication coding through the following publicly available datasets:
Using OpenCodeCounts, I looked at SNOMED CT and ICD-10 ADHD diagnosis coding in primary and inpatient care. To explore demographic differences, I also added coding position, age, and sex breakdowns for ICD-10 and OPCS-4 to version 0.5.0 of the package.
For medication coding, I used OpenPrescribing and OpenPrescribing Hospitals to look at GP prescribing and hospital issuing. First-line ADHD medications – methylphenidate, dexamfetamine, lisdexamfetamine – are Schedule 2 controlled substances, so the NHS Business Services Authority (NHSBSA) must be informed of Right to Choose and private prescriptions, meaning ADHD prescription item counts are publicly available through Freedom of Information (FOI) requests.
I use “Right to Choose or private” because this dataset does not distinguish between them, and some Right to Choose prescriptions may appear in the outpatient prescriptions dataset instead.
Because this data represents code usage, and is strongly dependent on data recording practices, we cannot infer prevalence or diagnosis and treatment rates without person-level data, but it does provide a useful starting point for future person-level EHR research.
ADHD diagnosis and medication coding trends
ADHD diagnosis and medication coding increased in the last 10-15 years, particularly following the COVID-19 pandemic.
Diagnosis coding
ADHD diagnosis coding increased by approximately 600% in primary care and around 1000% in hospital admitted patient care. Only 0.67% of inpatient ADHD diagnosis coding was recorded in the “main diagnosis” position (i.e. the main reason for inpatient treatment).

Figure 1: Yearly primary and inpatient care ADHD diagnosis coding (2011/12 to 2024/25).
Note: reporting periods are slightly different for primary care (Aug - Jul) and inpatient care (Apr - Mar) so data points don’t line up. Inpatient code usage data is only available from 2012/13 to 2024/25.
Looking at age breakdowns, we can see that patients under 30 contributed the most inpatient coding at first, but coding in patients aged 30-49 increased after 2020/21.

Figure 2: Age and sex breakdowns for inpatient ADHD diagnosis coding.
At first, there was more ADHD diagnosis coding for male inpatients, but the gap between coding for male and female inpatients narrowed over the years. In 2024/25, there was more coding for female inpatients.
Medication coding
Using change point analysis with a segmented linear model, I found a significant post-COVID increase in GP prescribing and hospital issuing of ADHD medications, with change points around August 2020 and October 2021 respectively. Right to Choose/private prescribing also appears to have increased around August 2020 and December 2020, but those change points did not survive correction for multiple comparisons. I suspect this is because the linear model struggled to detect a non-linear or exponential increase.

Figure 3: Significant change points in ADHD medication coding.
Note: Change points in red did not survive correction for multiple comparisons.
Lastly, regional variation in medication coding per 1000 population between ICBs increased over the years.

Figure 4: Distribution of medication coding rates per 1000 population across ICBs.
Every outlier ICB for Right to Choose or private prescribing has at least one Right to Choose or private provider. This suggests that services in outlier ICBs may be treating many out-of-area patients remotely, with the prescriber’s ICB recorded instead of the patients’ ICB. At a population level, there does not seem to be an obvious relationship between GP prescribing or hospital issuing of ADHD medications and deprivation or the proportion of under-18s.
Project takeaways: what the analysis suggests
My project shows that combining analysis of publicly available datasets can be useful for ADHD research and service evaluations. I have not found any changes to ADHD coding guidance in the NHS, so the increase in coding is likely – at least partly – driven by increased diagnosis and treatment.
It is also worth noting that an NHS England OpenSAFELY study found ADHD diagnosis rates are still lower than estimated prevalence rates, which suggests that ADHD remains underdiagnosed and undertreated in England.
I started this project with minimal experience in coding and EHRs, so developing the icd10_usage_breakdowns and opcs4_usage_breakdowns functions in the OpenCodeCounts package was a real highlight for me. I am excited to see how this project contributes to future research, and I hope it provides a useful framework for analysing multiple public datasets.
About Kaylee Poon
Kaylee Poon joined the Bennett Institute for Applied Data Science last September to complete her Biomedical Sciences (Neuroscience) integrated master’s project, working with Senior Researchers Milan Wiedemann and Helen Curtis.