OHDSI Home | Forums | Wiki | Github

General mapping source Concepts and ATLAS Descendants questions

We’ve been creating OMOP content for a couple years now and when Mapping source content (standard vocabularies or local concepts) to Standard OMOP concepts we only use the CONCEPT_RELATIONSHIP “Maps to” when mappings our content to any of the Domains.

I know there are hundreds of RELATIONSHIP_ID values in CONCEPT_RELATIONSHIP.

Should we be using other RELATIONSHIP_ID values in addition?

For ATLAS and it’s use of Descendants, it’s not clear to me which of these RELATIONSHIP_ID values in CONCEPT_RELATIONSHIP are used?

There are other types of relationships that you may want to leverage based on your need/use case (for example, SNOMED has relationship Has procedure site that links procedures and organs associated with that procedure) . If the purpose is to get standard counterparts, you are totally fine with Maps to.

Hierarchy (descendants) is a combo of multiple relationships and concept_ancestor table is where all of them are combined into single hierarchy for convenience. Atlas descendants feeds off of concept_ancestor. The basic rel is Is a/Subsumes, but there are other vocabulary-specific hierarchical relationships (which you don’t need to point to in concept_relationship since you have concept_ancestor).

Anna,
Thanks for the quick reply. This helps!!

For ATLAS and the CONDITION_OCCURRENCE domain specifically:
Could you describe how the CONCEPT_ANCESTOR and CONCEPT_RELATIONSHIP tables are used to find descendants?

Looking at Osteoporosis and finding descendants in CONCEPT_ANCESTOR I find 119 descedannts (at least in the Athena concepts we have downloaded)

select * from concept where concept_id = 80502;  -- Osteoporosis
select  c.concept_name, c.vocabulary_id, c.standard_concept,'----dlm----'dlm , ca.* 
from concept_ancestor ca 
join concept c on (c.concept_id = ca.descendant_concept_id)
where ancestor_concept_id = 80502 
order by lower(c.concept_name );

Not sure I understand the question :slight_smile:

How does ATLAS find all Descendants for any particular condition_concept_id in the CONDITION_OCCURRENCE table ?

Thanks, Jeff

@Kepi I think the answer is in the fact that concept_ancestor.ancestor_concept_id does not imply “parent ID”. ALL descendants of concept 123, at all levels, have a row in concept_ancestor with ancestor_concept_id=123.

I don’t know for certain, but I would guess Atlas is using the same logic as in @aostropolets example query, which returns all 86 descendants of osteoperosis.

The query flips the logic of “all descendants of 123” to “all concepts with 123 as an ancestor”.

It only goes to concept_ancestor. If you create a cohort definition, you can review the generated SQL, and at the top of the query you’ll see how it creates the codeset table which is the materialization of the concept set expressioni. You will see it uses the concept_ancestor table for any concept that indicates ‘include descendants’.

t