-- DBMS: bigquery
CREATE TABLE `isb-cgc.TCGA_bioclin_v0.Clinical`
(
  program_name STRING OPTIONS(description="Program Name, always TCGA (The Cancer Genome Atlas) in this table."),
  case_barcode STRING OPTIONS(description="TCGA patient/case barcode; e.g. TCGA-06-0119"),
  case_gdc_id STRING OPTIONS(description="GDC unique identifer for this case; e.g. 7b4ce492-ff40-4bf1-b3e8-75ff83e8746d. This identifier can be used to find more information at the GDC Data Portal ( https://portal.gdc.cancer.gov/cases/7b4ce492-ff40-4bf1-b3e8-75ff83e8746d )"),
  program_dbgap_accession_number STRING OPTIONS(description="Program dbGaP accession number, eg phs000178"),
  project_short_name STRING OPTIONS(description="Project name abbreviation; the program name appended with a project name abbreviation; e.g. TCGA-OV, etc."),
  project_name STRING OPTIONS(description="Project Name; frequently the same as or similar to the project disease type eg   Acute Lymphoblastic Leukemia - Phase II   or   Breast Invasive Carcinoma   etc"),
  disease_code STRING OPTIONS(description="A code representing the type of cancer. Values can be found at https://gdc.cancer.gov/resources-TCGA-users/TCGA-code-tables/TCGA-study-abbreviations; e.g. OV, GBM, LUAD"),
  gender STRING OPTIONS(description="Participant gender; e.g. Male, Female"),
  vital_status STRING OPTIONS(description="Survival state of the participant; e.g. dead, alive"),
  race STRING OPTIONS(description="The race of a participant, independent from ethnicity; e.g. White, Black or African American, Asian, Native Hawaiian or other Pacific Islander, American Indian or Alaska Native"),
  ethnicity STRING OPTIONS(description="The ethnic origination of a participant, independent from race; e.g. Not Hispanic or Latino, Hispanic or Latino"),
  age_at_diagnosis INT64 OPTIONS(description="Age, in years, at which a condition or disease was first diagnosed"),
  days_to_birth INT64 OPTIONS(description="Days since birth (a negative value, relative to the date of diagnosis which is considered to be t=0)"),
  days_to_death INT64 OPTIONS(description="If vital_status indicates 'dead', then this is the number of days to death (a positive value) relative to the date of diagnosis."),
  days_to_initial_pathologic_diagnosis INT64 OPTIONS(description="The number of days to initial pathologic diagnosis"),
  days_to_last_followup INT64 OPTIONS(description="If vital_status indicates 'alive', then this is the number of days from the date of diagnosis to the last followup (communication contact)."),
  days_to_last_known_alive INT64 OPTIONS(description="Number of days from the date of diagnosis to the last day on which a person was known to be alive. This field is a combination of the days_to_last_followup and days_to death fields. Therefore, this field can be used whether the vital_status is 'alive' or 'dead'."),
  days_to_submitted_specimen_dx INT64 OPTIONS(description="Numeric value to represent the day of the diagnosis for the submitted sample."),
  clinical_stage STRING OPTIONS(description="The stage of the cancer, based on results of tests done before surgery, such as physical exams and imaging scans; e.g. Stage I, Stage II, Stage III, Stage IV"),
  clinical_T STRING OPTIONS(description="The clinical T score is a rating of the extent of the primary tumor, based on results of tests done before surgery, such as physical exams and imaging scans; e.g. T1, T2, T3, T4"),
  clinical_N STRING OPTIONS(description="The clinical N score is a rating of the extent of cancer within nearby lymph nodes, based on results of tests done before surgery, such as physical exams and imaging scans; e.g. N1, N2, N3"),
  clinical_M STRING OPTIONS(description="The clinical M score is a rating of metastasis, that is, how much cancer has spread to distant sites. It is based on results of tests done before surgery, such as physical exams and imaging scans; e.g. MX, M0, M1"),
  pathologic_stage STRING OPTIONS(description="The stage of the cancer, based on surgery or biopsy; e.g. Stage I, Stage II, Stage III, Stage IV"),
  pathologic_T STRING OPTIONS(description="The pathologic T score is a rating of the extent of the primary tumor, based on surgery or biopsy; e.g. T1, T2, T3, T4"),
  pathologic_N STRING OPTIONS(description="The pathologic N score is a rating of the extent of cancer within nearby lymph nodes, based on surgery or biopsy; e.g. N1, N2, N3"),
  pathologic_M STRING OPTIONS(description="The pathologic M score is a rating of metastasis, that is, how much cancer has spread to distant sites. It is based on surgery or biopsy; e.g. MX, M0, M1"),
  year_of_initial_pathologic_diagnosis INT64 OPTIONS(description="Four digit year of the initial pathologic diagnosis"),
  tumor_tissue_site STRING OPTIONS(description="The location on the body where the tumor exists; e.g. Brain, Ovary, Lung, etc."),
  primary_neoplasm_melanoma_dx STRING OPTIONS(description="Indicates whether a person had a primary diagnosis of melanoma; e.g. Yes, No"),
  anatomic_neoplasm_subdivision STRING OPTIONS(description="The spatial location, subdivisions and/or atomic site name of a tumor; e.g. Rectum, Larynx, Tonsil, etc."),
  country STRING OPTIONS(description="Country of the participant; e.g. Germany, United States, Canada, etc."),
  other_dx STRING OPTIONS(description="Indicator and type of other diagnosis; e.g. No; Yes, History of Prior Malignancy; Yes, History of Synchronous/Bilateral Malignancy; Both History of Synchronous/Bilateral and Prior Malignancy"),
  other_malignancy_anatomic_site STRING OPTIONS(description="The site on the body where the other malignancy occurred; e.g. Bladder, Uterus, etc."),
  other_malignancy_type STRING OPTIONS(description="Indicates whether another malignancy occurred before or at the same time; e.g. Prior Malignancy, Synchronous Malignancy"),
  other_malignancy_histological_type STRING OPTIONS(description="The histological type of cancer of the other malignancy; e.g. Adenosquamous, Astrocytoma, etc."),
  history_of_neoadjuvant_treatment STRING OPTIONS(description="Describes the patient's history of neoadjuvant treatment and the kind of treament given prior to resection of the tumor; e.g. Yes, Pharmaceutical Treatment Prior to Resection, etc."),
  primary_therapy_outcome_success STRING OPTIONS(description="Kind of outcome achieved after the completion of the initial course of treatment; e.g. Complete Remission/Response, Progressive Disease, etc."),
  histological_type STRING OPTIONS(description="The histological type of cancer; e.g. Adenosquamous, Astrocytoma, etc."),
  neoplasm_histologic_grade STRING OPTIONS(description="Rating which expresses the degree of abnormality of cancer cells, a measure of differentiation and aggressiveness; e.g. G1, G2, G3, G4"),
  icd_10 STRING OPTIONS(description="Alphanumeric value used to describe the disease code from the tenth version of the International Classification of Disease (ICD-10)"),
  icd_o_3_site STRING OPTIONS(description="Code that represents the site of the disease using 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"),
  icd_o_3_histology STRING OPTIONS(description="Code that represents the histology of the disease using 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"),
  person_neoplasm_cancer_status STRING OPTIONS(description="The participant's cancer status; e.g. With Tumor, Tumor Free"),
  residual_tumor STRING OPTIONS(description="Status of the tissue margin following surgical resection; e.g. R0, R1, R2, RX"),
  tumor_type STRING OPTIONS(description="Tumor Type; e.g. Primary, Type 1, Type 2"),
  new_tumor_event_after_initial_treatment STRING OPTIONS(description="Indicates whether a patient has had a new tumor event after initial treatment; Yes, No"),
  lymphnodes_examined STRING OPTIONS(description="Indicator whether the lymph nodes were examined; e.g. Yes, No"),
  number_of_lymphnodes_examined INT64 OPTIONS(description="The number of lymph nodes examined"),
  number_of_lymphnodes_positive_by_he INT64 OPTIONS(description="The number of lymph nodes involved with disease as determined by histological examination"),
  lymphatic_invasion STRING OPTIONS(description="Indicator if small or thin-walled vessel invasion is present, indicating lymphatic involvement; e.g. Yes, No"),
  venous_invasion STRING OPTIONS(description="Indicator if large vessel or venous invasion was detected by surgery or presence in a tumor specimen; e.g. Yes, No"),
  lymphovascular_invasion_present STRING OPTIONS(description="Indicator if  invasion of a cancer to the blood vessels and/or lymphatics invasion is present; e.g. Yes, No"),
  bcr STRING OPTIONS(description="Biospecimen Core Resource; e.g. Nationwide Children's Hospital, Washington University"),
  batch_number INT64 OPTIONS(description="The BCR Batch Code; see https://gdc.cancer.gov/resources-TCGA-users/TCGA-code-tables/bcr-batch-codes for explanation of the codes"),
  tss_code STRING OPTIONS(description="Tissue Source Site Code; see https://gdc.cancer.gov/resources-TCGA-users/TCGA-code-tables/tissue-source-site-codes for explanation of codes"),
  age_began_smoking_in_years INT64 OPTIONS(description="Age, in years, that the participant began smoking"),
  year_of_tobacco_smoking_onset INT64 OPTIONS(description="Four-digit year that the participant started smoking; e.g. 2010"),
  stopped_smoking_year INT64 OPTIONS(description="Four-digit year that the participant stopped smoking; e.g. 2010"),
  tobacco_smoking_history INT64 OPTIONS(description="Category describing current smoking status and smoking history as self-reported by a participant.; e.g. 1, 2, etc."),
  number_pack_years_smoked FLOAT64 OPTIONS(description="The number of packs smoked per day times the number of years smoked by the participant"),
  height FLOAT64 OPTIONS(description="Height of participant in centimeters"),
  weight FLOAT64 OPTIONS(description="Weight of participant in kilograms"),
  bmi FLOAT64 OPTIONS(description="Body Mass Index of participant"),
  mononucleotide_and_dinucleotide_marker_panel_analysis_status STRING OPTIONS(description="Status of the mononucleotide and dinucleotide marker panel analysis; microsatellite-stable (MSS), low level MSI (MSI-L) if less than 40% of markers were altered and high level MSI (MSI-H) if greater than 40% of markers were altered"),
  menopause_status STRING OPTIONS(description="A female participant's menopausal status; e.g. Post, Pre, Indeterminate, Peri"),
  pregnancies STRING OPTIONS(description="The number of times (including currently if it applies) that a female participant has been pregnant, regardless of outcome."),
  hpv_status STRING OPTIONS(description="Indicates whether the participant has a record of a positive finding for human papillomavirus; e.g. Positive, Negative, Indeterminate"),
  hpv_calls STRING OPTIONS(description="HPV strains; e.g. HPV18, HPV45, etc."),
  h_pylori_infection STRING OPTIONS(description="Indicator of previous or current diagnosis of Helicobactor pylori infection; e.g. Yes, No, Never, Current"),
  gleason_score_combined INT64 OPTIONS(description="The Gleason Score (ranging from 1 -5) is the grade of the aggressiveness of prostate cancer. The combined Gleason Score is the primary Gleason score  (for the largest area of the tumor) added to the secondary Gleason Score (for the next largest section of the tumor)."),
  psa_value FLOAT64 OPTIONS(description="A male participant's Prostrate-Specific Antigen (PSA) value"),
  colorectal_cancer STRING OPTIONS(description="Indicates whether the participant has colorectal cancer; e.g. Yes, No"),
  history_of_colon_polyps STRING OPTIONS(description="Indicator if the participant had a previous history of colon polyps as noted in the history/physical or previous endoscopic report(s); e.g. Yes, No")
)
OPTIONS(
  friendly_name="TCGA CLINICAL 2018 DEPRECATED",
  description="Data was extracted from the TCGA program in June 2018. This clinical information about patient cases also includes TCGA project information. More details: see https://docs.gdc.cancer.gov/Encyclopedia/pages/Clinical_Data/. This table has been deprecated. It has been copied to isb-cgc-bq.TCGA_versioned.clinical_gdc_2018_06. Please see isb-cgc-bq.TCGA.clinical_gdc_current for the most current table.",
  labels=[("data_type", "clinical_data"), ("category", "clinical_biospecimen_data"), ("access", "open"), ("status", "deprecated"), ("program", "tcga"), ("source", "gdc")]
);

INSERT INTO `isb-cgc.TCGA_bioclin_v0.Clinical` (program_name, case_barcode, case_gdc_id, program_dbgap_accession_number, project_short_name, project_name, disease_code, gender, vital_status, race, ethnicity, age_at_diagnosis, days_to_birth, days_to_death, days_to_initial_pathologic_diagnosis, days_to_last_followup, days_to_last_known_alive, days_to_submitted_specimen_dx, clinical_stage, clinical_T, clinical_N, clinical_M, pathologic_stage, pathologic_T, pathologic_N, pathologic_M, year_of_initial_pathologic_diagnosis, tumor_tissue_site, primary_neoplasm_melanoma_dx, anatomic_neoplasm_subdivision, country, other_dx, other_malignancy_anatomic_site, other_malignancy_type, other_malignancy_histological_type, history_of_neoadjuvant_treatment, primary_therapy_outcome_success, histological_type, neoplasm_histologic_grade, icd_10, icd_o_3_site, icd_o_3_histology, person_neoplasm_cancer_status, residual_tumor, tumor_type, new_tumor_event_after_initial_treatment, lymphnodes_examined, number_of_lymphnodes_examined, number_of_lymphnodes_positive_by_he, lymphatic_invasion, venous_invasion, lymphovascular_invasion_present, bcr, batch_number, tss_code, age_began_smoking_in_years, year_of_tobacco_smoking_onset, stopped_smoking_year, tobacco_smoking_history, number_pack_years_smoked, height, weight, bmi, mononucleotide_and_dinucleotide_marker_panel_analysis_status, menopause_status, pregnancies, hpv_status, hpv_calls, h_pylori_infection, gleason_score_combined, psa_value, colorectal_cancer, history_of_colon_polyps) VALUES ('TCGA', 'TCGA-01-0628', 'f88560c8-3475-47f2-9d48-4b8311bc1132', 'phs000178', 'TCGA-OV', 'Ovarian Serous Cystadenocarcinoma', 'OV', 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, nan, nan, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL), ('TCGA', 'TCGA-01-0630', 'dc9b4616-e815-43c8-9ec4-720a32868541', 'phs000178', 'TCGA-OV', 'Ovarian Serous Cystadenocarcinoma', 'OV', 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, nan, nan, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL), ('TCGA', 'TCGA-01-0631', '3a7b22b5-0847-46df-92bf-cacc3f11deef', 'phs000178', 'TCGA-OV', 'Ovarian Serous Cystadenocarcinoma', 'OV', 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, nan, nan, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL), ('TCGA', 'TCGA-01-0633', 'dde3c31f-51cb-4236-9aa9-0c9eda6105eb', 'phs000178', 'TCGA-OV', 'Ovarian Serous Cystadenocarcinoma', 'OV', 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, nan, nan, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL), ('TCGA', 'TCGA-01-0636', '6f75a5d8-c469-4bed-bde9-572506f41ed3', 'phs000178', 'TCGA-OV', 'Ovarian Serous Cystadenocarcinoma', 'OV', 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, nan, nan, nan, NULL, NULL, NULL, NULL, NULL, NULL, NULL, nan, NULL, NULL);