-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier1_therapy_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 )"),
  Treatment_or_Therapy STRING OPTIONS(description="A yes/no/unknown/not applicable indicator related to the administration of therapeutic agents received."),
  Treatment_Type STRING OPTIONS(description="Text term that describes the kind of treatment administered."),
  Treatment_Effect STRING OPTIONS(description="The text term used to describe the pathologic effect a treatment(s) had on the tumor."),
  Treatment_Outcome STRING OPTIONS(description="Text term that describes the patient's final outcome after the treatment was administered."),
  Days_to_Treatment_End STRING OPTIONS(description="Number of days between the date used for index and the date the treatment ended."),
  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"),
  Days_to_Treatment_Start STRING OPTIONS(description="Number of days between the date used for index and the date the treatment started."),
  Initial_Disease_Status STRING OPTIONS(description="The text term used to describe the status of the patient's malignancy when the treatment began."),
  Regimen_or_Line_of_Therapy STRING OPTIONS(description="The text term used to describe the regimen or line of therapy."),
  Therapeutic_Agents STRING OPTIONS(description="Text identification of the individual agent(s) used as part of a treatment regimen."),
  Treatment_Intent_Type STRING OPTIONS(description="Text term to identify the reason for the administration of a treatment regimen. [Manually-curated]"),
  Chemo_Concurrent_to_Radiation STRING OPTIONS(description="The text term used to describe whether the patient was receiving chemotherapy concurrent to radiation."),
  Number_of_Cycles STRING OPTIONS(description="The numeric value used to describe the number of cycles of a specific treatment or regimen the patient received."),
  Reason_Treatment_Ended STRING OPTIONS(description="The text term used to describe the reason a specific treatment or regimen ended."),
  Treatment_Arm STRING OPTIONS(description="Text term used to describe the treatment arm assigned to a patient at the time eligibility is determined."),
  Treatment_Dose STRING OPTIONS(description="The numeric value used to describe the dose of an agent the patient received."),
  Treatment_Dose_Units STRING OPTIONS(description="The text term used to describe the dose units of an agent the patient received."),
  Treatment_Effect_Indicator STRING OPTIONS(description="The text term used to indicate whether the treatment had an effect on the patient."),
  Treatment_Frequency STRING OPTIONS(description="The text term used to describe the frequency the patient received an agent or regimen."),
  Prior_Sites_of_Radiation STRING OPTIONS(description="The anatomic location to which radiation treatment was administered to a patient prior to enrollment on a protocol."),
  Immunosuppression STRING OPTIONS(description="The indicator that describes whether or not immunosuppressive therapy was administered."),
  Concomitant_Medication_Received_Type STRING OPTIONS(description="An enumerated list of the type of concomitant medication received by the patient."),
  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 - THERAPY 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_therapy_r2` (Component, HTAN_Participant_ID, Treatment_or_Therapy, Treatment_Type, Treatment_Effect, Treatment_Outcome, Days_to_Treatment_End, Treatment_Anatomic_Site, Days_to_Treatment_Start, Initial_Disease_Status, Regimen_or_Line_of_Therapy, Therapeutic_Agents, Treatment_Intent_Type, Chemo_Concurrent_to_Radiation, Number_of_Cycles, Reason_Treatment_Ended, Treatment_Arm, Treatment_Dose, Treatment_Dose_Units, Treatment_Effect_Indicator, Treatment_Frequency, Prior_Sites_of_Radiation, Immunosuppression, Concomitant_Medication_Received_Type, entityId, HTAN_Center, Data_Release) VALUES ('Therapy', 'HTA1_962', 'Yes', 'Chemotherapy', 'None', 'None', '29064.0', 'None', '29001.0', 'None', 'None', 'Carboplatin', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn25882794', 'HTAN HTAPP', 'Release 2.0'), ('Therapy', 'HTA1_962', 'Yes', 'Chemotherapy', 'None', 'None', '29064.0', 'None', '29001.0', 'None', 'None', 'Pemetrexed', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn25882795', 'HTAN HTAPP', 'Release 2.0'), ('Therapy', 'HTA7_966', 'Yes', 'Chemotherapy', 'None', 'None', 'None', 'None', 'None', 'Initial Diagnosis', 'None', 'CI, Fluorouracil', 'None', 'Yes', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn26546848', 'HTAN HMS', 'Release 2.0'), ('Therapy', 'HTA7_914', 'Yes', 'Chemotherapy', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'Fluorouracil, Leucovorin, Cepcitabine', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn26708525', 'HTAN HMS', 'Release 2.0'), ('Therapy', 'HTA7_915', 'Yes', 'Chemotherapy', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'Fluorouracil, Leucovorin', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn26708526', 'HTAN HMS', 'Release 2.0');