OHDSI / Vocabulary-v5.0

Build process for the OHDSI Standardized Vocabularies. Currently not available as independent release.
The Unlicense
219 stars 75 forks source link

ATC has relationships in concept_relationship, absent in concept_ancestor #714

Open TinyRickC137 opened 1 year ago

TinyRickC137 commented 1 year ago

Describe the problem in content There are valid ATC - Rx relationships for standard valid drugs, that are absent in concept_ancestor table

How to find it One mall example

--All ancestors for the selected concept
SELECT c.*
FROM concept_ancestor ca
JOIN concept c
ON ca.ancestor_concept_id = c.concept_id
WHERE descendant_concept_id = 1592335;

--All relationships for the seleced concept
SELECT cr.relationship_id, cr.invalid_reason, c.*
FROM concept_relationship cr
JOIN concept c
ON cr.concept_id_2 = c.concept_id
WHERE concept_id_1 = 1592335;

Expected adjustments Investigate and deprecate them or add into concept_ancestor table

aostropolets commented 1 year ago

They are not in the ancestor because riboflavin in ATC is not mapped to riboflavin 5'-phosphate (conceptually). Instead, it is mapped to 19062817 riboflavin. RxNorm - ATC as a link is a legacy link and doesn't participate in the hierarchy. So, depending on whether you believe that riboflavin 5'-phosphate is equal to just riboflavin, you may chose to update the source mappings in ATC (on the attribute level, the source tables used in the constructor) and re-run it or leave it as is.

TinyRickC137 commented 1 year ago

Thank you, @aostropolets, very helpful However, It is not mentioned in the documentation, that these links are legacy, users may be confused as I was.

I will keep this issue open as a reminder