Integrates the digital growth charts API to calculate centiles and SDS where heights and weights are provided
Reports these values to the user in the questionnaire
Code changes
New file dgc_centile_calculations which makes the API calls. Note that credentials need to be added to the .env (see settings.py)
csv_upload makes the api calls within the async work flow prior to saving the visit
New fields for height/weight/bmi centiles and SDS are added to the Visit model so generate a new migration
These fields are added to the form, but have to set again to None on cleaning otherwise are cast to empty strings which then fails validation
The results are then pulled into the template and have a new template tag to help with this
Documentation changes (done or required as a result of this PR)
Please describe any changes to documentation here.
Related Issues
List any issues related to this PR here.
Mentions
@mentions of the person or team responsible for reviewing proposed changes.
Overview
Integrates the digital growth charts API to calculate centiles and SDS where heights and weights are provided Reports these values to the user in the questionnaire
Code changes
New file
dgc_centile_calculations
which makes the API calls. Note that credentials need to be added to the .env (see settings.py)csv_upload
makes the api calls within the async work flow prior to saving the visit New fields for height/weight/bmi centiles and SDS are added to the Visit model so generate a new migration These fields are added to the form, but have to set again to None on cleaning otherwise are cast to empty strings which then fails validation The results are then pulled into the template and have a new template tag to help with thisDocumentation changes (done or required as a result of this PR)
Please describe any changes to documentation here.
Related Issues
List any issues related to this PR here.
Mentions
@mentions of the person or team responsible for reviewing proposed changes.