Closes #149, vocabulary_version no longer required

This commit is contained in:
Clair Blacketer 2018-02-07 14:55:24 -05:00
parent ced0af0fe9
commit 4949f3d301
9 changed files with 65 additions and 62 deletions

View File

@ -17,7 +17,7 @@ create table vocabulary (
vocabulary_id varchar(20) not null,
vocabulary_name varchar(255) not null,
vocabulary_reference varchar(255) not null,
vocabulary_version varchar(255) not null,
vocabulary_version varchar(255) null,
vocabulary_concept_id integer not null
)
;
@ -390,8 +390,8 @@ create table measurement
person_id integer not null ,
measurement_concept_id integer not null ,
measurement_date date not null ,
measurement_time varchar(10) null ,
measurement_datetime datetime null ,
measurement_time varchar(10) null ,
measurement_type_concept_id integer not null ,
operator_concept_id integer null ,
value_as_number float null ,
@ -551,7 +551,7 @@ create table payer_plan_period
sponsor_source_concept_id integer null ,
family_source_value varchar(50) null ,
stop_reason_concept_id integer null ,
stop_reason_source_value integer null ,
stop_reason_source_value varchar(50) null ,
stop_reason_source_concept_id integer null
)
;

View File

@ -5,7 +5,7 @@ Field|Required|Type|Description
|vocabulary_id|Yes|varchar(20)|A unique identifier for each Vocabulary, such as ICD9CM, SNOMED, Visit.|
|vocabulary_name|Yes|varchar(255)|The name describing the vocabulary, for example "International Classification of Diseases, Ninth Revision, Clinical Modification, Volume 1 and 2 (NCHS)" etc.|
|vocabulary_reference|Yes|varchar(255)|External reference to documentation or available download of the about the vocabulary.|
|vocabulary_version|Yes|varchar(255)|Version of the Vocabulary as indicated in the source.|
|vocabulary_version|No|varchar(255)|Version of the Vocabulary as indicated in the source.|
|vocabulary_concept_id|Yes|integer|A foreign key that refers to a standard concept identifier in the CONCEPT table for the Vocabulary the VOCABULARY record belongs to.|
### Conventions

View File

@ -818,6 +818,8 @@ CREATE TABLE measurement
measurement_datetime TIMESTAMP,
measurement_time VARCHAR(10),
measurement_type_concept_id INTEGER,
operator_concept_id INTEGER,
@ -1134,7 +1136,7 @@ CREATE TABLE payer_plan_period
stop_reason_concept_id INTEGER,
stop_reason_source_value INTEGER,
stop_reason_source_value VARCHAR(50),
stop_reason_source_concept_id INTEGER
)

View File

@ -28,7 +28,7 @@
netezza script to create OMOP common data model version 5.3
last revised: 6-Nov-2017
last revised: 8-Jan-2018
Authors: Patrick Ryan, Christian Reich, Clair Blacketer
@ -64,7 +64,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL
)
DISTRIBUTE ON RANDOM
@ -480,6 +480,7 @@ CREATE TABLE measurement
measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL ,
measurement_datetime DATETIME NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL ,
value_as_number REAL NULL ,
@ -665,7 +666,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER NULL ,
stop_reason_source_value INTEGER NULL ,
stop_reason_source_value VARCHAR(50) NULL ,
stop_reason_source_concept_id INTEGER NULL
)
DISTRIBUTE ON (person_id)

View File

@ -62,7 +62,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL
)
;
@ -447,8 +447,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL ,
@ -623,7 +623,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER NULL ,
stop_reason_source_value INTEGER NULL ,
stop_reason_source_value VARCHAR(50) NULL ,
stop_reason_source_concept_id INTEGER NULL
)
;

View File

@ -60,7 +60,7 @@ WITH (DISTRIBUTION = REPLICATE);
IF XACT_STATE() = 1 COMMIT; CREATE TABLE vocabulary (vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL
)
WITH (DISTRIBUTION = REPLICATE);
@ -422,8 +422,8 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement
person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_datetime DATETIME NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL ,
@ -590,7 +590,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER NULL ,
stop_reason_source_value INTEGER NULL ,
stop_reason_source_value VARCHAR(50) NULL ,
stop_reason_source_concept_id INTEGER NULL
)
WITH (DISTRIBUTION = HASH(person_id));

View File

@ -62,7 +62,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL
)
;
@ -447,8 +447,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL ,
value_as_number NUMERIC NULL ,
@ -623,7 +623,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER NULL ,
stop_reason_source_value INTEGER NULL ,
stop_reason_source_value VARCHAR(50) NULL ,
stop_reason_source_concept_id INTEGER NULL
)
;

View File

@ -60,7 +60,7 @@ DISTSTYLE ALL;
CREATE TABLE vocabulary (vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL
)
DISTSTYLE ALL;
@ -422,8 +422,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL ,
@ -590,7 +590,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER NULL ,
stop_reason_source_value INTEGER NULL ,
stop_reason_source_value VARCHAR(50) NULL ,
stop_reason_source_concept_id INTEGER NULL
)
DISTKEY(person_id);

View File

@ -62,7 +62,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NOT NULL,
vocabulary_version VARCHAR(255) NULL,
vocabulary_concept_id INTEGER NOT NULL
)
;
@ -447,8 +447,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_datetime DATETIME NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL ,
@ -623,7 +623,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER NULL ,
stop_reason_source_value INTEGER NULL ,
stop_reason_source_value VARCHAR(50) NULL ,
stop_reason_source_concept_id INTEGER NULL
)
;