OHDSI Home | Forums | Wiki | Github

Identifying last measurement available before cohort entry

Hi colleagues!
Just posting this topic in the Researchers category in case someone sees a workaround. The issue is that I have repeated measurements at baseline (defined as -365,0), and I want to use just the closest one to the index for inclusion criterion in my cohort definition in ATLAS. In response to a question from @Cong_Liu @Chris_Knoll proposed to add a Nested criteria that requires exactly 1 of such measurements between (0,inf), being 0 here the date of the qualifying measurement, which ensures that this one is the last measurement available prior to cohort entry. The problem is that then this nested criterion scans beyond cohort entry date (remember we defined it as (0,inf)), and any measurement performed during follow-up time will cause the criterion to fail and thus to not include the patient in the cohort at all.
Does anyone have a way in ATLAS to frame the nested criterion so it runs from the index date of the hyerarchiaclly superior criterion until the date of cohort entry?
Thanks in advance to everyone considering this!

t