OHDSI Home | Forums | Wiki | Github

Having an issue mapping Epic ICD codes to Condition Concepts

We’re having an issue mapping EPIC ICD codes (either 9 or 10) to OMOP concepts

Epic has internal mapping for ICD codes. Whether ICD 9 or ICD 10, they map to their proprietary code. Each proprietary code can map to multiple 9 and/or 10 codes.

When I query for a particular AoU patient (PHI and proprietary EPIC data obscured):

I get

One Primary diagnosis and 2 Secondary dx.

I can’t map these directly to OMOP concepts but I can use the internal code mapping. The mapping results for these codes looks as follows:

So now,
Prop_diag_id 123 has 2 codes that map to it
456 has 2 codes
789 has 5 codes

Each of these codes map to separate OMOP concept_ids. So when I create the Condition_occurrence table, mapping the ICD codes to SNOMED codes, I get 9 records instead of 3.

I don’t know which condition_concept_id is correct, because I don’t know which ICD code the record was actually based on.

If it was a matter of one icd9 code and one icd10 code, I could split them by date, but there can be multiples of either code set.

Any suggestions on what to do?

Note: For those of you with access, I’ve posted a more complete explanation (with EPIC code) on UserWeb here: OMOP Issue - Condition_occurrence Table

The text string in the diag column doesn’t go with the ICD code of the same row. Check this resource icdcodelookup.com to look up the ICD codes and descriptions for Prop_diag_id = 789

Without having access to your data, it’s really hard to say exactly what is wrong, but I would guess there is another table/s and field/s that will get you to the internal mapping you seek.

Good luck! Epic is a complicated system on the backend, but great for providers!

Here are your examples:
1 case
123:
923.9 Contusion of unspecified part of upper limb->Contusion of upper limb 73075
S40.022A Contusion of left upper arm, initial encounter-> Contusion of upper arm 73923

456:
S80.12XA Contusion of left lower leg, initial encounter-> Contusion of lower leg 77734
924.5 Contusion of unspecified part of lower limb-> Contusion of lower limb 199978

Given ICD9CM and ICD10CM have different meaning, that’s why you get the different mapping.

2 case
789:
789 means “Infectious pnemonia” and internal mapping has “Pnemonia” and “Infectious disease” separately,
ICD10CM stands for B99.9 Unspecified infectious disease and J17 for pneumonia. So it’s OK that we have both 432250 (Disorder due to infection) and 255848 (Pneumonia), you could put both in CDM.

To avoid the ambiguity between ICD10CM and ICD9CM concepts, you can take only the mappings from ICD10CM, as usually (and as we see in the first case) it has more granular concepts

Thanks for replying.

Case 1: I only have access to the proprietary id (123). I don’t know which code was actually used (other than inferring it by date of icd9-icd10 switch).

Fortunately, I found another mapping table which Epic has which maps their proprietary diagnosis id number to a SNOMED code, so I can use that instead of trying to get the standard concept through ICD.

However, Case 2 has me intrigued. Are you saying that even though I have only one actual diagnosis record for pneumonia (789), I can report two condition records?

yes.
BTW, does this another mapping table also gives you two SNOMED codes in the second case?

No. It just returns the 3 diagnosis records with appropriate concept_ids (I assume they’re appropriate). Often they are different from those that came back with the ICD. Sometimes they are the same.

Hm, even 3. so are you going to put all 3 in the CDM?

t