-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.CPTAC.clinical_CPTAC3_discovery_and_confirmatory_pdc_current`
(
  case_id STRING OPTIONS(description="Unique identifier associated with a specific patient (e.g. 24cb0fcb-63d6-11e8-bcf1-0a2705229b82)"),
  case_submitter_id STRING OPTIONS(description="Unique identifier deriving from the data submitter that is associated with a specific patient (e.g. 05BR016)"),
  project_submitter_id STRING OPTIONS(description="Unique identifier deriving from the data submitter that is associated with a specific project (e.g. CPTAC3-Discovery)"),
  primary_site STRING OPTIONS(description="The text term used to describe the general location of the malignant disease, as categorized by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  disease_type STRING OPTIONS(description="The text term used to describe the type of malignant disease, as categorized by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  demographic_id STRING OPTIONS(description="Unique identifier attributed to data for the characterization of the patient by means of segmenting the population--for instance, characterization by age, sex, or race (e.g. 848b480c-0f56-11e9-a064-0a9c39d33490)"),
  demographic_submitter_id STRING OPTIONS(description="Unique identifier deriving from data submitter that is attributed to data for the characterization of the patient by means of segmenting the population (e.g., characterization by age, sex, or race) (e.g. P001-DM)"),
  race STRING OPTIONS(description="An arbitrary classification of a taxonomic group that is a division of a species; the provided values are based on the categories defined by the U.S. Office of Management and Business and used by the U.S. Census Bureau"),
  ethnicity STRING OPTIONS(description="An individual's self-described social and cultural grouping, specifically whether an individual describes themselves as Hispanic or Latino, based on the categories defined by the U.S. Office of Management and Business and used by the U.S. Census Bureau"),
  gender STRING OPTIONS(description="Text designations that identify gender; identification is self-reported and may come from a form, questionnaire, interview, etc."),
  age_at_index INT64 OPTIONS(description="The patient's age (in years) on the reference or anchor date date used during date obfuscation."),
  days_to_birth INT64 OPTIONS(description="Number of days between the date used for index and the date from a person's date of birth represented as a calculated negative number of days"),
  days_to_death INT64 OPTIONS(description="Number of days between the date used for index and the date from a person's date of death represented as a calculated number of days"),
  year_of_birth INT64 OPTIONS(description="Numeric value to represent the calendar year in which an individual was born"),
  year_of_death INT64 OPTIONS(description="Numeric value to represent the year of the death of an individual"),
  cause_of_death STRING OPTIONS(description="Text term to identify the cause of death for a patient"),
  vital_status STRING OPTIONS(description="The survival state of the person registered on the protocol"),
  diagnosis_id STRING OPTIONS(description="Unique identifier for data from the investigation, analysis and recognition of the presence and nature of disease, condition, or injury from expressed signs and symptoms; also, the scientific determination of any kind; the concise results of such an investigation (e.g. e8dd475b-693a-11ea-b1fd-0aad30af8a83)"),
  diagnosis_submitter_id STRING OPTIONS(description="Unique identifier deriving from data submitter attributed to data from the investigation, analysis and recognition of the presence and nature of disease, condition, or injury from expressed signs and symptoms; also, the scientific determination of any kind; the concise results of such an investigation (e.g. 33-DX)"),
  primary_diagnosis STRING OPTIONS(description="Text term used to describe the patient's histologic diagnosis, as described by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  diagnosis_is_primary_disease BOOL OPTIONS(description="Indicates whether this specific diagnosis represents the disease that was the primary focus of the study. Additionally, this diagnosis is reflected at the case level, which is captured using the case.disease_type property."),
  age_at_diagnosis INT64 OPTIONS(description="Age at the time of diagnosis expressed in number of days since birth"),
  year_of_diagnosis INT64 OPTIONS(description="Numeric value to represent the year of an individual's initial pathologic diagnosis of cancer"),
  days_to_last_follow_up INT64 OPTIONS(description="Time interval from the date of last follow up to the date of initial pathologic diagnosis, represented as a calculated number of days"),
  days_to_last_known_disease_status INT64 OPTIONS(description="Time interval from the date of last follow up to the date of initial pathologic diagnosis, represented as a calculated number of days"),
  days_to_recurrence INT64 OPTIONS(description="Number of days between the date used for index and the date the patient's disease recurred"),
  ajcc_clinical_m STRING OPTIONS(description="Extent of the distant metastasis for the cancer based on evidence obtained from clinical assessment parameters determined prior to treatment"),
  ajcc_pathologic_m STRING OPTIONS(description="Code to represent the defined absence or presence of distant spread or metastases (M) to locations via vascular channels or lymphatics beyond the regional lymph nodes, using criteria established by the American Joint Committee on Cancer (AJCC)"),
  ajcc_pathologic_n STRING OPTIONS(description="The codes that represent the stage of cancer based on the nodes present (N stage) according to criteria based on multiple editions of the AJCC's Cancer Staging Manual"),
  ajcc_pathologic_stage STRING OPTIONS(description="The extent of a cancer, especially whether the disease has spread from the original site to other parts of the body based on AJCC staging criteria"),
  ajcc_pathologic_t STRING OPTIONS(description="Code of pathological T (primary tumor) to define the size or contiguous extension of the primary tumor (T), using staging criteria from the American Joint Committee on Cancer (AJCC)"),
  ajcc_staging_system_edition STRING OPTIONS(description="The text term used to describe the version or edition of the American Joint Committee on Cancer Staging Handbooks, a publication by the group formed for the purpose of developing a system of staging for cancer that is acceptable to the American medical profession and is compatible with other accepted classifications."),
  classification_of_tumor STRING OPTIONS(description="Text that describes the kind of disease present in the tumor specimen as related to a specific timepoint"),
  last_known_disease_status STRING OPTIONS(description="Text term that describes the last known state or condition of an individual's neoplasm"),
  lymph_nodes_positive INT64 OPTIONS(description="The number of lymph nodes involved with disease as determined by pathologic examination"),
  lymphatic_invasion_present BOOL OPTIONS(description="A yes/no indicator to ask if small or thin-walled vessel invasion is present, indicating lymphatic involvement"),
  metastasis_at_diagnosis STRING OPTIONS(description="The text term used to describe the extent of metastatic disease present at diagnosis"),
  metastasis_at_diagnosis_site STRING OPTIONS(description="Text term used to identify an anatomic site in which metastatic disease involvement is found"),
  morphology STRING OPTIONS(description="The third edition of the International Classification of Diseases for Oncology, published in 2000 used principally in tumor and cancer registries for coding the site (topography) and the histology (morphology) of neoplasms. The study of the structure of the cells and their arrangement to constitute tissues and, finally, the association among these to form organs. In pathology, the microscopic process of identifying normal and abnormal morphologic characteristics in tissues, by employing various cytochemical and immunocytochemical stains. A system of numbered categories for representation of data"),
  prior_malignancy BOOL OPTIONS(description="The yes/no/unknown indicator used to describe the patient's history of prior cancer diagnosis"),
  progression_or_recurrence BOOL OPTIONS(description="Yes/No/Unknown indicator to identify whether a patient has had a new tumor event after initial treatment"),
  residual_disease STRING OPTIONS(description="Text terms to describe the status of a tissue margin following surgical resection"),
  site_of_resection_or_biopsy STRING OPTIONS(description="The text term used to describe the anatomic site of origin, of the patient's malignant disease, as described by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  sites_of_involvement STRING OPTIONS(description="The anatomic sites of disease involvement in addition to the primary anatomic site"),
  tissue_or_organ_of_origin STRING OPTIONS(description="The text term used to describe the anatomic site of origin, of the patient's malignant disease, as described by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  tumor_focality STRING OPTIONS(description="The text term used to describe whether the patient's disease originated in a single location or multiple locations."),
  tumor_grade STRING OPTIONS(description="Numeric value to express the degree of abnormality of cancer cells, a measure of differentiation and aggressiveness")
)
OPTIONS(
  friendly_name="CPTAC3-DISCOVERY-AND-CONFIRMATORY CLINICAL DATA",
  description="Clinical data was extracted from file metadata information for CPTAC3_discovery_and_confirmatory provided by CDA in August 2024 from the PDC release V4.3.",
  labels=[("access", "open"), ("data_type", "clinical_data"), ("source_0", "cda"), ("source_1", "pdc"), ("program", "cptac3"), ("category", "clinical_biospecimen_data"), ("status", "current"), ("version", "v3_4")]
);

INSERT INTO `isb-cgc-bq.CPTAC.clinical_CPTAC3_discovery_and_confirmatory_pdc_current` (case_id, case_submitter_id, project_submitter_id, primary_site, disease_type, demographic_id, demographic_submitter_id, race, ethnicity, gender, age_at_index, days_to_birth, days_to_death, year_of_birth, year_of_death, cause_of_death, vital_status, diagnosis_id, diagnosis_submitter_id, primary_diagnosis, diagnosis_is_primary_disease, age_at_diagnosis, year_of_diagnosis, days_to_last_follow_up, days_to_last_known_disease_status, days_to_recurrence, ajcc_clinical_m, ajcc_pathologic_m, ajcc_pathologic_n, ajcc_pathologic_stage, ajcc_pathologic_t, ajcc_staging_system_edition, classification_of_tumor, last_known_disease_status, lymph_nodes_positive, lymphatic_invasion_present, metastasis_at_diagnosis, metastasis_at_diagnosis_site, morphology, prior_malignancy, progression_or_recurrence, residual_disease, site_of_resection_or_biopsy, sites_of_involvement, tissue_or_organ_of_origin, tumor_focality, tumor_grade) VALUES ('0b291860-61ba-4ecd-9019-383a2eddf29b', 'chRCC ref/ discovery 10', 'CPTAC3 Discovery and Confirmatory', NULL, 'Other', '4d012cbe-6c83-49c6-bf23-8cf54e2b049f', 'chRCC ref/ discovery 10-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '71aecf17-b44a-4256-8872-5d2c5b9c385e', 'chRCC ref/ discovery 10-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('df4f2e68-8f98-11ea-b1fd-0aad30af8a83', 'QC4', 'CPTAC3 Discovery and Confirmatory', NULL, 'Other', '739ae059-2850-11ec-b712-0a4e2186f121', 'QC4-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '6981023a-2850-11ec-b712-0a4e2186f121', 'QC4-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('df4f3172-8f98-11ea-b1fd-0aad30af8a83', 'QC6', 'CPTAC3 Discovery and Confirmatory', NULL, 'Other', '73b97177-2850-11ec-b712-0a4e2186f121', 'QC6-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '698e8091-2850-11ec-b712-0a4e2186f121', 'QC6-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('3beac08e-60f1-4ea2-85c9-f7bef1efb04b', 'QC4', 'CPTAC3 Discovery and Confirmatory', NULL, 'Other', '6b1b0759-2b80-11ec-b712-0a4e2186f121', 'QC4-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '60d37f72-2b80-11ec-b712-0a4e2186f121', 'QC4-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('7739a390-c63a-11ea-b1fd-0aad30af8a83', 'NX16', 'CPTAC3 Discovery and Confirmatory', NULL, 'Other', '26232921-27be-11ec-b712-0a4e2186f121', 'NX16-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '088a4e61-27be-11ec-b712-0a4e2186f121', 'NX16-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);