documentation:next_cdm:time
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| documentation:next_cdm:time [2016/10/04 17:53] – vojtechhuser | documentation:next_cdm:time [2017/07/06 15:05] (current) – clairblacketer | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Add Time Field to various Occurrence and Exposure Tables ===== | ===== Add Time Field to various Occurrence and Exposure Tables ===== | ||
| + | === Proposals are now being stored as github issues === | ||
| + | [[https:// | ||
| - | While v5 visit_occurrence table supports both date and time of event, other occurrence tables and exposure tables such as drug, condition, and procedure support only the date level. | + | While v5 visit_occurrence table supports both date and time of event, other occurrence tables and exposure tables such as drug, condition, and procedure support only the date level. |
| - | We propose | + | Here is the current use of date and time fields in CDM v5.01: |
| + | |||
| + | PERSON | ||
| + | * year_of_birth as integer, required | ||
| + | * month_of_birth as integer, not required | ||
| + | * day_of_birth as integer, not required | ||
| + | * time_of_birth as time, not required | ||
| + | |||
| + | SPECIMEN | ||
| + | * specimen_date as date, required | ||
| + | * specimen_time as time, not required | ||
| + | |||
| + | DEATH | ||
| + | * death_date as date, required | ||
| + | |||
| + | VISIT_OCCURRENCE | ||
| + | * visit_start_date as date, required | ||
| + | * visit_start_time as time, not required | ||
| + | * visit_end_date as date, required | ||
| + | * visit_end_time as time, not required | ||
| + | |||
| + | PROCEDURE_OCCURRENCE | ||
| + | * procedure_date as date, required | ||
| + | |||
| + | DRUG_EXPOSURE | ||
| + | * drug_exposure_start_date as date, required | ||
| + | * drug_exposure _end_date as date, not required | ||
| + | |||
| + | DEVICE_EXPOSURE | ||
| + | * device_exposure_start_date as date, required | ||
| + | * device _exposure _end_date as date, not required | ||
| + | |||
| + | CONDITION_OCCURRENCE | ||
| + | * condition_start_date as date, required | ||
| + | * condition _end_date as date, not required | ||
| + | |||
| + | MEASUREMENT | ||
| + | * measurement_date as date, required | ||
| + | * measurement _time as time, not required | ||
| + | |||
| + | NOTE | ||
| + | * note_date as date, required | ||
| + | * note_time as time, not required | ||
| + | |||
| + | OBSERVATION | ||
| + | * observation_date as date, required | ||
| + | * observation _time as time, not required | ||
| + | |||
| + | And the ERA tables, COHORT tables, and PAYER_PLAN_PERIOD table. | ||
| + | |||
| + | |||
| + | === DECISION 1 === | ||
| + | |||
| + | We have a choice between | ||
| + | |||
| + | [Suggest datetime = timestamp.] | ||
| + | |||
| + | === DECISION 2 === | ||
| + | |||
| + | We propose adding a datetime | ||
| * Condition_Occurrence | * Condition_Occurrence | ||
| * Procedure_Occurrence | * Procedure_Occurrence | ||
| Line 10: | Line 71: | ||
| * Death | * Death | ||
| - | This would support handling data from ICU, Emergency Department, infusions, post-procedure care, etc where multiple events occur on the same day and sequence matters. | + | We propose replacing |
| - | + | * Specimen | |
| - | === Goal === | + | * Visit_Occurrence |
| - | Allow temporal operations finer than day without requiring recoding the OHDSI software, and consider allowing durations === | + | * Measurement |
| - | + | * Note | |
| - | === PROPOSAL 1 === | + | * Observation |
| - | + | ||
| - | 1. Throughout the CDM tables, keep all *_DATE fields as is, still in DATE format. These are generally required, non-null fields. | + | |
| - | + | ||
| - | 2. For each *_DATE field, add a *_TIME field of type DATETIME = TIMESTAMP, and make those fields optional. | + | |
| - | (for reference, link to existing spec (for example [[documentation: | + | A datetime field (also known as timestamp field) would be added to each date field. Date fields would not be changed. |
| - | === PROPOSAL 1a === | + | This would support handling data from ICU, Emergency Department, infusions, post-procedure care, etc. where multiple events occur on the same day and sequence matters. This granularity would also support the incorporation of data generated from tracking devices. |
| - | As above 1-2 and | + | In addition, current *_TIME fields would be removed. At this point, all current software will continue working with the *_DATE fields, |
| - | 3. Add a *_TIME_GRAN granularity field for each new DATETIME field, which would indicate year, month, day, hour, minute, or second as the timestamp' | + | [Suggest moving forward with fields called |
| + | === DECISION 3 === | ||
| - | === PROPOSAL 1b === | + | Are the datetime fields required. Making them required allows developers to begin to use them with a potential migration from date+time or date+timestamp to timesteamp in the future, but it forces CDM builders to enter unknown times or timestamps. If required, the default time will be the first instant in the allowable period. E.g., 1990-12-01-00: |
| - | As above 1-2, optionally 3, and | + | [Suggest optional for now.] |
| - | 4. Add a BIRTH_TIME timestamp column to the PERSON table to speed age calculations. | + | === DECISION |
| + | Should a date time (timestamp) field be added to BIRTH (or alternatively should PERSON.time_of_birth be changed to timestamp). This will allow more rapid calculation of age but will be redundant with the current information. | ||
| - | === PROPOSAL 2 === | + | [Suggest add BIRTH_DATETIME. Remove TIME_OF_BIRTH.] |
| - | Independent of 1-4, it was suggested that all tables have *_START_DATE and *_END_DATE fields for all domains. This means PROCEDURE_OCCURRENCE, | + | === DECISION 5 === |
| + | Should we add a *_TIME_GRAN granularity field for each new timestamp field, which would indicate year, month, day, hour, minute, or second as the timestamp' | ||
| + | [Suggest defer decision.] | ||
documentation/next_cdm/time.1475603604.txt.gz · Last modified: by vojtechhuser
