Made changes to adhere to the new CDM changes for version 5.1
This commit is contained in:
parent
a8d6557a56
commit
aef6a3a550
|
@ -229,7 +229,7 @@ CREATE TABLE person
|
|||
year_of_birth INTEGER NOT NULL ,
|
||||
month_of_birth INTEGER NULL,
|
||||
day_of_birth INTEGER NULL,
|
||||
time_of_birth VARCHAR(10) NULL,
|
||||
datetime_of_birth DATETIME2 NULL,
|
||||
race_concept_id INTEGER NOT NULL,
|
||||
ethnicity_concept_id INTEGER NOT NULL,
|
||||
location_id INTEGER NULL,
|
||||
|
@ -254,7 +254,9 @@ CREATE TABLE observation_period
|
|||
observation_period_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
observation_period_start_date DATE NOT NULL ,
|
||||
observation_period_start_datetime DATETIME2 NOT NULL ,
|
||||
observation_period_end_date DATE NOT NULL ,
|
||||
observation_period_end_datetime DATETIME2 NOT NULL ,
|
||||
period_type_concept_id INTEGER NOT NULL
|
||||
)
|
||||
;
|
||||
|
@ -268,7 +270,7 @@ CREATE TABLE specimen
|
|||
specimen_concept_id INTEGER NOT NULL ,
|
||||
specimen_type_concept_id INTEGER NOT NULL ,
|
||||
specimen_date DATE NOT NULL ,
|
||||
specimen_time VARCHAR(10) NULL ,
|
||||
specimen_datetime DATETIME2 NULL ,
|
||||
quantity FLOAT NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
anatomic_site_concept_id INTEGER NULL ,
|
||||
|
@ -302,9 +304,9 @@ CREATE TABLE visit_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
visit_concept_id INTEGER NOT NULL ,
|
||||
visit_start_date DATE NOT NULL ,
|
||||
visit_start_time VARCHAR(10) NULL ,
|
||||
visit_start_datetime DATETIME2 NULL ,
|
||||
visit_end_date DATE NOT NULL ,
|
||||
visit_end_time VARCHAR(10) NULL ,
|
||||
visit_end_datetime DATETIME2 NULL ,
|
||||
visit_type_concept_id INTEGER NOT NULL ,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
|
@ -321,6 +323,7 @@ CREATE TABLE procedure_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
procedure_concept_id INTEGER NOT NULL ,
|
||||
procedure_date DATE NOT NULL ,
|
||||
procedure_datetime DATETIME2 NOT NULL ,
|
||||
procedure_type_concept_id INTEGER NOT NULL ,
|
||||
modifier_concept_id INTEGER NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
|
@ -340,7 +343,9 @@ CREATE TABLE drug_exposure
|
|||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
drug_exposure_start_date DATE NOT NULL ,
|
||||
drug_exposure_start_datetime DATETIME2 NOT NULL ,
|
||||
drug_exposure_end_date DATE NULL ,
|
||||
drug_exposure_end_datetime DATETIME2 NULL ,
|
||||
drug_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
refills INTEGER NULL ,
|
||||
|
@ -367,7 +372,9 @@ CREATE TABLE device_exposure
|
|||
person_id INTEGER NOT NULL ,
|
||||
device_concept_id INTEGER NOT NULL ,
|
||||
device_exposure_start_date DATE NOT NULL ,
|
||||
device_exposure_start_datetime DATETIME2 NOT NULL ,
|
||||
device_exposure_end_date DATE NULL ,
|
||||
device_exposure_end_datetime DATETIME2 NULL ,
|
||||
device_type_concept_id INTEGER NOT NULL ,
|
||||
unique_device_id VARCHAR(50) NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
|
@ -385,7 +392,9 @@ CREATE TABLE condition_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
condition_concept_id INTEGER NOT NULL ,
|
||||
condition_start_date DATE NOT NULL ,
|
||||
condition_start_datetime DATETIME2 NOT NULL ,
|
||||
condition_end_date DATE NULL ,
|
||||
condition_end_datetime DATETIME2 NULL ,
|
||||
condition_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
|
@ -403,7 +412,7 @@ 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 DATETIME2 NULL ,
|
||||
measurement_type_concept_id INTEGER NOT NULL ,
|
||||
operator_concept_id INTEGER NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
|
@ -427,7 +436,7 @@ CREATE TABLE note
|
|||
note_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
note_date DATE NOT NULL ,
|
||||
note_time VARCHAR(10) NULL ,
|
||||
note_datetime DATETIME2 NULL ,
|
||||
note_type_concept_id INTEGER NOT NULL ,
|
||||
note_text VARCHAR(MAX) NOT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
|
@ -444,7 +453,7 @@ CREATE TABLE observation
|
|||
person_id INTEGER NOT NULL ,
|
||||
observation_concept_id INTEGER NOT NULL ,
|
||||
observation_date DATE NOT NULL ,
|
||||
observation_time VARCHAR(10) NULL ,
|
||||
observation_datetime DATETIME2 NULL ,
|
||||
observation_type_concept_id INTEGER NOT NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_string VARCHAR(60) NULL ,
|
||||
|
|
Loading…
Reference in New Issue