-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier1_followup_r4_v2`
(
  Imaging_Type STRING OPTIONS(description="The text term used to describe the type of imaging or scan performed on the patient."),
  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."),
  Menopause_Status STRING OPTIONS(description="Text term used to describe the patient's menopause status."),
  Nadir_CD4_Count STRING OPTIONS(description="Numeric value that represents the lowest point to which the CD4 count has dropped (nadir)."),
  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."),
  Height STRING OPTIONS(description="The height of the patient in centimeters."),
  Id STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819"),
  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."),
  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."),
  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."),
  Cause_of_Response STRING OPTIONS(description="The text term used to describe the suspected cause or reason for the patient disease response."),
  Body_Surface_Area STRING OPTIONS(description="Numeric value used to represent the 2-dimensional extent of the body surface relating height to weight."),
  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."),
  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'"),
  Comorbidity_Method_of_Diagnosis STRING OPTIONS(description="The text term used to describe the method used to diagnose the patient's comorbidity disease."),
  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. If not applicable please enter 'Not Applicable'"),
  Reflux_Treatment_Type STRING OPTIONS(description="Text term used to describe the types of treatment used to manage gastroesophageal reflux disease (GERD)."),
  HPV_Positive_Type STRING OPTIONS(description="Text classification to represent the strain or type of human papillomavirus identified in an individual."),
  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'"),
  Disease_Response STRING OPTIONS(description="Code assigned to describe the patient's response or outcome to the disease."),
  Barretts_Esophagus_Goblet_Cells_Present STRING OPTIONS(description="Presence or absennce of Barretts esophagus goblet cells."),
  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"),
  Comorbidity STRING OPTIONS(description="The text term used to describe a comorbidity disease, which coexists with the patient's malignant disease."),
  entityId STRING OPTIONS(description="Synapse ID of entity"),
  BMI STRING OPTIONS(description="A calculated numerical quantity that represents an individual's weight to height ratio."),
  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."),
  Karnofsky_Performance_Status STRING OPTIONS(description="Text term used to describe the classification used of the functional capabilities of a person."),
  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"),
  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"),
  Component STRING OPTIONS(description="Category of metadata (e.g. Diagnosis, Biospecimen, scRNA-seq Level 1, etc.); provide the same one for all items/rows."),
  Immunosuppressive_Treatment_Type STRING OPTIONS(description="The text term used to describe the type of immunosuppresive treatment the patient received."),
  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."),
  HAART_Treatment_Indicator STRING OPTIONS(description="The text term used to indicate whether the patient received Highly Active Antiretroviral Therapy (HAART)."),
  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. If not applicable please enter 'Not Applicable'"),
  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."),
  Hormonal_Contraceptive_Use STRING OPTIONS(description="The text term used to indicate whether the patient used hormonal contraceptives."),
  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."),
  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."),
  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_Result STRING OPTIONS(description="The text term used to describe the result of the imaging or scan performed on the patient."),
  Pregnancy_Outcome STRING OPTIONS(description="The text term used to describe the type of pregnancy the patient had"),
  ECOG_Performance_Status STRING OPTIONS(description="The ECOG functional performance status of the patient/participant."),
  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'"),
  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."),
  Progression_or_Recurrence_Type STRING OPTIONS(description="The text term used to describe the type of progressive or recurrent disease or relapsed disease."),
  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'"),
  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'"),
  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."),
  Pancreatitis_Onset_Year STRING OPTIONS(description="Date of onset of pancreatitis."),
  Hysterectomy_Type STRING OPTIONS(description="The text term used to describe the type of hysterectomy the patient had."),
  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."),
  Weight STRING OPTIONS(description="The weight of the patient measured in kilograms."),
  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."),
  Adverse_Event STRING OPTIONS(description="Text that represents the Common Terminology Criteria for Adverse Events low level term name for an adverse event."),
  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 R4 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 October 2023.  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_r4_v2` (Imaging_Type, Hepatitis_Sustained_Virological_Response, Menopause_Status, Nadir_CD4_Count, DLCO_Ref_Predictive_Percent, Height, Id, Viral_Hepatitis_Serologies, Diabetes_Treatment_Type, CD4_Count, Hysterectomy_Margins_Involved, Cause_of_Response, Body_Surface_Area, Recist_Targeted_Regions_Sum, Days_to_Adverse_Event, Comorbidity_Method_of_Diagnosis, Scan_Tracer_Used, Days_to_Recurrence, Reflux_Treatment_Type, HPV_Positive_Type, Days_to_imaging, Disease_Response, Barretts_Esophagus_Goblet_Cells_Present, Recist_Targeted_Regions_Number, Comorbidity, entityId, BMI, FEV1_FVC_Post_Bronch_Percent, Karnofsky_Performance_Status, Evidence_of_Recurrence_Type, Progression_or_Recurrence_Anatomic_Site, Component, Immunosuppressive_Treatment_Type, CDC_HIV_Risk_Factors, HAART_Treatment_Indicator, HTAN_Participant_ID, Days_to_Follow_Up, FEV_1_FVC_Pre_Bronch_Percent, FEV1_Ref_Post_Bronch_Percent, Hormonal_Contraceptive_Use, FEV1_Ref_Pre_Bronch_Percent, Adverse_Event_Grade, Progression_or_Recurrence, Imaging_Result, Pregnancy_Outcome, ECOG_Performance_Status, Days_to_Comorbidity, Risk_Factor_Treatment, Progression_or_Recurrence_Type, Days_to_Progression, Days_to_Progression_Free, AIDS_Risk_Factors, Pancreatitis_Onset_Year, Hysterectomy_Type, HIV_Viral_Load, Weight, Risk_Factor, Adverse_Event, HTAN_Center, Manifest_Id, Manifest_Version) VALUES ('MRI', NULL, 'Postmenopausal', NULL, NULL, '160.0', '6f13a740-0b2f-4bbb-ad8c-05afeea3e0ae', 'Hepatitis C Antibody', NULL, NULL, 'Not Reported', NULL, NULL, NULL, NULL, 'Unknown', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'syn28274798', '49.98', NULL, NULL, NULL, NULL, 'FollowUp', 'Other', NULL, NULL, 'HTA2_225', '21362', NULL, NULL, 'Never Used', NULL, NULL, 'No', 'Unknown', 'Unknown', NULL, NULL, 'Unknown', NULL, NULL, NULL, NULL, NULL, 'Hysterectomy NOS', NULL, '127.3', NULL, NULL, 'HTAN HTAPP', 'syn42296194', 1), ('MRI', NULL, 'Postmenopausal', NULL, NULL, '165.1', 'ac5b8b10-dc30-4940-840f-38000c517317', 'Hepatitis C Virus RNA', 'Not Reported', NULL, 'Not Reported', NULL, NULL, NULL, NULL, 'Unknown', NULL, NULL, NULL, NULL, NULL, 'Not Reported', NULL, NULL, NULL, 'syn28274801', '21.63', NULL, NULL, NULL, NULL, 'FollowUp', 'Other', NULL, NULL, 'HTA2_229', '23158', NULL, NULL, 'Former User', NULL, NULL, 'No', 'Unknown', 'Not Reported', NULL, NULL, 'Not Reported', NULL, NULL, NULL, NULL, NULL, 'Hysterectomy NOS', NULL, '59.0', 'Not Reported', NULL, 'HTAN HTAPP', 'syn42296194', 1), (NULL, NULL, 'Postmenopausal', NULL, NULL, '160.0', 'c5899c82-04b5-400b-b574-73237a6e4e77', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TF-Tumor Free', NULL, NULL, NULL, 'syn28260696', '23.1', NULL, NULL, NULL, NULL, 'FollowUp', NULL, NULL, NULL, 'HTA1_274', '23583', '76.0', NULL, NULL, '96.0', NULL, 'No', NULL, NULL, '0.0', NULL, NULL, NULL, NULL, '23505.0', NULL, NULL, NULL, NULL, '59.5', NULL, NULL, 'HTAN HTAPP', 'syn42238553', 1), (NULL, NULL, 'Unknown', NULL, NULL, '160.0', '5aaacf0c-4087-488e-aad1-134b669aada5', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TF-Tumor Free', NULL, NULL, NULL, 'syn28260702', '34.9', NULL, NULL, NULL, NULL, 'FollowUp', NULL, NULL, NULL, 'HTA1_322', '22112', '80.0', NULL, NULL, '100.0', NULL, 'No', NULL, NULL, '0.0', NULL, NULL, NULL, NULL, '21786.0', NULL, NULL, NULL, NULL, '89.4', NULL, NULL, 'HTAN HTAPP', 'syn42238553', 1), (NULL, NULL, 'Not Reported', NULL, NULL, '188.0', 'b2f5a14c-f306-4944-a486-1d367c992f3f', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'TF-Tumor Free', NULL, NULL, NULL, 'syn28260709', '24.6', NULL, NULL, NULL, NULL, 'FollowUp', NULL, NULL, NULL, 'HTA1_324', '27168', '49.0', NULL, NULL, '72.0', NULL, 'No', NULL, NULL, '1.0', NULL, NULL, NULL, NULL, '25368.0', NULL, NULL, NULL, NULL, '83.1', NULL, NULL, 'HTAN HTAPP', 'syn42238553', 1);