-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier1_followup_r2`
(
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  HTAN_Participant_ID STRING OPTIONS(description="HTAN ID associated with a patient based on HTAN ID SOP (eg HTANx_yyy )"),
  Days_to_Follow_Up STRING OPTIONS(description="Number of days between the date used for index and the date of the patient's last follow-up appointment or contact."),
  Adverse_Event STRING OPTIONS(description="Text that represents the Common Terminology Criteria for Adverse Events low level term name for an adverse event."),
  Progression_or_Recurrence STRING OPTIONS(description="Yes/No/unknown indicator to identify whether a patient has had a new tumor event after initial treatment."),
  Barretts_Esophagus_Goblet_Cells_Present STRING OPTIONS(description="TBD"),
  BMI STRING OPTIONS(description="A calculated numerical quantity that represents an individual's weight to height ratio."),
  Cause_of_Response STRING OPTIONS(description="The text term used to describe the suspected cause or reason for the patient disease response."),
  Comorbidity STRING OPTIONS(description="The text term used to describe a comorbidity disease, which coexists with the patient's malignant disease."),
  Comorbidity_Method_of_Diagnosis STRING OPTIONS(description="The text term used to describe the method used to diagnose the patient's comorbidity disease."),
  Days_to_Adverse_Event STRING OPTIONS(description="Number of days between the date used for index and the date of the patient's adverse event."),
  Days_to_Comorbidity STRING OPTIONS(description="Number of days between the date used for index and the date the patient was diagnosed with a comorbidity."),
  Diabetes_Treatment_Type STRING OPTIONS(description="Text term used to describe the types of treatment used to manage diabetes."),
  Disease_Response STRING OPTIONS(description="Code assigned to describe the patient's response or outcome to the disease."),
  DLCO_Ref_Predictive_Percent STRING OPTIONS(description="The value, as a percentage of predicted lung volume, measuring the amount of carbon monoxide detected in a patient's lungs."),
  ECOG_Performance_Status STRING OPTIONS(description="The ECOG functional performance status of the patient/participant."),
  FEV1_FVC_Post_Bronch_Percent STRING OPTIONS(description="Percentage value to represent result of Forced Expiratory Volume in 1 second (FEV1) divided by the Forced Vital Capacity (FVC) post-bronchodilator."),
  FEV_1_FVC_Pre_Bronch_Percent STRING OPTIONS(description="Percentage value to represent result of Forced Expiratory Volume in 1 second (FEV1) divided by the Forced Vital Capacity (FVC) pre-bronchodilator."),
  FEV1_Ref_Post_Bronch_Percent STRING OPTIONS(description="The percentage comparison to a normal value reference range of the volume of air that a patient can forcibly exhale from the lungs in one second post-bronchodilator."),
  FEV1_Ref_Pre_Bronch_Percent STRING OPTIONS(description="The percentage comparison to a normal value reference range of the volume of air that a patient can forcibly exhale from the lungs in one second pre-bronchodilator."),
  Height STRING OPTIONS(description="The height of the patient in centimeters."),
  Hepatitis_Sustained_Virological_Response STRING OPTIONS(description="The yes/no/unknown indicator used to describe whether the patient received treatment for a risk factor the patient had at the time of or prior to their diagnosis."),
  HPV_Positive_Type STRING OPTIONS(description="Text classification to represent the strain or type of human papillomavirus identified in an individual."),
  Karnofsky_Performance_Status STRING OPTIONS(description="Text term used to describe the classification used of the functional capabilities of a person."),
  Menopause_Status STRING OPTIONS(description="Text term used to describe the patient's menopause status."),
  Pancreatitis_Onset_Year STRING OPTIONS(description="TBD"),
  Reflux_Treatment_Type STRING OPTIONS(description="Text term used to describe the types of treatment used to manage gastroesophageal reflux disease (GERD)."),
  Risk_Factor STRING OPTIONS(description="The text term used to describe a risk factor the patient had at the time of or prior to their diagnosis."),
  Risk_Factor_Treatment STRING OPTIONS(description="The yes/no/unknown indicator used to describe whether the patient received treatment for a risk factor the patient had at the time of or prior to their diagnosis."),
  Viral_Hepatitis_Serologies STRING OPTIONS(description="Text term that describes the kind of serological laboratory test used to determine the patient's hepatitus status."),
  Weight STRING OPTIONS(description="The weight of the patient measured in kilograms."),
  Adverse_Event_Grade STRING OPTIONS(description="The text term used to describe a specific histone variants, which are proteins that substitute for the core canonical histones."),
  AIDS_Risk_Factors STRING OPTIONS(description="The text term used to describe a risk factor of the acquired immunodeficiency syndrome (AIDS) that the patient either had at time time of the study or experienced in the past."),
  Body_Surface_Area STRING OPTIONS(description="Numeric value used to represent the 2-dimensional extent of the body surface relating height to weight."),
  CD4_Count STRING OPTIONS(description="The text term used to describe the outcome of the procedure to determine the amount of the CD4 expressing cells in a sample."),
  CDC_HIV_Risk_Factors STRING OPTIONS(description="The text term used to describe a risk factor for human immunodeficiency virus, as described by the Center for Disease Control."),
  Days_to_Imaging STRING OPTIONS(description="Number of days between the date used for index and the date the imaging or scan was performed on the patient."),
  Evidence_of_Recurrence_Type STRING OPTIONS(description="The text term used to describe the type of evidence used to determine whether the patient's disease recurred"),
  HAART_Treatment_Indicator STRING OPTIONS(description="The text term used to indicate whether the patient received Highly Active Antiretroviral Therapy (HAART)."),
  HIV_Viral_Load STRING OPTIONS(description="Numeric value that represents the concentration of an analyte or aliquot extracted from the sample or sample portion, measured in milligrams per milliliter."),
  Hormonal_Contraceptive_Use STRING OPTIONS(description="The text term used to indicate whether the patient used hormonal contraceptives."),
  Hysterectomy_Margins_Involved STRING OPTIONS(description="The text term used to indicate whether the patient's disease was determined to be involved based on the surgical margins of the hysterectomy."),
  Hysterectomy_Type STRING OPTIONS(description="The text term used to describe the type of hysterectomy the patient had."),
  Imaging_Result STRING OPTIONS(description="The text term used to describe the result of the imaging or scan performed on the patient."),
  Imaging_Type STRING OPTIONS(description="The text term used to describe the type of imaging or scan performed on the patient."),
  Immunosuppressive_Treatment_Type STRING OPTIONS(description="The text term used to describe the type of immunosuppresive treatment the patient received."),
  Nadir_CD4_Count STRING OPTIONS(description="Numeric value that represents the lowest point to which the CD4 count has dropped (nadir)."),
  Pregnancy_Outcome STRING OPTIONS(description="The text term used to describe the type of pregnancy the patient had"),
  Recist_Targeted_Regions_Number STRING OPTIONS(description="Numeric value that represents the number of baseline target lesions, as described by the Response Evaluation Criteria in Solid Tumours (RECIST) criteria"),
  Recist_Targeted_Regions_Sum STRING OPTIONS(description="Numeric value that represents the sum of baseline target lesions, as described by the Response Evaluation Criteria in Solid Tumours (RECIST) criteria."),
  Scan_Tracer_Used STRING OPTIONS(description="The text term used to describe the type of tracer used during the imaging or scan of the patient."),
  Days_to_Recurrence STRING OPTIONS(description="Number of days between the date used for index and the date the patient's disease recurred."),
  Progression_or_Recurrence_Anatomic_Site STRING OPTIONS(description="The text term used to describe the anatomic site of resection; biopsy; tissue or organ of biospecimen origin; progression or recurrent disease; treatment"),
  Anatomic_Site STRING OPTIONS(description="The text term used to describe the anatomic site of resection; biopsy; tissue or organ of biospecimen origin; progression or recurrent disease; treatment"),
  Treatment_Anatomic_Site STRING OPTIONS(description="The text term used to describe the anatomic site of resection; biopsy; tissue or organ of biospecimen origin; progression or recurrent disease; treatment"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Data_Release STRING OPTIONS(description="Inclusion in HTAN Data Release e.g. Release 1.0")
)
OPTIONS(
  friendly_name="HTAN CLINICAL TIER 1 DATA - FOLLOW UP R2 VERSIONED",
  description="Data was extracted from HTAN Synapse projects in April 2022. This table contains information about HTAN patient cases and their clinical information. More details: see https://data.humantumoratlas.org/standard/clinical",
  labels=[("access", "open"), ("data_type", "clinical_data"), ("program", "htan"), ("source", "htan"), ("category", "clinical_biospecimen_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.clinical_tier1_followup_r2` (Component, HTAN_Participant_ID, Days_to_Follow_Up, Adverse_Event, Progression_or_Recurrence, Barretts_Esophagus_Goblet_Cells_Present, BMI, Cause_of_Response, Comorbidity, Comorbidity_Method_of_Diagnosis, Days_to_Adverse_Event, Days_to_Comorbidity, Diabetes_Treatment_Type, Disease_Response, DLCO_Ref_Predictive_Percent, ECOG_Performance_Status, FEV1_FVC_Post_Bronch_Percent, FEV_1_FVC_Pre_Bronch_Percent, FEV1_Ref_Post_Bronch_Percent, FEV1_Ref_Pre_Bronch_Percent, Height, Hepatitis_Sustained_Virological_Response, HPV_Positive_Type, Karnofsky_Performance_Status, Menopause_Status, Pancreatitis_Onset_Year, Reflux_Treatment_Type, Risk_Factor, Risk_Factor_Treatment, Viral_Hepatitis_Serologies, Weight, Adverse_Event_Grade, AIDS_Risk_Factors, Body_Surface_Area, CD4_Count, CDC_HIV_Risk_Factors, Days_to_Imaging, Evidence_of_Recurrence_Type, HAART_Treatment_Indicator, HIV_Viral_Load, Hormonal_Contraceptive_Use, Hysterectomy_Margins_Involved, Hysterectomy_Type, Imaging_Result, Imaging_Type, Immunosuppressive_Treatment_Type, Nadir_CD4_Count, Pregnancy_Outcome, Recist_Targeted_Regions_Number, Recist_Targeted_Regions_Sum, Scan_Tracer_Used, Days_to_Recurrence, Progression_or_Recurrence_Anatomic_Site, Anatomic_Site, Treatment_Anatomic_Site, entityId, HTAN_Center, Data_Release) VALUES ('FollowUp', 'HTA1_261', '31657', 'None', 'Yes - Progression or Recurrence', 'None', '25.1', 'None', 'None', 'None', 'None', 'None', 'None', 'TF-Tumor Free', 'None', 'None', '79.0', '76.0', '112.0', '108.0', '165.1', 'None', 'None', 'None', 'Not Reported', 'None', 'None', 'None', 'None', 'None', '68.5', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'Not Applicable', 'Temporal lobe', 'None', 'None', 'syn28260692', 'HTAN HTAPP', 'Release 2.0'), ('FollowUp', 'HTA1_293', '27272', 'None', 'Yes - Progression or Recurrence', 'None', '27.34', 'None', 'None', 'None', 'None', 'None', 'None', 'TF-Tumor Free', 'None', '1.0', 'None', '67.0', 'None', '87.0', '157.5', 'None', 'None', 'None', 'Postmenopausal', 'None', 'None', 'None', 'None', 'None', '67.39', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '27183', 'Frontal lobe', 'None', 'None', 'syn28260697', 'HTAN HTAPP', 'Release 2.0'), ('FollowUp', 'HTA8_2025', '19942', 'None', 'Yes - Progression or Recurrence', 'None', '23.3', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '158.0', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '58.2', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '19157.0', 'Lymph nodes of head face and neck', 'None', 'None', 'syn26485413', 'HTAN MSK', 'Release 2.0'), ('FollowUp', 'HTA8_2047', '27205', 'None', 'Yes - Progression or Recurrence', 'None', '30.7', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '174.0', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '93.0', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', '26379.0', 'Liver', 'None', 'None', 'syn26485435', 'HTAN MSK', 'Release 2.0'), ('FollowUp', 'HTA1_274', '23583', 'None', 'No', 'None', '23.1', 'None', 'None', 'None', 'None', 'None', 'None', 'TF-Tumor Free', 'None', '0.0', 'None', '76.0', 'None', '96.0', '160.0', 'None', 'None', 'None', 'Postmenopausal', 'None', 'None', 'None', 'None', 'None', '59.5', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn28260696', 'HTAN HTAPP', 'Release 2.0');