-- DBMS: bigquery
CREATE TABLE `isb-cgc.TCGA_bioclin_v0.clinical_v1`
(
  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 )"),
  case_barcode STRING OPTIONS(description="TCGA patient/case barcode; e.g. TCGA-06-0119"),
  program_name STRING OPTIONS(description="Program Name, always TCGA (The Cancer Genome Atlas) in this table."),
  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"),
  project_short_name STRING OPTIONS(description="Project name abbreviation; the program name appended with a project name abbreviation; e.g. TCGA-OV, etc."),
  age_at_diagnosis INT64 OPTIONS(description="Age, in years, at which a condition or disease was first diagnosed"),
  age_began_smoking_in_years STRING OPTIONS(description="Age, in years, that the participant began smoking"),
  anatomic_neoplasm_subdivision STRING OPTIONS(description="The spatial location, subdivisions and/or atomic site name of a tumor; e.g. Rectum, Larynx, Tonsil, etc."),
  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"),
  bcr STRING OPTIONS(description="Biospecimen Core Resource; e.g. Nationwide Children's Hospital, Washington University"),
  bmi FLOAT64 OPTIONS(description="Body Mass Index of participant"),
  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"),
  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_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"),
  colorectal_cancer STRING OPTIONS(description="Indicates whether the participant has colorectal cancer; e.g. Yes, No"),
  country STRING OPTIONS(description="Country of the participant; e.g. Germany, United States, Canada, etc."),
  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 STRING OPTIONS(description="Numeric value to represent the day of the diagnosis for the submitted sample."),
  ethnicity STRING OPTIONS(description="The ethnic origination of a participant, independent from race; eg. Not Hispanic or Latino, Hispanic or Latino"),
  gender STRING OPTIONS(description="Participant gender; e.g. Male, Female"),
  gleason_score_combined STRING 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)."),
  h_pylori_infection STRING OPTIONS(description="Indicator of previous or current diagnosis of Helicobactor pylori infection; e.g. Yes, No, Never, Current"),
  height INT64 OPTIONS(description="Height of participant in centimeters"),
  histological_type STRING OPTIONS(description="The histological type of cancer; e.g. Adenosquamous, Astrocytoma, etc."),
  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"),
  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."),
  hpv_calls STRING OPTIONS(description="HPV strains; e.g. HPV18, HPV45, etc."),
  hpv_status STRING OPTIONS(description="Indicates whether the participant has a record of a positive finding for human papillomavirus; e.g. Positive, Negative, Indeterminate"),
  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_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"),
  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"),
  lymphatic_invasion STRING OPTIONS(description="Indicator if small or thin-walled vessel invasion is present, indicating lymphatic involvement; e.g. Yes, No"),
  lymphnodes_examined STRING OPTIONS(description="Indicator whether the lymph nodes were examined; 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"),
  menopause_status STRING OPTIONS(description="A female participant's menopausal status; e.g. Post, Pre, Indeterminate, Peri"),
  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"),
  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"),
  new_tumor_event_after_initial_treatment BOOL OPTIONS(description="Indicates whether a patient has had a new tumor event after initial treatment; Yes, No"),
  number_of_lymphnodes_examined INT64 OPTIONS(description="The number of lymph nodes examined "),
  number_of_lymphnodes_positive_by_he STRING OPTIONS(description="The number of lymph nodes involved with disease as determined by histological examination"),
  number_pack_years_smoked INT64 OPTIONS(description="The number of packs smoked per day times the number of years smoked by the participant"),
  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_histological_type STRING OPTIONS(description="The histological type of cancer of the other malignancy; e.g. Adenosquamous, Astrocytoma, etc."),
  other_malignancy_type STRING OPTIONS(description="Indicates whether another malignancy occurred before or at the same time; e.g. Prior Malignancy, Synchronous Malignancy"),
  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"),
  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_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"),
  person_neoplasm_cancer_status STRING OPTIONS(description="The participant's cancer status; e.g. With Tumor, Tumor Free"),
  pregnancies STRING OPTIONS(description="The number of times (including currently if it applies) that a female participant has been pregnant, regardless of outcome."),
  primary_neoplasm_melanoma_dx STRING OPTIONS(description="Indicates whether a person had a primary diagnosis of melanoma; e.g. Yes, No"),
  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."),
  psa_value STRING OPTIONS(description="A male participant's Prostrate-Specific Antigen (PSA) value"),
  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"),
  residual_tumor STRING OPTIONS(description="Status of the tissue margin following surgical resection; e.g. R0, R1, R2, RX"),
  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."),
  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"),
  tumor_tissue_site STRING OPTIONS(description="The location on the body where the tumor exists; e.g. Brain, Ovary, Lung, etc."),
  tumor_type STRING OPTIONS(description="Tumor Type; e.g. Primary, Type 1, Type 2"),
  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"),
  vital_status STRING OPTIONS(description="Survival state of the participant; e.g. dead, alive"),
  weight INT64 OPTIONS(description="Weight of participant in kilograms"),
  year_of_diagnosis INT64 OPTIONS(description="Four digit year of the diagnosis"),
  year_of_tobacco_smoking_onset INT64 OPTIONS(description="Four-digit year that the participant started smoking; e.g. 2010")
)
OPTIONS(
  friendly_name="TCGA CLINICAL 2019 DEPRECATED",
  description="Data was extracted from the TCGA program in June 2019. 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_2019_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_v1` (case_gdc_id, case_barcode, program_name, disease_code, project_short_name, age_at_diagnosis, age_began_smoking_in_years, anatomic_neoplasm_subdivision, batch_number, bcr, bmi, clinical_M, clinical_N, clinical_stage, clinical_T, colorectal_cancer, country, 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, ethnicity, gender, gleason_score_combined, h_pylori_infection, height, histological_type, history_of_colon_polyps, history_of_neoadjuvant_treatment, hpv_calls, hpv_status, icd_10, icd_o_3_histology, icd_o_3_site, lymphatic_invasion, lymphnodes_examined, lymphovascular_invasion_present, menopause_status, mononucleotide_and_dinucleotide_marker_panel_analysis_status, neoplasm_histologic_grade, new_tumor_event_after_initial_treatment, number_of_lymphnodes_examined, number_of_lymphnodes_positive_by_he, number_pack_years_smoked, other_dx, other_malignancy_anatomic_site, other_malignancy_histological_type, other_malignancy_type, pathologic_M, pathologic_N, pathologic_stage, pathologic_T, person_neoplasm_cancer_status, pregnancies, primary_neoplasm_melanoma_dx, primary_therapy_outcome_success, psa_value, race, residual_tumor, stopped_smoking_year, tobacco_smoking_history, tss_code, tumor_tissue_site, tumor_type, venous_invasion, vital_status, weight, year_of_diagnosis, year_of_tobacco_smoking_onset) VALUES ('8fb406e7-49b1-4662-860c-5a4d32b9d19c', 'TCGA-2G-AALX', 'TCGA', 'TGCT', 'TCGA-TGCT', NULL, NULL, NULL, NULL, NULL, nan, 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('be64d20a-bcda-4623-912a-826e86f3225e', 'TCGA-2G-AALF', 'TCGA', 'TGCT', 'TCGA-TGCT', NULL, NULL, NULL, NULL, NULL, nan, 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('23742e7c-4c96-4253-9b6b-baf0e076b6e7', 'TCGA-2G-AALY', 'TCGA', 'TGCT', 'TCGA-TGCT', NULL, NULL, NULL, NULL, NULL, nan, 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('b3f29a2a-5ae2-45b5-8f59-d96ca461637a', 'TCGA-2G-AALZ', 'TCGA', 'TGCT', 'TCGA-TGCT', NULL, NULL, NULL, NULL, NULL, nan, 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('d69f7591-8917-4097-9b16-7977fa6a0dc6', 'TCGA-2G-AALN', 'TCGA', 'TGCT', 'TCGA-TGCT', NULL, NULL, NULL, NULL, NULL, nan, 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, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);