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.