OHDSI Home | Forums | Wiki | Github

Use of index date to identify time gap between two tests?

Hello everyone :smile:

As part of the cohort that i’m building, I need to do the following -

  1. Identify people with measurement A
  2. from (1) Identify people who have had at least one more measurement of A, at least 90 days later the first.

(Basically, i’m looking for two repeat tests).

To do this, i’ve created a primary measurement of A, and then assigned an additional measurement of A for people matching the Primary Event but occurs 90 days after the ‘indexed date’.

Based on http://www.ohdsi.org/wp-content/uploads/2016/09/ODHSI-Phenotype-Tutorial-Symposium-Version-v1-1.pdf index date seems to be the date of the first measurement, so I believe i’m right in doing this? :smile:

Yep, that sounds correct. If you save a version on ohdsi.org/web/atlas and
share the url, we can confirm for sure.

For the benefit of those wondering, I shared an image of the design via PM, which Patrick kindly confirmed for me. So basically, the above is right.

HOWEVER, what if I want to check for a measurement B that occurs up to 14 days before or 14 days after the second test? How can I work with the Index variable in such a case ?

For example, here, i’m checking if hypertension occurred between 90 days after or 1095 days after my first condition (which is the index).
Then, I need to check if a measure of weight was obtained up to 14 days before, or 14 days after the hypertension measure which was captured before.
In that case, does index mean hypertension, or the previous (primary condition) ?

The most recent update of atlas has incorporated a new cohort definition feature (but from your screenshot, you’re using a very old version). On OHDSI.org, I built this which is what I think you want:

I’ve saved this mockup here:

Effectively, what I’m doing here is looking for the essential hypertension between 90d after and 1095d after, and the essential hypertension that I find must have an accompanied weight measurement between 14d before and 14d after the date of the essential hypertension. If all these conditions are met, then the person will be entered into the cohort.

Be aware tho: there’s nothing in this that says that the following EH measurement was the ‘next’ one (or the second or the third etc). It only can say that starting at the primary event, there exists a EH measurement between 90d after and 1095 d after with a Weight measurement existing between 14d before and 14d after the EH measurement that we found (between 90d after and 1095d after the primary event). I call this out because you rightly say that if you find a EH after the primary event it’s the ‘second one’ but the real ‘second one’ might have happened on day 45 after index. So if you’re really trying to find ‘the immediate next EH measurement had a weight taken with 14d before and 14d after’ you’re exceeding a limitation of the tool. However, if it’s just enough to say you can find a EH measurement 90-1095 d after with a weight measurement within 2wks before and after, then the above will give you want you want.

-Chris

1 Like
t