Hostname: page-component-76d6cb85b7-xh428 Total loading time: 0 Render date: 2026-07-19T15:10:21.871Z Has data issue: false hasContentIssue false

Early detection of adults ADHD using electronic health records: A machine learning study

Published online by Cambridge University Press:  16 February 2026

Omar Hamed*
Affiliation:
Center for Applied Intelligent Systems Research in Health (CAISR Health), Halmstad University, Sweden
Farzaneh Etminani
Affiliation:
Center for Applied Intelligent Systems Research in Health (CAISR Health), Halmstad University, Sweden Research and Innovation Centrum, Region Halland, Sweden
Peter Jacobsson
Affiliation:
Region Halland, Varberg, Sweden Department of Psychiatry and Neurochemistry, Institute of Neuroscience and Physiology, The Sahlgrenska Academy, University of Gothenburg, Sektionskansliet: Blå Stråket 15, vån 3, SU/Sahlgrenska University Hospital, Gothenburg, Sweden
Thomas Davidsson
Affiliation:
SHAARPEC Inc, USA
*
Corresponding author: Omar Hamed; Email: omar.hamed@hh.se

Abstract

Background

Attention deficit hyperactivity disorder (ADHD) affects 5–7.2% of children and 2.5% of adults. Despite its prevalence, ADHD remains underdiagnosed and undertreated, leading to significant challenges for affected individuals. Early diagnosis and intervention can prevent adverse outcomes and improve quality of life.

Methods

We developed a predictive model to identify adults with ADHD using electronic health records. The dataset comprised 2,973 adult patients (aged 18 years and above) diagnosed with ADHD and a control group of 4,447 adults referred to psychologists with no ADHD diagnosis. A transformer-based architecture was implemented, utilizing only clinical codes and gender as input features. Fivefold cross-validation was adopted, and model performance was evaluated on held-out test data consisting of 800 patients, 400 of whom had an ADHD diagnosis.

Results

Our study demonstrated the ability to predict adult ADHD using clinical data, with a 6-month model achieving an area under the receiver operating characteristic curve (AUC) of 0.79 (95% confidence interval: 0.76–0.81), F1-score of 0.79, sensitivity of 0.80, and specificity of 0.77. Shapley Additive Explanations identified key contributing codes, including F158 and Y903, consistent with known associations between ADHD and substance use.

Conclusions

Our findings show that machine learning can effectively use clinical codes and demographic data from routine EHRs to support early, cost-efficient diagnosis of adult ADHD, paving the way for earlier intervention and improved outcomes.

Information

Type
Research Article
Creative Commons
Creative Common License - CCCreative Common License - BYCreative Common License - NCCreative Common License - SA
This is an Open Access article, distributed under the terms of the Creative Commons Attribution-NonCommercial-ShareAlike licence (http://creativecommons.org/licenses/by-nc-sa/4.0), which permits non-commercial re-use, distribution, and reproduction in any medium, provided the same Creative Commons licence is used to distribute the re-used or adapted article and the original article is properly cited. The written permission of Cambridge University Press or the rights holder(s) must be obtained prior to any commercial use.
Copyright
© The Author(s), 2026. Published by Cambridge University Press on behalf of European Psychiatric Association
Figure 0

Table 1. Considered ATC codes to identify ADHD patients

Figure 1

Figure 1. Using patient historical health records for early diagnosis of adult ADHD.

Figure 2

Figure 2. Generating a text representation of the patient’s healthcare records.

Figure 3

Table 2. Demographics and 2-month resource utilization variables (data after applying inclusion criteria)

Figure 4

Table 3. Model performance results on the holdout dataset

Figure 5

Figure 3. SHAP values results on the holdout dataset.

Figure 6

Figure 4. Model fairness across genders.

Submit a response

Comments

No Comments have been published for this article.