@Lui, @Marcela and I are using Capr to define cohorts and we are having a issue regarding the entry criteria definition. We want to define the entry criteria as “All” events per person, allowing multiple entries per person. For that, we are using this code:
To verify that patients have multiple entries, we replicated the same cohort definition in ATLAS.
In Atlas, we observed that patients have multiple entries (Records count > People count). In contrast, when using the same definition in Capr, we find that the number of persons matches that of Atlas; however, the People count is equal to the Records count, indicating that patients are entering the cohort only once.
We would like to understand the reasons behind this difference and how we can ensure that patients can have multiple entries in Capr.
Yes as in atlas you need to set the limit of the inclusion rules (ie the expression limit). Capr uses “First” by default which narrows to a per subject view (atlas uses the same default as well).
Image from atlas are all the potential limit toggles in circe.
limit initial events → primaryCriteriaLimit
limit initial events under additiona l criteria → qualifiedLimit
limit qualifying events → expressionLimit
The Capr commands align with the name of the slot in the circe json. As Egill shows if you want all events you need to toggle the limits to “all” throughout the definition. If you want subjects only then it depends on when you want to apply the limit (during the initial cohort entry query or during the attrition).
Glad this was resolved here. You can also post your Capr questions on the issues page of the package github Issues · OHDSI/Capr