@aostropolets,
it’s a good approach
but it will work in an ideal world where we assigned ATC’s to all the RxNorm concepts,
look:
select count(*) from concept c where c.concept_id not in (
select distinct c.concept_id from concept c
join concept_ancestor a on a.descendant_concept_id = c.concept_id
join concept x on a.ancestor_concept_id= x.concept_id and x.vocabulary_id =‘ATC’
where c.vocabulary_id = ‘RxNorm’ and c.concept_name like ‘%Sodium Chloride%’ and c.standard_concept = ‘S’
)
and c.vocabulary_id = ‘RxNorm’ and c.concept_name like ‘%Sodium Chloride%’ and c.standard_concept = ‘S’
;
–there are 650 concepts containing Sodium Chloride but without ATC relationship.
@ericaVoss, on the other hand the approach might be slightly modified and you get the nice results then:
there is a list of ingredients having the ATC’s of interest:
select c.concept_id, c.concept_name from concept c
join concept_ancestor a on a.descendant_concept_id = c.concept_id
join concept x on a.ancestor_concept_id= x.concept_id and x.vocabulary_id =‘ATC’
where c.vocabulary_id = ‘RxNorm’ and c.standard_concept = ‘S’ and c.concept_class_id = ‘Ingredient’
and x.concept_code in (
–take some of Anna’s examples and added ‘B05XA’ --seems to be important also
‘A02AA’, ‘A02AB’, ‘A02AC’, ‘A02AD’ ,-- salts compounds
‘B05XA’, – Electrolyte solutions
‘A06AC’, – Bulk-forming laxatives
‘A07B’ – INTESTINAL ADSORBENTS
)
;
so you can look for these ingredients in dose_era or go through concept_ancestor to get the corresponding drugs for drug_exposure analysis