Skip to content

Commit

Permalink
Describe age buckets in data-service README #2670
Browse files Browse the repository at this point in the history
  • Loading branch information
iamleeg committed Apr 25, 2022
1 parent aee42fd commit 993bbc6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions data-serving/data-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,12 @@ From the data-service root, run:
2. Generate the CSV fields list
`pushd ../scripts/prepare_fields_list; npm run populate-fields; popd`
3. re-build the data service (`npm run dev` watches the source so will do this automatically)

# Age bucketing

To prevent reidentification of individual cases, we use bucketed age ranges for infants (<1 year old) and then five year ranges.
This bucketing is done in the data service: age ranges are converted to age buckets when you write through the API (PUT/POST/upsert/batchUpsert),
then the bucketed age range is returned in API requests (GET or download).

This could have been done using mongoose hooks but we don't want to rely on mongoose for much longer (already removed from the curator service),
so instead all transformations are done by the cases controller.

0 comments on commit 993bbc6

Please sign in to comment.