From 99439a43888e9da354a3120b16f28579bebed7d4 Mon Sep 17 00:00:00 2001 From: Clair Blacketer Date: Fri, 26 Oct 2018 10:27:19 -0400 Subject: [PATCH] Fixes #221 --- Impala/OMOP CDM impala ddl.txt | 2 +- Netezza/OMOP CDM netezza ddl.txt | 2 +- Oracle/OMOP CDM oracle ddl.txt | 2 +- ParallelDataWarehouse/OMOP CDM pdw ddl.txt | 64 +++++++++++----------- PostgreSQL/OMOP CDM postgresql ddl.txt | 54 +++++++++--------- Redshift/OMOP CDM redshift ddl.txt | 48 ++++++++-------- 6 files changed, 86 insertions(+), 86 deletions(-) diff --git a/Impala/OMOP CDM impala ddl.txt b/Impala/OMOP CDM impala ddl.txt index b67bd43..499c49b 100644 --- a/Impala/OMOP CDM impala ddl.txt +++ b/Impala/OMOP CDM impala ddl.txt @@ -279,7 +279,7 @@ CREATE TABLE visit_occurrence admitted_from_source_value VARCHAR(50), discharge_to_source_value VARCHAR(50) , discharge_to_concept_id INTEGER , - preceding_visit_occurrence_id INTEGER + preceding_visit_occurrence_id BIGINT ) ; diff --git a/Netezza/OMOP CDM netezza ddl.txt b/Netezza/OMOP CDM netezza ddl.txt index 59cfa3a..bedcdff 100644 --- a/Netezza/OMOP CDM netezza ddl.txt +++ b/Netezza/OMOP CDM netezza ddl.txt @@ -306,7 +306,7 @@ CREATE TABLE visit_occurrence admitted_from_source_value VARCHAR(50) NULL , discharge_to_source_value VARCHAR(50) NULL , discharge_to_concept_id INTEGER NOT NULL , - preceding_visit_occurrence_id INTEGER NULL + preceding_visit_occurrence_id BIGINT NULL ) DISTRIBUTE ON (person_id); diff --git a/Oracle/OMOP CDM oracle ddl.txt b/Oracle/OMOP CDM oracle ddl.txt index dea2cf8..705a7a2 100644 --- a/Oracle/OMOP CDM oracle ddl.txt +++ b/Oracle/OMOP CDM oracle ddl.txt @@ -291,7 +291,7 @@ CREATE TABLE visit_occurrence admitted_from_source_value VARCHAR(50) NULL , discharge_to_source_value VARCHAR(50) NULL , discharge_to_concept_id INTEGER NOT NULL , - preceding_visit_occurrence_id INTEGER NULL + preceding_visit_occurrence_id NUMBER(19) NULL ) ; diff --git a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt index 1ca56e5..a242e59 100644 --- a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt +++ b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt @@ -234,9 +234,9 @@ person ( death_datetime DATETIME2 NULL, race_concept_id INTEGER NOT NULL, ethnicity_concept_id INTEGER NOT NULL, - location_id INTEGER NULL, - provider_id INTEGER NULL, - care_site_id INTEGER NULL, + location_id BIGINT NULL, + provider_id BIGINT NULL, + care_site_id BIGINT NULL, person_source_value VARCHAR(50) NULL, gender_source_value VARCHAR(50) NULL, gender_source_concept_id INTEGER NOT NULL, @@ -301,7 +301,7 @@ visit_occurrence ( admitted_from_source_value VARCHAR(50) NULL , discharge_to_source_value VARCHAR(50) NULL , discharge_to_concept_id INTEGER NOT NULL , - preceding_visit_occurrence_id INTEGER NULL + preceding_visit_occurrence_id BIGINT NULL ) WITH (DISTRIBUTION = HASH(person_id)); @@ -317,8 +317,8 @@ visit_detail ( visit_detail_end_date DATE NULL , visit_detail_end_datetime DATETIME2 NOT NULL , visit_detail_type_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL , - care_site_id INTEGER NULL , + provider_id BIGINT NULL , + care_site_id BIGINT NULL , discharge_to_concept_id INTEGER NOT NULL , admitted_from_concept_id INTEGER NOT NULL , admitted_from_source_value VARCHAR(50) NULL , @@ -343,9 +343,9 @@ procedure_occurrence ( procedure_type_concept_id INTEGER NOT NULL , modifier_concept_id INTEGER NOT NULL , quantity INTEGER NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , procedure_source_value VARCHAR(50) NULL , procedure_source_concept_id INTEGER NOT NULL , modifier_source_value VARCHAR(50) NULL @@ -372,9 +372,9 @@ drug_exposure ( sig VARCHAR(1000) NULL , route_concept_id INTEGER NOT NULL , lot_number VARCHAR(50) NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , drug_source_value VARCHAR(50) NULL , drug_source_concept_id INTEGER NOT NULL , route_source_value VARCHAR(50) NULL , @@ -396,9 +396,9 @@ device_exposure ( device_type_concept_id INTEGER NOT NULL , unique_device_id VARCHAR(50) NULL , quantity INTEGER NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , device_source_value VARCHAR(100) NULL , device_source_concept_id INTEGER NOT NULL ) @@ -411,19 +411,19 @@ condition_occurrence ( condition_occurrence_id BIGINT NOT NULL , person_id BIGINT NOT NULL , condition_concept_id INTEGER NOT NULL , - condition_start_date DATE NULL , + condition_start_date DATE NULL , condition_start_datetime DATETIME2 NOT NULL , - condition_end_date DATE NULL , + condition_end_date DATE NULL , condition_end_datetime DATETIME2 NULL , condition_type_concept_id INTEGER NOT NULL , condition_status_concept_id INTEGER NOT NULL , - stop_reason VARCHAR(20) NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , - condition_source_value VARCHAR(50) NULL , + stop_reason VARCHAR(20) NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , + condition_source_value VARCHAR(50) NULL , condition_source_concept_id INTEGER NOT NULL , - condition_status_source_value VARCHAR(50) NULL + condition_status_source_value VARCHAR(50) NULL ) WITH (DISTRIBUTION = HASH(person_id)); @@ -444,9 +444,9 @@ measurement ( unit_concept_id INTEGER NULL , range_low FLOAT NULL , range_high FLOAT NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , measurement_source_value VARCHAR(50) NULL , measurement_source_concept_id INTEGER NOT NULL , unit_source_value VARCHAR(50) NULL , @@ -470,9 +470,9 @@ note ( note_text VARCHAR(1000) NULL , encoding_concept_id INTEGER NOT NULL , language_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , note_source_value VARCHAR(50) NULL ) WITH (DISTRIBUTION = HASH(person_id)); @@ -513,7 +513,7 @@ observation ( value_as_concept_id INTEGER NULL , qualifier_concept_id INTEGER NULL , unit_concept_id INTEGER NULL , - provider_id INTEGER NULL , + provider_id BIGINT NULL , visit_occurrence_id BIGINT NULL , visit_detail_id BIGINT NULL , observation_source_value VARCHAR(50) NULL , @@ -682,8 +682,8 @@ WITH (DISTRIBUTION = HASH(person_id)); --HINT DISTRIBUTE ON KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE cost ( - cost_id BIGINT NOT NULL , - person_id BIGINT NOT NULL, + cost_id BIGINT NOT NULL , + person_id BIGINT NOT NULL, cost_event_id BIGINT NOT NULL , cost_event_field_concept_id INTEGER NOT NULL , cost_concept_id INTEGER NOT NULL , diff --git a/PostgreSQL/OMOP CDM postgresql ddl.txt b/PostgreSQL/OMOP CDM postgresql ddl.txt index e2556e7..310d075 100644 --- a/PostgreSQL/OMOP CDM postgresql ddl.txt +++ b/PostgreSQL/OMOP CDM postgresql ddl.txt @@ -235,9 +235,9 @@ CREATE TABLE person death_datetime TIMESTAMP NULL, race_concept_id INTEGER NOT NULL, ethnicity_concept_id INTEGER NOT NULL, - location_id INTEGER NULL, - provider_id INTEGER NULL, - care_site_id INTEGER NULL, + location_id BIGINT NULL, + provider_id BIGINT NULL, + care_site_id BIGINT NULL, person_source_value VARCHAR(50) NULL, gender_source_value VARCHAR(50) NULL, gender_source_concept_id INTEGER NOT NULL, @@ -294,15 +294,15 @@ CREATE TABLE visit_occurrence visit_end_date DATE NULL , visit_end_datetime TIMESTAMP NOT NULL , visit_type_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL, - care_site_id INTEGER NULL, + provider_id BIGINT NULL, + care_site_id BIGINT NULL, visit_source_value VARCHAR(50) NULL, visit_source_concept_id INTEGER NOT NULL , admitted_from_concept_id INTEGER NOT NULL , admitted_from_source_value VARCHAR(50) NULL , discharge_to_source_value VARCHAR(50) NULL , discharge_to_concept_id INTEGER NOT NULL , - preceding_visit_occurrence_id INTEGER NULL + preceding_visit_occurrence_id BIGINT NULL ) ; @@ -318,8 +318,8 @@ CREATE TABLE visit_detail visit_detail_end_date DATE NULL , visit_detail_end_datetime TIMESTAMP NOT NULL , visit_detail_type_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL , - care_site_id INTEGER NULL , + provider_id BIGINT NULL , + care_site_id BIGINT NULL , discharge_to_concept_id INTEGER NOT NULL , admitted_from_concept_id INTEGER NOT NULL , admitted_from_source_value VARCHAR(50) NULL , @@ -344,9 +344,9 @@ CREATE TABLE procedure_occurrence procedure_type_concept_id INTEGER NOT NULL , modifier_concept_id INTEGER NOT NULL , quantity INTEGER NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , procedure_source_value VARCHAR(50) NULL , procedure_source_concept_id INTEGER NOT NULL , modifier_source_value VARCHAR(50) NULL @@ -373,9 +373,9 @@ CREATE TABLE drug_exposure sig TEXT NULL , route_concept_id INTEGER NOT NULL , lot_number VARCHAR(50) NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , drug_source_value VARCHAR(50) NULL , drug_source_concept_id INTEGER NOT NULL , route_source_value VARCHAR(50) NULL , @@ -397,9 +397,9 @@ CREATE TABLE device_exposure device_type_concept_id INTEGER NOT NULL , unique_device_id VARCHAR(50) NULL , quantity INTEGER NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , device_source_value VARCHAR(100) NULL , device_source_concept_id INTEGER NOT NULL ) @@ -419,9 +419,9 @@ CREATE TABLE condition_occurrence condition_type_concept_id INTEGER NOT NULL , condition_status_concept_id INTEGER NOT NULL , stop_reason VARCHAR(20) NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , condition_source_value VARCHAR(50) NULL , condition_source_concept_id INTEGER NOT NULL , condition_status_source_value VARCHAR(50) NULL @@ -445,9 +445,9 @@ CREATE TABLE measurement unit_concept_id INTEGER NULL , range_low NUMERIC NULL , range_high NUMERIC NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , measurement_source_value VARCHAR(50) NULL , measurement_source_concept_id INTEGER NOT NULL , unit_source_value VARCHAR(50) NULL , @@ -471,9 +471,9 @@ CREATE TABLE note note_text TEXT NULL , encoding_concept_id INTEGER NOT NULL , language_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , note_source_value VARCHAR(50) NULL ) ; @@ -514,7 +514,7 @@ CREATE TABLE observation value_as_concept_id INTEGER NULL , qualifier_concept_id INTEGER NULL , unit_concept_id INTEGER NULL , - provider_id INTEGER NULL , + provider_id BIGINT NULL , visit_occurrence_id BIGINT NULL , visit_detail_id BIGINT NULL , observation_source_value VARCHAR(50) NULL , diff --git a/Redshift/OMOP CDM redshift ddl.txt b/Redshift/OMOP CDM redshift ddl.txt index e3a51ad..897b2b2 100644 --- a/Redshift/OMOP CDM redshift ddl.txt +++ b/Redshift/OMOP CDM redshift ddl.txt @@ -221,9 +221,9 @@ CREATE TABLE person ( death_datetime TIMESTAMP NULL, race_concept_id INTEGER NOT NULL, ethnicity_concept_id INTEGER NOT NULL, - location_id INTEGER NULL, - provider_id INTEGER NULL, - care_site_id INTEGER NULL, + location_id BIGINT NULL, + provider_id BIGINT NULL, + care_site_id BIGINT NULL, person_source_value VARCHAR(50) NULL, gender_source_value VARCHAR(50) NULL, gender_source_concept_id INTEGER NOT NULL, @@ -277,15 +277,15 @@ CREATE TABLE visit_occurrence ( visit_end_date DATE NULL , visit_end_datetime TIMESTAMP NOT NULL , visit_type_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL, - care_site_id INTEGER NULL, + provider_id BIGINT NULL, + care_site_id BIGINT NULL, visit_source_value VARCHAR(50) NULL, visit_source_concept_id INTEGER NOT NULL , admitted_from_concept_id INTEGER NOT NULL , admitted_from_source_value VARCHAR(50) NULL , discharge_to_source_value VARCHAR(50) NULL , discharge_to_concept_id INTEGER NOT NULL , - preceding_visit_occurrence_id INTEGER NULL + preceding_visit_occurrence_id BIGINT NULL ) DISTKEY(person_id); @@ -300,8 +300,8 @@ CREATE TABLE visit_detail ( visit_detail_end_date DATE NULL , visit_detail_end_datetime TIMESTAMP NOT NULL , visit_detail_type_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL , - care_site_id INTEGER NULL , + provider_id BIGINT NULL , + care_site_id BIGINT NULL , discharge_to_concept_id INTEGER NOT NULL , admitted_from_concept_id INTEGER NOT NULL , admitted_from_source_value VARCHAR(50) NULL , @@ -325,9 +325,9 @@ CREATE TABLE procedure_occurrence ( procedure_type_concept_id INTEGER NOT NULL , modifier_concept_id INTEGER NOT NULL , quantity INTEGER NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , procedure_source_value VARCHAR(50) NULL , procedure_source_concept_id INTEGER NOT NULL , modifier_source_value VARCHAR(50) NULL @@ -353,9 +353,9 @@ CREATE TABLE drug_exposure ( sig VARCHAR(MAX) NULL , route_concept_id INTEGER NOT NULL , lot_number VARCHAR(50) NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , drug_source_value VARCHAR(50) NULL , drug_source_concept_id INTEGER NOT NULL , route_source_value VARCHAR(50) NULL , @@ -376,9 +376,9 @@ CREATE TABLE device_exposure ( device_type_concept_id INTEGER NOT NULL , unique_device_id VARCHAR(50) NULL , quantity INTEGER NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , device_source_value VARCHAR(100) NULL , device_source_concept_id INTEGER NOT NULL ) @@ -422,9 +422,9 @@ CREATE TABLE measurement ( unit_concept_id INTEGER NULL , range_low FLOAT NULL , range_high FLOAT NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , measurement_source_value VARCHAR(50) NULL , measurement_source_concept_id INTEGER NOT NULL , unit_source_value VARCHAR(50) NULL , @@ -447,9 +447,9 @@ CREATE TABLE note ( note_text VARCHAR(MAX) NULL , encoding_concept_id INTEGER NOT NULL , language_concept_id INTEGER NOT NULL , - provider_id INTEGER NULL , - visit_occurrence_id INTEGER NULL , - visit_detail_id INTEGER NULL , + provider_id BIGINT NULL , + visit_occurrence_id BIGINT NULL , + visit_detail_id BIGINT NULL , note_source_value VARCHAR(50) NULL ) DISTKEY(person_id); @@ -488,7 +488,7 @@ CREATE TABLE observation value_as_concept_id INTEGER NULL , qualifier_concept_id INTEGER NULL , unit_concept_id INTEGER NULL , - provider_id INTEGER NULL , + provider_id BIGINT NULL , visit_occurrence_id BIGINT NULL , visit_detail_id BIGINT NULL , observation_source_value VARCHAR(50) NULL ,