Skip to content

Commit 2c952dc

Browse files
Addresses #150, adding time back in to the measurement table for backwards compatibility
1 parent dab7208 commit 2c952dc

9 files changed

Lines changed: 13 additions & 3 deletions

File tree

BigQuery/OMOP CDM bigquery ddl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ create table measurement
391391
measurement_concept_id integer not null ,
392392
measurement_date date not null ,
393393
measurement_datetime datetime null ,
394+
measurement_time varchar(10) null ,
394395
measurement_type_concept_id integer not null ,
395396
operator_concept_id integer null ,
396397
value_as_number float null ,

Documentation/CommonDataModel_Wiki_Files/StandardizedClinicalDataTables/MEASUREMENT.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Field|Required|Type|Description
77
|measurement_concept_id|Yes|integer|A foreign key to the standard measurement concept identifier in the Standardized Vocabularies.|
88
|measurement_date|Yes|date|The date of the Measurement.|
99
|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))|
10+
|measurement_time |No|varchar(10)|The time of the Measurement. This is present for backwards compatibility and will deprecated in an upcoming version|
1011
|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.|
1112
|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 <, <=, =, >=, >.|
1213
|value_as_number|No|float|A Measurement result where the result is expressed as a numeric value.|

Impala/OMOP CDM impala ddl.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,8 @@ CREATE TABLE measurement
818818

819819
measurement_datetime TIMESTAMP,
820820

821+
measurement_time VARCHAR(10),
822+
821823
measurement_type_concept_id INTEGER,
822824

823825
operator_concept_id INTEGER,

Netezza/OMOP CDM netezza ddl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ CREATE TABLE measurement
480480
measurement_concept_id INTEGER NOT NULL ,
481481
measurement_date DATE NOT NULL ,
482482
measurement_datetime DATETIME NULL ,
483+
measurement_time VARCHAR(10) NULL ,
483484
measurement_type_concept_id INTEGER NOT NULL ,
484485
operator_concept_id INTEGER NULL ,
485486
value_as_number REAL NULL ,

Oracle/OMOP CDM oracle ddl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ CREATE TABLE measurement
448448
measurement_concept_id INTEGER NOT NULL ,
449449
measurement_date DATE NOT NULL ,
450450
measurement_datetime TIMESTAMP NULL ,
451+
measurement_time VARCHAR(10) NULL ,
451452
measurement_type_concept_id INTEGER NOT NULL ,
452453
operator_concept_id INTEGER NULL ,
453454
value_as_number FLOAT NULL ,

ParallelDataWarehouse/OMOP CDM pdw ddl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ IF XACT_STATE() = 1 COMMIT; CREATE TABLE measurement
423423
measurement_concept_id INTEGER NOT NULL ,
424424
measurement_date DATE NOT NULL ,
425425
measurement_datetime DATETIME NULL ,
426+
measurement_time VARCHAR(10) NULL ,
426427
measurement_type_concept_id INTEGER NOT NULL ,
427428
operator_concept_id INTEGER NULL ,
428429
value_as_number FLOAT NULL ,

PostgreSQL/OMOP CDM postgresql ddl.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -448,13 +448,14 @@ CREATE TABLE measurement
448448
measurement_concept_id INTEGER NOT NULL ,
449449
measurement_date DATE NOT NULL ,
450450
measurement_datetime TIMESTAMP NULL ,
451+
measurement_time VARCHAR(10) NULL ,
451452
measurement_type_concept_id INTEGER NOT NULL ,
452453
operator_concept_id INTEGER NULL ,
453-
value_as_number NUMERIC NULL ,
454+
value_as_number NUMERIC NULL ,
454455
value_as_concept_id INTEGER NULL ,
455456
unit_concept_id INTEGER NULL ,
456-
range_low NUMERIC NULL ,
457-
range_high NUMERIC NULL ,
457+
range_low NUMERIC NULL ,
458+
range_high NUMERIC NULL ,
458459
provider_id INTEGER NULL ,
459460
visit_occurrence_id INTEGER NULL ,
460461
visit_detail_id INTEGER NULL ,

Redshift/OMOP CDM redshift ddl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ CREATE TABLE measurement
423423
measurement_concept_id INTEGER NOT NULL ,
424424
measurement_date DATE NOT NULL ,
425425
measurement_datetime TIMESTAMP NULL ,
426+
measurement_time VARCHAR(10) NULL ,
426427
measurement_type_concept_id INTEGER NOT NULL ,
427428
operator_concept_id INTEGER NULL ,
428429
value_as_number FLOAT NULL ,

Sql Server/OMOP CDM sql server ddl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,7 @@ CREATE TABLE measurement
448448
measurement_concept_id INTEGER NOT NULL ,
449449
measurement_date DATE NOT NULL ,
450450
measurement_datetime DATETIME NULL ,
451+
measurement_time VARCHAR(10) NULL ,
451452
measurement_type_concept_id INTEGER NOT NULL ,
452453
operator_concept_id INTEGER NULL ,
453454
value_as_number FLOAT NULL ,

0 commit comments

Comments
 (0)