-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.CPTAC.clinical_CPTAC_2_pdc_current`
(
  case_id STRING OPTIONS(description="Unique identifier associated with a specific patient (e.g. 24cb0fcb-63d6-11e8-bcf1-0a2705229b82)"),
  case_submitter_id STRING OPTIONS(description="Unique identifier deriving from the data submitter that is associated with a specific patient (e.g. 05BR016)"),
  project_submitter_id STRING OPTIONS(description="Unique identifier deriving from the data submitter that is associated with a specific project (e.g. CPTAC3-Discovery)"),
  primary_site STRING OPTIONS(description="The text term used to describe the general location of the malignant disease, as categorized by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  disease_type STRING OPTIONS(description="The text term used to describe the type of malignant disease, as categorized by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  demographic_id STRING OPTIONS(description="Unique identifier attributed to data for the characterization of the patient by means of segmenting the population--for instance, characterization by age, sex, or race (e.g. 848b480c-0f56-11e9-a064-0a9c39d33490)"),
  demographic_submitter_id STRING OPTIONS(description="Unique identifier deriving from data submitter that is attributed to data for the characterization of the patient by means of segmenting the population (e.g., characterization by age, sex, or race) (e.g. P001-DM)"),
  race STRING OPTIONS(description="An arbitrary classification of a taxonomic group that is a division of a species; the provided values are based on the categories defined by the U.S. Office of Management and Business and used by the U.S. Census Bureau"),
  ethnicity STRING OPTIONS(description="An individual's self-described social and cultural grouping, specifically whether an individual describes themselves as Hispanic or Latino, based on the categories defined by the U.S. Office of Management and Business and used by the U.S. Census Bureau"),
  gender STRING OPTIONS(description="Text designations that identify gender; identification is self-reported and may come from a form, questionnaire, interview, etc."),
  diagnosis_id STRING OPTIONS(description="Unique identifier for data from the investigation, analysis and recognition of the presence and nature of disease, condition, or injury from expressed signs and symptoms; also, the scientific determination of any kind; the concise results of such an investigation (e.g. e8dd475b-693a-11ea-b1fd-0aad30af8a83)"),
  diagnosis_submitter_id STRING OPTIONS(description="Unique identifier deriving from data submitter attributed to data from the investigation, analysis and recognition of the presence and nature of disease, condition, or injury from expressed signs and symptoms; also, the scientific determination of any kind; the concise results of such an investigation (e.g. 33-DX)"),
  primary_diagnosis STRING OPTIONS(description="Text term used to describe the patient's histologic diagnosis, as described by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  age_at_diagnosis INT64 OPTIONS(description="Age at the time of diagnosis expressed in number of days since birth"),
  days_to_last_follow_up INT64 OPTIONS(description="Time interval from the date of last follow up to the date of initial pathologic diagnosis, represented as a calculated number of days"),
  days_to_last_known_disease_status INT64 OPTIONS(description="Time interval from the date of last follow up to the date of initial pathologic diagnosis, represented as a calculated number of days"),
  days_to_recurrence INT64 OPTIONS(description="Number of days between the date used for index and the date the patient's disease recurred"),
  ajcc_pathologic_stage STRING OPTIONS(description="The extent of a cancer, especially whether the disease has spread from the original site to other parts of the body based on AJCC staging criteria"),
  figo_stage STRING OPTIONS(description="The extent of a cervical or endometrial cancer within the body, especially whether the disease has spread from the original site to other parts of the body, as described by the International Federation of Gynecology and Obstetrics (FIGO) stages"),
  morphology STRING OPTIONS(description="The third edition of the International Classification of Diseases for Oncology, published in 2000 used principally in tumor and cancer registries for coding the site (topography) and the histology (morphology) of neoplasms. The study of the structure of the cells and their arrangement to constitute tissues and, finally, the association among these to form organs. In pathology, the microscopic process of identifying normal and abnormal morphologic characteristics in tissues, by employing various cytochemical and immunocytochemical stains. A system of numbered categories for representation of data"),
  prior_malignancy BOOL OPTIONS(description="The yes/no/unknown indicator used to describe the patient's history of prior cancer diagnosis"),
  tissue_or_organ_of_origin STRING OPTIONS(description="The text term used to describe the anatomic site of origin, of the patient's malignant disease, as described by the World Health Organization's (WHO) International Classification of Diseases for Oncology (ICD-O)"),
  tumor_stage STRING OPTIONS(description="The extent of a cancer in the body. Staging is usually based on the size of the tumor, whether lymph nodes contain cancer, and whether the cancer has spread from the original site to other parts of the body. The accepted values for tumor_stage depend on the tumor site, type, and accepted staging system. These items should accompany the tumor_stage value as associated metadata")
)
OPTIONS(
  friendly_name="CPTAC2 CLINICAL DATA",
  description="Clinical data was extracted from file metadata information for CPTAC_2 provided by CDA in August 2024 from the PDC release V4.3.",
  labels=[("access", "open"), ("data_type", "clinical_data"), ("source_0", "cda"), ("source_1", "pdc"), ("program", "cptac2"), ("category", "clinical_biospecimen_data"), ("status", "current"), ("version", "v4_3")]
);

INSERT INTO `isb-cgc-bq.CPTAC.clinical_CPTAC_2_pdc_current` (case_id, case_submitter_id, project_submitter_id, primary_site, disease_type, demographic_id, demographic_submitter_id, race, ethnicity, gender, diagnosis_id, diagnosis_submitter_id, primary_diagnosis, age_at_diagnosis, days_to_last_follow_up, days_to_last_known_disease_status, days_to_recurrence, ajcc_pathologic_stage, figo_stage, morphology, prior_malignancy, tissue_or_organ_of_origin, tumor_stage) VALUES ('09433645-87bd-4063-9586-2686aba4ed00', 'JX0052', 'CPTAC2 Retrospective', NULL, 'Other', '23bbecd3-decf-4794-b911-c49e6f969151', 'JX0052-DM', NULL, NULL, NULL, '7aa6a559-ccad-49f3-a6fc-f343921b94d4', 'JX0052-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('6b882756-f4dd-4ced-8d22-61a123dfc3f1', 'JX0150', 'CPTAC2 Retrospective', NULL, 'Other', '52e228b0-ecf8-4686-8614-49e1bac994a0', 'JX0150-DM', NULL, NULL, NULL, 'e928c647-e667-4334-ae3f-d40a6b0e7cbd', 'JX0150-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('7166b8a0-f458-434a-b675-dc42b0bc3ee9', 'JX0076', 'CPTAC2 Retrospective', NULL, 'Other', 'b7c50ba2-4739-43ec-a552-ee4e9f06db5b', 'JX0076-DM', NULL, NULL, NULL, '582bb47f-fdb4-42ce-8a2c-a27b8c24b5d8', 'JX0076-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('8740338c-97ec-45e2-99e1-4cca2af50d57', 'JX0088', 'CPTAC2 Retrospective', NULL, 'Other', '2538e64b-524a-491c-a840-2581e9d046a6', 'JX0088-DM', NULL, NULL, NULL, '271146d3-9f40-4714-b8de-3ec5c440f1bf', 'JX0088-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), ('b7dd9263-594e-4fc7-b808-d09fef308f04', 'JX0169', 'CPTAC2 Retrospective', NULL, 'Other', '46a37112-d63e-49ee-a597-eb1ccc80596d', 'JX0169-DM', NULL, NULL, NULL, '6b5f5746-6c08-4f9a-b6a1-c4f67483e4c0', 'JX0169-DX', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);