Skip to content

Commit

Permalink
KH-527: Fixed Observation answer concept uuid references
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruhanga authored and rbuisson committed May 29, 2024
1 parent 850a156 commit f80e952
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions analytics/dsl/flattening/queries/observations.sql
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ SELECT
obs.void_reason AS obs_void_reason,
obs.previous_version AS previous_version_obs_id,
obs.obs_group_id AS parent_obs_id,
value_concept_name.uuid AS answer_coded_uuid,
concept_answer.uuid AS answer_coded_uuid,
creator.uuid AS creator_uuid,
encounter.uuid AS encounter_uuid,
visit.uuid AS visit_uuid,
Expand All @@ -43,4 +43,5 @@ FROM
LEFT JOIN concept_name concept_concept_name ON obs.concept_id = concept_concept_name.concept_id AND concept_concept_name.locale LIKE 'en' AND concept_concept_name.voided = false AND concept_concept_name.locale_preferred = true
LEFT JOIN person patient ON obs.person_id = patient.person_id
LEFT JOIN person creator ON obs.creator = creator.person_id
LEFT JOIN concept concept ON obs.concept_id = concept.concept_id
LEFT JOIN concept concept ON obs.concept_id = concept.concept_id
LEFT JOIN concept concept_answer ON obs.value_coded = concept_answer.concept_id

0 comments on commit f80e952

Please sign in to comment.