This commit is contained in:
Clair Blacketer 2018-02-07 15:25:57 -05:00
parent ced0af0fe9
commit 9bfa59a43e
10 changed files with 74 additions and 71 deletions

View File

@ -17,7 +17,7 @@ create table vocabulary (
vocabulary_id varchar(20) not null, vocabulary_id varchar(20) not null,
vocabulary_name varchar(255) not null, vocabulary_name varchar(255) not null,
vocabulary_reference 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 vocabulary_concept_id integer not null
) )
; ;
@ -390,8 +390,8 @@ create table measurement
person_id integer not null , person_id integer not null ,
measurement_concept_id integer not null , measurement_concept_id integer not null ,
measurement_date date not null , measurement_date date not null ,
measurement_datetime datetime null ,
measurement_time varchar(10) null , measurement_time varchar(10) null ,
measurement_datetime datetime null ,
measurement_type_concept_id integer not null , measurement_type_concept_id integer not null ,
operator_concept_id integer null , operator_concept_id integer null ,
value_as_number float null , value_as_number float null ,
@ -551,7 +551,7 @@ create table payer_plan_period
sponsor_source_concept_id integer null , sponsor_source_concept_id integer null ,
family_source_value varchar(50) null , family_source_value varchar(50) null ,
stop_reason_concept_id integer 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 stop_reason_source_concept_id integer null
) )
; ;
@ -578,7 +578,7 @@ create table cost
payer_plan_period_id integer null , payer_plan_period_id integer null ,
amount_allowed float null , amount_allowed float null ,
revenue_code_concept_id integer null , revenue_code_concept_id integer null ,
reveue_code_source_value varchar(50) null, revenue_code_source_value varchar(50) null,
drg_concept_id integer null, drg_concept_id integer null,
drg_source_value varchar(3) null drg_source_value varchar(3) null
) )

View File

@ -8,7 +8,7 @@ Field|Required|Type|Description
|definition_type_concept_id|Yes|integer|Type defining what kind of Cohort Definition the record represents and how the syntax may be executed| |definition_type_concept_id|Yes|integer|Type defining what kind of Cohort Definition the record represents and how the syntax may be executed|
|cohort_definition_syntax|No|varchar(MAX)|Syntax or code to operationalize the Cohort definition| |cohort_definition_syntax|No|varchar(MAX)|Syntax or code to operationalize the Cohort definition|
|subject_concept_id|Yes|integer|A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).| |subject_concept_id|Yes|integer|A foreign key to the Concept to which defines the domain of subjects that are members of the cohort (e.g., Person, Provider, Visit).|
|cohort_instantiation_date|No|Date|A date to indicate when the Cohort was instantiated in the COHORT table| |cohort_initiation_date|No|Date|A date to indicate when the Cohort was instantiated in the COHORT table|
### Conventions ### Conventions
* The cohort_definition_syntax does not prescribe any specific syntax or programming language. Typically, it would be any flavor SQL, a cohort definition language, or a free-text description of the algorithm. * The cohort_definition_syntax does not prescribe any specific syntax or programming language. Typically, it would be any flavor SQL, a cohort definition language, or a free-text description of the algorithm.

View File

@ -8,6 +8,6 @@ The CONCEPT_SYNONYM table is used to store alternate names and descriptions for
### Conventions ### Conventions
* The concept_name field contains a valid Synonym of a concept, including the description in the concept_name itself. I.e. each Concept has at least one Synonym in the CONCEPT_SYNONYM table. As an example, for a SNOMED-CT Concept, if the fully specified name is stored as the concept_name of the CONCEPT table, then the Preferred Term and Synonyms associated with the Concept are stored in the CONCEPT_SYNONYM table. * The concept_synonym_name field contains a valid Synonym of a concept, including the description in the concept_name itself. I.e. each Concept has at least one Synonym in the CONCEPT_SYNONYM table. As an example, for a SNOMED-CT Concept, if the fully specified name is stored as the concept_name of the CONCEPT table, then the Preferred Term and Synonyms associated with the Concept are stored in the CONCEPT_SYNONYM table.
* Only Synonyms that are active and current are stored in the CONCEPT_SYNONYM table. Tracking synonym/description history and mapping of obsolete synonyms to current Concepts/Synonyms is out of scope for the Standard Vocabularies. * Only Synonyms that are active and current are stored in the CONCEPT_SYNONYM table. Tracking synonym/description history and mapping of obsolete synonyms to current Concepts/Synonyms is out of scope for the Standard Vocabularies.
* Currently, only English Synonyms are included. * Currently, only English Synonyms are included.

View File

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

View File

@ -28,7 +28,7 @@
netezza script to create OMOP common data model version 5.3 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 Authors: Patrick Ryan, Christian Reich, Clair Blacketer
@ -64,7 +64,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference 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 vocabulary_concept_id INTEGER NOT NULL
) )
DISTRIBUTE ON RANDOM DISTRIBUTE ON RANDOM
@ -479,7 +479,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime DATETIME NULL , measurement_datetime DATETIME NULL ,
measurement_time VARCHAR(10) NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number REAL NULL , value_as_number REAL NULL ,
@ -665,7 +666,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL , sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL , family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER 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 stop_reason_source_concept_id INTEGER NULL
) )
DISTRIBUTE ON (person_id) DISTRIBUTE ON (person_id)
@ -694,7 +695,7 @@ CREATE TABLE cost
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed REAL NULL , amount_allowed REAL NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL, revenue_code_source_value VARCHAR(50) NULL,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )

View File

@ -62,7 +62,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference 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 vocabulary_concept_id INTEGER NOT NULL
) )
; ;
@ -447,8 +447,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_time VARCHAR(10) NULL , measurement_time VARCHAR(10) NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL , value_as_number FLOAT NULL ,
@ -623,7 +623,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL , sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL , family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER 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 stop_reason_source_concept_id INTEGER NULL
) )
; ;
@ -650,7 +650,7 @@ CREATE TABLE cost
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed FLOAT NULL , amount_allowed FLOAT NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL, revenue_code_source_value VARCHAR(50) NULL,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )

View File

@ -60,7 +60,7 @@ WITH (DISTRIBUTION = REPLICATE);
IF XACT_STATE() = 1 COMMIT; CREATE TABLE vocabulary (vocabulary_id VARCHAR(20) NOT NULL, IF XACT_STATE() = 1 COMMIT; CREATE TABLE vocabulary (vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference 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 vocabulary_concept_id INTEGER NOT NULL
) )
WITH (DISTRIBUTION = REPLICATE); WITH (DISTRIBUTION = REPLICATE);
@ -422,8 +422,8 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime DATETIME NULL ,
measurement_time VARCHAR(10) NULL , measurement_time VARCHAR(10) NULL ,
measurement_datetime DATETIME NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number FLOAT 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 , sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL , family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER 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 stop_reason_source_concept_id INTEGER NULL
) )
WITH (DISTRIBUTION = HASH(person_id)); WITH (DISTRIBUTION = HASH(person_id));
@ -616,7 +616,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE cost
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed FLOAT NULL , amount_allowed FLOAT NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL, revenue_code_source_value VARCHAR(50) NULL,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )

View File

@ -62,7 +62,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference 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 vocabulary_concept_id INTEGER NOT NULL
) )
; ;
@ -447,8 +447,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_time VARCHAR(10) NULL , measurement_time VARCHAR(10) NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number NUMERIC NULL , value_as_number NUMERIC NULL ,
@ -623,7 +623,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL , sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL , family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER 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 stop_reason_source_concept_id INTEGER NULL
) )
; ;
@ -650,7 +650,7 @@ CREATE TABLE cost
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed NUMERIC NULL , amount_allowed NUMERIC NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL, revenue_code_source_value VARCHAR(50) NULL,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )

View File

@ -60,7 +60,7 @@ DISTSTYLE ALL;
CREATE TABLE vocabulary (vocabulary_id VARCHAR(20) NOT NULL, CREATE TABLE vocabulary (vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference 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 vocabulary_concept_id INTEGER NOT NULL
) )
DISTSTYLE ALL; DISTSTYLE ALL;
@ -422,8 +422,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_time VARCHAR(10) NULL , measurement_time VARCHAR(10) NULL ,
measurement_datetime TIMESTAMP NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL , value_as_number FLOAT NULL ,
@ -590,7 +590,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL , sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL , family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER 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 stop_reason_source_concept_id INTEGER NULL
) )
DISTKEY(person_id); DISTKEY(person_id);
@ -616,7 +616,7 @@ CREATE TABLE cost
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed FLOAT NULL , amount_allowed FLOAT NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL, revenue_code_source_value VARCHAR(50) NULL,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )

View File

@ -62,7 +62,7 @@ CREATE TABLE vocabulary (
vocabulary_id VARCHAR(20) NOT NULL, vocabulary_id VARCHAR(20) NOT NULL,
vocabulary_name VARCHAR(255) NOT NULL, vocabulary_name VARCHAR(255) NOT NULL,
vocabulary_reference 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 vocabulary_concept_id INTEGER NOT NULL
) )
; ;
@ -447,8 +447,8 @@ CREATE TABLE measurement
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
measurement_concept_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL ,
measurement_date DATE NOT NULL , measurement_date DATE NOT NULL ,
measurement_datetime DATETIME NULL ,
measurement_time VARCHAR(10) NULL , measurement_time VARCHAR(10) NULL ,
measurement_datetime DATETIME NULL ,
measurement_type_concept_id INTEGER NOT NULL , measurement_type_concept_id INTEGER NOT NULL ,
operator_concept_id INTEGER NULL , operator_concept_id INTEGER NULL ,
value_as_number FLOAT NULL , value_as_number FLOAT NULL ,
@ -623,7 +623,7 @@ CREATE TABLE payer_plan_period
sponsor_source_concept_id INTEGER NULL , sponsor_source_concept_id INTEGER NULL ,
family_source_value VARCHAR(50) NULL , family_source_value VARCHAR(50) NULL ,
stop_reason_concept_id INTEGER 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 stop_reason_source_concept_id INTEGER NULL
) )
; ;
@ -650,7 +650,7 @@ CREATE TABLE cost
payer_plan_period_id INTEGER NULL , payer_plan_period_id INTEGER NULL ,
amount_allowed FLOAT NULL , amount_allowed FLOAT NULL ,
revenue_code_concept_id INTEGER NULL , revenue_code_concept_id INTEGER NULL ,
reveue_code_source_value VARCHAR(50) NULL, revenue_code_source_value VARCHAR(50) NULL,
drg_concept_id INTEGER NULL, drg_concept_id INTEGER NULL,
drg_source_value VARCHAR(3) NULL drg_source_value VARCHAR(3) NULL
) )