Creating complex cohorts using compare or merge
The Compare or merge function is a useful method of exploring the overlap between two cohorts. However, this function can also be used to create complex cohorts that cannot easily be defined using the standard configuration of Cohort Discovery. Suppose, for example, that you wanted to define a single cohort as follows:
All patients who were:
(1) Admitted to Hospital A under the care of Doctor B in 2013 who presented a severe risk of suicide.
AND
(2) Who were admitted to Hospital B in 2014 under the care of either Doctor C or Doctor D, and who during that period did not present with an apparent risk of suicide.
Such a cohort could not easily be defined using the standard user interface. It would require adaptation of the interface to include complex combinations of multiple selections, bracketing of clauses, etc. However, using the compare or merge function, such a cohort is easy to define by simply creating two cohorts (one corresponding to each of the two sets of filters) and then using the function to identify the overlapping subgroup.
In this way, the Compare or merge function effectively introduces brackets around sets of filters; each set of filters being represented by a single cohort. Selection of intersections and complements thereby strings together sets of bracketed filters, in principle permitting any level of logical complexity to be defined.