For the move to CDMv6, perhaps condition_end_datetime
should be not null as consistent with other tables?
I’ve noticed drug_exposure_end_datetime
is mandatory. This is smart since analysis logic doesn’t have the background necessary to easily know when a drug exposure period has ended, besides guessing that it’s the start_datetime
plus the days_supply
, or failing that, the start_datetime + 1day
. In this case, an ETL process could make a better guess, and this guess can be seen in the database itself.
For other tables, end_datetime
is also mandatory, except for condition
, where it remains nullable. Why? Perhaps a null
ending datetime might indicate a condition isn’t yet resolved and is ongoing? But, there’s a challenge with this. Most of the cohort logic that I’ve reviewed is defaulting a missing end_date
to start_date + 1day
– it is not defaulting to the last day of the observation period. In other words, the cohort logic doesn’t treat the null
value as an indeterminate interval ending, as is the treatment in the Clinical Quality Language (CQL). Instead, the default logic (making it equal to start_date +1 day
) is applied universally, when other information at the data source might be better equipped to make a more plausible ending value on a case by case basis.