People with diabetes are almost 25% more likely to be hospitalised,1 occupying around 20% of hospital beds2 – nearly three times their population prevalence.3 Although most are admitted for reasons unrelated to diabetes, they often experience more complications and poorer outcomes. While most hospitals now have multidisciplinary teams of specialist diabetes inpatient practitioners (MDiTs), many still rely on reactive ward referrals, leading to treatment delays and increased harm risk.
To address this, our research – part of the NIHR Imperial Biomedical Research Centre’s Digital Health theme – is developing the concept of virtual ward rounds, the remote screening and triage of people in hospital with diabetes to enable more proactive, preventative specialist care. This approach seeks to transform the MDiT model through a data-driven clinical decision support system (CDSS).
UNLOCKING POTENTIAL: FROM REACTIVE TO PROACTIVE CARE
Figure 1. Illustration of rules-based aggregation.
Inpatient diabetes care is typically managed by non-diabetes specialist admitting teams who, rightly, prioritise the presenting complaint, often deferring referral and treatment of diabetes-related problems – sometimes only after harm has occurred.4 Although hospitals are required to implement electronic systems for proactive diabetes case-finding, screening and triage, progress remains inconsistent.5 Key diabetes-related data, such as blood glucose levels, medications and diagnosis codes, are often fragmented across multiple electronic health record (EHR) workflows.6 Diagnoses are typically recorded retrospectively from discharge summaries, making real-time retrieval difficult and time-consuming.
Recent advances in AI and secure data environments (SDEs) offer the opportunity to reshape this reactive model. The iCARE SDE hosts routinely collected EHR data from Imperial College Healthcare NHS Trust alongside primary care EHR data, via the Whole Systems Integrated Care database, covering 2.8 million people across North West London. Automated ingestion delivers near real-time transformation of raw EHR data. A dual approach – using identifiable data for direct clinical care interventions and de-identified data for research – enables continuous validation and oversight, critical for safely embedding AI models into frontline practice. In parallel, federated analysis methods are also being developed to allow researchers to run algorithms across multiple datasets without transferring data between institutions, preserving both security and integrity.7
HARNESSING DATA AND AI, BUILT ON TRUST AND CLINICAL INSIGHT
Using the iCARE SDE, we are developing a hybrid CDSS that combines rule-based logic with machine learning to balance the power of AI with clinician and service user trust. While AI is increasingly trialled in CDSSs, concerns about transparency and explainability remain major barriers to adoption.8 Rule-based algorithms are therefore prioritised for high-confidence case-finding, following step-by-step IF-THEN-ELSE logic grounded in clinical guidelines, to ensure clarity and efficiency. Where data are incomplete or ambiguous, machine learning is selectively applied to recognise subtle patterns, filling gaps that rule-based methods cannot, and thereby supporting future harm prediction.
FROM DATA TO DECISIONS: A TRANSPARENT FRAMEWORK
Our CDSS development follows a three-stage framework9 designed to maintain transparency and explainability throughout:
Figure 2. Hypoglycaemic episodes (< 4 mmol/L) in people with diabetes by ward and time interval (top 20 wards) Jul 2022–Dec 2023. Credit: The authors ©2025 Imperial College Healthcare NHS Trust (ICHT). All rights reserved. No part of this figure may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of ICHT. For permission requests, email [email protected]
1. Basic reasoning
We begin with a rule-based algorithm to aggregate retrospective diabetes data hierarchically and cumulatively over time, producing an auditable dataset for further analysis (Figure 1). At the spell level, high-confidence cases meeting full diagnostic criteria are automatically labelled, while ambiguous ones such as single diagnosis codes or isolated abnormal glucose readings are given ‘silver-standard’ labels, indicating possible diabetes. We also engineer baseline risk factors (e.g. age, diabetes type, comorbidities) to support harm risk segmentation. At the clinical event level, we extract dynamic, time-varying predictors (e.g. insulin use, renal function) for future harm prediction, along with contextual data (e.g. ward location, specialty) to support quality improvement.
2. Predictive modelling
We apply unsupervised clustering to baseline risk factors to segment harm episodes into clinically meaningful phenotypes. These serve as targeted machine-learning model inputs, improving signal-to-noise ratio. To refine silver-standard labelling, we use uncertainty sampling to iteratively select low-confidence cases for chart review until model performance stabilises. Decision tree-based machine-learning models are used to capture complex non-linear relationships through a hierarchical structure mirroring human clinical reasoning. Combined with local explanation techniques such as SHAP (Shapley additive explanations), which quantify case-level feature importance, these models provide a clear, interpretable foundation for explainable AI in direct clinical care.10 For example, rather than simply flagging people at high risk of severe hypoglycaemia, clinicians can see the contributing factors (e.g. age >75, stage 5 chronic kidney disease, recent sulfonylureas), enabling more transparent and informed decision making.
3. Explaining and reasoning
We design simple, intuitive visualisations, such as ward-level control charts, heatmaps and bar plots showing decision feature importance, which can be heuristically validated to ensure alignment with clinical practice, and enhance clinician understanding (Figure 2).
FROM VALIDATION TO REAL-WORLD TESTING
Once validated, the CDSS will be tested and evaluated at Imperial College Healthcare NHS Trust and across other trusts. Working with clinicians and community partners, we will assess its impact on harm incidence and hospital length of stay, helping establish a scalable, proactive, data-driven model for specialist inpatient diabetes care.
JAMES BEVERIDGE
PhD Candidate, Department of Surgery and Cancer, Imperial College London; Senior Manager, NHS England
PARIZAD AVARI
Clinical Lecturer, Department of Metabolism, Digestion and Reproduction, Imperial College London; Consultant Diabetologist, Imperial College Healthcare NHS Trust, London
ERIK MAYER
Clinical Associate Professor, Department of Surgery and Cancer, Imperial College London; Consultant Surgeon, Imperial College Healthcare NHS Trust and the Royal Marsden NHS Foundation Trust, London; Director iCARE Secure Data Environment, NIHR Imperial Biomedical Research Centre
This research is funded by the National Institute for Health Research (NIHR) Imperial Biomedical Research Centre (NIHR203323).
REFERENCES
1. Comino EJ et al. 2015 BMC Health Services Research https://doi.org/10.1186/s12913-014-0666-2.
2. NHS Digital 2017 National Diabetes Inpatient Audit England and Wales https://digital.nhs.uk/data-and-information/publications/statistical/national-diabetes-inpatient-audit/national-diabetes-inpatient-audit-nadia-2017.
3. Dhatariya KK et al. 2023 Diabetic Medicine https://doi.org/10.1111/dme.14980.
4. Flanagan D et al. 2008 Diabetic Medicine https://doi.org/10.1111/j.1464-5491.2007.02326.x.
5. NHS England 2024 National Diabetes Inpatient Safety Audit https://digital.nhs.uk/data-and-information/publications/statistical/national-diabetes-inpatient-safety-audit-ndisa/national-diabetes-inpatient-safety-audit-2022-23/data-quality-statement.
6. Pichardo-Lowden AR et al. 2018 Journal of Diabetes Science & Technology https://doi.org/10.1177/1932296818817005.
7. iCARE and WSIC 2025 Health Service Journal https://www.hsj.co.uk/technology-and-innovation/meeting-new-challenges-in-data-science-for-health-research-and-innovation/7039414.article.
8. Sutton RT et al. 2020 npj Digital Medicine https://doi.org/10.1038/s41746-020-0221-y.
9. Kovalchuk SV et al. 2022 Journal of Biomedical Informatics https://doi.org/10.1016/j.jbi.2022.104013.
10. Pang K 2025 Healthcare Analytics https://doi.org/10.1016/j.health.2025.100390.