-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier3_breast_r3`
(
  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 )"),
  Timepoint_Label STRING OPTIONS(description="Label to identify the time point at which the clinical data or biospecimen was obtained (e.g. Baseline, End of Treatment, Overall survival, Final). NO PHI/PII INFORMATION IS ALLOWED."),
  Start_Days_from_Index STRING OPTIONS(description="Number of days from the date of birth (index date) to the date of an event (e.g. exposure to environmental factor, treatment start, etc.). If not applicable please enter 'Not Applicable'"),
  Stop_Days_from_Index STRING OPTIONS(description="Number of days from the date of birth (index date) to the end date of the event (e.g. exposure to environmental factor, treatment start, etc.). Note: if the event occurs at a single time point, e.g. a diagnosis or a lab test, the values for this column is 'Not Applicable'"),
  Breast_Carcinoma_Detection_Method_Type STRING OPTIONS(description="The means, manner of procedure, or systematic course of actions performed in order to discover or identify breast cancer."),
  Breast_Carcinoma_Histology_Category STRING OPTIONS(description="Classification of the type of invasive breast carcinoma diagnosed based on histologic attributes."),
  Invasive_Lobular_Breast_Carcinoma_Histologic_Category STRING OPTIONS(description="The histologic subtype for an infiltrating lobular carcinoma of the breast."),
  Invasive_Ductal_Breast_Carcinoma_Histologic_Category STRING OPTIONS(description="The histologic subtype for the most common type of invasive breast carcinoma."),
  Breast_Biopsy_Procedure_Finding_Type STRING OPTIONS(description="Text term to describe the result of the examination of the breast tissue specimen or fluid as related to the presence and nature of disease."),
  Breast_Quadrant_Site STRING OPTIONS(description="The breast quadrant or structure from which the breast tissue specimen was removed for microscopic examination."),
  Breast_Cancer_Assessment_Tests STRING OPTIONS(description="Text term to identify assessment tests done in participants during diagnosis"),
  Breast_Cancer_Genomic_Test_Performed STRING OPTIONS(description="Text term that represents the name of the genomic test performed for breast cancer."),
  Mammaprint_Risk_Group STRING OPTIONS(description="Text term that represents the risk group for breast cancer as determined by assessment of the MammaPrint test."),
  Oncotype_Risk_Group STRING OPTIONS(description="Text term that represents the risk group for breast cancer as determined by assessment of the Oncotype recurrence score."),
  Breast_Carcinoma_Estrogen_Receptor_Status STRING OPTIONS(description="Text term to represent the overall result of Estrogen Receptor (ER) testing in a participant with breast cancer"),
  Breast_Carcinoma_Progesteroner_Receptor_Status STRING OPTIONS(description="Text term to represent the overall result of Progresterone Receptor (PR) testing in a participant with breast cancer"),
  Breast_Cancer_Allred_Estrogen_Receptor_Score STRING OPTIONS(description="The numeric Allred score, that is cell staining percentage plus intensity, to determine estrogen receptor status."),
  Prior_Invasive_Breast_Disease STRING OPTIONS(description="Text term to indicate prior invasive breast condition in the participant"),
  Breast_Carcinoma_ER_Status_Percentage_Value STRING OPTIONS(description="A numerical quantity measured or assigned or computed which captures the estrogen receptor level measured in a participant with breast cancer"),
  Breast_Carcinoma_PR_Status_Percentage_Value STRING OPTIONS(description="A numerical quantity measured or assigned or computed which captures the progesterone receptor level measured in a participant with breast cancer"),
  HER2_Breast_Carcinoma_Copy_Number_Total STRING OPTIONS(description="Result of HER2 Copy Number testing (in a participant with breast cancer), expressed as a range of values."),
  Breast_Carcinoma_Centromere_17_Copy_Number STRING OPTIONS(description="Result of Centromere 17 testing in a sample or specimen of metastatic breast carcinoma, expressed as a range of values."),
  Breast_Carcinoma_HER2_Centromere17_Copynumber_Total STRING OPTIONS(description="Number of Cells Counted for HER2 & Centromere 17 Copy Numbers in a participant with breast cancer"),
  Breast_Carcinoma_HER2_Chromosome17_Ratio STRING OPTIONS(description="HER2 chromosome 17 ratio in participants with breast cancer"),
  Breast_Carcinoma_Surgical_Procedure_Name STRING OPTIONS(description="Text name of a surgical procedure performed for a person with a diagnosis of breast cancer"),
  Breast_Carcinoma_HER2_Ratio_Diagnosis STRING OPTIONS(description="HER2 ratio of the participant at diagnosis"),
  Breast_Carcinoma_HER2_Status STRING OPTIONS(description="Text term to signify the result of the medical procedure that involves testing a sample of blood or tissue for HER2 in a participant with breast cancer"),
  Hormone_Therapy_Breast_Cancer_Prevention_Indicator STRING OPTIONS(description="Did the patient receive hormonal therapy for prevention of breast cancer?"),
  Breast_Carcinoma_ER_Staining_Intensity STRING OPTIONS(description="Text term to indicate the ER staining intensity on pathology assessment in a participant with breast cancer"),
  Breast_Carcinoma_PR_Staining_Intensity STRING OPTIONS(description="Text term to indicate the PR staining intensity on pathology assessment in a participant with breast cancer"),
  Oncotype_Score STRING OPTIONS(description="OncotypeDX recurrence score"),
  Breast_Imaging_Performed_Type STRING OPTIONS(description="The kind of technology or method performed for screening, diagnosis, surgical procedures or therapy that aids in the visualization of the breast(s)."),
  Multifocal_Breast_Carcinoma_Present_Indicator STRING OPTIONS(description="A response to indicate if there is breast cancer characterized by the presence of multiple cancerous tumors that originate from the same clone and usually located in the same quadrant of the breast."),
  Multicentric_Breast_Carcinoma_Present_Indicator STRING OPTIONS(description="A response to indicate if there is breast cancer characterized by the presence of multiple cancerous tumors that originate from different clones and usually located in different quadrants of the breast."),
  BIRADS_Mammography_Breast_Density_Category STRING OPTIONS(description="The category that describes the relative amount of different tissues present in the breast on a mammogram based on the updated 2015 edition of the American College of Radiology's Breast Imaging Reporting and Data System (BI-RADS) reporting guidelines."),
  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"),
  Manifest_Version INT64 OPTIONS(description="Latest version of metadata manifest"),
  Uuid STRING OPTIONS(description="Unique identifier of entity e.g. a96059eb-81af-4b24-ae50-9242c0d8f819")
)
OPTIONS(
  friendly_name="HTAN CLINICAL TIER 3 DATA - BREAST R3 VERSIONED",
  description="This table contains third tier disease-agnostic extensions to the GDC clinical data model. Data was extracted from HTAN Synapse projects in April 2023 and contains 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_tier3_breast_r3` (Component, HTAN_Participant_ID, Timepoint_Label, Start_Days_from_Index, Stop_Days_from_Index, Breast_Carcinoma_Detection_Method_Type, Breast_Carcinoma_Histology_Category, Invasive_Lobular_Breast_Carcinoma_Histologic_Category, Invasive_Ductal_Breast_Carcinoma_Histologic_Category, Breast_Biopsy_Procedure_Finding_Type, Breast_Quadrant_Site, Breast_Cancer_Assessment_Tests, Breast_Cancer_Genomic_Test_Performed, Mammaprint_Risk_Group, Oncotype_Risk_Group, Breast_Carcinoma_Estrogen_Receptor_Status, Breast_Carcinoma_Progesteroner_Receptor_Status, Breast_Cancer_Allred_Estrogen_Receptor_Score, Prior_Invasive_Breast_Disease, Breast_Carcinoma_ER_Status_Percentage_Value, Breast_Carcinoma_PR_Status_Percentage_Value, HER2_Breast_Carcinoma_Copy_Number_Total, Breast_Carcinoma_Centromere_17_Copy_Number, Breast_Carcinoma_HER2_Centromere17_Copynumber_Total, Breast_Carcinoma_HER2_Chromosome17_Ratio, Breast_Carcinoma_Surgical_Procedure_Name, Breast_Carcinoma_HER2_Ratio_Diagnosis, Breast_Carcinoma_HER2_Status, Hormone_Therapy_Breast_Cancer_Prevention_Indicator, Breast_Carcinoma_ER_Staining_Intensity, Breast_Carcinoma_PR_Staining_Intensity, Oncotype_Score, Breast_Imaging_Performed_Type, Multifocal_Breast_Carcinoma_Present_Indicator, Multicentric_Breast_Carcinoma_Present_Indicator, BIRADS_Mammography_Breast_Density_Category, entityId, HTAN_Center, Data_Release, Manifest_Version, Uuid) VALUES ('BreastCancerTier3', 'HTA9_1', 'Primary Resection', '23281', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Positive', 'Negative', NULL, NULL, '10.6', '5.0', NULL, NULL, NULL, NULL, NULL, NULL, 'Negative', NULL, 'unknown', NULL, NULL, NULL, NULL, NULL, NULL, 'syn24983455', 'HTAN OHSU', 'Release 2.0', 5, '640a6afe-fd1c-41a2-8b8a-fb1fd75fddff'), ('BreastCancerTier3', 'HTA9_1', 'Biopsy 1', '25726', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Positive', 'Negative', NULL, NULL, '95.0', '0.0', NULL, NULL, NULL, NULL, NULL, NULL, 'Negative', NULL, 'Strong', NULL, NULL, NULL, NULL, NULL, NULL, 'syn24983456', 'HTAN OHSU', 'Release 2.0', 5, 'a1b2b00a-1133-433b-b6a2-60d1609f81a4'), ('BreastCancerTier3', 'HTA9_1', 'Biopsy 2', '25969', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Positive', 'Negative', NULL, NULL, '95.0', '0.0', NULL, NULL, NULL, NULL, NULL, NULL, 'Negative', NULL, 'Strong', NULL, NULL, NULL, NULL, NULL, NULL, 'syn24983457', 'HTAN OHSU', 'Release 2.0', 5, '9b9c582c-cd9b-41db-80e4-cccea75db717'), ('BreastCancerTier3', 'HTA9_1', 'Biopsy 4', '26999', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Positive', 'Negative', NULL, NULL, '100.0', '0.0', NULL, NULL, NULL, NULL, NULL, NULL, 'Negative', NULL, 'unknown', NULL, NULL, NULL, NULL, NULL, NULL, 'syn24983459', 'HTAN OHSU', 'Release 2.0', 5, 'ed3f277f-5a2f-459f-beec-f45be5405abb'), ('BreastCancerTier3', 'HTA9_1', 'Biopsy 5', '27484', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Positive', 'Negative', NULL, NULL, '100.0', '0.0', NULL, NULL, NULL, NULL, NULL, NULL, 'Negative', NULL, 'unknown', NULL, NULL, NULL, NULL, NULL, NULL, 'syn29401121', 'HTAN OHSU', 'Release 2.0', 5, '41bbe72f-6ec6-4190-993c-4e8272041906');