-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.CPTAC.clinical_CPTAC3_other_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."),
  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."),
  last_known_disease_status STRING OPTIONS(description="Text term that describes the last known state or condition of an individual's neoplasm"),
  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"),
  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)"),
  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-OTHER CLINICAL DATA",
  description="Clinical data was extracted from file metadata information for CPTAC3_other 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", "v4_3")]
);

INSERT INTO `isb-cgc-bq.CPTAC.clinical_CPTAC3_other_pdc_current` (case_id, case_submitter_id, project_submitter_id, primary_site, disease_type, demographic_id, demographic_submitter_id, race, ethnicity, gender, 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, last_known_disease_status, morphology, progression_or_recurrence, residual_disease, site_of_resection_or_biopsy, tissue_or_organ_of_origin, tumor_focality, tumor_grade) VALUES ('4ef40b23-97dd-434a-befc-6580803d65c1', 'Se7595', 'CPTAC3-Other', 'Pancreas', 'Other', '82db2018-41c3-42ee-b7b8-3b27a20151ab', 'Se7595-DM', 'white', NULL, 'female', -20819, NULL, NULL, NULL, NULL, NULL, 'd1acaa00-a73d-48ba-80f3-c16063b9f9fd', 'Se7595-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('d3cad9e3-843a-41cf-b335-40dbc287b4e9', 'CR1', 'CPTAC3-Other', NULL, 'Other', 'cb73eb73-e31c-4611-a5da-6f0a0e0bb707', 'CR1-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'f1f7d5bf-e8c1-40e4-b406-a79706eaa133', 'CR1-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('4c5e9b7e-79f5-4569-8873-217f0c73d887', 'Luminal (WHIM 16)', 'CPTAC3-Other', NULL, 'Other', '08f03d49-7993-4814-a2f8-8f7c6f0e768a', 'Luminal (WHIM 16)-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '7ecb4ce9-567c-44e2-8cda-b306dfdc846c', 'Luminal (WHIM 16)-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('6e7561ef-f5b3-4bf0-8148-f0d155fb0d9d', 'CR3', 'CPTAC3-Other', NULL, 'Other', '0890028d-5c4f-4d96-b239-22bba762fcba', 'CR3-DM', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '876ae2e1-dda0-4c08-9878-f0ae34002f46', 'CR3-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('b18badea-0143-4663-9eb5-285d89ccbd96', 'Se7055', 'CPTAC3-Other', 'Pancreas', 'Other', '00098727-5592-47c6-aa30-48c0f8c92518', 'Se7055-DM', 'white', NULL, 'male', -19358, NULL, NULL, NULL, NULL, NULL, '2707c612-29ac-4095-98b3-238641f8edaa', 'Se7055-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);