commit
33294de80c
|
@ -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 ,
|
||||||
|
|
|
@ -7,6 +7,7 @@ Field|Required|Type|Description
|
||||||
|measurement_concept_id|Yes|integer|A foreign key to the standard measurement concept identifier in the Standardized Vocabularies.|
|
|measurement_concept_id|Yes|integer|A foreign key to the standard measurement concept identifier in the Standardized Vocabularies.|
|
||||||
|measurement_date|Yes|date|The date of the Measurement.|
|
|measurement_date|Yes|date|The date of the Measurement.|
|
||||||
|measurement_datetime|No|datetime|The date and time of the Measurement. Some database systems don't have a datatype of time. To accomodate all temporal analyses, datatype datetime can be used (combining measurement_date and measurement_time [forum discussion](http://forums.ohdsi.org/t/date-time-and-datetime-problem-and-the-world-of-hours-and-1day/314))|
|
|measurement_datetime|No|datetime|The date and time of the Measurement. Some database systems don't have a datatype of time. To accomodate all temporal analyses, datatype datetime can be used (combining measurement_date and measurement_time [forum discussion](http://forums.ohdsi.org/t/date-time-and-datetime-problem-and-the-world-of-hours-and-1day/314))|
|
||||||
|
|measurement_time |No|varchar(10)|The time of the Measurement. This is present for backwards compatibility and will deprecated in an upcoming version|
|
||||||
|measurement_type_concept_id|Yes|integer|A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the provenance from where the Measurement record was recorded.|
|
|measurement_type_concept_id|Yes|integer|A foreign key to the predefined Concept in the Standardized Vocabularies reflecting the provenance from where the Measurement record was recorded.|
|
||||||
|operator_concept_id|No|integer|A foreign key identifier to the predefined Concept in the Standardized Vocabularies reflecting the mathematical operator that is applied to the value_as_number. Operators are <, <=, =, >=, >.|
|
|operator_concept_id|No|integer|A foreign key identifier to the predefined Concept in the Standardized Vocabularies reflecting the mathematical operator that is applied to the value_as_number. Operators are <, <=, =, >=, >.|
|
||||||
|value_as_number|No|float|A Measurement result where the result is expressed as a numeric value.|
|
|value_as_number|No|float|A Measurement result where the result is expressed as a numeric value.|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
|
@ -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 ,
|
||||||
|
|
|
@ -447,7 +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_datetime TIMESTAMP 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 FLOAT NULL ,
|
value_as_number FLOAT NULL ,
|
||||||
|
@ -622,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 VARCHAR(50) NULL ,
|
stop_reason_source_value VARCHAR(50) NULL ,
|
||||||
stop_reason_source_concept_id INTEGER NULL
|
stop_reason_source_concept_id INTEGER NULL
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
|
@ -207,7 +207,7 @@ Standardized clinical data
|
||||||
|
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE person
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE person
|
||||||
(person_id INTEGER NOT NULL ,
|
(person_id INTEGER NOT NULL ,
|
||||||
gender_concept_id INTEGER NOT NULL ,
|
gender_concept_id INTEGER NOT NULL ,
|
||||||
|
@ -231,7 +231,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE person
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE observation_period
|
IF XACT_STATE() = 1 COMMIT; 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 ,
|
||||||
|
@ -242,7 +242,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE observation_period
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE specimen
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE specimen
|
||||||
(specimen_id INTEGER NOT NULL ,
|
(specimen_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -263,7 +263,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE specimen
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE death
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE death
|
||||||
(person_id INTEGER NOT NULL ,
|
(person_id INTEGER NOT NULL ,
|
||||||
death_date DATE NOT NULL ,
|
death_date DATE NOT NULL ,
|
||||||
|
@ -276,7 +276,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE death
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_occurrence
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_occurrence
|
||||||
(visit_occurrence_id INTEGER NOT NULL ,
|
(visit_occurrence_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -299,7 +299,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_occurrence
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_detail
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_detail
|
||||||
(visit_detail_id INTEGER NOT NULL ,
|
(visit_detail_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -324,7 +324,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_detail
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE procedure_occurrence
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE procedure_occurrence
|
||||||
(procedure_occurrence_id INTEGER NOT NULL ,
|
(procedure_occurrence_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -344,7 +344,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE procedure_occurrence
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_exposure
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_exposure
|
||||||
(drug_exposure_id INTEGER NOT NULL ,
|
(drug_exposure_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -373,7 +373,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_exposure
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE device_exposure
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE device_exposure
|
||||||
(device_exposure_id INTEGER NOT NULL ,
|
(device_exposure_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -394,7 +394,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE device_exposure
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_occurrence
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_occurrence
|
||||||
(condition_occurrence_id INTEGER NOT NULL ,
|
(condition_occurrence_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -416,13 +416,14 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_occurrence
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement
|
||||||
(measurement_id INTEGER NOT NULL ,
|
(measurement_id INTEGER NOT NULL ,
|
||||||
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 FLOAT NULL ,
|
value_as_number FLOAT NULL ,
|
||||||
|
@ -441,7 +442,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE note
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE note
|
||||||
(note_id INTEGER NOT NULL ,
|
(note_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -481,7 +482,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE note_nlp
|
||||||
WITH (DISTRIBUTION = REPLICATE);
|
WITH (DISTRIBUTION = REPLICATE);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE observation
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE observation
|
||||||
(observation_id INTEGER NOT NULL ,
|
(observation_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -572,7 +573,7 @@ Standardized health economics
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE payer_plan_period
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE payer_plan_period
|
||||||
(payer_plan_period_id INTEGER NOT NULL ,
|
(payer_plan_period_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -629,7 +630,7 @@ Standardized derived elements
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort
|
||||||
(cohort_definition_id INTEGER NOT NULL ,
|
(cohort_definition_id INTEGER NOT NULL ,
|
||||||
subject_id INTEGER NOT NULL ,
|
subject_id INTEGER NOT NULL ,
|
||||||
|
@ -639,7 +640,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort
|
||||||
WITH (DISTRIBUTION = HASH(subject_id));
|
WITH (DISTRIBUTION = HASH(subject_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort_attribute
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort_attribute
|
||||||
(cohort_definition_id INTEGER NOT NULL ,
|
(cohort_definition_id INTEGER NOT NULL ,
|
||||||
subject_id INTEGER NOT NULL ,
|
subject_id INTEGER NOT NULL ,
|
||||||
|
@ -652,7 +653,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort_attribute
|
||||||
WITH (DISTRIBUTION = HASH(subject_id));
|
WITH (DISTRIBUTION = HASH(subject_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_era
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_era
|
||||||
(drug_era_id INTEGER NOT NULL ,
|
(drug_era_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -665,7 +666,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_era
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE dose_era
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE dose_era
|
||||||
(dose_era_id INTEGER NOT NULL ,
|
(dose_era_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -678,7 +679,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE dose_era
|
||||||
WITH (DISTRIBUTION = HASH(person_id));
|
WITH (DISTRIBUTION = HASH(person_id));
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_era
|
IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_era
|
||||||
(condition_era_id INTEGER NOT NULL ,
|
(condition_era_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
|
|
@ -447,14 +447,15 @@ 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_datetime TIMESTAMP 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 NUMERIC NULL ,
|
value_as_number NUMERIC NULL ,
|
||||||
value_as_concept_id INTEGER NULL ,
|
value_as_concept_id INTEGER NULL ,
|
||||||
unit_concept_id INTEGER NULL ,
|
unit_concept_id INTEGER NULL ,
|
||||||
range_low NUMERIC NULL ,
|
range_low NUMERIC NULL ,
|
||||||
range_high NUMERIC NULL ,
|
range_high NUMERIC NULL ,
|
||||||
provider_id INTEGER NULL ,
|
provider_id INTEGER NULL ,
|
||||||
visit_occurrence_id INTEGER NULL ,
|
visit_occurrence_id INTEGER NULL ,
|
||||||
visit_detail_id INTEGER NULL ,
|
visit_detail_id INTEGER NULL ,
|
||||||
|
|
|
@ -207,7 +207,7 @@ Standardized clinical data
|
||||||
|
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE person
|
CREATE TABLE person
|
||||||
(person_id INTEGER NOT NULL ,
|
(person_id INTEGER NOT NULL ,
|
||||||
gender_concept_id INTEGER NOT NULL ,
|
gender_concept_id INTEGER NOT NULL ,
|
||||||
|
@ -231,7 +231,7 @@ CREATE TABLE person
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE observation_period
|
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 ,
|
||||||
|
@ -242,7 +242,7 @@ CREATE TABLE observation_period
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE specimen
|
CREATE TABLE specimen
|
||||||
(specimen_id INTEGER NOT NULL ,
|
(specimen_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -263,7 +263,7 @@ CREATE TABLE specimen
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE death
|
CREATE TABLE death
|
||||||
(person_id INTEGER NOT NULL ,
|
(person_id INTEGER NOT NULL ,
|
||||||
death_date DATE NOT NULL ,
|
death_date DATE NOT NULL ,
|
||||||
|
@ -276,7 +276,7 @@ CREATE TABLE death
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE visit_occurrence
|
CREATE TABLE visit_occurrence
|
||||||
(visit_occurrence_id INTEGER NOT NULL ,
|
(visit_occurrence_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -299,7 +299,7 @@ CREATE TABLE visit_occurrence
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE visit_detail
|
CREATE TABLE visit_detail
|
||||||
(visit_detail_id INTEGER NOT NULL ,
|
(visit_detail_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -324,7 +324,7 @@ CREATE TABLE visit_detail
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE procedure_occurrence
|
CREATE TABLE procedure_occurrence
|
||||||
(procedure_occurrence_id INTEGER NOT NULL ,
|
(procedure_occurrence_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -344,7 +344,7 @@ CREATE TABLE procedure_occurrence
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE drug_exposure
|
CREATE TABLE drug_exposure
|
||||||
(drug_exposure_id INTEGER NOT NULL ,
|
(drug_exposure_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -373,7 +373,7 @@ CREATE TABLE drug_exposure
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE device_exposure
|
CREATE TABLE device_exposure
|
||||||
(device_exposure_id INTEGER NOT NULL ,
|
(device_exposure_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -394,7 +394,7 @@ CREATE TABLE device_exposure
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE condition_occurrence
|
CREATE TABLE condition_occurrence
|
||||||
(condition_occurrence_id INTEGER NOT NULL ,
|
(condition_occurrence_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -416,13 +416,14 @@ CREATE TABLE condition_occurrence
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE measurement
|
CREATE TABLE measurement
|
||||||
(measurement_id INTEGER NOT NULL ,
|
(measurement_id INTEGER NOT NULL ,
|
||||||
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_datetime TIMESTAMP 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 FLOAT NULL ,
|
value_as_number FLOAT NULL ,
|
||||||
|
@ -441,7 +442,7 @@ CREATE TABLE measurement
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE note
|
CREATE TABLE note
|
||||||
(note_id INTEGER NOT NULL ,
|
(note_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -481,7 +482,7 @@ CREATE TABLE note_nlp
|
||||||
DISTSTYLE ALL;
|
DISTSTYLE ALL;
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE observation
|
CREATE TABLE observation
|
||||||
(observation_id INTEGER NOT NULL ,
|
(observation_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -572,7 +573,7 @@ Standardized health economics
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE payer_plan_period
|
CREATE TABLE payer_plan_period
|
||||||
(payer_plan_period_id INTEGER NOT NULL ,
|
(payer_plan_period_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -629,7 +630,7 @@ Standardized derived elements
|
||||||
************************/
|
************************/
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
||||||
CREATE TABLE cohort
|
CREATE TABLE cohort
|
||||||
(cohort_definition_id INTEGER NOT NULL ,
|
(cohort_definition_id INTEGER NOT NULL ,
|
||||||
subject_id INTEGER NOT NULL ,
|
subject_id INTEGER NOT NULL ,
|
||||||
|
@ -639,7 +640,7 @@ CREATE TABLE cohort
|
||||||
DISTKEY(subject_id);
|
DISTKEY(subject_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
--HINT DISTRIBUTE_ON_KEY(subject_id)
|
||||||
CREATE TABLE cohort_attribute
|
CREATE TABLE cohort_attribute
|
||||||
(cohort_definition_id INTEGER NOT NULL ,
|
(cohort_definition_id INTEGER NOT NULL ,
|
||||||
subject_id INTEGER NOT NULL ,
|
subject_id INTEGER NOT NULL ,
|
||||||
|
@ -652,7 +653,7 @@ CREATE TABLE cohort_attribute
|
||||||
DISTKEY(subject_id);
|
DISTKEY(subject_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE drug_era
|
CREATE TABLE drug_era
|
||||||
(drug_era_id INTEGER NOT NULL ,
|
(drug_era_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -665,7 +666,7 @@ CREATE TABLE drug_era
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE dose_era
|
CREATE TABLE dose_era
|
||||||
(dose_era_id INTEGER NOT NULL ,
|
(dose_era_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
@ -678,7 +679,7 @@ CREATE TABLE dose_era
|
||||||
DISTKEY(person_id);
|
DISTKEY(person_id);
|
||||||
|
|
||||||
|
|
||||||
--HINT DISTRIBUTE_ON_KEY(person_id)
|
--HINT DISTRIBUTE_ON_KEY(person_id)
|
||||||
CREATE TABLE condition_era
|
CREATE TABLE condition_era
|
||||||
(condition_era_id INTEGER NOT NULL ,
|
(condition_era_id INTEGER NOT NULL ,
|
||||||
person_id INTEGER NOT NULL ,
|
person_id INTEGER NOT NULL ,
|
||||||
|
|
|
@ -447,7 +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_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 FLOAT NULL ,
|
value_as_number FLOAT NULL ,
|
||||||
|
|
Loading…
Reference in New Issue