Chart / Graphical display of Cohorts that change during a study

LabKey Support Forum
Chart / Graphical display of Cohorts that change during a study rpiercy  2022-12-14 04:29
Status: Active
 
I have set up a visit based study with initially 3 Cohorts of participants. During the study 2 more separate Cohorts are generated from within one of the existing Cohorts to make 5 final cohorts. (i.e. some participants start in one cohort and then shift into two others, as their treatments change).

Setting this up with automatic cohort assignment with a dataset and visits seems straightforwards. However, when I try to view the data within any dataset graphically with time on the X axis and with participants grouped according to their cohort at any given time, it seems not to recognise that the cohorts change.

Is this actually possible to view graphically please (with correct cohort assignment at different times)?

I am using Labkey server 21.7.

Thank you.

Richard
 
 
cnathe responded:  2022-12-15 07:56
Richard,
I assume you are using the "Cohort Assignment > Advanced" mode which uses a dataset automatic participant cohort assignment via a study dataset to track changing cohorts mid-study. https://www.labkey.org/Documentation/wiki-page.view?name=manageCohorts

If so, you can definitely view the "cohort for a given participant at any given visit within the study" in a grid view by pulling in the "Visit Cohort" column via the ParticipantVisit/Cohort lookup. See the attached screenshot as an example which uses fake data to show the difference in a grid view of the participants current cohort vs the cohort at a given visit.

As per your question about the graphical / chart view of this data, what chart type are you creating? If you are using the study Time chart, you are correct that we currently only support using the participant current cohort in the data grouping variable. However, if you add that "Visit Cohort" column to your saved view of a dataset, you should be able to use that variable in the other chart types (i.e. Line, Scatter, etc.).

Thanks,
Cory
 
rpiercy responded:  2022-12-20 01:52
Thanks Cory. Yes - it is the Time Chart that I am interested in.