diff --git a/Impala/OMOP_CDM_ddl_Impala.sql b/Impala/OMOP_CDM_ddl_Impala.sql index d1ade63..5901e8e 100644 --- a/Impala/OMOP_CDM_ddl_Impala.sql +++ b/Impala/OMOP_CDM_ddl_Impala.sql @@ -50,11 +50,11 @@ CREATE TABLE concept ( domain_id VARCHAR(20), vocabulary_id VARCHAR(20), concept_class_id VARCHAR(20), - standard_concept VARCHAR(1), + standard_concept CHAR(1), concept_code VARCHAR(50), valid_start_date VARCHAR(8), -- DATE valid_end_date VARCHAR(8), -- DATE - invalid_reason VARCHAR(1) + invalid_reason CHAR(1) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' TBLPROPERTIES ("skip.header.line.count"="1") @@ -106,7 +106,7 @@ CREATE TABLE concept_relationship ( relationship_id VARCHAR(20), valid_start_date VARCHAR(8), -- DATE valid_end_date VARCHAR(8), -- DATE - invalid_reason VARCHAR(1) + invalid_reason CHAR(1) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' TBLPROPERTIES ("skip.header.line.count"="1") @@ -117,8 +117,8 @@ TBLPROPERTIES ("skip.header.line.count"="1") CREATE TABLE relationship ( relationship_id VARCHAR(20), relationship_name VARCHAR(255), - is_hierarchical VARCHAR(1), - defines_ancestry VARCHAR(1), + is_hierarchical CHAR(1), + defines_ancestry CHAR(1), reverse_relationship_id VARCHAR(20), relationship_concept_id INTEGER ) @@ -158,7 +158,7 @@ CREATE TABLE source_to_concept_map ( target_vocabulary_id VARCHAR(20), valid_start_date VARCHAR(8), -- DATE valid_end_date VARCHAR(8), -- DATE - invalid_reason VARCHAR(1) + invalid_reason CHAR(1) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' TBLPROPERTIES ("skip.header.line.count"="1") @@ -179,7 +179,7 @@ CREATE TABLE drug_strength ( box_size INTEGER, valid_start_date VARCHAR(8), -- DATE valid_end_date VARCHAR(8), -- DATE - invalid_reason VARCHAR(1) + invalid_reason CHAR(1) ) ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t' TBLPROPERTIES ("skip.header.line.count"="1") @@ -486,7 +486,7 @@ CREATE TABLE note_nlp ( nlp_system VARCHAR(250), nlp_date VARCHAR(8), nlp_datetime VARCHAR(10), - term_exists VARCHAR(1), + term_exists CHAR(1), term_temporal VARCHAR(50), term_modifiers VARCHAR(2000) ) @@ -543,7 +543,7 @@ CREATE TABLE `location` ( address_1 VARCHAR(50), address_2 VARCHAR(50), city VARCHAR(50), - state VARCHAR(2), + state CHAR(2), zip VARCHAR(9), county VARCHAR(20), location_source_value VARCHAR(50) @@ -631,7 +631,7 @@ CREATE TABLE cost ( revenue_code_concept_id INTEGER, reveue_code_source_value VARCHAR(50), drg_concept_id INTEGER, - drg_source_value VARCHAR(3) + drg_source_value CHAR(3) ) ; diff --git a/Oracle/OMOP CDM ddl - Oracle.sql b/Oracle/OMOP CDM ddl - Oracle.sql index 76011cc..124812c 100644 --- a/Oracle/OMOP CDM ddl - Oracle.sql +++ b/Oracle/OMOP CDM ddl - Oracle.sql @@ -49,11 +49,11 @@ CREATE TABLE concept ( domain_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL, concept_class_id VARCHAR(20) NOT NULL, - standard_concept VARCHAR(1) NULL, + standard_concept CHAR(1) NULL, concept_code VARCHAR(50) NOT NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL + invalid_reason CHAR(1) NULL ) ; @@ -97,7 +97,7 @@ CREATE TABLE concept_relationship ( relationship_id VARCHAR(20) NOT NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL) + invalid_reason CHAR(1) NULL) ; @@ -105,8 +105,8 @@ CREATE TABLE concept_relationship ( CREATE TABLE relationship ( relationship_id VARCHAR(20) NOT NULL, relationship_name VARCHAR(255) NOT NULL, - is_hierarchical VARCHAR(1) NOT NULL, - defines_ancestry VARCHAR(1) NOT NULL, + is_hierarchical CHAR(1) NOT NULL, + defines_ancestry CHAR(1) NOT NULL, reverse_relationship_id VARCHAR(20) NOT NULL, relationship_concept_id INTEGER NOT NULL ) @@ -140,7 +140,7 @@ CREATE TABLE source_to_concept_map ( target_vocabulary_id VARCHAR(20) NOT NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL + invalid_reason CHAR(1) NULL ) ; @@ -159,7 +159,7 @@ CREATE TABLE drug_strength ( box_size INTEGER NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL + invalid_reason CHAR(1) NULL ) ; @@ -471,7 +471,7 @@ CREATE TABLE note_nlp nlp_system VARCHAR(250) NULL , nlp_date DATE NOT NULL , nlp_datetime TIMESTAMP WITH TIME ZONE NULL , - term_exists VARCHAR(1) NULL , + term_exists CHAR(1) NULL , term_temporal VARCHAR(50) NULL , term_modifiers VARCHAR(2000) NULL ) @@ -528,7 +528,7 @@ CREATE TABLE location address_1 VARCHAR(50) NULL , address_2 VARCHAR(50) NULL , city VARCHAR(50) NULL , - state VARCHAR(2) NULL , + state CHAR(2) NULL , zip VARCHAR(9) NULL , county VARCHAR(20) NULL , location_source_value VARCHAR(50) NULL @@ -615,7 +615,7 @@ CREATE TABLE cost revenue_code_concept_id INTEGER NULL , reveue_code_source_value VARCHAR2(50) NULL , drg_concept_id INTEGER NULL, - drg_source_value VARCHAR(3) NULL + drg_source_value CHAR(3) NULL ) ; diff --git a/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql b/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql index acc06c6..eea33f0 100644 --- a/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql +++ b/PostgreSQL/OMOP CDM ddl - PostgreSQL.sql @@ -49,11 +49,11 @@ CREATE TABLE concept ( domain_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL, concept_class_id VARCHAR(20) NOT NULL, - standard_concept VARCHAR(1) NULL, + standard_concept CHAR(1) NULL, concept_code VARCHAR(50) NOT NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL + invalid_reason CHAR(1) NULL ) ; @@ -97,7 +97,7 @@ CREATE TABLE concept_relationship ( relationship_id VARCHAR(20) NOT NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL) + invalid_reason CHAR(1) NULL) ; @@ -105,8 +105,8 @@ CREATE TABLE concept_relationship ( CREATE TABLE relationship ( relationship_id VARCHAR(20) NOT NULL, relationship_name VARCHAR(255) NOT NULL, - is_hierarchical VARCHAR(1) NOT NULL, - defines_ancestry VARCHAR(1) NOT NULL, + is_hierarchical CHAR(1) NOT NULL, + defines_ancestry CHAR(1) NOT NULL, reverse_relationship_id VARCHAR(20) NOT NULL, relationship_concept_id INTEGER NOT NULL ) @@ -140,7 +140,7 @@ CREATE TABLE source_to_concept_map ( target_vocabulary_id VARCHAR(20) NOT NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL + invalid_reason CHAR(1) NULL ) ; @@ -159,7 +159,7 @@ CREATE TABLE drug_strength ( box_size INTEGER NULL, valid_start_date DATE NOT NULL, valid_end_date DATE NOT NULL, - invalid_reason VARCHAR(1) NULL + invalid_reason CHAR(1) NULL ) ; @@ -472,7 +472,7 @@ CREATE TABLE note_nlp nlp_system VARCHAR(250) NULL , nlp_date DATE NOT NULL , nlp_datetime TIMESTAMP NULL , - term_exists VARCHAR(1) NULL , + term_exists CHAR(1) NULL , term_temporal VARCHAR(50) NULL , term_modifiers VARCHAR(2000) NULL ) @@ -530,7 +530,7 @@ CREATE TABLE location address_1 VARCHAR(50) NULL , address_2 VARCHAR(50) NULL , city VARCHAR(50) NULL , - state VARCHAR(2) NULL , + state CHAR(2) NULL , zip VARCHAR(9) NULL , county VARCHAR(20) NULL , location_source_value VARCHAR(50) NULL @@ -618,7 +618,7 @@ CREATE TABLE cost revenue_code_concept_id INTEGER NULL , reveue_code_source_value VARCHAR(50) NULL , drg_concept_id INTEGER NULL, - drg_source_value VARCHAR(3) NULL + drg_source_value CHAR(3) NULL ) ; diff --git a/Redshift/OMOP CDM ddl - Redshift.sql b/Redshift/OMOP CDM ddl - Redshift.sql index 7af70af..8b79ce3 100644 --- a/Redshift/OMOP CDM ddl - Redshift.sql +++ b/Redshift/OMOP CDM ddl - Redshift.sql @@ -54,7 +54,7 @@ create table concept concept_code varchar(50) null, valid_start_date date not null, valid_end_date date not null, - invalid_reason varchar(1) null + invalid_reason char(1) null ) diststyle all; @@ -92,7 +92,7 @@ create table concept_relationship relationship_id varchar(20) not null, valid_start_date date not null, valid_end_date date not null, - invalid_reason varchar(1) null + invalid_reason char(1) null ) diststyle all; @@ -101,8 +101,8 @@ create table relationship ( relationship_id varchar(20) not null, relationship_name varchar(255) not null, - is_hierarchical varchar(1) not null, - defines_ancestry varchar(1) not null, + is_hierarchical char(1) not null, + defines_ancestry char(1) not null, reverse_relationship_id varchar(20) not null, relationship_concept_id integer not null ) @@ -137,7 +137,7 @@ create table source_to_concept_map target_vocabulary_id varchar(20) not null, valid_start_date date not null, valid_end_date date not null, - invalid_reason varchar(1) null + invalid_reason char(1) null ) diststyle all; @@ -154,7 +154,7 @@ create table drug_strength box_size integer null, valid_start_date date not null, valid_end_date date not null, - invalid_reason varchar(1) null + invalid_reason char(1) null ) diststyle all; @@ -474,7 +474,7 @@ CREATE TABLE note_nlp nlp_system varchar(250) null , nlp_date date not null , nlp_datetime timestamp null , - term_exists varchar(1) null , + term_exists char(1) null , term_temporal varchar(50) null , term_modifiers varchar(2000) null ) @@ -534,7 +534,7 @@ create table location address_1 varchar(50) null , address_2 varchar(50) null , city varchar(50) null , - state varchar(2) null , + state char(2) null , zip varchar(9) null , county varchar(20) null , location_source_value varchar(50) null @@ -705,7 +705,7 @@ create table cost revenue_code_concept_id integer null , reveue_code_source_value varchar(50) null , drg_concept_id integer null, - drg_source_value varchar(3) null + drg_source_value char(3) null ) distkey(payer_plan_period_id) sortkey(payer_plan_period_id); diff --git a/Sql Server/OMOP CDM ddl - SQL Server.sql b/Sql Server/OMOP CDM ddl - SQL Server.sql index 87f20ba..6619fc0 100644 --- a/Sql Server/OMOP CDM ddl - SQL Server.sql +++ b/Sql Server/OMOP CDM ddl - SQL Server.sql @@ -529,7 +529,7 @@ CREATE TABLE location address_1 VARCHAR(50) NULL , address_2 VARCHAR(50) NULL , city VARCHAR(50) NULL , - state VARCHAR(2) NULL , + state CHAR(2) NULL , zip VARCHAR(9) NULL , county VARCHAR(20) NULL , location_source_value VARCHAR(50) NULL @@ -615,7 +615,7 @@ CREATE TABLE cost revenue_code_concept_id INTEGER NULL , reveue_code_source_value VARCHAR(50) NULL, drg_concept_id INTEGER NULL, - drg_source_value VARCHAR(3) NULL + drg_source_value CHAR(3) NULL ) ;