I want to calculate the IR of people that having COVID (first occurrence) has developed pneumonia in the next 180 days. With 180 of previous observations.
Then I have created two cohorts.
One cohort of people infected with COVID: First occurrence, and 180 days of previous observations.
And another cohort of people with a condition of pneumonia.
My question is about the proper or best to define the pneumonia cohort.
Cohort entry event:
Condition occurrence of pneumonia.
With continuous observation of at least 180 days before.
Inclusion criteria:
Measurement of COVID
Where events start between 180 previous and 0 days after index.
I think I don’t need any exit criteria (except end of continuous observation).
Neither I need additional criteria because they will be already included on the COVID cohort.
Is it the right way to to it?
Another option would be to define the pneumonia cohort with all pneumonia events, without any filter.
Pneumonia is your outcome, so you don’t need to specify inclusion criteria of ‘prior covid’. We design OHDSI analysis cohorts without any cross-dependencies (like outcome must have had the prior target). Instead, your T (target) is the population of interest: those with COVID. Your O (outcome) is pneumonia. Your IR is 'among T, who had O within TAR (time at risk). Note: you’ll find lots of pneumonia cases, but the IR will just look among T for theO, so this lets you define your outcome once, and look for it as an outcome among many different T’s.
I don’t think you need to require your pneumonia to require prior outcome of 180d. You require the prior outcome when you want to ensure that there’s a ‘clean window’ that this is a new event or if you require a certain amount of baseline time to perform characterizations. When looking at an outcome, I don’t think you need to be that strict.
That was another option I thought: creating a cohort with all pneumonia events. The survival model or incidence rate calculation would just take the proper ones, taking into consideration the temporal sequence. But I didn’t know if it was going to work well
Filtering the final outcome with previous conditions or events should reduce the size of the data.
Ok, from this, you want ‘new infarction’ where your T (Infarction) is a cohort where the person enters with an infarction where there are no Infarctions between 180d before and 1d before entry’. The ‘prior 180d of continuous observation’ handles the first part ‘but the second part ‘nor previous pneumonia’ will be handled by Atlas IR by excluding anyone with the prior outcome (this isnt’ exactly what you want based on your diagram…the diagram says to exclude the infarction only if there is a prior outcome ‘within 180d’).
Atlas Incidence Rate works off of the definition of ‘incidence’ of something being a ‘new’ event, meaning that if you had the outcome already, then you are excluded from being included in the analysis. What is being described above is what I would call ‘time to event’ analysis, which it doesn’t care if the pneumonia is a first outcome, it only cares about if the pneumonia is after your Target’s index date (the Infarction).
But you can still do this in Atlas, but I have to reverse what I said earlier about making your outcomes generic: in this case you do need to specify your outcome as something that happens after the T.
So, target cohort is:
Enter cohort with condition occurrence of Infarction
Must have 0 pneumonia between 180d before and 0d before index
Outcome Cohort is:
Enter cohort with Pneumonia
Must have at least 1 Infarction within 180d before and 0d before index.
In your Incidence Anaysis in Atlas:
T: Infarction
O: Pneumonia after Infarction
TAR: Starts with T’s start date, ends with T’s start date + 180d.
So, the T will be the people that are eligible for your study (180d of prior obs + no recent pneumonia. The O will only contain those people that had a Pneumonia diagnosis after a Infarction diagnosis, so that we don’t get any ‘prior Pneumonia’ outcomes that will exclude them from the analysis in Atlas.
They are both important because you want to both ensure you have 180d of prior observation to the Infarction, and also you want to ensure that you have 0 pneumona in the 180d prior to your Infarction. The reason why the prior observation is so important is that you can’t assert that you had 0 pneumonia in the prior 180d if you don’t actually have the 180d of prior observation! Put another way, if I’ve only known you for 20 days, can I say you haven’t had something for a whole 180d prior? Answer: no, i can only assert somethign about the 20d I knew you…so unless I know you for 180d, I can’t say you haven’t had something in that 180d.
The final (outcome) cohort has something wrong:
You don’t want to limit the cohort entry events to the ‘earliest per person’ because you don’t want to limit yourself to only 1 pneumonia to consider: you want multiple pneumonia events to be considered, but pick the earliest one that occurred AFTER a infarction diagnosis.
So, change the 'limit initial events to ‘all events per person’ at the top…that will allow multiple Pneumonia events to be considered for an outcome, but from that set, we will include only those events that had prior infarction…from that final set of events, we just want the earliest, and that will be the outcome set for your analysis.
Then it applies the cohort entry criteria (it takes all the pneumonia events) and then it filters those events with the inclusion criteria (occurring after infarction).
What about the qualifying events in the inclusion criteria? There we select the first occurrence that meets the criteria, isn’t it?
Correct. The ‘qualifying’ events are the events that passed all inclusion criteria. So you have two choices as to when you limit to 1 event per person…the first is at the top where you pull in all the initial events. Limiting at the top will restrict the events to 1 per person. At the end, you can then make the choice to limit the remaining ‘qualified’ events to 1 per person. Note: you can’t go from 1 event per person at the top to suddenly multiple events per person at the bottom. Once the choice is made to limit to 1 per person, then the remainder of the process will just be working with 1 per person. It makes it feel like the bottom ‘limit’ is redundant, and it is if you already limited to 1 per person at the top, but the UI is simple that way.
Should I specify the “Must have 0 pneumonia between 180d before and 0d before index” inside the Cohort Entry Events rules or inside the Inclusion Criteria?
You could do it either way. The reason for putting it into inclusion rules is that you will get ‘inclusion rule stats’ that tells you how many people met the criteria out of all your entry events. If you don’t care about that, you can put the restriction with the initial events.
In the definition of the outcome cohort (pneumonia), I have forgotten to add in the inclusion criteria the date interval of the previous event (infarction).
Perhaps it’s not needed for the calculation of the IR, but it’s needed to properly characterize the outcome target.
The reason why (I think) you want it in this case is that the Atlas IR will exclude people who had an outcome before the analysis (ie: a pneumonia before their infarction). If you don’t want that, then you have to make an oucome “pneumonia after infarction” so that there will not be any prior outcomes (because you require the pneumonia after infarction).
You should try it both ways and see the difference!
I’m sorry for asking this again.
the “limit qualifying events to earliest event per person” selects the first occurrence of pneumonia meeting all conditions?
or selects the first occurrence of infarction meeting the inclusion criteria?
I think you said the first option.
Then, how would we do the second one? "take pneumonia events which are preceded by an infarction (but only if this infarction is the first infarction meeting some criteria).
I’m sorry for asking this again.
Does the “limit qualifying events to earliest event per person” select the first occurrence of pneumonia meeting all conditions?
or does it select the first occurrence of infarction meeting the inclusion criteria?
I think you said the first option.
Then, how would we do the second one? "take pneumonia events which are preceded by an infarction (but only if this infarction is the first infarction meeting some criteria).
What is ‘all conditions’ vs. ‘inclusion criteria’ to you? Simply put: ‘limit qualifying events to earliest event’ means you’ll pick one qualifying event per person, the earliest event chosen will be the first one if you order by date, and the event ‘qualifies’ if it meets all inclusion rules.
The earliest infarction that occurs after an infarction is the second one.