Aggregated hospital discharge rates and age-standardization pipeline for gastric cancer in Chile, 2018-2022
Description
This dataset and analysis pipeline support the findings of the ecological time-series study on hospital discharge trends for gastric cancer (ICD-10: C16) in Chile during 2018–2022. The dataset includes: (1) raw input CSV files with annual population denominators from the World Bank (BANCOMUNDIAL.csv) and the age-sex distribution of the 2024 Chilean Census used as the standard population (CENSO2024.csv); (2) the full Python pipeline (Code.py); (3) processed output files: descriptive counts matrix (Table A), crude hospital discharge rates by sex, age group, and year (Table 1), age-adjusted rates with standard errors calculated using the Stang & Gianicolo (2025) method (Table 2), and a tab-delimited Joinpoint-ready input file (table2_for_joinpoint.txt), all also provided as a consolidated Excel workbook; and (4) the Joinpoint Regression Program session file (Joinpoint - session.jps) with the exact software configuration used to produce the APC estimates reported in the manuscript. No individually identifiable data are included. All primary data sources are publicly available.
Files
Steps to reproduce
Download national hospital discharge microdata for Chile for the years 2018–2022 from the publicly accessible DEIS-MINSAL website and save the files in a single folder, using the original filenames (e.g., EGRE_DATOS_ABIERTOS_2018.csv, EGRE_DATOS_ABIERTOS_2019.csv, EGRE_DATOS_ABIERTOS_2020.csv, EGR_DATOS_ABIERTO_2021.csv, EGRE_DATOS_ABIERTOS_2022.csv). Open a new session in Google Colab, upload the provided Python script, and mount Google Drive. Set the working directory to the folder that contains the five DEIS CSV files, as indicated in Section 0 of the script. Run the script from start to finish (Runtime → Run all). The script loads and harmonizes the DEIS microdata, expands age groups to quinquennia, and aggregates weighted discharge counts by sex, age group (0–14, 15–64, ≥65 years), and year. The script then computes crude hospital discharge rates per 100,000 inhabitants using hardcoded World Bank population denominators, and generates age-adjusted discharge rates and their standard errors by direct standardization to the 2024 Census age distribution using the Stang & Gianicolo (2025) variance approximation. The outputs are exported automatically as CSV and Excel files: (a) a descriptive counts matrix (Table A), (b) crude rates by sex, age group, and year (Table 1), (c) age-adjusted rates and Stang & Gianicolo standard errors by sex and year (Table 2), and (d) a tab-delimited file {prefix}_table2_for_joinpoint.txt formatted for import into the Joinpoint Regression Program v6.0.1 (NCI). To reproduce the joinpoint regression results reported in the manuscript, import {prefix}_table2_for_joinpoint.txt into Joinpoint v6.0.1 using "Rates with Standard Errors" as the input type, specify the Rate and Standard_Error columns, use the external variance option, set the maximum number of joinpoints to 0 (n=5 annual observations), and apply the permutation test of Kim et al. for model selection.