getCohortCovariateData function

Extracts covariates based on cohorts