@Gowtham_Rao: I need to look at the logic. I’m pretty sure that it doesn’t account for separate observation periods. I think if you have a gap size of 999999, and you have the following episodes:
OP1:<---------------------------------------------->
EP1: |-----------------------------|
OP2: <------------->
EP2: |---|
Here I’m showing a person with 2 events, no exit strategy, so the episode goes from the event to the end of observation period.
If you take the episodes and extend the end dates by 9999 days to combine them, it works like this:
EP1: |-----------------------------|--------------------------->
EP2: |---|
Yields:
EPF: |-------------------------------------------------|
OP1:<---------------------------------------------->
OP2: <------------->
And you can see the final episode (EPF) spans the observation periods.
I think the solution is to take the final episodes and split them up by finding episode durations that overlap the observation periods like so:
EPF: |-------------------------------------------------|
OP1:<---------------------------------------------->
OP2: <------------->
Yields:
FE1: |-----------------------------|
FE2: |------------|
Here, FE means ‘Final Episode’.
I have some reservations about doing it this way: The time at risk in the second observation period is being driven by some events appearing in the first observation period, and, in the past, there’s been some very strict requirements about containing the events that contribute to a cohort episode all come from the same observation period. However, there is some Themis work that is allowing events to appear outside of an observation period…so it’s possible that it’s OK for a cohort episode to span observation periods.
I’ll have to wait and see what the Themis group comes up with.