REPORT-694
Add conditional cohort definition and encounter query