Skip to content

Commit bd26d1c

Browse files
authored
Merge pull request #1682 from cmu-delphi/release/delphi-epidata-4.1.37
Release Delphi Epidata 4.1.37
2 parents 929116c + d6e4270 commit bd26d1c

File tree

22 files changed

+1668
-345
lines changed

22 files changed

+1668
-345
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 4.1.36
2+
current_version = 4.1.37
33
commit = False
44
tag = False
55

dev/local/setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = Delphi Development
3-
version = 4.1.36
3+
version = 4.1.37
44

55
[options]
66
packages =

docs/api/flusurv.md

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,45 @@ If neither is specified, the current issues are used.
5454

5555
## Response
5656

57-
| Field | Description | Type |
58-
|--------------------------|-----------------------------------------------------------------|------------------|
59-
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
60-
| `epidata` | list of results | array of objects |
61-
| `epidata[].release_date` | | string |
62-
| `epidata[].location` | | string |
63-
| `epidata[].issue` | | integer |
64-
| `epidata[].epiweek` | | integer |
65-
| `epidata[].lag` | | integer |
66-
| `epidata[].rate_age_0` | | float |
67-
| `epidata[].rate_age_1` | | float |
68-
| `epidata[].rate_age_2` | | float |
69-
| `epidata[].rate_age_3` | | float |
70-
| `epidata[].rate_age_4` | | float |
71-
| `epidata[].rate_overall` | | float |
72-
| `message` | `success` or error message | string |
57+
| Field | Description | Type |
58+
|---|---|---|
59+
| `result` | result code: 1 = success, 2 = too many results, -2 = no results | integer |
60+
| `epidata` | list of results | array of objects |
61+
| `epidata[].release_date` | the date when this record was first received by Delphi | string |
62+
| `epidata[].location` | the name of the catchment (e.g. 'network_all', 'CA', 'NY_albany' | string |
63+
| `epidata[].issue` | the epiweek of receipt by Delphi (e.g. issue 201453 includes epiweeks up to and including 2014w53, but not 2015w01 or following) | integer |
64+
| `epidata[].epiweek` | the epiweek during which the data was collected | integer |
65+
| `epidata[].lag` | number of weeks between `epiweek` and `issue` | integer |
66+
| `epidata[].rate_age_0` | hospitalization rate for ages 0-4 | float |
67+
| `epidata[].rate_age_1` | hospitalization rate for ages 5-17 | float |
68+
| `epidata[].rate_age_2` | hospitalization rate for ages 18-49 | float |
69+
| `epidata[].rate_age_3` | hospitalization rate for ages 50-64 | float |
70+
| `epidata[].rate_age_4` | hospitalization rate for ages 65+ | float |
71+
| `epidata[].rate_overall` | overall hospitalization rate | float |
72+
| `epidata[].rate_age_5` | hospitalization rate for ages 65-74 | float |
73+
| `epidata[].rate_age_6` | hospitalization rate for ages 75-84 | float |
74+
| `epidata[].rate_age_7` | hospitalization rate for ages 85+ | float |
75+
| `epidata[].rate_age_18t29` | hospitalization rate for ages 18 to 29 | float |
76+
| `epidata[].rate_age_30t39` | hospitalization rate for ages 30 to 39 | float |
77+
| `epidata[].rate_age_40t49` | hospitalization rate for ages 40 to 49 | float |
78+
| `epidata[].rate_age_5t11` | hospitalization rate for ages 5 to 11 | float |
79+
| `epidata[].rate_age_12t17` | hospitalization rate for ages 12 to 17 | float |
80+
| `epidata[].rate_age_lt18` | hospitalization rate for ages <18 | float |
81+
| `epidata[].rate_age_gte18` | hospitalization rate for ages >=18 | float |
82+
| `epidata[].rate_age_0tlt1` | hospitalization rate for ages 0-1 | float |
83+
| `epidata[].rate_age_1t4` | hospitalization rate for ages 1-4 | float |
84+
| `epidata[].rate_age_gte75` | hospitalization rate for ages >=75 | float |
85+
| `epidata[].rate_race_white` | hospitalization rate for white people | float |
86+
| `epidata[].rate_race_black` | hospitalization rate for black people | float |
87+
| `epidata[].rate_race_hisp` | hospitalization rate for Hispanic/Latino people | float |
88+
| `epidata[].rate_race_asian` | hospitalization rate for Asian people | float |
89+
| `epidata[].rate_race_natamer` | hospitalization rate for American Indian/Alaskan Native people | float |
90+
| `epidata[].rate_sex_male` | hospitalization rate for males | float |
91+
| `epidata[].rate_sex_female` | hospitalization rate for females | float |
92+
| `epidata[].rate_flu_a` | hospitalization rate for inflenza A | float |
93+
| `epidata[].rate_flu_b` | hospitalization rate for inflenza B | float |
94+
| `epidata[].season` | indicates the start and end years of the winter flu season in the format YYYY-YY (e.g. 2022-23 indicates the flu season running late 2022 through early 2023) | string |
95+
| `message` | `success` or error message | string |
7396

7497
Notes:
7598
* The `flusurv` age groups are, in general, not the same as the ILINet

integrations/server/test_flusurv.py

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,54 @@ def localSetUp(self):
1010

1111
def test_flusurv(self):
1212
"""Basic integration test for flusurv endpoint"""
13+
# TODO: Should test out the whole pipeline, where we mock the source
14+
# API by pulling more realistic data from a local JSON.
1315
self.cur.execute(
14-
"INSERT INTO `flusurv`(`release_date`, `issue`, `epiweek`, `location`, `lag`, `rate_age_0`, `rate_age_1`, `rate_age_2`, `rate_age_3`, `rate_age_4`, `rate_overall`, `rate_age_5`, `rate_age_6`, `rate_age_7`) VALUES(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
15-
("2012-11-02", "201243", "201143", "CA", "52", "0", "0", "0", "0.151", "0", "0.029", "0", "0", "0"),
16+
"""
17+
INSERT INTO `flusurv`(
18+
`release_date`,
19+
`issue`,
20+
`epiweek`,
21+
`location`,
22+
`lag`,
23+
`rate_age_0`,
24+
`rate_age_1`,
25+
`rate_age_2`,
26+
`rate_age_3`,
27+
`rate_age_4`,
28+
`rate_overall`,
29+
`rate_age_5`,
30+
`rate_age_6`,
31+
`rate_age_7`,
32+
`rate_age_18t29`,
33+
`rate_age_30t39`,
34+
`rate_age_40t49`,
35+
`rate_age_5t11`,
36+
`rate_age_12t17`,
37+
`rate_age_lt18`,
38+
`rate_age_gte18`,
39+
`rate_age_1t4`,
40+
`rate_age_gte75`,
41+
`rate_age_0tlt1`,
42+
`rate_race_white`,
43+
`rate_race_black`,
44+
`rate_race_hisp`,
45+
`rate_race_asian`,
46+
`rate_race_natamer`,
47+
`rate_sex_male`,
48+
`rate_sex_female`,
49+
`rate_flu_a`,
50+
`rate_flu_b`,
51+
`season`
52+
) VALUES(
53+
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s,
54+
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s
55+
)
56+
""",
57+
(
58+
"2012-11-02", 201243, 201143, "CA", 52, 0, 0, 0, 0.151, 0, 0.029, 0, 0, 0,
59+
2.54, 0, 1, 0, 0, 0, 0, 0, 0.68, 0.46, 1, 1, 0, 0, 0, 99, 0, 0, 22.2, "2012-13"
60+
),
1661
)
1762
self.cnx.commit()
1863
response = self.epidata_client.flusurv(epiweeks=201143, locations="CA")
@@ -25,13 +70,36 @@ def test_flusurv(self):
2570
"location": "CA",
2671
"issue": 201243,
2772
"epiweek": 201143,
73+
"season": "2012-13",
2874
"lag": 52,
2975
"rate_age_0": 0.0,
3076
"rate_age_1": 0.0,
3177
"rate_age_2": 0.0,
3278
"rate_age_3": 0.151,
3379
"rate_age_4": 0.0,
3480
"rate_overall": 0.029,
81+
"rate_age_5": 0.0,
82+
"rate_age_6": 0.0,
83+
"rate_age_7": 0.0,
84+
"rate_age_18t29": 2.54,
85+
"rate_age_30t39": 0.0,
86+
"rate_age_40t49": 1.0,
87+
"rate_age_5t11": 0.0,
88+
"rate_age_12t17": 0.0,
89+
"rate_age_lt18": 0.0,
90+
"rate_age_gte18": 0.0,
91+
"rate_age_1t4": 0.0,
92+
"rate_age_gte75": 0.68,
93+
"rate_age_0tlt1": 0.46,
94+
"rate_race_white": 1.0,
95+
"rate_race_black": 1.0,
96+
"rate_race_hisp": 0.0,
97+
"rate_race_asian": 0.0,
98+
"rate_race_natamer": 0.0,
99+
"rate_sex_male": 99.0,
100+
"rate_sex_female": 0.0,
101+
"rate_flu_a": 0.0,
102+
"rate_flu_b": 22.2,
35103
}
36104
],
37105
"result": 1,

0 commit comments

Comments
 (0)