OHDSI Home | Forums | Wiki | Github

Handling relative dates

Is it possible to specify “relative dates” in any of the occurrence tables?

Some organizations cannot share absolute dates for privacy purposes.
One workaround is to specify a relative date to a point in time.

For example, we would like to indicate that a drug was given 10 days following a patient diagnosis.
In this case, we would like to have:

  • CONDITION_OCCURRENCE.condition_start_datetime = 0 (to indicate that this is the significant event for which all other occurrences are relative.)
  • DRUG_EXPOSURE.drug_exposure_start_datetime = 14

If a drug was given 5 days prior to the diagnosis then

  • DRUG_EXPOSURE.drug_exposure_start_datetime = -5 (where negative means the number of days prior).

While we could consider other methods, we need a means by which we do not have to specify absolute days.

May Terry


Wait. If you have the date of the diagnosis, and you have the relative date of the drug then the drug_exposure_start_date=condition_start_date - relative drug date. No?

Hi @mlterryMitre,

If you do not need to do seasonal studies (e.g. real month and year) just shift each birthdate by a random number ± 10 years or so. Recompute the dates of all the other events according to that. The dates are meaningless now but the sequence of events is preserved. You will have cases where the medication will appear before they hit the market but that it is ok I believe. This will also misrepresent the number of people in a given period of time. However, both of those issues are exactly the same as using the “relative dates” you mentioned.

That is similar to the approach that is described in this forum for people over 89 but without truncation.

The question is: Do you support relative dates. (as SDTM does)
The official OMOP answer is: No. We don’t.

But we should have guidance (from Trial or registry WG ) on that. Such guidance does not exist at the moment. If I were to write it - I would say:

OMOP has no direct support for relative dates. Relative dates must be converted into dummy dates. Use index of 1 (not zero). Shift dates into de-identified context. E.g., Jan 1 2100 (or Jan 1 3000.)
Drug on day -2 will be on Dec 30 2099.

dec30 -2 day
dec31 -1 day
Jan 1 day 1 of informed consent (AVOID DAY ZERO!!!)

See https://en.wikipedia.org/wiki/Sol_(day_on_Mars)#Usage_in_Mars_landers and 1.3 here https://lhncbc.github.io/CRI/CONSIDER/CONSIDER-full.html#format

Actually, the conventions created by the CT working group does contain a short section on relative dates. This basically echoes what you say here; OMOP needs an absolute date which needs to be derived/approximated from other variables.