-- DBMS: bigquery
CREATE TABLE `isb-cgc-bq.CPTAC.clinical_diagnosis_proteogenomic_translational_research_centers_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)"),
  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)"),
  diagnosis_is_primary_disease BOOL OPTIONS(description="Indicates whether this specific diagnosis represents the disease that was the primary focus of the study. Additionally, this diagnosis is reflected at the case level, which is captured using the case.disease_type property."),
  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"),
  classification_of_tumor STRING OPTIONS(description="Text that describes the kind of disease present in the tumor specimen as related to a specific timepoint"),
  last_known_disease_status STRING OPTIONS(description="Text term that describes the last known state or condition of an individual's neoplasm"),
  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"),
  progression_or_recurrence BOOL OPTIONS(description="Yes/No/Unknown indicator to identify whether a patient has had a new tumor event after initial treatment"),
  site_of_resection_or_biopsy 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)"),
  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_grade STRING OPTIONS(description="Numeric value to express the degree of abnormality of cancer cells, a measure of differentiation and aggressiveness"),
  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="PROTEOGENOMIC TRANSLATIONAL RESEARCH CENTERS (PTRC) CLINICAL DATA - DIAGNOSIS",
  description="Clinical data was extracted from file metadata information for proteogenomic_translational_research_centers 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", "cptac3"), ("category", "clinical_biospecimen_data"), ("status", "current"), ("version", "v4_3")]
);

INSERT INTO `isb-cgc-bq.CPTAC.clinical_diagnosis_proteogenomic_translational_research_centers_pdc_current` (case_id, case_submitter_id, project_submitter_id, diagnosis_id, diagnosis_submitter_id, primary_diagnosis, diagnosis_is_primary_disease, age_at_diagnosis, days_to_last_follow_up, days_to_last_known_disease_status, days_to_recurrence, classification_of_tumor, last_known_disease_status, morphology, progression_or_recurrence, site_of_resection_or_biopsy, tissue_or_organ_of_origin, tumor_grade, tumor_stage) VALUES ('288bfe73-2ba8-4c55-b513-17d67414e846', '2460', 'Proteogenomic Translational Research Centers (PTRC)', '4b634acc-a526-4683-823f-20347e58e3c0', '2460-DX', 'Acute myeloid leukemia, t(16;16)(p 13;q 11)', True, 13346, 2075, NULL, NULL, NULL, 'With tumor', NULL, NULL, 'Blood', 'Bone marrow', NULL, NULL), ('e44381c2-7b6e-45ee-9f8a-917880100d9d', '2360', 'Proteogenomic Translational Research Centers (PTRC)', '7dd35e3c-2185-40a3-92a1-1c664ea2e4b9', '2360-DX', 'Myeloid leukemia associated with Down Syndrome', True, 2985, 2327, NULL, NULL, NULL, 'Tumor free', NULL, NULL, 'Blood', 'Bone marrow', NULL, NULL), ('b7ab6864-ee5e-4a02-a970-a9ad26436f47', '1553', 'Proteogenomic Translational Research Centers (PTRC)', '59dc814e-3f4e-4bd8-b48d-35033eb52b11', '1553-DX', 'Myelodysplastic syndrome, NOS', True, 14345, 392, NULL, NULL, NULL, 'Tumor free', NULL, NULL, 'Bone marrow', 'Bone marrow', NULL, NULL), ('fd194bdf-5e2e-4f29-b973-f86d58746c7e', '1648', 'Proteogenomic Translational Research Centers (PTRC)', '9986ef96-d307-4b7c-b21a-bd1dfbe0b986', '1648-DX', 'Acute myeloid leukemia with t(9;11)(p22;q23); MLLT3-MLL', True, 25444, 0, NULL, NULL, NULL, 'With tumor', NULL, NULL, 'Bone marrow', 'Bone marrow', NULL, NULL), ('35c525e8-a1c4-49d7-9511-273a0c174e9c', '939', 'Proteogenomic Translational Research Centers (PTRC)', 'c0b94d44-7fda-452c-ab23-d9b663e0d008', '939-DX', 'Undifferentiated leukemia', True, 12560, 3022, NULL, NULL, NULL, 'Tumor free', NULL, NULL, 'Bone marrow', 'Bone marrow', NULL, NULL);