No, you did not get that right. You can define cohorts in atlas, and if you want ingredient specific persistence windows, then you define your cohort to use each drug_exposure for a given ingreidnet, and specify a fixed persistence window.
The screenshot you provided in your first post focused on the ‘cohort era collapse’ which just combines sub-episodes of cohort eras together if the end of one is within X days of the start of the next. Which you could do if you made each cohort event the individual drug exposure, and you wanted to use the drug exposure’s start_end date.
However, in your case, I think you want to assume a fixed duration of the exposure from the start of the exposure (Is this what you intend?) If so, you can instead use the ‘event persistence’ option to specify that you want the event (the drug_exposure to the ingredient) to persist for 60 or 90 days, like this:
So, to put it all together, you would define your cohort like this:
Cohort entry event: drug exposure of drugs with descendants from Ingredient X
Cohort Exit: event will persist until ‘fixed duration relative to initial event’: Start Date + 60 days
This will produce a series of 60 day episodes for the person, each episode begins with a drug exposure that descends from the Ingredient. A different ingredient could be used in a differnt cohort, using ingredient specific persistence.
Finally, you can decide that if there are 2 drug episodes that are within 45 days (for example) of each other (ie: the datediff between the earlier episode’s end date and the later episode’s start date <= 45) should collapse into a single episode. that is what the Cohort Era’s ‘gap size’ refers to.
The idea of ‘stockpiling’ is not handled in Atlas cohort definitions, so if you want to handle cases where overlapping exposures should lead to ‘expanding’ the duration based on the amount of overlap (ie: stockpiling means you are going to extend the next episode), then you will have to write custom queries to handle that.