Scalable Clinical Data Infrastructure and Comparative ML Evaluation for Hospitalisation Risk Prediction in Elderly Patients with Multiple Long-Term Conditions using CPRD
Authors: Asra Aslam, Volodymyr Chapman, Maurice M. O'Connell, Aseel S. Abuzour, Michael Abaho, Danushka Bollegala, Gary Leeming, Eduard Shantsila, +4 more
Organizations: School of Information, University of Sheffield, Sheffield, United Kingdom · School of Medicine, Faculty of Medicine and Health, University of Leeds, Leeds, United Kingdom · Division of Informatics, University of Manchester, Manchester, United Kingdom · Academic Unit for Ageing & Stroke Research, University of Leeds, Leeds, United Kingdom · Institute of Population Health, University of Liverpool, Liverpool, United Kingdom
Deep learning architectures are increasingly proposed for patient trajectory modeling in electronic health records (EHRs), yet their advantage over simpler, more interpretable models is rarely subjected to rigorous empirical scrutiny in real-world clinical settings. We present a comprehensive patient timeline pipeline applied to elderly patients in CPRD Aurum, incorporating 260 clinical conditions classified via a three-tier automated framework including specialised detection logic for 17 complex conditions. Using this infrastructure, we benchmark Temporal Graph Convolutional Neural Networks (TG-CNN) against Logistic Regression with LASSO regularisation and Random Forests for predicting 12-month all-cause emergency hospitalisation risk, motivated by (but not filtered to) the elevated risk of adverse drug reactions. Under cross-validation, TG-CNN achieves a marginally higher mean AUC-ROC than LASSO (0.712 vs. 0.705), whereas on the held-out test set LASSO achieves the highest discrimination of three models (AUC-ROC 0.733, versus 0.710 for Random Forest and 0.702 for TG-CNN). We show, that discrimination alone is an incomplete criterion for clinical deployment: after Platt calibration, LASSO is the only model with an acceptable calibration slope (0.817), while Random Forest (0.759) and, TG-CNN (0.391) remain substantially miscalibrated. We argue that LASSO, not the highest-discriminating model, is the model best suited to direct clinical deployment. We present lessons for the machine learning and healthcare community regarding data infrastructure, model selection, and value of calibration and interpretability in high-stakes decision support.
Figures & tables
Figure 1: CPRD Data Preprocessing Workflow Architecture.
Condition
Primary Data Source
Threshold / Criterion
Guideline
Hypertension
ABPM / in-office BP
SBP ≥ 140 or DBP ≥ 90 mmHg ( ≥ 3 readings)
NICE NG136
Hypotension
ABPM / cuff BP
SBP ≤ 90 or DBP ≤ 60 mmHg ( ≥ 3 readings)
Clinical consensus
Anaemia (Other)
Haemoglobin (Hb)
F: < 11.5 g/dL; M: < 13.0 g/dL
WHO
Osteoporosis
BMD T-score (DEXA)
T-score <− 2.5
WHO
Cholesterol
HDL/LDL/Total/TG
Elevated in any component; gender-specific HDL
NICE CG181
CKD
eGFR
eGFR < 60 mL/min/1.73m 2 (staged 3a–5)
KDIGO 2012
Table 1: Detection logic for the 17 complex conditions (abbreviations here * ).
Characteristic
Value
Total patients (training set)
570,125
Total patients (test set)
63,347
Age criterion
≥ 65 years at 01 April 2019
Observation window
01 April 2019 to 31 March 2020
Outcome: all-cause hospitalisation (training)
∼ 20% (class imbalance present)
Clinical conditions modelled
Simple, Intermediate, Complex tiers)
Table 2: Cohort and pipeline summary. Exact class distribution is reflected in the stratified sampling strategy described in Section 3.4 .
5-fold Cross-Validation
Model
Data
Mean
Standard
AUC-ROC
Deviation
Logistic Regression
Demographics
0.640
0.0013
(LASSO)
Events
0.688
0.0056
Demographics + events
0.705
0.0041
Random Forest
Demographics
0.643
0.0024
Table 3: Model performance summary: mean validation AUC-ROC and standard deviation under 5-fold cross-validation. All models predict all-cause hospitalisation within 12 months in an elderly primary care cohort ( Ntrain=570,125 ).
Model
C-slope
Brier score
ECE
AUC-ROC
AUC-PR
( ↑ 1.0 best)
( ↓ best)
( ↓ best)
( ↑ best)
( ↑ best)
LASSO
0.817
0.132
0.013
0.733
0.380
Random Forest
0.759
0.135
0.009
0.710
0.333
TG-CNN
0.391
0.137
0.008
0.702
0.334
Table 4: Model performance comparison across metrics on test set ( Ntest=63,347 ).
Figure 2: Diagnostics for (a) LASSO (b) Random Forest, and (c) TGCNN models with Calibration plots (on left) showing predicted versus observed hospitalisation rates; the curve falls below the ideal diagonal indicating systematic overestimation of risk. And GP-stratified C-statistic plots (right) showing performance across primary care practices; red points indicate practices outside the confidence envelope.
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 3: TG-CNN Architecture with Dual Layer based Configuration flexibility
Figure 4: TGCNN Training for Demographics, Events, and Events with Demographics. Dashed vertical lines indicate the early stopping epoch (Epoch 1) where validation loss reached its minimum and model weights were saved for testing
Model
Best AUC-ROC
Calibration
Interpretable
Deployable without post-hoc correction?
LASSO
0.733
Well-calibrated
Yes (548 coefficients)
Yes
Random Forest
0.710
Miscalibrated
Partial
No
TG-CNN
0.702
Miscalibrated
No (black box)
No
Appendix
Table 5: Multi-criteria Model Summary.
Feature Category
Count
Description / Encoding
Clinical Conditions
190
Unique condition codes observed in the elderly cohort (DynAIRx framework)
Medication Prescriptions
802
Unique British National Formulary (BNF) prescription codes
Demographics
19
18 binary encodings plus continuous scaled age
Appendix
Table 6: Consolidated Feature Inventory Across Model Input Categories
Figure 5: Calibration curves for Logistic Regression (LASSO), Random Forest, and TG-CNN models on the test set, comparing raw predictions against post-hoc Platt scaling and Isotonic regression.
Figure 6: Change in TG-CNN test-set performance and calibration metrics when event order is shuffled, relative to the unshuffled baseline (dashed red line at zero), across 50 independent shuffles. (a) Absolute value of the change in each metric. (b) Raw change in each metric, showing whether shuffling increased or decreased each value.
Figure 7: Permutation feature importance for LASSO (top predictors: primary care prescription codes, BNF, and functional status markers, event_Housebound) and Random Forest (which additionally ranks individual chronic conditions, including dementia and atrial fibrillation, among its top predictors), ranked by mean MSE increase upon feature permutation on the held-out test set.
Figure 8: SHAP values for LASSO and Random Forest on the held-out test set, showing age as the dominant predictor for both models, followed by medication-related and functional status features consistent with the permutation importance results.
Category
Parameter
Values tested
Best model
Learning process
Max epochs
10
1 *
Initial learning rate
{10−2,10−3}
10−3
Learning rate decay
Exponential ( γ=0.9
Same
decay every 106 steps)
Optimizer
Adam
Adam
Batch size
64
64
Appendix
Table 7: Hyperparameter search space with selected hyperparameters for the final model.
Numerical time-series models effectively process irregular electronic health record (EHR) trajectories, but do not expose which temporal patterns support each prediction as readable evidence. Existing text-based interfaces either serialize observations, preserving source traceability but offering limited clinical interpretation, or generate patient-level summaries that improve readability but can obscure links to source measurements. We introduce STEP-CTS (Source-Traceable Evidence for Prediction from Clinical Time-Series), which learns to select source-traceable text evidence for a language-model predictor. Multi-scale window statistics of each trajectory are verbalized as sets of deterministic threshold predicates, each set linked to its source window (e.g., "[5-7 h]: last temperature at least 38C"). An offline LLM, run once per unique predicate set without access to patient records, the prediction task, or outcome labels, attaches clinical concepts such as "fever" to their supporting predicates and abstains when none applies. Each predicate set, together with its concepts, forms an evidence unit. A learned Evidence Selector selects a fixed-size subset of the evidence units, which a pretrained clinical language-model encoder reads to make the prediction, with no patient-level text generation. Across three ICU benchmarks, STEP-CTS outperforms evaluated text-based baselines, improving AUPRC over the strongest by 5.1, 3.7, and 11.7 percentage points on P2012, MIMIC-III, and P2019, respectively, and is competitive with dedicated numerical time-series models. Ablations show that clinical concepts and learned evidence selection each contribute to predictive performance. In a blinded clinician study, the selected evidence is rated as traceable as deterministic serialization, near the ceiling of the scale, and above generated summaries on clinical interpretation.
Kwanhyung Lee, Juhwan Choi, Jongheon Kim +5
Kim Jaechul Graduate School of AI, KAIST · AITRICS
To overcome the limitations of manual administrative coding in geriatric Cardiovascular Risk Management, this study introduces an automated classification framework leveraging unstructured Electronic Health Records (EHRs). Using a dataset of 3,482 patients, we benchmarked three distinct modeling paradigms on longitudinal Dutch clinical narratives: classical machine learning baselines, specialized deep learning architectures optimized for large-context sequences, and general-purpose generative Large Language Models (LLMs) in a zero-shot setting. Additionally, we evaluated a late fusion strategy to integrate unstructured text with structured medication embeddings and anthropometric data. Our analysis reveals that the custom Transformer architecture outperforms both traditional methods and generative \acs{llm}s, achieving the highest F1-scores and Matthews Correlation Coefficients. These findings underscore the critical role of specialized hierarchical attention mechanisms in capturing long-range dependencies within medical texts, presenting a robust, automated alternative to manual workflows for clinical risk stratification.
Jacopo Vitale, David Della Morte, Luca Bacco +5
Research Unit of Intelligent Health Technologies, Universit`a Campus Bio-Medico di Roma, Rome, Italy. · Central Diagnostic Laboratory, University Medical Center Utrecht, Utrecht, The Netherlands.
Accurate and interpretable mortality risk prediction in intensive care units (ICUs) remains a critical challenge due to the irregular temporal structure of electronic health records (EHRs), the complexity of longitudinal disease trajectories, and the lack of clinically grounded explanations in many data-driven models. To address these challenges, we propose TA-RNN-Medical-Hybrid, a time-aware and knowledge-enriched deep learning framework that jointly models longitudinal clinical sequences and irregular temporal dynamics through explicit continuous-time encoding, along with standardized medical concept representations. The proposed framework extends time-aware recurrent modeling by integrating explicit continuous-time embeddings that operate independently of visit indexing, SNOMED-based disease representations, and a hierarchical dual-level attention mechanism that captures both visit-level temporal importance and feature/concept-level clinical relevance. This design enables accurate mortality risk estimation while providing transparent and clinically meaningful explanations aligned with established medical knowledge. We evaluate the proposed approach on the MIMIC-III critical care dataset and compare it against strong time-aware and sequential baselines. Experimental results demonstrate that TA-RNN-Medical-Hybrid consistently improves predictive performance in terms of AUC, accuracy, and recall-oriented F2-score. Moreover, qualitative analysis shows that the model effectively decomposes mortality risk across time and clinical concepts, yielding interpretable insights into disease severity, chronicity, and temporal progression. Overall, the proposed framework bridges the gap between predictive accuracy and clinical interpretability, offering a scalable and transparent solution for high-stakes ICU decision support systems.
Department of Computer Engineering, SRC.,Islamic Azad university, Tehran, Iran · School of Computer Engineering, Iran university of Science and technology, Tehran, Iran