diff --git a/cumulus_library_covid/covid_symptom/table_prevalence_ed.sql b/cumulus_library_covid/covid_symptom/table_prevalence_ed.sql index fa72d2a..9212f3a 100644 --- a/cumulus_library_covid/covid_symptom/table_prevalence_ed.sql +++ b/cumulus_library_covid/covid_symptom/table_prevalence_ed.sql @@ -28,12 +28,11 @@ join_2020 AS ( p.subject_ref, p.encounter_ref, COALESCE(pcr.covid_pcr_result_display, 'None') AS covid_pcr_result, - CASE - WHEN dx.cond_code IS NOT NULL THEN True ELSE False - END AS covid_icd10, + 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 + (dx.cond_code IS NOT NULL OR 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