Hi All - We’re trying to leverage the drug_exposure table and the visit_occurrence tables to categorize drug exposure by specific concept IDs. We bought these data in the OMOP CDM v5 from a major third party claims vendor and did not convert these ourselves.
Our query looks something like this:
select count(*)
FROM omop_claims.DRUG_EXPOSURE de
JOIN omop_claims.VISIT_OCCURRENCE V on de.visit_occurrence_id = V.visit_occurrence_id and de.person_id = V.person_id
and V.visit_concept_id in (42898160,9201,9202,9203)
where de.drug_concept_id in (36247192,
36247191,
44815763,
44815761)
We really care about allowing a user to filter on the visit_concept associated to the drug exposure, if it exists at all. The output of this query was 0. When we investigated, we found that the culprit was NULLs in the VISIT_OCCURRENCE_ID.
I was digging around and found this chain from Visit_concept_id for pharmacy claim data:
I totally get that NULLs can occur for legitimate reasons but I’m confused a bit by all NULLs. I found my other claims data set also had all NULLs for VISIT_OCCURRENCE_ID. I would expect that a large amount of values may be null but I’m slightly confused that there couldn’t be some triangulation to have 9202 to denote outpatient visits where RX values are derived from an outpatient services table.
So let me reframe the question, is there another way that I could use fields between drug_exposure and visit_occurrence to see this exposure stratification? Is there a way to creatively use the TYPE field to do this? (Bias: I think some of the TYPEs are a little tricky to use effectively.) Or am I simply asking OMOP transformed medical and pharmacy claims a question it can’t answer?
Best,
Kristin