Skip to content

Commit

Permalink
Merge pull request #110 from seattleflu/census-tract
Browse files Browse the repository at this point in the history
views: Add census tract to SCAN encounters view
  • Loading branch information
kairstenfay committed Jun 16, 2020
2 parents 0e50f58 + 14cc6f0 commit f534d4b
Show file tree
Hide file tree
Showing 6 changed files with 4,382 additions and 1 deletion.
2 changes: 2 additions & 0 deletions schema/deploy/shipping/views.sql
Expand Up @@ -1042,6 +1042,7 @@ create or replace view shipping.hcov19_observation_v1 as
best_available_site as site,
best_available_site_type as site_type,

location.hierarchy->'tract' as census_tract,
location.hierarchy->'puma' as puma,
case location.scale
-- Only include address identifiers as those are used to identify
Expand Down Expand Up @@ -1158,6 +1159,7 @@ create or replace view shipping.scan_encounters_v1 as
age_in_years(upper(age_bin_coarse_v2.range)) as age_range_coarse_upper,

location.hierarchy -> 'puma' as puma,
location.hierarchy -> 'tract' as census_tract,

symptoms,
symptom_onset,
Expand Down

0 comments on commit f534d4b

Please sign in to comment.