Hi everyone, I am working on finding the visit_start_date and visit_end_date (from the visit_occurrence table) for my desired cohort (from the cohort table). Generally, I want to map the desired visit dates with my cohort.
What I have done so far is to join the two tables by cohort.subject_id = visit_occurrence.person_id. However, this generates all visits by patients in my cohort, rather than the ones selected for an outcome / drug exposure. I than tried to also join my cohort.cohort_start_date and visit_occurrence.visit_start_date (heoretically, the visit start dates should also be the same day the cohort starts), but I feel like this is still not concrete enough. There is also a cohort_definition column in the cohort table that specifies my desired cohort. I wonder if there is a way to map this cohort_definiton column with the visit_occurrence table, maybe through a third table?
Thank you for any comments and suggestions!