OHDSI Home | Forums | Wiki | Github

Question about Concept_ancestor and Concept_relationship table

I am trying to understand how concept_ancestor table works. Let’s say there is a vocabulary with four concepts that are also four levels of a hierarchy (simplifying)

  • A
  • B
  • C
  • D

In Concept_relationship, they are mapped as follows:

  • A concept ‘Subsumes’ B; B concept ‘Is a’ A
  • B concept ‘Subsumes’ C; C concept ‘Is a’ B
  • C concept ‘Subsumes’ D; D concept ‘Is a’ C

Next question - how should the concept_ancestor table be for these four concepts?

My assumption is that it is something like below, but min_levels_of_seperation and max_levels_of_seperation is unclear

Example.xlsx (13.3 KB)

Could someone please help me by filing up the concept_ancestor table?

you are right.
levels of separation represent the number of steps you need to go from an ancestor to a descendant. As vocabularies like SNOMED have complicated hierarchy, you can reach a concept in different ways and, therefore, max and min_levels will differ.
In your example they’ll be the same as you have only one path + add the concepts themselves with levels = 0

1 Like

Thanks for this illustration. So, it appears that concepts are stored in a hierarchy where parent concept “Subsumes” child(ren) concepts. Does this means that the parent concepts are generic and are for organizational purposes only, and the bottom-most or “leaf” concepts (those that do not subsume others) are the only actual billable goods/services/procedures?

Some concept classes don’t make use of these relationships and others do. Procedures do, but Drugs don’t. Is that expected?

Can we get the same information using the concept_ancestor and the concept_relationship tables? (but using different queries).

Almost, @joe !

The difference is that concept_ancestor only stores hierarchical relationships (like ‘Is a / Subsumes’ pair) between standard and classificational concepts, and does not store a type of link while concept_relationship stores all relationships between any concepts (not necessarily standard or classificational).

We derive concept_ancestor from concept_relationship.

Does it answer your question or do you need more depth?