From 98f2927cc9f2459242492505bed3c0d6003f5b2b Mon Sep 17 00:00:00 2001 From: Gowtham Rao Date: Mon, 6 Nov 2017 05:29:17 -0500 Subject: [PATCH 1/5] Updates to payer plan period based on proposal accepted by CDM workgroup Updated based on acceptance of https://github.com/OHDSI/CommonDataModel/issues/120 --- .../PAYER_PLAN_PERIOD.md | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/PAYER_PLAN_PERIOD.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/PAYER_PLAN_PERIOD.md index 8afc419..f7f947d 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/PAYER_PLAN_PERIOD.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedHealthEconomicsDataTables/PAYER_PLAN_PERIOD.md @@ -1,16 +1,27 @@ -The PAYER_PLAN_PERIOD table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure from a given Payer. Each Person receiving healthcare is typically covered by a health benefit plan, which pays for (fully or partially), or directly provides, the care. These benefit plans are provided by payers, such as health insurances or state or government agencies. In each plan the details of the health benefits are defined for the Person or her family, and the health benefit Plan might change over time typically with increasing utilization (reaching certain cost thresholds such as deductibles), plan availability and purchasing choices of the Person. The unique combinations of Payer organizations, health benefit Plans and time periods in which they are valid for a Person are recorded in this table. +The PAYER_PLAN_PERIOD table captures details of the period of time that a Person is continuously enrolled under a specific health Plan benefit structure, from a certain sponsor, from a given Payer and within the same family. Each Person receiving healthcare is typically covered by a health benefit plan, which determines what health care services will be paid for (fully or partially). A sponsor (usually an employer group or government or the payer itself) holds the financial responsibility for the reimbursement, and the financial transaction of adjudicating the eligible plan-benefit and reimbursing the service provider is administered by the payer. In each plan the details of the health benefits are defined for the Person or her family, and the health benefit Plan might change over time typically with increasing utilization (reaching certain cost thresholds such as deductibles), plan availability and purchasing choices of the Person. The unique combinations of Payer organizations, health benefit Plans and time periods in which they are valid for a Person are recorded in this table. Field|Required|Type|Description :------------------------------|:--------|:------------|:---------------------------------------------- -|payer_plan_period_id|Yes|integer|A identifier for each unique combination of payer, plan, family code and time span.| +|payer_plan_period_id|Yes|integer|A identifier for each unique combination of payer, sponsor, plan, family code and time span.| |person_id|Yes|integer|A foreign key identifier to the Person covered by the payer. The demographic details of that Person are stored in the PERSON table.| |payer_plan_period_start_date|Yes|date|The start date of the payer plan period.| |payer_plan_period_end_date|Yes|date|The end date of the payer plan period.| +| payer_concept_id |No|integer|A foreign key that refers to a Standard Payer concept identifiers in the Standardized Vocabularies| |payer_source_value|No|varchar(50)|The source code for the payer as it appears in the source data.| +| payer_source_concept_id |No|integer|A foreign key to a payer concept that refers to the code used in the source.| +| plan_concept_id|No|integer|A foreign key that refers to a Standard plan that represents the health benefit plan in the Standardized Vocabularies| |plan_source_value|No|varchar(50)|The source code for the Person's health benefit plan as it appears in the source data.| +| plan_source_concept_id |No|integer|A foreign key to a plan concept that refers to the code used in the source.| +| sponsor_concept_id |No|integer|A foreign key that refers to a Standard plan that represents the sponsor in the Standardized Vocabularies| +|sponsor_source_value|No|varchar(50)|The source code for the Person's sponsor of the health plan as it appears in the source data.| +| sponsor_source_concept_id*|No|integer|A foreign key to a sponsor concept that refers to the code used in the source.| |family_source_value|No|varchar(50)|The source code for the Person's family as it appears in the source data.| +| stop_reason_concept_id |No|integer|A foreign key that refers to a Standard termination reason that represents the reason for the termination in the Standardized Vocabularies.| +| stop_reason_source_value |No|varchar(50)|The reason for stop-coverage of the record.| +| stop_reason_source_concept_id |No|integer|A foreign key to a stop-coverage concept that refers to the code used in the source.| ### Conventions - * Different Payers have different designs for their health benefit Plans. The PAYER_PLAN_PERIOD table does not capture all details of the plan design or the relationship between Plans or the cost of healthcare triggering a change from one Plan to another. However, it allows identifying the unique combination of Payer (insurer), Plan (determining healthcare benefits and limits) and Person. Typically, depending on healthcare utilization, a Person may have one or many subsequent Plans during coverage by a single Payer. - * Payer or Plan information is not normalized or recorded as part of the Standard Vocabularies. Instead, they are referred to only by their source_value. - * Typically, family members are covered under the same Plan as the Person. In those cases, the payer_source_value, plan_source_value and family_source_value are identical. \ No newline at end of file + * Different Payers have different designs for their health benefit Plans. The PAYER_PLAN_PERIOD table does not capture all details of the plan design or the relationship between Plans or the cost of healthcare triggering a change from one Plan to another. However, it allows identifying the unique combination of Payer (insurer), Plan (determining healthcare benefits and limits), Sponsor (holds the financial risk), Family and Person. Typically, depending on healthcare utilization, a Person may have one or many subsequent Plans during coverage by a single Payer. + * **sponsor:** who finances the transaction. **payer:** who administers the transaction. **plan:** the actual contract being administered by the payer and agreed by the sponsor. **stop reason:** reason for termination of the contract +  * Source values of the Payer, Plan, Sponsor, Family are captured as the respective _source_value. Concept_id's are used to support standardized analysis, similar to other OMOP CDM tables that use _source_concept_id and _concept_id. + * Typically, family members are covered under the same Plan as the Person. In those cases, the payer_source_value, plan_source_value and family_source_value are identical. From 878f108b44b0d8793debec21495762419d328604 Mon Sep 17 00:00:00 2001 From: Clair Blacketer Date: Mon, 8 Jan 2018 13:18:53 -0500 Subject: [PATCH 2/5] Fixed PAYER_PLAN_PERIOD, changed STOP_REASON_SOURCE_VALUE to VARCHAR(50) from INTEGER, based on issue #147 --- BigQuery/OMOP CDM bigquery ddl.txt | 2 +- Impala/OMOP CDM impala ddl.txt | 2 +- Netezza/OMOP CDM netezza ddl.txt | 4 ++-- Oracle/OMOP CDM oracle ddl.txt | 3 +-- ParallelDataWarehouse/OMOP CDM pdw ddl.txt | 3 +-- PostgreSQL/OMOP CDM postgresql ddl.txt | 3 +-- Redshift/OMOP CDM redshift ddl.txt | 3 +-- Sql Server/OMOP CDM sql server ddl.txt | 3 +-- 8 files changed, 9 insertions(+), 14 deletions(-) diff --git a/BigQuery/OMOP CDM bigquery ddl.txt b/BigQuery/OMOP CDM bigquery ddl.txt index 385c177..5a5263b 100644 --- a/BigQuery/OMOP CDM bigquery ddl.txt +++ b/BigQuery/OMOP CDM bigquery ddl.txt @@ -551,7 +551,7 @@ create table payer_plan_period sponsor_source_concept_id integer null , family_source_value varchar(50) 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 ) ; diff --git a/Impala/OMOP CDM impala ddl.txt b/Impala/OMOP CDM impala ddl.txt index 3be1202..9fec86d 100644 --- a/Impala/OMOP CDM impala ddl.txt +++ b/Impala/OMOP CDM impala ddl.txt @@ -1134,7 +1134,7 @@ CREATE TABLE payer_plan_period stop_reason_concept_id INTEGER, - stop_reason_source_value INTEGER, + stop_reason_source_value VARCHAR(50), stop_reason_source_concept_id INTEGER ) diff --git a/Netezza/OMOP CDM netezza ddl.txt b/Netezza/OMOP CDM netezza ddl.txt index d140cca..02c5706 100644 --- a/Netezza/OMOP CDM netezza ddl.txt +++ b/Netezza/OMOP CDM netezza ddl.txt @@ -28,7 +28,7 @@ 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 @@ -665,7 +665,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) DISTRIBUTE ON (person_id) diff --git a/Oracle/OMOP CDM oracle ddl.txt b/Oracle/OMOP CDM oracle ddl.txt index d61bdc2..4b2a5ba 100644 --- a/Oracle/OMOP CDM oracle ddl.txt +++ b/Oracle/OMOP CDM oracle ddl.txt @@ -447,7 +447,6 @@ 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 , @@ -623,7 +622,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) ; diff --git a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt index 1c71fac..847769e 100644 --- a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt +++ b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt @@ -422,7 +422,6 @@ IF XACT_STATE() = 1 COMMIT; 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 DATETIME NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , @@ -590,7 +589,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) WITH (DISTRIBUTION = HASH(person_id)); diff --git a/PostgreSQL/OMOP CDM postgresql ddl.txt b/PostgreSQL/OMOP CDM postgresql ddl.txt index 4c0b3ed..42822f0 100644 --- a/PostgreSQL/OMOP CDM postgresql ddl.txt +++ b/PostgreSQL/OMOP CDM postgresql ddl.txt @@ -447,7 +447,6 @@ 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 , @@ -623,7 +622,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) ; diff --git a/Redshift/OMOP CDM redshift ddl.txt b/Redshift/OMOP CDM redshift ddl.txt index de4d591..b81dec9 100644 --- a/Redshift/OMOP CDM redshift ddl.txt +++ b/Redshift/OMOP CDM redshift ddl.txt @@ -422,7 +422,6 @@ 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 , @@ -590,7 +589,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) DISTKEY(person_id); diff --git a/Sql Server/OMOP CDM sql server ddl.txt b/Sql Server/OMOP CDM sql server ddl.txt index 9d635f2..6b11877 100644 --- a/Sql Server/OMOP CDM sql server ddl.txt +++ b/Sql Server/OMOP CDM sql server ddl.txt @@ -447,7 +447,6 @@ 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 DATETIME NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , @@ -623,7 +622,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) ; From 9431a2cd30a56fd5cc4993f0c3aafb1d0e1e4d88 Mon Sep 17 00:00:00 2001 From: Clair Blacketer Date: Wed, 7 Feb 2018 08:54:35 -0500 Subject: [PATCH 3/5] Closes #150 --- BigQuery/OMOP CDM bigquery ddl.txt | 3 +- Impala/OMOP CDM impala ddl.txt | 4 +- Netezza/OMOP CDM netezza ddl.txt | 6 +-- Oracle/OMOP CDM oracle ddl.txt | 5 +-- ParallelDataWarehouse/OMOP CDM pdw ddl.txt | 43 +++++++++++----------- PostgreSQL/OMOP CDM postgresql ddl.txt | 5 +-- Redshift/OMOP CDM redshift ddl.txt | 43 +++++++++++----------- Sql Server/OMOP CDM sql server ddl.txt | 5 +-- 8 files changed, 54 insertions(+), 60 deletions(-) diff --git a/BigQuery/OMOP CDM bigquery ddl.txt b/BigQuery/OMOP CDM bigquery ddl.txt index 385c177..44438d9 100644 --- a/BigQuery/OMOP CDM bigquery ddl.txt +++ b/BigQuery/OMOP CDM bigquery ddl.txt @@ -391,7 +391,6 @@ create table measurement measurement_concept_id integer not null , measurement_date date not null , measurement_time varchar(10) null , - measurement_datetime datetime null , measurement_type_concept_id integer not null , operator_concept_id integer null , value_as_number float null , @@ -551,7 +550,7 @@ create table payer_plan_period sponsor_source_concept_id integer null , family_source_value varchar(50) 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 ) ; diff --git a/Impala/OMOP CDM impala ddl.txt b/Impala/OMOP CDM impala ddl.txt index 3be1202..ceab91b 100644 --- a/Impala/OMOP CDM impala ddl.txt +++ b/Impala/OMOP CDM impala ddl.txt @@ -816,7 +816,7 @@ CREATE TABLE measurement measurement_date TIMESTAMP, - measurement_datetime TIMESTAMP, + measurement_time VARCHAR(10), measurement_type_concept_id INTEGER, @@ -1134,7 +1134,7 @@ CREATE TABLE payer_plan_period stop_reason_concept_id INTEGER, - stop_reason_source_value INTEGER, + stop_reason_source_value VARCHAR(50), stop_reason_source_concept_id INTEGER ) diff --git a/Netezza/OMOP CDM netezza ddl.txt b/Netezza/OMOP CDM netezza ddl.txt index d140cca..87351fa 100644 --- a/Netezza/OMOP CDM netezza ddl.txt +++ b/Netezza/OMOP CDM netezza ddl.txt @@ -28,7 +28,7 @@ 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 @@ -479,7 +479,7 @@ CREATE TABLE measurement person_id INTEGER NOT NULL , measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , - measurement_datetime DATETIME NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number REAL NULL , @@ -665,7 +665,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) DISTRIBUTE ON (person_id) diff --git a/Oracle/OMOP CDM oracle ddl.txt b/Oracle/OMOP CDM oracle ddl.txt index d61bdc2..094d8ed 100644 --- a/Oracle/OMOP CDM oracle ddl.txt +++ b/Oracle/OMOP CDM oracle ddl.txt @@ -447,8 +447,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_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , @@ -623,7 +622,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) ; diff --git a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt index 1c71fac..2a63661 100644 --- a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt +++ b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt @@ -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 (person_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE observation_period (observation_period_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE specimen (specimen_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE death (person_id INTEGER NOT NULL , death_date DATE NOT NULL , @@ -276,7 +276,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE death 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 (visit_occurrence_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE visit_detail (visit_detail_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE procedure_occurrence (procedure_occurrence_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_exposure (drug_exposure_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE device_exposure (device_exposure_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)); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_occurrence (condition_occurrence_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -416,14 +416,13 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE condition_occurrence 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 (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_datetime DATETIME NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , @@ -442,7 +441,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement 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 (note_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -482,7 +481,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE note_nlp WITH (DISTRIBUTION = REPLICATE); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE observation (observation_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -573,7 +572,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 (payer_plan_period_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -590,7 +589,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) WITH (DISTRIBUTION = HASH(person_id)); @@ -630,7 +629,7 @@ Standardized derived elements ************************/ ---HINT DISTRIBUTE_ON_KEY(subject_id) +--HINT DISTRIBUTE_ON_KEY(subject_id) IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort (cohort_definition_id INTEGER NOT NULL , subject_id INTEGER NOT NULL , @@ -640,7 +639,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort 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 (cohort_definition_id INTEGER NOT NULL , subject_id INTEGER NOT NULL , @@ -653,7 +652,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE cohort_attribute 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 (drug_era_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -666,7 +665,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE drug_era 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 (dose_era_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -679,7 +678,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE dose_era 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 (condition_era_id INTEGER NOT NULL , person_id INTEGER NOT NULL , diff --git a/PostgreSQL/OMOP CDM postgresql ddl.txt b/PostgreSQL/OMOP CDM postgresql ddl.txt index 4c0b3ed..7250334 100644 --- a/PostgreSQL/OMOP CDM postgresql ddl.txt +++ b/PostgreSQL/OMOP CDM postgresql ddl.txt @@ -447,8 +447,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_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number NUMERIC NULL , @@ -623,7 +622,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) ; diff --git a/Redshift/OMOP CDM redshift ddl.txt b/Redshift/OMOP CDM redshift ddl.txt index de4d591..b66a477 100644 --- a/Redshift/OMOP CDM redshift ddl.txt +++ b/Redshift/OMOP CDM redshift ddl.txt @@ -207,7 +207,7 @@ Standardized clinical data ************************/ ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE person (person_id INTEGER NOT NULL , gender_concept_id INTEGER NOT NULL , @@ -231,7 +231,7 @@ CREATE TABLE person DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE observation_period (observation_period_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -242,7 +242,7 @@ CREATE TABLE observation_period DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE specimen (specimen_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -263,7 +263,7 @@ CREATE TABLE specimen DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE death (person_id INTEGER NOT NULL , death_date DATE NOT NULL , @@ -276,7 +276,7 @@ CREATE TABLE death DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE visit_occurrence (visit_occurrence_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -299,7 +299,7 @@ CREATE TABLE visit_occurrence DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE visit_detail (visit_detail_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -324,7 +324,7 @@ CREATE TABLE visit_detail DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE procedure_occurrence (procedure_occurrence_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -344,7 +344,7 @@ CREATE TABLE procedure_occurrence DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE drug_exposure (drug_exposure_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -373,7 +373,7 @@ CREATE TABLE drug_exposure DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE device_exposure (device_exposure_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -394,7 +394,7 @@ CREATE TABLE device_exposure DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE condition_occurrence (condition_occurrence_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -416,14 +416,13 @@ CREATE TABLE condition_occurrence DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) 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_datetime TIMESTAMP NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , @@ -442,7 +441,7 @@ CREATE TABLE measurement DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE note (note_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -482,7 +481,7 @@ CREATE TABLE note_nlp DISTSTYLE ALL; ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE observation (observation_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -573,7 +572,7 @@ Standardized health economics ************************/ ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE payer_plan_period (payer_plan_period_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -590,7 +589,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) DISTKEY(person_id); @@ -630,7 +629,7 @@ Standardized derived elements ************************/ ---HINT DISTRIBUTE_ON_KEY(subject_id) +--HINT DISTRIBUTE_ON_KEY(subject_id) CREATE TABLE cohort (cohort_definition_id INTEGER NOT NULL , subject_id INTEGER NOT NULL , @@ -640,7 +639,7 @@ CREATE TABLE cohort DISTKEY(subject_id); ---HINT DISTRIBUTE_ON_KEY(subject_id) +--HINT DISTRIBUTE_ON_KEY(subject_id) CREATE TABLE cohort_attribute (cohort_definition_id INTEGER NOT NULL , subject_id INTEGER NOT NULL , @@ -653,7 +652,7 @@ CREATE TABLE cohort_attribute DISTKEY(subject_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE drug_era (drug_era_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -666,7 +665,7 @@ CREATE TABLE drug_era DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE dose_era (dose_era_id INTEGER NOT NULL , person_id INTEGER NOT NULL , @@ -679,7 +678,7 @@ CREATE TABLE dose_era DISTKEY(person_id); ---HINT DISTRIBUTE_ON_KEY(person_id) +--HINT DISTRIBUTE_ON_KEY(person_id) CREATE TABLE condition_era (condition_era_id INTEGER NOT NULL , person_id INTEGER NOT NULL , diff --git a/Sql Server/OMOP CDM sql server ddl.txt b/Sql Server/OMOP CDM sql server ddl.txt index 9d635f2..c5e4bd4 100644 --- a/Sql Server/OMOP CDM sql server ddl.txt +++ b/Sql Server/OMOP CDM sql server ddl.txt @@ -447,8 +447,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 DATETIME NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , @@ -623,7 +622,7 @@ CREATE TABLE payer_plan_period sponsor_source_concept_id INTEGER NULL , family_source_value VARCHAR(50) 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 ) ; From dab7208accfcee1ff53b8374cf8aa3a25b9c203a Mon Sep 17 00:00:00 2001 From: Clair Blacketer Date: Wed, 7 Feb 2018 13:57:58 -0500 Subject: [PATCH 4/5] Closes #150. Changed measurement_time to measurement_datetime. --- BigQuery/OMOP CDM bigquery ddl.txt | 2 +- Impala/OMOP CDM impala ddl.txt | 2 +- Netezza/OMOP CDM netezza ddl.txt | 2 +- Oracle/OMOP CDM oracle ddl.txt | 2 +- ParallelDataWarehouse/OMOP CDM pdw ddl.txt | 2 +- PostgreSQL/OMOP CDM postgresql ddl.txt | 2 +- Redshift/OMOP CDM redshift ddl.txt | 2 +- Sql Server/OMOP CDM sql server ddl.txt | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/BigQuery/OMOP CDM bigquery ddl.txt b/BigQuery/OMOP CDM bigquery ddl.txt index 44438d9..1ff8bec 100644 --- a/BigQuery/OMOP CDM bigquery ddl.txt +++ b/BigQuery/OMOP CDM bigquery ddl.txt @@ -390,7 +390,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 datetime null , measurement_type_concept_id integer not null , operator_concept_id integer null , value_as_number float null , diff --git a/Impala/OMOP CDM impala ddl.txt b/Impala/OMOP CDM impala ddl.txt index ceab91b..9fec86d 100644 --- a/Impala/OMOP CDM impala ddl.txt +++ b/Impala/OMOP CDM impala ddl.txt @@ -816,7 +816,7 @@ CREATE TABLE measurement measurement_date TIMESTAMP, - measurement_time VARCHAR(10), + measurement_datetime TIMESTAMP, measurement_type_concept_id INTEGER, diff --git a/Netezza/OMOP CDM netezza ddl.txt b/Netezza/OMOP CDM netezza ddl.txt index 87351fa..4bdc44e 100644 --- a/Netezza/OMOP CDM netezza ddl.txt +++ b/Netezza/OMOP CDM netezza ddl.txt @@ -479,7 +479,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 DATETIME NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number REAL NULL , diff --git a/Oracle/OMOP CDM oracle ddl.txt b/Oracle/OMOP CDM oracle ddl.txt index 094d8ed..c1427c4 100644 --- a/Oracle/OMOP CDM oracle ddl.txt +++ b/Oracle/OMOP CDM oracle ddl.txt @@ -447,7 +447,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 FLOAT NULL , diff --git a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt index 2a63661..cdee639 100644 --- a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt +++ b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt @@ -422,7 +422,7 @@ IF XACT_STATE() = 1 COMMIT; 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 DATETIME NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , diff --git a/PostgreSQL/OMOP CDM postgresql ddl.txt b/PostgreSQL/OMOP CDM postgresql ddl.txt index 7250334..1edef4a 100644 --- a/PostgreSQL/OMOP CDM postgresql ddl.txt +++ b/PostgreSQL/OMOP CDM postgresql ddl.txt @@ -447,7 +447,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 , diff --git a/Redshift/OMOP CDM redshift ddl.txt b/Redshift/OMOP CDM redshift ddl.txt index b66a477..eaef616 100644 --- a/Redshift/OMOP CDM redshift ddl.txt +++ b/Redshift/OMOP CDM redshift ddl.txt @@ -422,7 +422,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 FLOAT NULL , diff --git a/Sql Server/OMOP CDM sql server ddl.txt b/Sql Server/OMOP CDM sql server ddl.txt index c5e4bd4..f9c1552 100644 --- a/Sql Server/OMOP CDM sql server ddl.txt +++ b/Sql Server/OMOP CDM sql server ddl.txt @@ -447,7 +447,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 DATETIME NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , From 2c952dca984a7bc8156f07d8f92c0932dd533787 Mon Sep 17 00:00:00 2001 From: Clair Blacketer Date: Wed, 7 Feb 2018 14:18:39 -0500 Subject: [PATCH 5/5] Addresses #150, adding time back in to the measurement table for backwards compatibility --- BigQuery/OMOP CDM bigquery ddl.txt | 1 + .../StandardizedClinicalDataTables/MEASUREMENT.md | 1 + Impala/OMOP CDM impala ddl.txt | 2 ++ Netezza/OMOP CDM netezza ddl.txt | 1 + Oracle/OMOP CDM oracle ddl.txt | 1 + ParallelDataWarehouse/OMOP CDM pdw ddl.txt | 1 + PostgreSQL/OMOP CDM postgresql ddl.txt | 7 ++++--- Redshift/OMOP CDM redshift ddl.txt | 1 + Sql Server/OMOP CDM sql server ddl.txt | 1 + 9 files changed, 13 insertions(+), 3 deletions(-) diff --git a/BigQuery/OMOP CDM bigquery ddl.txt b/BigQuery/OMOP CDM bigquery ddl.txt index 1ff8bec..2bc4bb3 100644 --- a/BigQuery/OMOP CDM bigquery ddl.txt +++ b/BigQuery/OMOP CDM bigquery ddl.txt @@ -391,6 +391,7 @@ create table measurement measurement_concept_id integer not null , measurement_date date not null , measurement_datetime datetime null , + measurement_time varchar(10) null , measurement_type_concept_id integer not null , operator_concept_id integer null , value_as_number float null , diff --git a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md index f683a82..c443a3d 100644 --- a/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md +++ b/Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md @@ -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_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_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.| |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.| diff --git a/Impala/OMOP CDM impala ddl.txt b/Impala/OMOP CDM impala ddl.txt index 9fec86d..4b35d03 100644 --- a/Impala/OMOP CDM impala ddl.txt +++ b/Impala/OMOP CDM impala ddl.txt @@ -818,6 +818,8 @@ CREATE TABLE measurement measurement_datetime TIMESTAMP, + measurement_time VARCHAR(10), + measurement_type_concept_id INTEGER, operator_concept_id INTEGER, diff --git a/Netezza/OMOP CDM netezza ddl.txt b/Netezza/OMOP CDM netezza ddl.txt index 4bdc44e..268eb26 100644 --- a/Netezza/OMOP CDM netezza ddl.txt +++ b/Netezza/OMOP CDM netezza ddl.txt @@ -480,6 +480,7 @@ CREATE TABLE measurement measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , measurement_datetime DATETIME NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number REAL NULL , diff --git a/Oracle/OMOP CDM oracle ddl.txt b/Oracle/OMOP CDM oracle ddl.txt index c1427c4..c8627f2 100644 --- a/Oracle/OMOP CDM oracle ddl.txt +++ b/Oracle/OMOP CDM oracle ddl.txt @@ -448,6 +448,7 @@ CREATE TABLE measurement measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , measurement_datetime TIMESTAMP NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , diff --git a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt index cdee639..f712047 100644 --- a/ParallelDataWarehouse/OMOP CDM pdw ddl.txt +++ b/ParallelDataWarehouse/OMOP CDM pdw ddl.txt @@ -423,6 +423,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , measurement_datetime DATETIME NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , diff --git a/PostgreSQL/OMOP CDM postgresql ddl.txt b/PostgreSQL/OMOP CDM postgresql ddl.txt index 1edef4a..afc3c81 100644 --- a/PostgreSQL/OMOP CDM postgresql ddl.txt +++ b/PostgreSQL/OMOP CDM postgresql ddl.txt @@ -448,13 +448,14 @@ CREATE TABLE measurement measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , measurement_datetime TIMESTAMP NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , - value_as_number NUMERIC NULL , + value_as_number NUMERIC NULL , value_as_concept_id INTEGER NULL , unit_concept_id INTEGER NULL , - range_low NUMERIC NULL , - range_high NUMERIC NULL , + range_low NUMERIC NULL , + range_high NUMERIC NULL , provider_id INTEGER NULL , visit_occurrence_id INTEGER NULL , visit_detail_id INTEGER NULL , diff --git a/Redshift/OMOP CDM redshift ddl.txt b/Redshift/OMOP CDM redshift ddl.txt index eaef616..9aadf2c 100644 --- a/Redshift/OMOP CDM redshift ddl.txt +++ b/Redshift/OMOP CDM redshift ddl.txt @@ -423,6 +423,7 @@ CREATE TABLE measurement measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , measurement_datetime TIMESTAMP NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL , diff --git a/Sql Server/OMOP CDM sql server ddl.txt b/Sql Server/OMOP CDM sql server ddl.txt index f9c1552..f57770f 100644 --- a/Sql Server/OMOP CDM sql server ddl.txt +++ b/Sql Server/OMOP CDM sql server ddl.txt @@ -448,6 +448,7 @@ CREATE TABLE measurement measurement_concept_id INTEGER NOT NULL , measurement_date DATE NOT NULL , measurement_datetime DATETIME NULL , + measurement_time VARCHAR(10) NULL , measurement_type_concept_id INTEGER NOT NULL , operator_concept_id INTEGER NULL , value_as_number FLOAT NULL ,