Currently submitted to: JMIR Medical Informatics
Date Submitted: Aug 13, 2026
Open Peer Review Period: Aug 21, 2026 - Oct 16, 2026
(currently open for review)
Warning: This is an author submission that is not peer-reviewed or edited. Preprints - unless they show as "accepted" - should not be relied on to guide clinical practice or health-related behavior and should not be reported in news media as established information.
Risk Prediction for Incident Chronic Disease and Comorbidity Using Outpatient Electronic Medical Records: Model Development and Temporal External Validation
ABSTRACT
Background:
Research on the prediction of chronic comorbidity has mostly concentrated on disease transitions that occur after diagnosis, that is secondary prevention, whereas the outpatient period that precedes the first confirmed diagnosis is the critical window for primary prevention. This window presents several distinct difficulties, including sparse data, a systematic gap between recorded trajectories and true disease onset, and a distortion of probability calibration under class imbalance.
Objective:
This study examines whether a model that combines reference-range deviation (RD) encoding with a landmark design can achieve primary-prevention risk prediction for hypertension (HTN), diabetes mellitus (DM), and their comorbidity in an outpatient population, and whether the resulting performance transfers across time.
Methods:
Using an outpatient cohort collected between 2023 and 2024 (N = 401,569), we set 2024-01-01 as the landmark, adopt a one-year follow-up window, and construct three primary-prevention tasks defined as incident HTN, incident DM, and the incident co-occurrence of both diseases. Modeling is performed with the reference-range deviation multi-modal stacking (RD-MMS) framework, and external temporal validation is conducted on an independent cohort that has no patient overlap and is anchored at a 2025 landmark. Performance and clinical utility are assessed with the area under the receiver operating characteristic curve (AUROC), the expected calibration error (ECE), SHapley Additive exPlanations (SHAP), and decision curve analysis (DCA).
Results:
In internal five-fold cross-validation, the three tasks reach an AUROC of 0.818 for HTN, 0.774 for DM, and 0.839 for both diseases, each of which is significantly higher than the strongest single-modality baseline (p < 0.001). In external temporal validation, discrimination remains highly stable, with ΔAUROC within ±0.012, whereas probability calibration drifts under the downsampled prior; this drift is corrected by a lightweight recalibration step. SHAP shows that age is the dominant driver, with a contribution of 58.9% to 70.7%, yet laboratory, text, and visit-behavior features provide incremental discrimination beyond age, so that the model still significantly outperforms the minimal demographic baseline within a single age band (p < 0.05). The contribution of imaging text is close to zero, and a reduced model of 50 dimensions preserves performance with almost no loss. DCA confirms a positive clinical net benefit across the threshold range from 0.01 to 0.50.
Conclusions:
The combination of a landmark design and RD encoding enables primary-prevention risk stratification for chronic comorbidity. By integrating age, laboratory trajectories, and visit patterns, the method achieves individualized risk refinement within a single age band, and it shows a general deployment pattern in which discrimination transfers across time while probability requires only a lightweight local recalibration.
Citation
Request queued. Please wait while the file is being generated. It may take some time.
Copyright
© The authors. All rights reserved. This is a privileged document currently under peer-review/community review (or an accepted/rejected manuscript). Authors have provided JMIR Publications with an exclusive license to publish this preprint on it's website for review and ahead-of-print citation purposes only. While the final peer-reviewed paper may be licensed under a cc-by license on publication, at this stage authors and publisher expressively prohibit redistribution of this draft paper other than for review purposes.