Fig. 1: Flowchart of the patient selection.

We initially extracted the data of 13,653 patients from EMR. After applying exclusion criteria, 1665 patients were not included because their hospital stay was less than 24 h or without Complete Blood Count data; 523 patients with IBD or hereditary CRC syndromes were excluded, and another 591 patients with a history of other types of primary malignant tumor or with garbled data were also not included. Finally, 10,874 individuals were included in the study, of which 8820 were in the derivation cohort (training dataset and internal validation dataset), and 2054 were in the temporal validation cohort. EMR Electronic Medical Record, CRC Colorectal cancer, CBC Complete Blood Count, YOCRC Young-onset colorectal cancer, YNCRC Young individuals without CRC diagnosis.