-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier1_followup_r5_v2`
(
  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."),
  Immunosuppressive_Treatment_Type STRING OPTIONS(description="The text term used to describe the type of immunosuppresive treatment the patient received."),
  Progression_or_Recurrence_Type STRING OPTIONS(description="The text term used to describe the type of progressive or recurrent disease or relapsed disease."),
  Reflux_Treatment_Type STRING OPTIONS(description="Text term used to describe the types of treatment used to manage gastroesophageal reflux disease (GERD)."),
  Nadir_CD4_Count STRING OPTIONS(description="Numeric value that represents the lowest point to which the CD4 count has dropped (nadir)."),
  Days_to_Progression STRING OPTIONS(description="Number of days between the date used for index and the date the patient's disease progressed. If not applicable please enter 'Not Applicable'"),
  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."),
  Progression_or_Recurrence STRING OPTIONS(description="Yes/No/unknown indicator to identify whether a patient has had a new tumor event after initial treatment."),
  Imaging_Type STRING OPTIONS(description="The text term used to describe the type of imaging or scan performed on the patient."),
  Days_to_Progression_Free STRING OPTIONS(description="Number of days between the date used for index and the date the patient's disease was formally confirmed as progression-free. If not applicable please enter 'Not Applicable'"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  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."),
  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. If not applicable please enter 'Not Applicable'"),
  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."),
  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"),
  ECOG_Performance_Status STRING OPTIONS(description="The ECOG functional performance status of the patient/participant."),
  Imaging_Result STRING OPTIONS(description="The text term used to describe the result of the imaging or scan performed on the patient."),
  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."),
  Cause_of_Response STRING OPTIONS(description="The text term used to describe the suspected cause or reason for the patient disease response."),
  Height STRING OPTIONS(description="The height of the patient in centimeters."),
  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. If not applicable please enter 'Not Applicable'"),
  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."),
  Comorbidity_Method_of_Diagnosis STRING OPTIONS(description="The text term used to describe the method used to diagnose the patient's comorbidity disease."),
  HPV_Positive_Type STRING OPTIONS(description="Text classification to represent the strain or type of human papillomavirus identified in an individual."),
  Comorbidity STRING OPTIONS(description="The text term used to describe a comorbidity disease, which coexists with the patient's malignant disease."),
  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."),
  Disease_Response STRING OPTIONS(description="Code assigned to describe the patient's response or outcome to the disease."),
  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. If not applicable please enter 'Not Applicable'"),
  Adverse_Event STRING OPTIONS(description="Text that represents the Common Terminology Criteria for Adverse Events low level term name for an adverse event."),
  Barretts_Esophagus_Goblet_Cells_Present STRING OPTIONS(description="Presence or absennce of Barretts esophagus goblet cells."),
  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."),
  Hysterectomy_Type STRING OPTIONS(description="The text term used to describe the type of hysterectomy the patient had."),
  Pregnancy_Outcome STRING OPTIONS(description="The text term used to describe the type of pregnancy the patient had"),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  Weight STRING OPTIONS(description="The weight of the patient measured in kilograms."),
  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."),
  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."),
  Viral_Hepatitis_Serologies STRING OPTIONS(description="Text term that describes the kind of serological laboratory test used to determine the patient's hepatitus status."),
  Diabetes_Treatment_Type STRING OPTIONS(description="Text term used to describe the types of treatment used to manage diabetes."),
  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."),
  Karnofsky_Performance_Status STRING OPTIONS(description="Text term used to describe the classification used of the functional capabilities of a person."),
  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."),
  Body_Surface_Area STRING OPTIONS(description="Numeric value used to represent the 2-dimensional extent of the body surface relating height to weight."),
  HTAN_Participant_ID STRING OPTIONS(description="HTAN ID associated with a patient based on HTAN ID SOP (eg HTANx_yyy )"),
  Pancreatitis_Onset_Year STRING OPTIONS(description="Date of onset of pancreatitis."),
  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)."),
  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."),
  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."),
  Days_to_Recurrence STRING OPTIONS(description="Number of days between the date used for index and the date the patient's disease recurred. If not applicable please enter 'Not Applicable'"),
  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."),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  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."),
  Hormonal_Contraceptive_Use STRING OPTIONS(description="The text term used to indicate whether the patient used hormonal contraceptives."),
  Menopause_Status STRING OPTIONS(description="Text term used to describe the patient's menopause status."),
  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"),
  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. If not applicable please enter 'Not Applicable'"),
  BMI STRING OPTIONS(description="A calculated numerical quantity that represents an individual's weight to height ratio."),
  HTAN_Center STRING OPTIONS(description="Name of HTAN Center e.g. HTAN HTAPP"),
  Manifest_Id STRING OPTIONS(description="Synapse ID of manifest containing file annotation"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest")
)
OPTIONS(
  friendly_name="HTAN CLINICAL TIER 1 DATA - FOLLOW UP R5 VERSIONED",
  description="This table contains follow up clinical information about HTAN patient cases based on the NCI Genomic Data Commons (GDC) clinical data model. Data was extracted from HTAN Synapse projects in April 2024. 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_r5_v2` (Hepatitis_Sustained_Virological_Response, Immunosuppressive_Treatment_Type, Progression_or_Recurrence_Type, Reflux_Treatment_Type, Nadir_CD4_Count, Days_to_Progression, Hysterectomy_Margins_Involved, Progression_or_Recurrence, Imaging_Type, Days_to_Progression_Free, Component, Risk_Factor_Treatment, Days_to_Comorbidity, Scan_Tracer_Used, Progression_or_Recurrence_Anatomic_Site, ECOG_Performance_Status, Imaging_Result, CDC_HIV_Risk_Factors, Cause_of_Response, Height, Days_to_Adverse_Event, FEV1_Ref_Pre_Bronch_Percent, Comorbidity_Method_of_Diagnosis, HPV_Positive_Type, Comorbidity, HIV_Viral_Load, Disease_Response, Days_to_Follow_Up, Adverse_Event, Barretts_Esophagus_Goblet_Cells_Present, AIDS_Risk_Factors, Hysterectomy_Type, Pregnancy_Outcome, entityId, Weight, DLCO_Ref_Predictive_Percent, FEV1_FVC_Post_Bronch_Percent, Viral_Hepatitis_Serologies, Diabetes_Treatment_Type, FEV_1_FVC_Pre_Bronch_Percent, Karnofsky_Performance_Status, Risk_Factor, Body_Surface_Area, HTAN_Participant_ID, Pancreatitis_Onset_Year, Evidence_of_Recurrence_Type, HAART_Treatment_Indicator, Recist_Targeted_Regions_Sum, CD4_Count, Days_to_Recurrence, Adverse_Event_Grade, Id, FEV1_Ref_Post_Bronch_Percent, Hormonal_Contraceptive_Use, Menopause_Status, Recist_Targeted_Regions_Number, Days_to_imaging, BMI, HTAN_Center, Manifest_Id, Manifest_Version) VALUES (NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'unknown', NULL, NULL, 'FollowUp', 'Yes', '23725.0', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '24467.0', NULL, 'Pathology', NULL, 'Insulin Controlled Diabetes', NULL, 'DU-Disease Unchanged', '25228', 'Sepsis', NULL, NULL, NULL, NULL, NULL, '88.1', NULL, NULL, NULL, 'Insulin', NULL, NULL, 'Diabetes Type II', NULL, 'HTA12_247', NULL, NULL, NULL, NULL, NULL, NULL, 'Grade 2', '2fffd55c-cb43-43be-973c-64cf4133ce04', NULL, NULL, 'Postmenopausal', NULL, NULL, '32.33', 'HTAN WUSTL', 'syn53351285', 2), (NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'No', NULL, '23505.0', 'FollowUp', NULL, NULL, NULL, NULL, '0.0', NULL, NULL, NULL, '160.0', NULL, '96.0', NULL, NULL, NULL, NULL, 'TF-Tumor Free', '23583', NULL, NULL, NULL, NULL, NULL, 'syn28260696', '59.5', NULL, NULL, NULL, NULL, '76.0', NULL, NULL, NULL, 'HTA1_274', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'c5899c82-04b5-400b-b574-73237a6e4e77', NULL, NULL, 'Postmenopausal', NULL, NULL, '23.1', 'HTAN HTAPP', 'syn42238553', 1), (NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'No', NULL, '21786.0', 'FollowUp', NULL, NULL, NULL, NULL, '0.0', NULL, NULL, NULL, '160.0', NULL, '100.0', NULL, NULL, NULL, NULL, 'TF-Tumor Free', '22112', NULL, NULL, NULL, NULL, NULL, 'syn28260702', '89.4', NULL, NULL, NULL, NULL, '80.0', NULL, NULL, NULL, 'HTA1_322', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '5aaacf0c-4087-488e-aad1-134b669aada5', NULL, NULL, 'Unknown', NULL, NULL, '34.9', 'HTAN HTAPP', 'syn42238553', 1), (NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'No', NULL, '25368.0', 'FollowUp', NULL, NULL, NULL, NULL, '1.0', NULL, NULL, NULL, '188.0', NULL, '72.0', NULL, NULL, NULL, NULL, 'TF-Tumor Free', '27168', NULL, NULL, NULL, NULL, NULL, 'syn28260709', '83.1', NULL, NULL, NULL, NULL, '49.0', NULL, NULL, NULL, 'HTA1_324', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'b2f5a14c-f306-4944-a486-1d367c992f3f', NULL, NULL, 'Not Reported', NULL, NULL, '24.6', 'HTAN HTAPP', 'syn42238553', 1), (NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'No', NULL, '27943.0', 'FollowUp', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '160.0', NULL, '97.0', NULL, NULL, NULL, NULL, 'TF-Tumor Free', '28026', NULL, NULL, NULL, NULL, NULL, 'syn28260713', '52.2', NULL, NULL, NULL, NULL, '76.0', NULL, NULL, NULL, 'HTA1_331', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '85d8dedf-ffad-40bd-bbdb-c614ac537134', NULL, NULL, 'Not Reported', NULL, NULL, '20.37', 'HTAN HTAPP', 'syn42238553', 1);