Related Experiment Video
Updated: Jun 25, 2025

Implementation of a Real-Time Psychosis Risk Detection and Alerting System Based on Electronic Health Records using CogStack
Published on: May 15, 2020
Predicting type 1 diabetes in children using electronic health records in primary care in the UK: development and
Rhian Daniel1, Hywel Jones1, John W Gregory1
1Division of Population Medicine, School of Medicine, Cardiff University, Cardiff, UK.
Insights
A new machine-learning algorithm can help detect type 1 diabetes in children earlier in primary care. This tool aims to reduce life-threatening diabetic ketoacidosis by anticipating diagnosis an average of 9 days sooner.
Area of Science:
- Utilizes machine learning and artificial intelligence in pediatric healthcare.
- Focuses on predictive analytics for early disease detection in primary care settings.
Background:
- Early recognition of type 1 diabetes in children is challenging, often leading to delayed diagnosis.
- A significant proportion of children present with diabetic ketoacidosis, a preventable complication.
- Current diagnostic pathways in primary care struggle with subtle or atypical symptom presentations.
Purpose of the Study:
- To investigate the efficacy of a machine-learning algorithm for earlier detection of type 1 diabetes in children within primary care.
- To assess the potential of the algorithm to reduce the incidence of diabetic ketoacidosis at diagnosis.
Main Methods:
- Developed a predictive algorithm using ensemble learning (SuperLearner) on Welsh primary care electronic health records (EHRs).
- Linked EHR data with the Brecon Dataset, a register of newly diagnosed type 1 diabetes cases in children.
- Validated the algorithm using English EHRs from the Clinical Practice Research Datalink and Hospital Episode Statistics.
Main Results:
- The algorithm, if set to alert on 10% of contacts, could identify 71.6% of children with type 1 diabetes up to 90 days before diagnosis.
- Anticipated diagnosis by an average of 9.34 days, potentially allowing for earlier intervention.
- The study involved large datasets, with millions of child contacts analyzed in both development and validation phases.
Conclusions:
- A machine-learning predictive algorithm shows promise for earlier identification of type 1 diabetes in primary care.
- Implementation could significantly decrease the rate of new-onset type 1 diabetes presenting with diabetic ketoacidosis.
- Further research is needed to explore the acceptability of alert thresholds in primary care settings.
Background:
Children presenting to primary care with suspected type 1 diabetes should be referred immediately to secondary care to avoid life-threatening diabetic ketoacidosis. However, early recognition of children with type 1 diabetes is challenging. Children might not present with classic symptoms, or symptoms might be attributed to more common conditions. A quarter of children present with diabetic ketoacidosis, a proportion unchanged over 25 years. Our aim was to investigate whether a machine-learning algorithm could lead to earlier detection of type 1 diabetes in primary care.
Methods:
We developed the predictive algorithm using Welsh primary care electronic health records (EHRs) linked to the Brecon Dataset, a register of children newly diagnosed with type 1 diabetes. Children were included from their first primary care record within the study period of Jan 1, 2000, to Dec 31, 2016, until either type 1 diabetes diagnosis, they turned 15 years of age, or study end. We developed an ensemble learner (SuperLearner) using 26 potential predictors. Validation of the algorithm was done in English EHRs from the Clinical Practice Research Datalink (primary care) and Hospital Episode Statistics, focusing on the ability of the algorithm to identify children who went on to develop type 1 diabetes and the time by which diagnosis could be anticipated.
Findings:
The development dataset comprised 34 754 400 primary care contacts, relating to 952 402 children, and the validation dataset comprised 43 089 103 primary care contacts, relating to 1 493 328 children. Of these, 1829 (0·19%) children younger than 15 years in the development dataset, and 1516 (0·10%) in the validation dataset had a reliable date of type 1 diabetes diagnosis. If set to give an alert in 10% of contacts, an estimated 71·6% (95% CI 68·8-74·4) of the children with type 1 diabetes would receive an alert by the algorithm in the 90 days before diagnosis, with diagnosis anticipated, on average, by an estimated 9·34 days (95% CI 7·77-10·9).
Interpretation:
If implemented into primary care settings, this predictive algorithm could substantially reduce the proportion of patients with new-onset type 1 diabetes presenting in diabetic ketoacidosis. Acceptability of alert thresholds should be explored in primary care.
Funding:
Diabetes UK.
Related Concept Videos
Diabetes Mellitus: Type 2 and Gestational
Diabetes Mellitus: Overview and Type I Subtype
Type 1 diabetes is an autoimmune disease in which the immune system mistakenly attacks and destroys the insulin-producing beta cells in the pancreas. As a result, the body is unable to produce sufficient insulin, and individuals with...
Diabetes: Symptoms, Diagnosis, and Complications
Pathophysiology of Diabetes
Type 1 diabetes is characterized by autoimmune-mediated destruction of pancreatic β cells, with environmental factors potentially triggering this process in genetically susceptible individuals. Despite many not having a family history, certain genes increase susceptibility,...

