-
Notifications
You must be signed in to change notification settings - Fork 67
Closed
Labels
acquisitionchanges acquisition logicchanges acquisition logicapi changeaffect the API and its responsesaffect the API and its responsesenhancement
Description
There have been quite a few columns added to the HHS datasets on patient impact and hospital capacity since we last updated our code, including:
- age stratifications added April 30
- covid deaths added June 30
- drug courses on hand added September 13
- influenza admissions, ICU prevalence, and deaths, added September 17
The above are the additions for state timeseries; state daily and facility weekly may have a different set.
The code for this dataset is in acquisition/covid_hosp. There are three variants: state timeseries, state daily, and facility (weekly).
Updating that code requires the following steps:
- Look up the CSV column headers for all new columns on the appropriate website (state timeseries is here; you should be able to find links for the others in the Epidata docs on non-covidcast endpoints)
- Add the new columns to the database definitions in covid_hosp.sql (possibly using an alias name to reduce column name length in the db)
- List the mapping between CSV column header, DB column name, and data type in each dataset's database.py (example: state timeseries)
- Update or extend the tests (unit; integration) with new sample data containing the new columns
- Write a database migration script (in SQL) to add the new columns to the existing database. We haven't historically done this in a reviewable fashion, but we should really start. Make a new directory
src/ddl/migrations/to hold this script, and include the acquisition module (covid_hosp) in the name, as well as the starting and ending minor versions (we're currently in v0.2; this change includes a database migration so it will push us into v0.3. You can always see the current complete version on the repository releases page) - Open a PR and tag a reviewer.
- Once your PR is approved, merge it, then ping Katie to schedule a minor-version release. Release should occur after the day's covid_hosp updates run in Automation, which are scheduled for 10am but have been delayed lately due to the covidcast meta cache running time problems. Avoid releasing on Fridays for everyone's health.
- After release and before the next day's covid_hosp update jobs run in Automation, run the migration.
Metadata
Metadata
Assignees
Labels
acquisitionchanges acquisition logicchanges acquisition logicapi changeaffect the API and its responsesaffect the API and its responsesenhancement