OHDSI Home | Forums | Wiki | Github

Difference between drug_exposure_end_date and drug_exposure_end_datetime?


(Alyssa Huque) #1

In reference to the drug_exposure table.
Is the only difference that drug_exposure_end_datetime includes the time? why repeat the date twice in two different fields? (this question is also applied to the difference between drug_exposure_start_date and drug_exposure_start_datetime)

(This is my first time posting on the topic so if I am posting in the wrong place or using it incorrectly please let me know)


(Don Torok) #2

This requires some history. Originally there was just start and end dates. Then there was an argument that time was needed, I think originally for measurements. At that time there was a decision to add the redundant date/time for all tables that had dates, with the expectations that at some point the date/time fields would replace the date fields. But, have not gotten around to removing the date fields because it will break a number existing OHDSI applications. So suggest for now, filling both fields, and if you only have date, just cast the date value as datetime for the date/time column. Eventually the date only fields will be removed.


t