Skip to content

Commit

Permalink
fixed "upper" for PCR='POSITIVE'
Browse files Browse the repository at this point in the history
  • Loading branch information
comorbidity committed Aug 17, 2023
1 parent 00ec758 commit 85f07c6
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cumulus_library_covid/covid_symptom/table_prevalence_ed.sql
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,10 @@ join_2020 AS (
p.encounter_ref,
COALESCE(pcr.covid_pcr_result_display, 'None') AS covid_pcr_result,
COALESCE(dx.cond_code, 'None') AS covid_icd10,
CASE
WHEN
(dx.cond_code IS NOT NULL OR pcr.covid_pcr_result_display = 'POSITIVE')
THEN True
ELSE False
AS covid_dx,
CASE WHEN
(dx.cond_code IS NOT NULL) OR
(upper(pcr.covid_pcr_result_display) = 'POSITIVE')
THEN True ELSE False END AS covid_dx,
COALESCE(nlp.symptom_display, 'None') AS covid_symptom,
COALESCE(icd10.icd10_display, 'None') AS symptom_icd10_display
FROM from_period AS p
Expand Down

0 comments on commit 85f07c6

Please sign in to comment.