Question, right now it looks like concepts like 46273477-Complication due to ulcerative colitis and 46269889-Complication due to Crohn's disease don’t seem to have a relationship to the disease. For the last concept I would assume there would be a relationship 21002084-Crohn's Disease - I think preferably where Crohn’s disease is an ancestor. What are people’s thoughts?
@SIA - yes sorry you are correct. I had started from indications in the Vocabulary 21002084-Crohn's Disease and got to standard concept you mention which includes 201606-Crohn's disease.
But I would expect to go from that concept to the other:
SELECT *
FROM CONCEPT c1
JOIN CONCEPT_ANCESTOR ca
ON ca.ANCESTOR_CONCEPT_ID = c1.CONCEPT_ID
JOIN CONCEPT c2
ON c2.CONCEPT_ID = ca.DESCENDANT_CONCEPT_ID
WHERE c1.CONCEPT_ID = 201606
AND c2.CONCEPT_ID = 46269889
--0 rows in Vocabulary V20170503
It looks like the relationship exists, but only in the CONCEPT_RELATIONSHIP table. I see there is a “Has due to” relationship, which must not be in the CONCEPT_ANCESTOR table.
SELECT *
FROM CONCEPT c1
JOIN CONCEPT_RELATIONSHIP ca
ON ca.CONCEPT_ID_2 = c1.CONCEPT_ID
JOIN CONCEPT c2
ON c2.CONCEPT_ID = ca.CONCEPT_ID_1
WHERE c1.CONCEPT_ID = 201606
AND c2.CONCEPT_ID = 46269889
--1 row