1. Study design and patients This study is a multicenter retrospectively observational cohort study, which collected and followed up the patients with gastric cancer and colorectal cancer in 11 Chinese hospitals from August 1, 2015, to June 31, 2018. The eight sites of these were recruited as a training cohort, and the other three sites were recruited as an external validation cohort (Supplement Table 1). The inclusion criteria for both cohorts were complied with: 1) 18-80 years old; 2) postoperative pathological diagnosis of gastric or colorectal adenocarcinoma; 3) underwent radical surgery; 4) TNM stage ranged from stage I to stage III. The exclusion criteria included: 1) NRS 2002 or PG-SGA data was missing; 2) pathological diagnosis of gastric stump cancer, cancer in situ, or pin-point cancer; 3) in-hospital death or death within 30 days after surgery; 4) preoperative neoadjuvant therapy; 5) preoperative endoscopic surgery; 6) the previous history of other malignant tumors; 7) pregnancy. This study was approved by the Ethics Committee of each hospital.
2. Data collection The following clinical data were collected in this study: demographic characteristics (age, sex, height, weight, and BMI), age-adjusted Charlson Comorbidity Index (aCCI), NRS 2002 score, PG-SGA rating, pathological characteristics (tumor stage, type, differentiation, tumor size, and tumor vol-ume), surgical characteristics (operation type and intraoperative blood loss), hematological indicators \[carcinoembryonic antigen (CEA), cancer antigen19-9 (CA19-9), albumin, pre-albumin, blood glucose, triglycerides (TG), alanine aminotransferase (ALT), aspartate aminotransferase (AST), total bilirubin, blood urea nitrogen (BUN), serum creatinine, hemoglobin, and white blood cell\], and other clinical characteristics (postoperative complication and postoperative infection). These candidate variables were derived from previous studies and clinical experience. We obtained tumor staging from electronic medical records and pathological reports using the American Joint Committee on Cancer (AJCC) 8th edition. Tumor volume was derived from tumor length, width, and height using the following formulas: V = 1/2 × a × b2 or V = π/6 × a × b × c.
3. Nutritional status assessments All the centers routinely perform nutritional status assessments on admission by the NRS 2002 and PG-SGA. We collected the NRS 2002 score and PG-SGA rating from the electronic medical record system.

   3.1 NRS 2002 NRS 2002 was used to estimate nutritional risk, accounting for inadequate nutritional status (low, moderate, or severe) and illness severity (low, moderate, or severe), with a 70-year age adjustment. The NRS 2002 score ranges from 0 to 7. For the NRS 2002, we employed three categories: no nutritional risk (\<3), nutritional risk (3-4), and severe nutritional risk (≥5).

   3.2 PG-SGA The PG-SGA, a nutritional status assessment tool based on the SGA, was developed exclusively for cancer patients. This includes self-evaluation by patients as well as evaluation by medical professionals. The seven components that make up the core content are weight, food intake, symptoms, functional ability, illness and its relationship to nutritional needs, metabolic demand (stress), and physical examination. The first four components were assessed by patients, while the final three were assessed by medical professionals. Physical examination was used to determine muscular exhaustion, subcutaneous fat thickness, and edema. Decreased mass and tone in temporal regions, deltoids, and quads indicated muscular exhaustion. The triceps and midaxillary lines at the level of the lower ribs were studied for subcutaneous fat depletion. Edema was checked on the ankles. Patients were categorized as well-nourished (A), moderately malnourished (B), or severely malnourished (C) based on the foregoing assessments.
4. Study Outcome The primary outcome of this study was OS, defined as the time from the date of surgery to the end of follow-up or death. Follow-up information was mainly collected through the follow-up database of gastric and colorectal cancer of each center combined with telephone, outpatient, or inpatient follow-ups.
5. Statistical methods Measurement data will be expressed as means and standard deviations (SD), while enumeration data will be expressed as frequencies and respective percentages. Hematological indicators will be converted to categorical variables while analyzed. Variables will be initially screened using the least absolute shrinkage and selection operator (LASSO) regression. The variables with minimum λ will be further screened using univariate and multivariate Cox regression analysis to identify independent predictors. Then we will build a prediction model by multivariate Cox regression model and plot the nomogram. For user convenience, we will also create a dynamic nomogram webpage. Discrimination of the model will be assessed using the receiver operating curve (ROC), the area under the curve (AUC), and the concordance index (C-index). Calibration plots will be used to assess the calibration of the model. Decision curve analysis (DCA) will be used to evaluate the clinical utility of the model. The same assessments will be performed with an external validation cohort. Internal validation of the model will be performed using Five folds cross-validation by 200 times. The cut-off values of the nomogram score which categorize patients into three categories (low-risk, middle-risk, and high-risk) will be calculated by X-tile 3.6.1 version (https://medicine.yale.edu/lab/rimm/research/software/). Kaplan-Meier analysis will be used to do survival analyses. R 4.2.0 version (http://www.r-project.org) will be used for statistical analyses of this study. A two-tailed p \<0.05 will be considered statistically significant.