-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.clinical_tier1_familyhistory_r2`
(
  Relationship_Type STRING OPTIONS(description="The subgroup that describes the state of connectedness between members of the unit of society organized around kinship ties."),
  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 )"),
  Relative_with_Cancer_History STRING OPTIONS(description="The yes/no/unknown indicator used to describe whether any of the patient's relatives have a history of cancer."),
  Relationship_Gender STRING OPTIONS(description="The text term used to describe the gender of the patient's relative with a history of cancer."),
  Relationship_Age_at_Diagnosis STRING OPTIONS(description="The age (in years) when the patient's relative was first diagnosed."),
  Relationship_Primary_Diagnosis STRING OPTIONS(description="The text term used to describe the malignant diagnosis of the patient's relative with a history of cancer."),
  Relatives_with_Cancer_History_Count STRING OPTIONS(description="The number of relatives the patient has with a known history of cancer."),
  Family_Member_Vital_Status_Indicator STRING OPTIONS(description="The response indicates whether the family member of the patient with a history of cancer is alive. (Extension to GDC attributes in Family History Tier 1)"),
  Known_Genetic_Predisposition_Mutation STRING OPTIONS(description="A yes/no/unknown indicator to identify whether there is a known genetic predisposition mutation present in the patient."),
  Hereditary_Cancer_Predisposition_Syndrome STRING OPTIONS(description="History of presence of inherited genetic predisposition syndrome that confers heightened susceptibility to cancer in the patient."),
  Cancer_Associated_Gene_Mutations STRING OPTIONS(description="Type of inherited germline or other gene mutations that confers heightened susceptibility to cancer identified in patient history"),
  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 - FAMILY HISTORY 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_familyhistory_r2` (Relationship_Type, Component, HTAN_Participant_ID, Relative_with_Cancer_History, Relationship_Gender, Relationship_Age_at_Diagnosis, Relationship_Primary_Diagnosis, Relatives_with_Cancer_History_Count, Family_Member_Vital_Status_Indicator, Known_Genetic_Predisposition_Mutation, Hereditary_Cancer_Predisposition_Syndrome, Cancer_Associated_Gene_Mutations, entityId, HTAN_Center, Data_Release) VALUES ('None', 'FamilyHistory', 'HTA1_286', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn28270513', 'HTAN HTAPP', 'Release 2.0'), ('None', 'FamilyHistory', 'HTA1_288', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn28270514', 'HTAN HTAPP', 'Release 2.0'), ('None', 'FamilyHistory', 'HTA1_289', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn28270519', 'HTAN HTAPP', 'Release 2.0'), ('None', 'FamilyHistory', 'HTA9_1', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn24991944', 'HTAN OHSU', 'Release 2.0'), ('None', 'FamilyHistory', 'HTA7_32', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'None', 'syn26486587', 'HTAN HMS', 'Release 2.0');