-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.HTAN_versioned.srrs_biospecimen_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_Biospecimen_ID STRING OPTIONS(description="HTAN ID associated with a biosample based on HTAN ID SOP (eg HTANx_yyy_zzz)"),
  Source_HTAN_Biospecimen_ID STRING OPTIONS(description="This is the HTAN ID that may have been assigned to the biospecimen at the site of biospecimen origin (e.g. BU)."),
  HTAN_Parent_ID STRING OPTIONS(description="HTAN ID of parent from which the biospecimen was obtained. Parent could be another biospecimen or a research participant."),
  Adjacent_Biospecimen_IDs STRING OPTIONS(description="List of HTAN Identifiers (separated by commas) of adjacent biospecimens cut from the same sample; for example HTA3_3000_3, HTA3_3000_4, ..."),
  Biospecimen_Type STRING OPTIONS(description="Biospecimen Type"),
  Assay_Type STRING OPTIONS(description="The type and level of assay this metadata applies to (e.g. RPPA, Nanostring DSP, etc.)"),
  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."),
  Collection_Days_from_Index STRING OPTIONS(description="Number of days from the research participant's index date that the biospecimen was obtained."),
  Acquisition_Method_Type STRING OPTIONS(description="Records the method of acquisition or source for the specimen under consideration."),
  Ischemic_Time STRING OPTIONS(description="Duration of time, in seconds, between when the specimen stopped receiving oxygen and when it was preserved or processed. Integer value."),
  Ischemic_Temperature STRING OPTIONS(description="Specify whether specimen experienced warm or cold ischemia."),
  Collection_Media STRING OPTIONS(description="Material Specimen is collected into post procedure"),
  Topography_Code STRING OPTIONS(description="Topography Code, indicating site within the body, based on ICD-O-3."),
  Additional_Topography STRING OPTIONS(description="Topography not included in the ICD-O-3 Topography codes."),
  Fixative_Type STRING OPTIONS(description="Text term to identify the type of fixative used to preserve a tissue specimen"),
  Storage_Method STRING OPTIONS(description="The method by which a biomaterial was stored after preservation or before another protocol was used."),
  Preinvasive_Morphology STRING OPTIONS(description="Histologic Morphology not included in ICD-O-3 morphology codes, for preinvasive lesions included in the HTAN"),
  Histologic_Morphology_Code STRING OPTIONS(description="Histologic Morphology Code, based on ICD-O-3. Any valid ICD-O-3 morphology code. See https://seer.cancer.gov/icd-o-3/ and https://seer.cancer.gov/icd-o-3/sitetype.icdo3.20200629.xlsx. Examples: 80510"),
  Preservation_Method STRING OPTIONS(description="Text term that represents the method used to preserve the sample."),
  Processing_Days_from_Index STRING OPTIONS(description="Number of days from the research participant's index date that the biospecimen was processed"),
  Protocol_Link STRING OPTIONS(description="Protocols.io ID or DOI link to a free/open protocol resource describing in detail the assay protocol (e.g. surface markers used in Smart-seq, dissociation duration,  lot/batch numbers for key reagents such as primers, sequencing reagent kits, etc.) or the protocol by which the sample was obtained or generated."),
  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 SRRS BIOSPECIMEN DATA R2 VERSIONED",
  description="Data was extracted from HTAN Synapse projects in April 2022.",
  labels=[("access", "open"), ("data_type", "biospecimen"), ("program", "htan"), ("source", "htan"), ("category", "clinical_biospecimen_data"), ("status", "current")]
);

INSERT INTO `isb-cgc-bq.HTAN_versioned.srrs_biospecimen_r2` (Component, HTAN_Biospecimen_ID, Source_HTAN_Biospecimen_ID, HTAN_Parent_ID, Adjacent_Biospecimen_IDs, Biospecimen_Type, Assay_Type, Timepoint_Label, Collection_Days_from_Index, Acquisition_Method_Type, Ischemic_Time, Ischemic_Temperature, Collection_Media, Topography_Code, Additional_Topography, Fixative_Type, Storage_Method, Preinvasive_Morphology, Histologic_Morphology_Code, Preservation_Method, Processing_Days_from_Index, Protocol_Link, entityId, HTAN_Center, Data_Release) VALUES ('SRRSBiospecimen', 'HTA5_1833_1101', 'None', 'HTA5_1833_1011', 'None', 'Tissue Biospecimen Type', 'H&E', 'surgical treatment', '22215', 'Surgical Resection', '4320', 'Warm Ischemia', 'None', 'None', 'None', 'Formalin', 'Ambient temperature', 'None', '8140/3', 'Formalin fixed paraffin embedded - FFPE', 'unknown', 'Unavailable', 'syn26469447', 'HTAN SRRS', 'Release 2.0'), ('SRRSBiospecimen', 'HTA3_11009_15000001', 'None', 'HTA3_11009', 'None', 'Tissue Biospecimen Type', 'H&E', 'surgical treatment', '24028', 'Surgical Resection', 'unknown', 'None', 'None', 'C34.9', 'None', 'Formalin', 'Ambient temperature', 'Severe dysplasia', 'unknown', 'Formalin fixed paraffin embedded - FFPE', '24030', 'dx.doi.org/10.17504/protocols.io.bzuvp6w6', 'syn26452748', 'HTAN SRRS', 'Release 2.0'), ('SRRSBiospecimen', 'HTA3_11009_15000002', 'None', 'HTA3_11009', 'None', 'Tissue Biospecimen Type', 'H&E', 'surgical treatment', '24028', 'Surgical Resection', 'unknown', 'None', 'None', 'C34.9', 'None', 'Formalin', 'Ambient temperature', 'Mild dysplasia', 'unknown', 'Formalin fixed paraffin embedded - FFPE', '24030', 'dx.doi.org/10.17504/protocols.io.bzuvp6w6', 'syn26452749', 'HTAN SRRS', 'Release 2.0'), ('SRRSBiospecimen', 'HTA3_11009_15000003', 'None', 'HTA3_11009', 'None', 'Tissue Biospecimen Type', 'H&E', 'surgical treatment', '24028', 'Surgical Resection', 'unknown', 'None', 'None', 'C34.9', 'None', 'Formalin', 'Ambient temperature', 'Reserve cell hyperplasia', 'unknown', 'Formalin fixed paraffin embedded - FFPE', '24030', 'dx.doi.org/10.17504/protocols.io.bzuvp6w6', 'syn26452750', 'HTAN SRRS', 'Release 2.0'), ('SRRSBiospecimen', 'HTA3_11009_15000004', 'None', 'HTA3_11009', 'None', 'Tissue Biospecimen Type', 'H&E', 'surgical treatment', '24028', 'Surgical Resection', 'unknown', 'None', 'None', 'C34.9', 'None', 'Formalin', 'Ambient temperature', 'None', '8071/3', 'Formalin fixed paraffin embedded - FFPE', 'unknown', 'dx.doi.org/10.17504/protocols.io.bzuvp6w6', 'syn26452751', 'HTAN SRRS', 'Release 2.0');