Removed OBSERVATION_PERIOD_START_DATETIME and OBSERVATION_PERIOD_END_DATETIME from DDLs

This commit is contained in:
Clair Blacketer 2018-06-22 09:52:37 -04:00
parent 4d5bd8bd3b
commit 3f49979dd4
5 changed files with 0 additions and 10 deletions

View File

@ -158,9 +158,7 @@ SELECT
observation_period_id,
person_id,
TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(observation_period_start_date AS STRING), 1, 4), SUBSTR(CAST(observation_period_start_date AS STRING), 5, 2), SUBSTR(CAST(observation_period_start_date AS STRING), 7, 2)), 'UTC') AS observation_period_start_date,
TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(observation_period_start_date AS STRING), 1, 4), SUBSTR(CAST(observation_period_start_date AS STRING), 5, 2), SUBSTR(CAST(observation_period_start_date AS STRING), 7, 2)), 'UTC') AS observation_period_start_datetime,
TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(observation_period_end_date AS STRING), 1, 4), SUBSTR(CAST(observation_period_end_date AS STRING), 5, 2), SUBSTR(CAST(observation_period_end_date AS STRING), 7, 2)), 'UTC') AS observation_period_end_date,
TO_UTC_TIMESTAMP(CONCAT_WS('-', SUBSTR(CAST(observation_period_end_date AS STRING), 1, 4), SUBSTR(CAST(observation_period_end_date AS STRING), 5, 2), SUBSTR(CAST(observation_period_end_date AS STRING), 7, 2)), 'UTC') AS observation_period_end_datetime,
period_type_concept_id
FROM omop_cdm.observation_period;

View File

@ -254,9 +254,7 @@ 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
)
;

View File

@ -254,9 +254,7 @@ 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
)
;

View File

@ -248,9 +248,7 @@ 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
)
distkey(person_id)

View File

@ -254,9 +254,7 @@ 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
)
;