OHDSI Home | Forums | Wiki | Github

Default Time [THEMIS WG3]

themis

(Erica Voss) #1

One of the items that came out of the OHDSI Symposium Themis F2F was what to do with DATETIME columns when the raw data has no time. What do you do for start times when all you have is day data? What do you do for end times when all you have is day data? Here is what was discussed but we would like to open it for comment.

RECOMMENDATION
Choose default time of 00:00:00 if time is unknown. If you do have time and receive a time of 00:00:00 just shift 1 second to 00:00:01

ACTION
Work with @clairblacketer to have posted on the Data Model Conventions page under the CDM Wiki under convensions. https://github.com/OHDSI/CommonDataModel/wiki/Data-Model-Conventions


Should _datetime fields be required?
(Erica Voss) #2

Any final feedback on this?


(Alberto Gil Jimenez) #3

hi @ericaVoss
Would this be conflictive with the new rules of the VISIT_OCURRENCE table? Now the required fields are visit_start_datetime and visit_end_datetime (visit_end_date and visit_start_date are not required anymore).

So what if a hospitalization lasts for a day (e.g. 2014-04-14), and the source data only stored the date? (therefore when converting the source data to CDM v6 visit_start_datetime = visit_start_endtime = 2014-04-14 00:00:00.00). May this cause issues in the future if the analytical tools infer that the hospitalization lasted 0 hours 0 minutes 0 seconds?


(Erica Voss) #4

This is a good comment and something we will have to keep in mind.

My initial reaction is that most data sets will not have time and tools/methods will need to account for this. Additionally what is the alternative, if you data set does not have time you could default set it for the whole day but that is just as incorrect as a visit being 0 hours 0 minutes 0 seconds. Finally, nothing takes time into account just yet (that I know of), so we are safe for now.


(Alberto Gil Jimenez) #5

@ericaVoss indeed, both assumptions would be incorrect. But good to keep it in mind for the future, as all converted datasets to cdm v6 would have this issue in most of the cases. Thanks for the answer!


(Clair Blacketer) #6

Didn’t we have the same issue when we only had date and not datetime? For a visit that was only one day VISIT_START_DATE = VISIT_END_DATE and if you did a difference it would come up as a visit with 0 days. We compensate for this now by typically only taking VISIT_START_DATE into account during analysis of outpatient visits (where these most often occur) because we assume they all started and ended on the same day. For those scenarios where I imagine length of stay to the minute is important, like an ER, any EHR should have admit and discharge time.


(Alberto Gil Jimenez) #7

@clairblacketer thanks a lot for your input


t