refactored bart2 cohort queries for flat tables
Merge branch 'updatedcohort' of https://github.com/BaobabHealthTrust/bart2 into updatedcohort