Skip to content

Commit

Permalink
KH-502: Concept mappings to be properly concatenated in the concepts …
Browse files Browse the repository at this point in the history
…query
  • Loading branch information
Ruhanga committed May 16, 2024
1 parent ddc30ad commit b2a8300
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions analytics/dsl/flattening/queries/concepts.sql
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
SELECT DISTINCT concept.concept_id AS concept_id,
LISTAGG(
CONCAT_WS(': ', concept_reference_source.name, concept_reference_term.code), ', '
) AS concept_mappings_source_Codes,
CASE
WHEN concept_reference_source.name <> '' AND concept_reference_term.code <> ''
THEN CONCAT_WS(': ', concept_reference_source.name, concept_reference_term.code)
END
, ', '
) AS concept_mappings_source_Codes,
concept_name.name AS name,
concept_name.locale AS locale,
concept_name.locale_preferred AS locale_preferred,
Expand Down

0 comments on commit b2a8300

Please sign in to comment.