diff --git a/working/packages/vocabulary_pack/CheckManualSynonyms.sql b/working/packages/vocabulary_pack/CheckManualSynonyms.sql index 26bbcb0ad..61849a668 100644 --- a/working/packages/vocabulary_pack/CheckManualSynonyms.sql +++ b/working/packages/vocabulary_pack/CheckManualSynonyms.sql @@ -16,7 +16,7 @@ BEGIN LEFT JOIN concept c ON c.concept_code = csm.synonym_concept_code AND c.vocabulary_id = csm.synonym_vocabulary_id LEFT JOIN concept_stage cs ON cs.concept_code = csm.synonym_concept_code AND cs.vocabulary_id = csm.synonym_vocabulary_id LEFT JOIN vocabulary v ON v.vocabulary_id = csm.synonym_vocabulary_id - LEFT JOIN concept c_l ON c_l.concept_id = csm.language_concept_id AND c_l.vocabulary_id='SNOMED' AND c_l.domain_id='Observation' AND c_l.concept_class_id='Qualifier Value' AND c_l.concept_name ilike '%language' + LEFT JOIN concept c_l ON c_l.concept_id = csm.language_concept_id AND c_l.vocabulary_id IN ('SNOMED','Language') AND c_l.domain_id='Language' AND c_l.concept_class_id='Qualifier Value' AND c_l.concept_name ilike '%language' ) AS s0 WHERE reason IS NOT NULL LIMIT 1;