Skip to content

Commit

Permalink
Merge pull request #21 from publichealthengland/COV-49_add_missing_me…
Browse files Browse the repository at this point in the history
…trics_to_DATA_TYPES

COV-49 Add missing metrics to DATA_TYPES
  • Loading branch information
beawitcht authored Mar 16, 2023
2 parents 5444f41 + 5080ec8 commit 10de57f
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions app/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# 3rd party:

# Internal:
# Internal:

# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -201,22 +201,22 @@ class DBQueries(NamedTuple):
FETCH FIRST 1 ROW ONLY""")

area_id_by_type = """\
SELECT MIN(id) AS id
FROM covid19.area_reference
WHERE area_type = $1
SELECT MIN(id) AS id
FROM covid19.area_reference
WHERE area_type = $1
GROUP BY area_code"""

area_id_by_code_no_type = """\
SELECT MIN(id) AS id
FROM covid19.area_reference
WHERE area_code = $1
SELECT MIN(id) AS id
FROM covid19.area_reference
WHERE area_code = $1
GROUP BY area_code"""

area_id_by_code = """\
SELECT MIN(id) AS id
FROM covid19.area_reference
WHERE area_code = $1
AND area_type = $2
SELECT MIN(id) AS id
FROM covid19.area_reference
WHERE area_code = $1
AND area_type = $2
GROUP BY area_code"""


Expand Down Expand Up @@ -370,6 +370,10 @@ class DBQueries(NamedTuple):

"newDailyNsoDeathsByDeathDate": int,
"cumDailyNsoDeathsByDeathDate": int,
"newDailyNsoDeathsByDeathDateChangePercentage": float,
"newDailyNsoDeathsByDeathDateChange": int,
"newDailyNsoDeathsByDeathDateDirection": str,
"newDailyNsoDeathsByDeathDateRollingSum": int,

"cumWeeklyNsoDeathsByRegDate": int,
"cumWeeklyNsoDeathsByRegDateRate": float,
Expand Down Expand Up @@ -735,6 +739,10 @@ class DBQueries(NamedTuple):

"newDailyNsoDeathsByDeathDate": int,
"cumDailyNsoDeathsByDeathDate": int,
"newDailyNsoDeathsByDeathDateChangePercentage": float,
"newDailyNsoDeathsByDeathDateChange": int,
"newDailyNsoDeathsByDeathDateDirection": str,
"newDailyNsoDeathsByDeathDateRollingSum": int,

"cumPeopleVaccinatedFirstDoseByPublishDate": int,
"cumPeopleVaccinatedSecondDoseByPublishDate": int,
Expand Down

0 comments on commit 10de57f

Please sign in to comment.