Athena
Athena copied to clipboard
Concept detail page appears almost empty for some concepts
There's a list of 82 concepts for which Athena produces almost an empty detail page (example link):
- Concept_details are missing.
- Dates are wrong, just the current_date is retrieved.
- But relationships are shown.
At the same time, the information in the download package from Athena seems to be correct.
With the following query it looks like the pattern is a deprecated concept that has a "Concept replaced by" link to the "Precise Ingredient" concept_class.
SELECT * FROM concept c1
JOIN concept_relationship cr1 ON c1.concept_id = cr1.concept_id_1
AND cr1.invalid_reason IS NULL
AND cr1.relationship_id = 'Concept replaced by'
JOIN devv5.concept_relationship cr2 --maybe it's not a necessary condition
ON cr2.concept_id_1 = c1.concept_id
AND cr2.invalid_reason IS NULL
AND cr2.relationship_id = 'Maps to'
AND cr2.concept_id_2 != cr1.concept_id_2 --can't be checked since alternative case doesn't exist
JOIN devv5.concept c2 ON cr1.concept_id_2 = c2.concept_id
AND c2.concept_class_id IN ('Precise Ingredient')
WHERE TRUE
;
It's not a precise ingredient thing. A replacement link without counterpart "Maps to" seems to be the thing. Examples: https://athena.ohdsi.org/search-terms/terms/40301422 https://athena.ohdsi.org/search-terms/terms/40320877
https://athena.ohdsi.org/search-terms/terms/40301422 https://athena.ohdsi.org/search-terms/terms/40320877
These examples don't match the criteria anymore.
Here is the example: https://athena.ohdsi.org/search-terms/terms/40367177
Here #391 @ekorchmar suspected the following reason:
I am not well versed in Java, but it looks like processor of this query result is not equipped to handle multiple 'Maps to' replacements. Of course, it is not valid for the concept 40317576 to have multiple mapping targets, but other concepts might have multiple valid mappings; this needs to be handled.