Merge branch 'master' of https://github.com/OHDSI/CommonDataModel
This commit is contained in:
commit
aeec6e3948
|
@ -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,
|
||||
birth_datetime TIMESTAMP WITH TIME ZONE 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 TIMESTAMP WITH TIME ZONE 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
|
||||
)
|
||||
;
|
||||
|
@ -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 TIMESTAMP WITH TIME ZONE NULL ,
|
||||
quantity FLOAT NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
anatomic_site_concept_id INTEGER NULL ,
|
||||
|
@ -287,7 +289,8 @@ CREATE TABLE death
|
|||
(
|
||||
person_id INTEGER NOT NULL ,
|
||||
death_date DATE NOT NULL ,
|
||||
death_type_concept_id INTEGER NOT NULL ,
|
||||
death_datetime TIMESTAMP WITH TIME ZONE NULL ,
|
||||
death_type_concept_id INTEGER NOT NULL ,
|
||||
cause_concept_id INTEGER NULL ,
|
||||
cause_source_value VARCHAR(50) NULL,
|
||||
cause_source_concept_id INTEGER NULL
|
||||
|
@ -302,9 +305,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 TIMESTAMP WITH TIME ZONE 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 ,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
|
@ -321,6 +324,7 @@ CREATE TABLE procedure_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
procedure_concept_id INTEGER NOT NULL ,
|
||||
procedure_date DATE NOT NULL ,
|
||||
procedure_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
|
||||
procedure_type_concept_id INTEGER NOT NULL ,
|
||||
modifier_concept_id INTEGER NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
|
@ -340,8 +344,10 @@ CREATE TABLE drug_exposure
|
|||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
drug_exposure_start_date DATE NOT NULL ,
|
||||
drug_exposure_end_date DATE NULL ,
|
||||
drug_type_concept_id INTEGER NOT NULL ,
|
||||
drug_exposure_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
|
||||
drug_exposure_end_date DATE NULL ,
|
||||
drug_exposure_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
|
||||
drug_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
refills INTEGER NULL ,
|
||||
quantity FLOAT NULL ,
|
||||
|
@ -367,8 +373,10 @@ CREATE TABLE device_exposure
|
|||
person_id INTEGER NOT NULL ,
|
||||
device_concept_id INTEGER NOT NULL ,
|
||||
device_exposure_start_date DATE NOT NULL ,
|
||||
device_exposure_end_date DATE NULL ,
|
||||
device_type_concept_id INTEGER NOT NULL ,
|
||||
device_exposure_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
|
||||
device_exposure_end_date DATE NULL ,
|
||||
device_exposure_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
|
||||
device_type_concept_id INTEGER NOT NULL ,
|
||||
unique_device_id VARCHAR(50) NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
|
@ -385,8 +393,10 @@ CREATE TABLE condition_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
condition_concept_id INTEGER NOT NULL ,
|
||||
condition_start_date DATE NOT NULL ,
|
||||
condition_end_date DATE NULL ,
|
||||
condition_type_concept_id INTEGER NOT NULL ,
|
||||
condition_start_datetime TIMESTAMP WITH TIME ZONE NOT NULL ,
|
||||
condition_end_date DATE NULL ,
|
||||
condition_end_datetime TIMESTAMP WITH TIME ZONE NULL ,
|
||||
condition_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
|
@ -403,7 +413,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 TIMESTAMP WITH TIME ZONE NULL ,
|
||||
measurement_type_concept_id INTEGER NOT NULL ,
|
||||
operator_concept_id INTEGER NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
|
@ -427,7 +437,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 TIMESTAMP WITH TIME ZONE NULL ,
|
||||
note_type_concept_id INTEGER NOT NULL ,
|
||||
note_text CLOB NOT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
|
@ -444,7 +454,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 TIMESTAMP WITH TIME ZONE NULL ,
|
||||
observation_type_concept_id INTEGER NOT NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_string VARCHAR(60) NULL ,
|
||||
|
|
|
@ -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,
|
||||
birth_datetime TIMESTAMP 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 TIMESTAMP NOT NULL ,
|
||||
observation_period_end_date DATE NOT NULL ,
|
||||
observation_period_end_datetime TIMESTAMP 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 TIMESTAMP NULL ,
|
||||
quantity NUMERIC NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
anatomic_site_concept_id INTEGER NULL ,
|
||||
|
@ -287,7 +289,8 @@ CREATE TABLE death
|
|||
(
|
||||
person_id INTEGER NOT NULL ,
|
||||
death_date DATE NOT NULL ,
|
||||
death_type_concept_id INTEGER NOT NULL ,
|
||||
death_datetime TIMESTAMP NULL ,
|
||||
death_type_concept_id INTEGER NOT NULL ,
|
||||
cause_concept_id INTEGER NULL ,
|
||||
cause_source_value VARCHAR(50) NULL,
|
||||
cause_source_concept_id INTEGER NULL
|
||||
|
@ -302,9 +305,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 TIMESTAMP NULL ,
|
||||
visit_end_date DATE NOT NULL ,
|
||||
visit_end_time VARCHAR(10) NULL ,
|
||||
visit_end_datetime TIMESTAMP NULL ,
|
||||
visit_type_concept_id INTEGER NOT NULL ,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
|
@ -321,6 +324,7 @@ CREATE TABLE procedure_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
procedure_concept_id INTEGER NOT NULL ,
|
||||
procedure_date DATE NOT NULL ,
|
||||
procedure_datetime TIMESTAMP NOT NULL ,
|
||||
procedure_type_concept_id INTEGER NOT NULL ,
|
||||
modifier_concept_id INTEGER NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
|
@ -340,8 +344,10 @@ CREATE TABLE drug_exposure
|
|||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
drug_exposure_start_date DATE NOT NULL ,
|
||||
drug_exposure_end_date DATE NULL ,
|
||||
drug_type_concept_id INTEGER NOT NULL ,
|
||||
drug_exposure_start_datetime TIMESTAMP NOT NULL ,
|
||||
drug_exposure_end_date DATE NULL ,
|
||||
drug_exposure_end_datetime TIMESTAMP NULL ,
|
||||
drug_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
refills INTEGER NULL ,
|
||||
quantity NUMERIC NULL ,
|
||||
|
@ -367,8 +373,10 @@ CREATE TABLE device_exposure
|
|||
person_id INTEGER NOT NULL ,
|
||||
device_concept_id INTEGER NOT NULL ,
|
||||
device_exposure_start_date DATE NOT NULL ,
|
||||
device_exposure_end_date DATE NULL ,
|
||||
device_type_concept_id INTEGER NOT NULL ,
|
||||
device_exposure_start_datetime TIMESTAMP NOT NULL ,
|
||||
device_exposure_end_date DATE NULL ,
|
||||
device_exposure_end_datetime TIMESTAMP NULL ,
|
||||
device_type_concept_id INTEGER NOT NULL ,
|
||||
unique_device_id VARCHAR(50) NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
|
@ -385,8 +393,10 @@ CREATE TABLE condition_occurrence
|
|||
person_id INTEGER NOT NULL ,
|
||||
condition_concept_id INTEGER NOT NULL ,
|
||||
condition_start_date DATE NOT NULL ,
|
||||
condition_end_date DATE NULL ,
|
||||
condition_type_concept_id INTEGER NOT NULL ,
|
||||
condition_start_datetime TIMESTAMP NOT NULL ,
|
||||
condition_end_date DATE NULL ,
|
||||
condition_end_datetime TIMESTAMP NULL ,
|
||||
condition_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
|
@ -403,7 +413,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 TIMESTAMP NULL ,
|
||||
measurement_type_concept_id INTEGER NOT NULL ,
|
||||
operator_concept_id INTEGER NULL ,
|
||||
value_as_number NUMERIC NULL ,
|
||||
|
@ -427,7 +437,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 TIMESTAMP NULL ,
|
||||
note_type_concept_id INTEGER NOT NULL ,
|
||||
note_text TEXT NOT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
|
@ -444,7 +454,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 TIMESTAMP NULL ,
|
||||
observation_type_concept_id INTEGER NOT NULL ,
|
||||
value_as_number NUMERIC NULL ,
|
||||
value_as_string VARCHAR(60) NULL ,
|
||||
|
|
45
README.md
45
README.md
|
@ -1,6 +1,51 @@
|
|||
Common-Data-Model
|
||||
=================
|
||||
|
||||
v5.1
|
||||
See full CDM specification file on our [Wiki](http://www.ohdsi.org/web/wiki/doku.php?id=documentation:cdm:single-page) or in the [CDM V5 PDF](https://github.com/OHDSI/CommonDataModel/blob/master/OMOP%20CDM%20v5.pdf)
|
||||
|
||||
Release Notes
|
||||
=============
|
||||
This version is bases on this CDM working group [proposal](http://www.ohdsi.org/web/wiki/doku.php?id=documentation:next_cdm:time). The proposed and accepted changes include adding a datetime field to every table that had a date column. These were the new columns added:
|
||||
|
||||
**PERSON**
|
||||
* birth_datetime, not required
|
||||
|
||||
**SPECIMEN**
|
||||
* specimen_datetime, not required
|
||||
|
||||
**DEATH**
|
||||
* death_datetime, not required
|
||||
|
||||
**VISIT_OCCURRENCE**
|
||||
* visit_start_datetime, not required
|
||||
* visit_end_datetime, not required
|
||||
|
||||
**PROCEDURE_OCCURRENCE**
|
||||
* procedure_datetime, not required
|
||||
|
||||
**DRUG_EXPOSURE**
|
||||
* drug_exposure_start_datetime, not required
|
||||
* drug_exposure_end_datetime, not required
|
||||
|
||||
**DEVICE_EXPOSURE**
|
||||
* device_exposure_start_datetime, not required
|
||||
* device_exposure_end_datetime, not required
|
||||
|
||||
**CONDITION_OCCURRENCE**
|
||||
* condition_start_datetime, not required
|
||||
* condition_end_datetime, not required
|
||||
|
||||
**MEASUREMENT**
|
||||
* measurement_datetime as time, not required
|
||||
|
||||
**OBSERVATION**
|
||||
* observation_datetime, not required
|
||||
|
||||
**NOTE**
|
||||
* note_datetime, not required
|
||||
|
||||
=======
|
||||
This repo contains the definition of the OMOP Common Data Model. It supports the 4 SQL technologies: Impala, Oracle, Postgres and SQL Server. For each, the DDL, constraints and indexes (if appropirate) are defined.
|
||||
|
||||
Versions are defined using tagging and versioning. Full versions (V6, 7 etc.) are released irregularly after a major strategy change or use case coverage. It will be issued during an OHDSI Symposium. Major version (V5.1, 5.2 etc.) are released half yearly (1-Jul and 1-Jan). Those versions are not guaranteed to be backward compatible. Minor versions (V5.1.1, V5.1.2 etc.) are released irregularly and often, and contain small hot fixes or backward compatible changes to the last Major Version.
|
||||
|
|
|
@ -194,19 +194,19 @@ Standardized meta-data
|
|||
***************************/
|
||||
|
||||
|
||||
CREATE TABLE cdm_source
|
||||
(
|
||||
cdm_source_name VARCHAR(255) NOT NULL,
|
||||
cdm_source_abbreviation VARCHAR(25) NULL,
|
||||
cdm_holder VARCHAR(255) NULL,
|
||||
source_description VARCHAR(MAX) NULL,
|
||||
source_documentation_reference VARCHAR(255) NULL,
|
||||
cdm_etl_reference VARCHAR(255) NULL,
|
||||
source_release_date DATE NULL,
|
||||
cdm_release_date DATE NULL,
|
||||
cdm_version VARCHAR(10) NULL,
|
||||
vocabulary_version VARCHAR(20) NULL
|
||||
)
|
||||
CREATE TABLE cdm_source
|
||||
(
|
||||
cdm_source_name VARCHAR(255) NOT NULL,
|
||||
cdm_source_abbreviation VARCHAR(25) NULL,
|
||||
cdm_holder VARCHAR(255) NULL,
|
||||
source_description VARCHAR(MAX) NULL,
|
||||
source_documentation_reference VARCHAR(255) NULL,
|
||||
cdm_etl_reference VARCHAR(255) NULL,
|
||||
source_release_date DATE NULL,
|
||||
cdm_release_date DATE NULL,
|
||||
cdm_version VARCHAR(10) NULL,
|
||||
vocabulary_version VARCHAR(20) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
@ -222,254 +222,264 @@ Standardized clinical data
|
|||
************************/
|
||||
|
||||
|
||||
CREATE TABLE person
|
||||
(
|
||||
person_id INTEGER NOT NULL ,
|
||||
gender_concept_id INTEGER NOT NULL ,
|
||||
year_of_birth INTEGER NOT NULL ,
|
||||
month_of_birth INTEGER NULL,
|
||||
day_of_birth INTEGER NULL,
|
||||
time_of_birth VARCHAR(10) NULL,
|
||||
race_concept_id INTEGER NOT NULL,
|
||||
ethnicity_concept_id INTEGER NOT NULL,
|
||||
location_id INTEGER NULL,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
person_source_value VARCHAR(50) NULL,
|
||||
gender_source_value VARCHAR(50) NULL,
|
||||
gender_source_concept_id INTEGER NULL,
|
||||
race_source_value VARCHAR(50) NULL,
|
||||
race_source_concept_id INTEGER NULL,
|
||||
ethnicity_source_value VARCHAR(50) NULL,
|
||||
ethnicity_source_concept_id INTEGER NULL
|
||||
)
|
||||
CREATE TABLE person
|
||||
(
|
||||
person_id INTEGER NOT NULL ,
|
||||
gender_concept_id INTEGER NOT NULL ,
|
||||
year_of_birth INTEGER NOT NULL ,
|
||||
month_of_birth INTEGER NULL,
|
||||
day_of_birth INTEGER NULL,
|
||||
birth_datetime DATETIME2 NULL,
|
||||
race_concept_id INTEGER NOT NULL,
|
||||
ethnicity_concept_id INTEGER NOT NULL,
|
||||
location_id INTEGER NULL,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
person_source_value VARCHAR(50) NULL,
|
||||
gender_source_value VARCHAR(50) NULL,
|
||||
gender_source_concept_id INTEGER NULL,
|
||||
race_source_value VARCHAR(50) NULL,
|
||||
race_source_concept_id INTEGER NULL,
|
||||
ethnicity_source_value VARCHAR(50) NULL,
|
||||
ethnicity_source_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE observation_period
|
||||
(
|
||||
observation_period_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
observation_period_start_date DATE NOT NULL ,
|
||||
observation_period_end_date DATE NOT NULL ,
|
||||
period_type_concept_id INTEGER NOT NULL
|
||||
)
|
||||
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
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE specimen
|
||||
(
|
||||
specimen_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
specimen_concept_id INTEGER NOT NULL ,
|
||||
specimen_type_concept_id INTEGER NOT NULL ,
|
||||
specimen_date DATE NOT NULL ,
|
||||
specimen_time VARCHAR(10) NULL ,
|
||||
quantity FLOAT NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
anatomic_site_concept_id INTEGER NULL ,
|
||||
disease_status_concept_id INTEGER NULL ,
|
||||
specimen_source_id VARCHAR(50) NULL ,
|
||||
specimen_source_value VARCHAR(50) NULL ,
|
||||
unit_source_value VARCHAR(50) NULL ,
|
||||
anatomic_site_source_value VARCHAR(50) NULL ,
|
||||
disease_status_source_value VARCHAR(50) NULL
|
||||
)
|
||||
(
|
||||
specimen_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
specimen_concept_id INTEGER NOT NULL ,
|
||||
specimen_type_concept_id INTEGER NOT NULL ,
|
||||
specimen_date DATE NOT NULL ,
|
||||
specimen_datetime DATETIME2 NULL ,
|
||||
quantity FLOAT NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
anatomic_site_concept_id INTEGER NULL ,
|
||||
disease_status_concept_id INTEGER NULL ,
|
||||
specimen_source_id VARCHAR(50) NULL ,
|
||||
specimen_source_value VARCHAR(50) NULL ,
|
||||
unit_source_value VARCHAR(50) NULL ,
|
||||
anatomic_site_source_value VARCHAR(50) NULL ,
|
||||
disease_status_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE death
|
||||
(
|
||||
person_id INTEGER NOT NULL ,
|
||||
death_date DATE NOT NULL ,
|
||||
death_type_concept_id INTEGER NOT NULL ,
|
||||
cause_concept_id INTEGER NULL ,
|
||||
cause_source_value VARCHAR(50) NULL,
|
||||
cause_source_concept_id INTEGER NULL
|
||||
)
|
||||
CREATE TABLE death
|
||||
(
|
||||
person_id INTEGER NOT NULL ,
|
||||
death_date DATE NOT NULL ,
|
||||
death_datetime DATETIME2 NULL ,
|
||||
death_type_concept_id INTEGER NOT NULL ,
|
||||
cause_concept_id INTEGER NULL ,
|
||||
cause_source_value VARCHAR(50) NULL,
|
||||
cause_source_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE visit_occurrence
|
||||
(
|
||||
visit_occurrence_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
visit_concept_id INTEGER NOT NULL ,
|
||||
visit_start_date DATE NOT NULL ,
|
||||
visit_start_time VARCHAR(10) NULL ,
|
||||
visit_end_date DATE NOT NULL ,
|
||||
visit_end_time VARCHAR(10) NULL ,
|
||||
visit_type_concept_id INTEGER NOT NULL ,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
visit_source_value VARCHAR(50) NULL,
|
||||
visit_source_concept_id INTEGER NULL
|
||||
)
|
||||
CREATE TABLE visit_occurrence
|
||||
(
|
||||
visit_occurrence_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
visit_concept_id INTEGER NOT NULL ,
|
||||
visit_start_date DATE NOT NULL ,
|
||||
visit_start_datetime DATETIME2 NULL ,
|
||||
visit_end_date DATE NOT NULL ,
|
||||
visit_end_datetime DATETIME2 NULL ,
|
||||
visit_type_concept_id INTEGER NOT NULL ,
|
||||
provider_id INTEGER NULL,
|
||||
care_site_id INTEGER NULL,
|
||||
visit_source_value VARCHAR(50) NULL,
|
||||
visit_source_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE procedure_occurrence
|
||||
(
|
||||
procedure_occurrence_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
procedure_concept_id INTEGER NOT NULL ,
|
||||
procedure_date DATE NOT NULL ,
|
||||
procedure_type_concept_id INTEGER NOT NULL ,
|
||||
modifier_concept_id INTEGER NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
procedure_source_value VARCHAR(50) NULL ,
|
||||
procedure_source_concept_id INTEGER NULL ,
|
||||
qualifier_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE procedure_occurrence
|
||||
(
|
||||
procedure_occurrence_id INTEGER NOT NULL ,
|
||||
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 ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
procedure_source_value VARCHAR(50) NULL ,
|
||||
procedure_source_concept_id INTEGER NULL ,
|
||||
qualifier_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE drug_exposure
|
||||
(
|
||||
drug_exposure_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
drug_exposure_start_date DATE NOT NULL ,
|
||||
drug_exposure_end_date DATE NULL ,
|
||||
drug_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
refills INTEGER NULL ,
|
||||
quantity FLOAT NULL ,
|
||||
days_supply INTEGER NULL ,
|
||||
sig VARCHAR(MAX) NULL ,
|
||||
route_concept_id INTEGER NULL ,
|
||||
effective_drug_dose FLOAT NULL ,
|
||||
dose_unit_concept_id INTEGER NULL ,
|
||||
lot_number VARCHAR(50) NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
drug_source_value VARCHAR(50) NULL ,
|
||||
drug_source_concept_id INTEGER NULL ,
|
||||
route_source_value VARCHAR(50) NULL ,
|
||||
dose_unit_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE drug_exposure
|
||||
(
|
||||
drug_exposure_id INTEGER NOT NULL ,
|
||||
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 ,
|
||||
quantity FLOAT NULL ,
|
||||
days_supply INTEGER NULL ,
|
||||
sig VARCHAR(MAX) NULL ,
|
||||
route_concept_id INTEGER NULL ,
|
||||
effective_drug_dose FLOAT NULL ,
|
||||
dose_unit_concept_id INTEGER NULL ,
|
||||
lot_number VARCHAR(50) NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
drug_source_value VARCHAR(50) NULL ,
|
||||
drug_source_concept_id INTEGER NULL ,
|
||||
route_source_value VARCHAR(50) NULL ,
|
||||
dose_unit_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
CREATE TABLE device_exposure
|
||||
(
|
||||
device_exposure_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
device_concept_id INTEGER NOT NULL ,
|
||||
device_exposure_start_date DATE NOT NULL ,
|
||||
device_exposure_end_date DATE NULL ,
|
||||
device_type_concept_id INTEGER NOT NULL ,
|
||||
unique_device_id VARCHAR(50) NULL ,
|
||||
quantity INTEGER NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
device_source_value VARCHAR(100) NULL ,
|
||||
device_source_concept_id INTEGER NULL
|
||||
)
|
||||
CREATE TABLE device_exposure
|
||||
(
|
||||
device_exposure_id INTEGER NOT NULL ,
|
||||
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 ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
device_source_value VARCHAR(100) NULL ,
|
||||
device_source_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
CREATE TABLE condition_occurrence
|
||||
(
|
||||
condition_occurrence_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
condition_concept_id INTEGER NOT NULL ,
|
||||
condition_start_date DATE NOT NULL ,
|
||||
condition_end_date DATE NULL ,
|
||||
condition_type_concept_id INTEGER NOT NULL ,
|
||||
stop_reason VARCHAR(20) NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
condition_source_value VARCHAR(50) NULL ,
|
||||
condition_source_concept_id INTEGER NULL
|
||||
)
|
||||
CREATE TABLE condition_occurrence
|
||||
(
|
||||
condition_occurrence_id INTEGER NOT NULL ,
|
||||
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 ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
condition_source_value VARCHAR(50) NULL ,
|
||||
condition_source_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE measurement
|
||||
(
|
||||
measurement_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
measurement_concept_id INTEGER NOT NULL ,
|
||||
measurement_date DATE NOT NULL ,
|
||||
measurement_time VARCHAR(10) NULL ,
|
||||
measurement_type_concept_id INTEGER NOT NULL ,
|
||||
operator_concept_id INTEGER NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_concept_id INTEGER NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
range_low FLOAT NULL ,
|
||||
range_high FLOAT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
measurement_source_value VARCHAR(50) NULL ,
|
||||
measurement_source_concept_id INTEGER NULL ,
|
||||
unit_source_value VARCHAR(50) NULL ,
|
||||
value_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE measurement
|
||||
(
|
||||
measurement_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
measurement_concept_id INTEGER NOT NULL ,
|
||||
measurement_date DATE NOT NULL ,
|
||||
measurement_datetime DATETIME2 NULL ,
|
||||
measurement_type_concept_id INTEGER NOT NULL ,
|
||||
operator_concept_id INTEGER NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_concept_id INTEGER NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
range_low FLOAT NULL ,
|
||||
range_high FLOAT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
measurement_source_value VARCHAR(50) NULL ,
|
||||
measurement_source_concept_id INTEGER NULL ,
|
||||
unit_source_value VARCHAR(50) NULL ,
|
||||
value_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE note
|
||||
(
|
||||
note_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
note_date DATE NOT NULL ,
|
||||
note_time VARCHAR(10) NULL ,
|
||||
note_type_concept_id INTEGER NOT NULL ,
|
||||
note_text VARCHAR(MAX) NOT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
note_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE note
|
||||
(
|
||||
note_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
note_date DATE NOT NULL ,
|
||||
note_datetime DATETIME2 NULL ,
|
||||
note_type_concept_id INTEGER NOT NULL ,
|
||||
note_text VARCHAR(MAX) NOT NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
note_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE observation
|
||||
(
|
||||
observation_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
observation_concept_id INTEGER NOT NULL ,
|
||||
observation_date DATE NOT NULL ,
|
||||
observation_time VARCHAR(10) NULL ,
|
||||
observation_type_concept_id INTEGER NOT NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_string VARCHAR(60) NULL ,
|
||||
value_as_concept_id INTEGER NULL ,
|
||||
qualifier_concept_id INTEGER NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
observation_source_value VARCHAR(50) NULL ,
|
||||
observation_source_concept_id INTEGER NULL ,
|
||||
unit_source_value VARCHAR(50) NULL ,
|
||||
qualifier_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE observation
|
||||
(
|
||||
observation_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
observation_concept_id INTEGER NOT NULL ,
|
||||
observation_date DATE NOT NULL ,
|
||||
observation_datetime DATETIME2 NULL ,
|
||||
observation_type_concept_id INTEGER NOT NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_string VARCHAR(60) NULL ,
|
||||
value_as_concept_id INTEGER NULL ,
|
||||
qualifier_concept_id INTEGER NULL ,
|
||||
unit_concept_id INTEGER NULL ,
|
||||
provider_id INTEGER NULL ,
|
||||
visit_occurrence_id INTEGER NULL ,
|
||||
observation_source_value VARCHAR(50) NULL ,
|
||||
observation_source_concept_id INTEGER NULL ,
|
||||
unit_source_value VARCHAR(50) NULL ,
|
||||
qualifier_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE fact_relationship
|
||||
(
|
||||
domain_concept_id_1 INTEGER NOT NULL ,
|
||||
fact_id_1 INTEGER NOT NULL ,
|
||||
domain_concept_id_2 INTEGER NOT NULL ,
|
||||
fact_id_2 INTEGER NOT NULL ,
|
||||
relationship_concept_id INTEGER NOT NULL
|
||||
)
|
||||
CREATE TABLE fact_relationship
|
||||
(
|
||||
domain_concept_id_1 INTEGER NOT NULL ,
|
||||
fact_id_1 INTEGER NOT NULL ,
|
||||
domain_concept_id_2 INTEGER NOT NULL ,
|
||||
fact_id_2 INTEGER NOT NULL ,
|
||||
relationship_concept_id INTEGER NOT NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
@ -483,50 +493,50 @@ Standardized health system data
|
|||
|
||||
|
||||
|
||||
CREATE TABLE location
|
||||
(
|
||||
location_id INTEGER NOT NULL ,
|
||||
address_1 VARCHAR(50) NULL ,
|
||||
address_2 VARCHAR(50) NULL ,
|
||||
city VARCHAR(50) NULL ,
|
||||
state VARCHAR(2) NULL ,
|
||||
zip VARCHAR(9) NULL ,
|
||||
county VARCHAR(20) NULL ,
|
||||
location_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE location
|
||||
(
|
||||
location_id INTEGER NOT NULL ,
|
||||
address_1 VARCHAR(50) NULL ,
|
||||
address_2 VARCHAR(50) NULL ,
|
||||
city VARCHAR(50) NULL ,
|
||||
state VARCHAR(2) NULL ,
|
||||
zip VARCHAR(9) NULL ,
|
||||
county VARCHAR(20) NULL ,
|
||||
location_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE care_site
|
||||
(
|
||||
care_site_id INTEGER NOT NULL ,
|
||||
care_site_name VARCHAR(255) NULL ,
|
||||
place_of_service_concept_id INTEGER NULL ,
|
||||
location_id INTEGER NULL ,
|
||||
care_site_source_value VARCHAR(50) NULL ,
|
||||
place_of_service_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE care_site
|
||||
(
|
||||
care_site_id INTEGER NOT NULL ,
|
||||
care_site_name VARCHAR(255) NULL ,
|
||||
place_of_service_concept_id INTEGER NULL ,
|
||||
location_id INTEGER NULL ,
|
||||
care_site_source_value VARCHAR(50) NULL ,
|
||||
place_of_service_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
CREATE TABLE provider
|
||||
(
|
||||
provider_id INTEGER NOT NULL ,
|
||||
provider_name VARCHAR(255) NULL ,
|
||||
NPI VARCHAR(20) NULL ,
|
||||
DEA VARCHAR(20) NULL ,
|
||||
specialty_concept_id INTEGER NULL ,
|
||||
care_site_id INTEGER NULL ,
|
||||
year_of_birth INTEGER NULL ,
|
||||
gender_concept_id INTEGER NULL ,
|
||||
provider_source_value VARCHAR(50) NULL ,
|
||||
specialty_source_value VARCHAR(50) NULL ,
|
||||
specialty_source_concept_id INTEGER NULL ,
|
||||
gender_source_value VARCHAR(50) NULL ,
|
||||
gender_source_concept_id INTEGER NULL
|
||||
)
|
||||
|
||||
CREATE TABLE provider
|
||||
(
|
||||
provider_id INTEGER NOT NULL ,
|
||||
provider_name VARCHAR(255) NULL ,
|
||||
NPI VARCHAR(20) NULL ,
|
||||
DEA VARCHAR(20) NULL ,
|
||||
specialty_concept_id INTEGER NULL ,
|
||||
care_site_id INTEGER NULL ,
|
||||
year_of_birth INTEGER NULL ,
|
||||
gender_concept_id INTEGER NULL ,
|
||||
provider_source_value VARCHAR(50) NULL ,
|
||||
specialty_source_value VARCHAR(50) NULL ,
|
||||
specialty_source_concept_id INTEGER NULL ,
|
||||
gender_source_value VARCHAR(50) NULL ,
|
||||
gender_source_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
@ -539,16 +549,16 @@ Standardized health economics
|
|||
************************/
|
||||
|
||||
|
||||
CREATE TABLE payer_plan_period
|
||||
(
|
||||
payer_plan_period_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
payer_plan_period_start_date DATE NOT NULL ,
|
||||
payer_plan_period_end_date DATE NOT NULL ,
|
||||
payer_source_value VARCHAR (50) NULL ,
|
||||
plan_source_value VARCHAR (50) NULL ,
|
||||
family_source_value VARCHAR (50) NULL
|
||||
)
|
||||
CREATE TABLE payer_plan_period
|
||||
(
|
||||
payer_plan_period_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
payer_plan_period_start_date DATE NOT NULL ,
|
||||
payer_plan_period_end_date DATE NOT NULL ,
|
||||
payer_source_value VARCHAR (50) NULL ,
|
||||
plan_source_value VARCHAR (50) NULL ,
|
||||
family_source_value VARCHAR (50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
@ -631,29 +641,29 @@ CREATE TABLE device_cost
|
|||
*/
|
||||
|
||||
|
||||
CREATE TABLE cost
|
||||
(
|
||||
cost_id INTEGER NOT NULL ,
|
||||
cost_event_id INTEGER NOT NULL ,
|
||||
cost_domain_id VARCHAR(20) NOT NULL ,
|
||||
cost_type_concept_id INTEGER NOT NULL ,
|
||||
currency_concept_id INTEGER NULL ,
|
||||
total_charge FLOAT NULL ,
|
||||
total_cost FLOAT NULL ,
|
||||
total_paid FLOAT NULL ,
|
||||
paid_by_payer FLOAT NULL ,
|
||||
paid_by_patient FLOAT NULL ,
|
||||
paid_patient_copay FLOAT NULL ,
|
||||
paid_patient_coinsurance FLOAT NULL ,
|
||||
paid_patient_deductible FLOAT NULL ,
|
||||
paid_by_primary FLOAT NULL ,
|
||||
paid_ingredient_cost FLOAT NULL ,
|
||||
paid_dispensing_fee FLOAT NULL ,
|
||||
payer_plan_period_id INTEGER NULL ,
|
||||
amount_allowed FLOAT NULL ,
|
||||
revenue_code_concept_id INTEGER NULL ,
|
||||
reveue_code_source_value VARCHAR(50) NULL
|
||||
)
|
||||
CREATE TABLE cost
|
||||
(
|
||||
cost_id INTEGER NOT NULL ,
|
||||
cost_event_id INTEGER NOT NULL ,
|
||||
cost_domain_id VARCHAR(20) NOT NULL ,
|
||||
cost_type_concept_id INTEGER NOT NULL ,
|
||||
currency_concept_id INTEGER NULL ,
|
||||
total_charge FLOAT NULL ,
|
||||
total_cost FLOAT NULL ,
|
||||
total_paid FLOAT NULL ,
|
||||
paid_by_payer FLOAT NULL ,
|
||||
paid_by_patient FLOAT NULL ,
|
||||
paid_patient_copay FLOAT NULL ,
|
||||
paid_patient_coinsurance FLOAT NULL ,
|
||||
paid_patient_deductible FLOAT NULL ,
|
||||
paid_by_primary FLOAT NULL ,
|
||||
paid_ingredient_cost FLOAT NULL ,
|
||||
paid_dispensing_fee FLOAT NULL ,
|
||||
payer_plan_period_id INTEGER NULL ,
|
||||
amount_allowed FLOAT NULL ,
|
||||
revenue_code_concept_id INTEGER NULL ,
|
||||
reveue_code_source_value VARCHAR(50) NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
@ -666,68 +676,68 @@ Standardized derived elements
|
|||
|
||||
************************/
|
||||
|
||||
CREATE TABLE cohort
|
||||
(
|
||||
cohort_definition_id INTEGER NOT NULL ,
|
||||
subject_id INTEGER NOT NULL ,
|
||||
cohort_start_date DATE NOT NULL ,
|
||||
cohort_end_date DATE NOT NULL
|
||||
)
|
||||
CREATE TABLE cohort
|
||||
(
|
||||
cohort_definition_id INTEGER NOT NULL ,
|
||||
subject_id INTEGER NOT NULL ,
|
||||
cohort_start_date DATE NOT NULL ,
|
||||
cohort_end_date DATE NOT NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
CREATE TABLE cohort_attribute
|
||||
(
|
||||
cohort_definition_id INTEGER NOT NULL ,
|
||||
cohort_start_date DATE NOT NULL ,
|
||||
cohort_end_date DATE NOT NULL ,
|
||||
subject_id INTEGER NOT NULL ,
|
||||
attribute_definition_id INTEGER NOT NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_concept_id INTEGER NULL
|
||||
)
|
||||
CREATE TABLE cohort_attribute
|
||||
(
|
||||
cohort_definition_id INTEGER NOT NULL ,
|
||||
cohort_start_date DATE NOT NULL ,
|
||||
cohort_end_date DATE NOT NULL ,
|
||||
subject_id INTEGER NOT NULL ,
|
||||
attribute_definition_id INTEGER NOT NULL ,
|
||||
value_as_number FLOAT NULL ,
|
||||
value_as_concept_id INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE drug_era
|
||||
(
|
||||
drug_era_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
drug_era_start_date DATE NOT NULL ,
|
||||
drug_era_end_date DATE NOT NULL ,
|
||||
drug_exposure_count INTEGER NULL ,
|
||||
gap_days INTEGER NULL
|
||||
)
|
||||
CREATE TABLE drug_era
|
||||
(
|
||||
drug_era_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
drug_era_start_date DATE NOT NULL ,
|
||||
drug_era_end_date DATE NOT NULL ,
|
||||
drug_exposure_count INTEGER NULL ,
|
||||
gap_days INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
CREATE TABLE dose_era
|
||||
(
|
||||
dose_era_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
unit_concept_id INTEGER NOT NULL ,
|
||||
dose_value FLOAT NOT NULL ,
|
||||
dose_era_start_date DATE NOT NULL ,
|
||||
dose_era_end_date DATE NOT NULL
|
||||
)
|
||||
CREATE TABLE dose_era
|
||||
(
|
||||
dose_era_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
drug_concept_id INTEGER NOT NULL ,
|
||||
unit_concept_id INTEGER NOT NULL ,
|
||||
dose_value FLOAT NOT NULL ,
|
||||
dose_era_start_date DATE NOT NULL ,
|
||||
dose_era_end_date DATE NOT NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE condition_era
|
||||
(
|
||||
condition_era_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
condition_concept_id INTEGER NOT NULL ,
|
||||
condition_era_start_date DATE NOT NULL ,
|
||||
condition_era_end_date DATE NOT NULL ,
|
||||
condition_occurrence_count INTEGER NULL
|
||||
)
|
||||
CREATE TABLE condition_era
|
||||
(
|
||||
condition_era_id INTEGER NOT NULL ,
|
||||
person_id INTEGER NOT NULL ,
|
||||
condition_concept_id INTEGER NOT NULL ,
|
||||
condition_era_start_date DATE NOT NULL ,
|
||||
condition_era_end_date DATE NOT NULL ,
|
||||
condition_occurrence_count INTEGER NULL
|
||||
)
|
||||
;
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue