OHDSI Home | Forums | Wiki | Github

Unable to replicate Atlas incidence rate of index: Inpatient Visit - which concept codes does it use?

Does anyone know who to ask which concept codes are used in atlas for the index: Inpatient Visit in the incidence analysis tool?

Asking because I am unable to replicate the following result of 4000+ persons with concept codes associated with the index of “Inpatient Visit” (out of a cohort with 20k people):

When I try manually defining a concept set where the only concept is “IP” (ATLAS), and defining a new incidence analysis, it only returns 12 cases with the associated concept code:

image

Open to any advice on how to debug this inconsistency, or whether I have the wrong code for what Atlas uses for computing the index: Inpatient Visit numbers in a cohort characterization.

Are you saying that you have a cohort of 4000+ persons, but only 16 people were included in the Incidence Rate analysis in Atlas?

Yes exactly - only 16 people were included in the incidence rate analysis, when I was expecting at least 4798 people to have an inpatient visit code.

Atlas incidence will exclude prior outcomes, so is it possible that the 16 people that were used were 16 people that actually never had the prior. What is the outcome of interest in your analysis? If you want to avoid this, you can define your outcome cohort to specify the events that occur after your target cohort entry events.

The outcome I am interested in is what Atlas is using to define inpatient visits in the VisitConceptCountShortTerm analysis in the cohort characterization tool.

The closest code I could find in the OHDSI source is here: https://github.com/OHDSI/FeatureExtraction/blob/da48fda9f27cb3c8fa34cc3f91ee741071dc51bb/inst/sql/sql_server/DomainConcept.sql#L40 where it looks like the condition type codes used for inpatient visits are 38000183, 38000184, 38000199, 38000200.

Does that sound correct, or am I looking in the wrong place?

(There are zero records with these condition type codes in the data source I am looking at.)

I am confused because these are condition types, not visit types

I have been trying to use the concept id 9201 (concept code “IP”) for inpatient visits as the outcome of interest in a cohort defined using visit occurrences with this concept.

The outcome cohort specifies events with this concept id that occur at any time, regardless of cohort entry of the target cohort.

But then I don’t get the same numbers as the cohort characterization, which is why I am trying to figure out what ATLAS uses to find inpatient visits.

I believe the code you found is related to doing a condition occurrence analysis and for inpatient conditions, it would use condition_type_concept_id as you found. But, that’s not a way to just identify ‘Inpatient visits’. To do that, you would look at the visit_concept_id from the visit occurrence table.

I don’t think the analysis uses DomainConcept.sql, based on this configuration file:

This file specifies that the sql template is ConceptCounts.sql. I don’t see anything specific to ‘inpatient’, tho. so I am a little at a loss about how it’s calculated. @anthonysena or @schuemie might be able to answer that.

But, aside from that, I’m sense some confusion between what is reported in characterization (ie: the time before index) and incidence rates (ie: the time after index).

Can you clarify to me what you are looking for in the characterization, vs. what you are looking for in your incidence rate? It sounds like if you made an outcome cohort of ‘inpatient visits’, so anyone with an inpatient visit prior to your cohort start date will be excluded from the incidence rate analysis. I am not sure what your target cohort is, but, whatever it is, if an inpatient visit occurred prior to it, then the person will be excluded.

Thanks so much Chris, I think that answers my question! Anthony confirmed that Atlas discards people with an inpatient visit if it occurs prior to the target cohort.

However, I am still trying to figure out how to analyze the incidence of criteria dependent on inpatient visits – especially if they seem to be discarded.

For example, http://doi.org/10.1097/AOG.0000000000004057 has the following cohort definition “Following previous studies, a delivery was identified as having severe maternal morbidity if that delivery: 1) had at least one of the five procedure based indicators or 2) had at least one of the 16 diagnosis-based indicators and additionally had: a) in-hospital death, b) a cesarean delivery with a length of stay 5 days or longer, or c) a vaginal delivery with a length of stay 3 days or longer.”

Here is how I translated this into an Atlas cohort definition, using the inpatient code of IP (ATLAS).

In the cohort definition module generation tab, I can confirm that there are 2,011 people in this outcome cohort.

In an incidence analysis using this as an outcome however, the incidence drops to 4 cases. If I remove the criteria for the duration of inpatient visits (and only use the condition codes), then the incidence goes up to 334.

I assume this is happening for the same reason: the outcome cohort definition uses the inpatient visit code, and if this code happens any time prior to target cohort entry, that person does not count.

Do you know how I might use Atlas to include people in the incidence analysis even if they had some inpatient codes prior to the target cohort entry?

Thanks so much for bearing with me; this is incredibly helpful for trying to replicate and scale this existing work using Atlas.

You need to craft your outcome cohort to only include events that are after the criteria of your target cohort definition. In other words, if your current Target cohort is ‘exposed to drug X’, then you need to modify your outcome cohort with an additional inclusion rule stating ‘entry event has at least 1 exposure of Drug X prior to index start date’.

This will restrict your outcomes to only those that happened after the target’s entry event, and therefore you will be excluding ‘priors’ from the outcome cohort.

t