OHDSI Home | Forums | Wiki | Github

SNOMEDCT Hierarchy

Hello!

I am not sure if this is an issue on my side but I am not able to find the SNOMEDCT hierarchy for this code 365980008: Finding of tobacco use and exposure. I tried both concept_ancestor and concept_relationship tables.
I’d appreciate any suggestions or feedback.

Thank you,
Deepika

Here is a link in Athena to look at.

Thank you, Mark. I know its in Athena but I am trying to get the hierarchy from the omop tables.

It looks like maybe you are using concept_code (the SNOMED identifier for the concept) and you need to use concept_id (the unique OHDSI identifier for the concept) when you look in the relationship tables (e.g. concept_ancestor). Here are some queries that might be helpful.

select count(*) from concept;

select * from concept where vocabulary_id = 'SNOMED' and lower(concept_name) like '%tobacco use and exposure%' order by concept_id;

-- 
-- find the record for SNOMED concept
--

select * from concept where vocabulary_id = 'SNOMED' and concept_code = '365980008';

select * from concept where concept_id = '4268843';


--
-- Get the descendants
--

select
	ca.*
from
	concept ancestor_concept
	join concept_ancestor ca on ancestor_concept.concept_id = ca.ancestor_concept_id
where
	ancestor_concept.concept_id = 4268843
;

--
-- Get the descendant details
--

select
	descendant_concept.*,
	ca.*
from
	concept ancestor_concept
	join concept_ancestor ca on ancestor_concept.concept_id = ca.ancestor_concept_id
	join concept descendant_concept on descendant_concept.concept_id = ca.descendant_concept_id
where
	ancestor_concept.concept_id = 4268843
order by 
	descendant_concept.concept_name
;

Are you doing ETL? I have seen other posts (not that I remember where) advising not to use the ancestor_concept for ETL but to use concept_relationship.

Now I am in a older version of the vocabulary (AOU ETL) but in it, ‘365980008’ is a standard concept. Perhaps I do not understand your end case.

Oh oh. Lots of uncertainties here in the Forum. Make sure you read the Book of OHDSI, it’s all in there, that’s why we have it.

365980008 is indeed a typical SNOMED code (they call it conceptID to confuse us), not an OMOP Concept ID. It exists in the SNOMED and Nebraska Lexicon vocabularies. You need to use the one that is a standard concept, and that is the SNOMED one. It has a nice hierarchy that you can traverse through CONCEPT_ANCESTOR or CONCEPT_RELATIONSHIP (using the “Isa” and “Subsumes” relationship IDs). All good.

However, if you are ETLing you may want to watch the new Smoking hierarchy coming up.

t