Made changes to adhere to the new CDM changes for version 5.1 for Oracle

This commit is contained in:
Karthik Natarajan 2017-01-02 19:27:35 -05:00
parent 866c8c666b
commit 20a6f4a04f
1 changed files with 22 additions and 13 deletions

View File

@ -229,7 +229,7 @@ CREATE TABLE person
year_of_birth INTEGER NOT NULL , year_of_birth INTEGER NOT NULL ,
month_of_birth INTEGER NULL, month_of_birth INTEGER NULL,
day_of_birth INTEGER NULL, day_of_birth INTEGER NULL,
time_of_birth VARCHAR(10) NULL, datetime_of_birth TIMESTAMP WITH TIME ZONE NULL,
race_concept_id INTEGER NOT NULL, race_concept_id INTEGER NOT NULL,
ethnicity_concept_id INTEGER NOT NULL, ethnicity_concept_id INTEGER NOT NULL,
location_id INTEGER NULL, location_id INTEGER NULL,
@ -254,7 +254,9 @@ CREATE TABLE observation_period
observation_period_id INTEGER NOT NULL , observation_period_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
observation_period_start_date DATE NOT NULL , observation_period_start_date DATE NOT NULL ,
observation_period_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
observation_period_end_date DATE NOT NULL , observation_period_end_date DATE NOT NULL ,
observation_period_end_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
period_type_concept_id INTEGER NOT NULL period_type_concept_id INTEGER NOT NULL
) )
; ;
@ -268,7 +270,7 @@ CREATE TABLE specimen
specimen_concept_id INTEGER NOT NULL , specimen_concept_id INTEGER NOT NULL ,
specimen_type_concept_id INTEGER NOT NULL , specimen_type_concept_id INTEGER NOT NULL ,
specimen_date DATE NOT NULL , specimen_date DATE NOT NULL ,
specimen_time VARCHAR(10) NULL , specimen_datetime TIMESTAMP WITH TIME ZONE NULL ,
quantity FLOAT NULL , quantity FLOAT NULL ,
unit_concept_id INTEGER NULL , unit_concept_id INTEGER NULL ,
anatomic_site_concept_id INTEGER NULL , anatomic_site_concept_id INTEGER NULL ,
@ -302,9 +304,9 @@ CREATE TABLE visit_occurrence
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
visit_concept_id INTEGER NOT NULL , visit_concept_id INTEGER NOT NULL ,
visit_start_date DATE NOT NULL , visit_start_date DATE NOT NULL ,
visit_start_time VARCHAR(10) NULL , visit_start_datetime TIMESTAMP WITH TIME ZONE NULL ,
visit_end_date DATE NOT NULL , visit_end_date DATE NOT NULL ,
visit_end_time VARCHAR(10) NULL , visit_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
visit_type_concept_id INTEGER NOT NULL , visit_type_concept_id INTEGER NOT NULL ,
provider_id INTEGER NULL, provider_id INTEGER NULL,
care_site_id INTEGER NULL, care_site_id INTEGER NULL,
@ -321,6 +323,7 @@ CREATE TABLE procedure_occurrence
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
procedure_concept_id INTEGER NOT NULL , procedure_concept_id INTEGER NOT NULL ,
procedure_date DATE NOT NULL , procedure_date DATE NOT NULL ,
procedure_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
procedure_type_concept_id INTEGER NOT NULL , procedure_type_concept_id INTEGER NOT NULL ,
modifier_concept_id INTEGER NULL , modifier_concept_id INTEGER NULL ,
quantity INTEGER NULL , quantity INTEGER NULL ,
@ -340,7 +343,9 @@ CREATE TABLE drug_exposure
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
drug_concept_id INTEGER NOT NULL , drug_concept_id INTEGER NOT NULL ,
drug_exposure_start_date DATE NOT NULL , drug_exposure_start_date DATE NOT NULL ,
drug_exposure_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
drug_exposure_end_date DATE NULL , drug_exposure_end_date DATE NULL ,
drug_exposure_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
drug_type_concept_id INTEGER NOT NULL , drug_type_concept_id INTEGER NOT NULL ,
stop_reason VARCHAR(20) NULL , stop_reason VARCHAR(20) NULL ,
refills INTEGER NULL , refills INTEGER NULL ,
@ -367,7 +372,9 @@ CREATE TABLE device_exposure
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
device_concept_id INTEGER NOT NULL , device_concept_id INTEGER NOT NULL ,
device_exposure_start_date DATE NOT NULL , device_exposure_start_date DATE NOT NULL ,
device_exposure_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
device_exposure_end_date DATE NULL , device_exposure_end_date DATE NULL ,
device_exposure_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
device_type_concept_id INTEGER NOT NULL , device_type_concept_id INTEGER NOT NULL ,
unique_device_id VARCHAR(50) NULL , unique_device_id VARCHAR(50) NULL ,
quantity INTEGER NULL , quantity INTEGER NULL ,
@ -385,7 +392,9 @@ CREATE TABLE condition_occurrence
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
condition_concept_id INTEGER NOT NULL , condition_concept_id INTEGER NOT NULL ,
condition_start_date DATE NOT NULL , condition_start_date DATE NOT NULL ,
condition_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
condition_end_date DATE NULL , condition_end_date DATE NULL ,
condition_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
condition_type_concept_id INTEGER NOT NULL , condition_type_concept_id INTEGER NOT NULL ,
stop_reason VARCHAR(20) NULL , stop_reason VARCHAR(20) NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
@ -403,7 +412,7 @@ 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_time VARCHAR(10) NULL , measurement_datetime TIMESTAMP WITH TIME ZONE 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 ,
@ -427,7 +436,7 @@ CREATE TABLE note
note_id INTEGER NOT NULL , note_id INTEGER NOT NULL ,
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
note_date DATE NOT NULL , note_date DATE NOT NULL ,
note_time VARCHAR(10) NULL , note_datetime TIMESTAMP WITH TIME ZONE NULL ,
note_type_concept_id INTEGER NOT NULL , note_type_concept_id INTEGER NOT NULL ,
note_text CLOB NOT NULL , note_text CLOB NOT NULL ,
provider_id INTEGER NULL , provider_id INTEGER NULL ,
@ -444,7 +453,7 @@ CREATE TABLE observation
person_id INTEGER NOT NULL , person_id INTEGER NOT NULL ,
observation_concept_id INTEGER NOT NULL , observation_concept_id INTEGER NOT NULL ,
observation_date DATE NOT NULL , observation_date DATE NOT NULL ,
observation_time VARCHAR(10) NULL , observation_datetime TIMESTAMP WITH TIME ZONE NULL ,
observation_type_concept_id INTEGER NOT NULL , observation_type_concept_id INTEGER NOT NULL ,
value_as_number FLOAT NULL , value_as_number FLOAT NULL ,
value_as_string VARCHAR(60) NULL , value_as_string VARCHAR(60) NULL ,