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