I am looking to find the top level term for my diagnosis codes which have ICD9/10 codes.
For example,
ICD-9 ICD9 description OMOP concept Name OMOP concept Id
01000 Prim Tuberculosis Complex-unspec Tuberculosis 434557
01001 Prim Tuberculosis Complex-no Exam 1 Tuberculosis 434557
You can see how I have tried to map different conditions related to Tuberculosis to their parent term. In drugs domain, we call ingredients as the top level of the hierarchy. So, we map metformin 250 mg to metformin.
Does such hierarchy exists for diagnosis/conditions domain? If yes, what is the concept class called? I only see clinical finding for all standard diagnosis concepts under conditions domain in OMOP… So, unable to choose a filter in Usagi to map my source terms to top level items
Can you share some insights on how to map different manifestations of a clinical condition to its corresponding top level(parent) term? Is it possible using Usagi? Has anyone tried this before?
While we don’t intend to do our actual mapping this way, but for some analytics reasons, I would like to group different diagnosis codes to their parent term.
You can do that for the ICDs. But we don’t use their rather limited hierarchy. Standard Conditions are encoded in SNOMED CT, and their hierarchy is much stronger and available in CONCEPT_ANCESTOR.
Could there be multiple parents at the same level like shown below? (with Is a relationship). I was expecting to see only one parent term like what we have for 2nd scenario (2nd example). When can a term have multiple parents at the same level? Or is my query incorrect? If there are multiple terms at the same level, we just pick anyone (because all of them are valid, standard concepts and there is no way to differentiate them)?
I tried the below query
select b.descendant_concept_id, a.concept_name,b.ancestor_concept_id
from cdm.concept a
inner join
cdm.concept_ancestor b
on a.concept_id = b.ancestor_concept_id
where b.descendant_concept_id = 321318
and b.max_levels_of_separation = 1 and b.min_levels_of_separation = 1 and
standard_concept = 'S'
Yes, Conditions can have multiple parents at the same level. This is to be expected. Our bodies and disease processes are much more complex than drugs, which have a more linear hierarchy.
Just wanted to add that drug hiearchy will show multiple parents in the case of combination drugs (each element of the combination will have a parent ingredient) as well as some ATC classes cover the same ingredients so you will find an ingredient has multiple ATC parents.
Is there anyway to filter our concept_sets (either via Atlas or SQL) to only include drugs which has that specific ingredient (and no other ingredient)? Basically, drop combination drugs from concept set
For ex: Let’s take the ingredient rosiglitazone. If I select descendants of this, I get combination drugs which has both rosiglitazone and metformin as it’s constituents. I understand this is expected and correct way of working.
But is there anyway to avoid such combination drugs from our concept set?
Currently I manually uncheck or export to csv and remove all terms which contains keyword met. I feel this may not be a good approach. So, wanted to know whether there is any other efficient method that can allow us to drop these combination drugs from our concept set (eith via Atlas or SQL).
When I try to write SQL, I don’t see any pattern in relationships to exclude them specifically. Any advice or suggestions?
The reason to ask this is because if one wishes to study the effectiveness of a drug (which belongs to specific drug class), we want to make sure that we keep it clean (and not consider any drug constituents from different class). Understand this could be challenging but just wanted to know whether experts here have tried this before
hi @SELVA_MUTHU_KUMARAN, there are 2 ways to do that using SQL and concept ancestor.
-- var 1 (returns 152 entries)
select c.*, d.* from concept_ancestor ca
join concept c on c.concept_id = ca.ancestor_concept_id
join concept d on d.concept_id = ca.descendant_concept_id
where ancestor_concept_id = 1547504
and d.concept_name not like '% / %' -- filter out combo-drugs
and d.standard_concept = 'S';
-- var 2 via ATC (returns 140 entries without some RxNorm Extension concepts which are out of ATC hierarchy)
select c.*, d.* from concept_ancestor ca
join concept c on c.concept_id = ca.ancestor_concept_id
join concept d on d.concept_id = ca.descendant_concept_id
and c.concept_id <> d.concept_id
where ancestor_concept_id = 21600781 -- ATC 5th, rosiglitazone; oral
and d.standard_concept = 'S';
And what if metformin was given as a separate pill? Do you have a list of drugs as an exclusion criteria?
@Polina_Talapova , interesting, so, when I want to find the rosiglitazone regardless it’s a single ingredient or a combination (most common query I suppose), I will lost all combination drugs and some 12 RxE drugs, right?
@Dymshyts - If metformin is given as a separate pill, we would like to have them for our study. I do have a list of drugs to exclude but like I mentioned, it was identified manually by going through the concept set
For ex: When I reviewed drug concepts with rosiglitazone ingredient, I see that they are also part of combination drugs. So, we manually review and exclude them (using Atlas) or filter from exported concept set csv file (using pattern matching).
@Polina_Talapova - Fantastic. I missed to notice the slash / character. Believe combination drugs all have / character in their name to differentiate from single ingredient drug.
Believe combination drugs all have / character in their name to differentiate from single ingredient drug.
yes, they do (please pay attention, not just ‘/’ but ’ / ’ with spaces on the sides).
when I want to find the rosiglitazone regardless it’s a single ingredient or a combination (most common query I suppose), I will lost all combination drugs and some 12 RxE drugs, right?
@Dymshyts you will not lose if you use the following query:
-- returns 354 entries
select distinct d.* from concept_ancestor ca
join concept c on c.concept_id = ca.ancestor_concept_id
join concept d on d.concept_id = ca.descendant_concept_id
where ancestor_concept_id = 1547504
and d.standard_concept = 'S';
which is an RxNorm Ingredient.
My point here is that ATC hierarchy is flawed in this case, there’s no context that 21600781 – ATC 5th, rosiglitazone; oral stands for the monocomponent drugs only. Please correct me if I’m wrong
in ATC, for combinations with rosiglitazone there are two specific codes: A10BD04 glimepiride and rosiglitazone and A10BD03 metformin and rosiglitazone.
Interestingly, that querying respective ids in concept_ancestor table (see below) we get 349 distinct values, that, in comparison with the previous request, is 5 concepts less. And all of the missing ones are mono-component. In parallel, it seems that A10BG02 rosiglitazone stands for the monocomponent drugs only, at least at the present time.
select distinct d.* from concept_ancestor ca
join concept c on c.concept_id = ca.ancestor_concept_id
join concept d on d.concept_id = ca.descendant_concept_id
and c.concept_id <> d.concept_id
where ancestor_concept_id in ( 21600781, 21600769, 21600768)
and d.standard_concept = 'S'
and d.concept_name ilike '%rosiglitazone%';
Am assuming whatever relationship we see in Athena is only available in concept * tables.
So, currently I would like to know whether we can get ATC top level items using OMOP concept_ids only (because we don’t have source drug codes in our data)
For ex: I would like to get the level A10B and A10BA using the omop concept_id = 1503297 (metformin).
Ah okay, I found using the below query. Thanks for your help
select * from cdm.concept where concept_id in
(select distinct ancestor_concept_id from cdm.concept_ancestor
where descendant_concept_id = 1503297)
and concept_class_id in (‘ATC 2nd’, ‘ATC 3rd’)