[WIP] Implement growth assessment using WHO indicators #80

Draft
joao.dubas wants to merge 73 commits from jpd-feat-add-bmi-module-with-live-view into main
Owner

Add growth curve calculation based on z-score and centile from z-score.

Add growth curve calculation based on z-score and centile from z-score.
joao.dubas added 2 commits 2024-06-04 16:48:30 +00:00
Initial implementation to fetch growth indicators from WHO.

For now, the system merges the measurements for each gender and age
group in a single `csv` file.

The final solution should do this, saving a `dets` file.
wip(growth): change from with to case
All checks were successful
continuous-integration/drone/pr Build is passing
2fedb4ecf0
joao.dubas added 2 commits 2024-06-04 23:57:05 +00:00
1. Fetch common data for all indicators
2. Remove headers during merge

Also, re-generate files.
wip(growth): add fix note on convert/3 method
All checks were successful
continuous-integration/drone/pr Build is passing
8be9fa38bb
joao.dubas added 1 commit 2024-06-06 01:36:35 +00:00
wip(growth): calculate key metrics for growth
Some checks failed
continuous-integration/drone/pr Build is failing
500d0e89bb
1. calculate age in days, weeks, and months
2. calculate body mass index for metric and english unities
3. calculate z-score for a given measurement and box-cox parameters (l,
   m, s)
4. calculate centile score for a given measurement and box-cox
   parameters
joao.dubas added 1 commit 2024-06-06 11:35:21 +00:00
fix(growth): alias z-score and use if
Some checks failed
continuous-integration/drone/pr Build is failing
bb79aa2f3a
joao.dubas added 1 commit 2024-06-06 20:39:51 +00:00
chore(growth): add documentation and examples
All checks were successful
continuous-integration/drone/pr Build is passing
a8466f0c1d
joao.dubas added 1 commit 2024-06-06 22:57:09 +00:00
chore(growth): fetch extended data for indicators
All checks were successful
continuous-integration/drone/pr Build is passing
902a22c947
Also, improve module doc.
joao.dubas added 1 commit 2024-06-07 13:29:10 +00:00
feat(growth): load csv indicators into ets tables
All checks were successful
continuous-integration/drone/pr Build is passing
52c1d0c028
joao.dubas added 3 commits 2024-06-09 20:01:18 +00:00
joao.dubas added 2 commits 2024-06-10 12:16:05 +00:00
To make this possible, the following changes were made:

* Use `Task` to start the load process
* Create `ets` table before start the async task
  * This is needed to keep the tables alive after the task process exits
* Adjust the application to start the `Growth.Indicators.Load` task
wip(growth): add score module
Some checks failed
continuous-integration/drone/pr Build is failing
04fff60541
This module is responsible for calculate the z score/centile for each
measurement.
joao.dubas added 1 commit 2024-06-10 17:56:34 +00:00
chore(growth): load is independent from task
Some checks failed
continuous-integration/drone/pr Build is failing
4234b2e917
Ensure that `Growth.Indicators.Load.all/0` can be run independently from
the task.

So, the `ets` table is create based on the filename processed.
joao.dubas added 3 commits 2024-06-10 19:11:32 +00:00
wip(growth): implement results for bmi
Some checks failed
continuous-integration/drone/pr Build is failing
06b35cbceb
This implementation should be made generic for all other scores.
joao.dubas added 1 commit 2024-06-10 19:25:02 +00:00
fix(growth): ignore enum result explicitly
All checks were successful
continuous-integration/drone/pr Build is passing
0ac434c61d
joao.dubas added 4 commits 2024-06-11 11:43:31 +00:00
The `Growth.Score.Scorer` behaviour implements the methods needed to
calculate z-score and centile for any indicator.
feat(growth): calculate z-score/centile for all indicators
All checks were successful
continuous-integration/drone/pr Build is passing
79aec9f7e5
joao.dubas added 3 commits 2024-06-11 12:02:34 +00:00
joao.dubas added 1 commit 2024-06-11 12:18:50 +00:00
feat: add ex_doc to generate documentation
All checks were successful
continuous-integration/drone/pr Build is passing
7fab746ea8
joao.dubas added 1 commit 2024-06-11 14:54:24 +00:00
chore(growth): move nil logic to scorer behaviour
All checks were successful
continuous-integration/drone/pr Build is passing
0d7a4cc9c3
Handle `nil` measurement in `Growth.Score.Scorer`.
joao.dubas added 3 commits 2024-07-08 21:36:57 +00:00
Conflicts:
    mix.lock
chore(deps): update deps of deps
All checks were successful
continuous-integration/drone/pr Build is passing
8dffb86d01
joao.dubas added 1 commit 2024-07-08 21:55:29 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
3914bd5240
joao.dubas added 1 commit 2024-07-12 11:15:50 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
8e9907a3e8
joao.dubas added 1 commit 2024-07-12 11:19:59 +00:00
test(growth): work on age calculation
All checks were successful
continuous-integration/drone/pr Build is passing
c923b2efb7
joao.dubas added 1 commit 2024-08-12 20:24:53 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
b696cc129d
Conflicts:
    mix.exs
    mix.lock
joao.dubas added 1 commit 2024-08-13 14:17:51 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
824a70452f
joao.dubas added 1 commit 2024-09-18 11:49:48 +00:00
chore: ignore elixir tools folder
All checks were successful
continuous-integration/drone/pr Build is passing
dc6e00d54b
joao.dubas added 1 commit 2024-09-22 19:07:15 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
90613635fb
Conflicts:
    .gitignore
    lib/wabanex/application.ex
    mix.lock
joao.dubas added 2 commits 2024-09-25 23:51:07 +00:00
1. The calculation made in `Grownth.Calc.Centile.compute/4` converts a
   given z-score into the expected measurement value.
   This can be used to get specific values for key z-scores, such as,
   -3, -2, 2 and 3.
2. To calculate the percentile of a given z-score the system uses the
   cumulative distribution function.
merge: updates from tracking
All checks were successful
continuous-integration/drone/pr Build is passing
8328bbe9fb
joao.dubas added 1 commit 2024-09-26 00:33:23 +00:00
chore: execute dialyzer with short format
All checks were successful
continuous-integration/drone/pr Build is passing
7c15e1fae6
joao.dubas added 1 commit 2024-10-01 14:29:59 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
3a69b8d4ff
joao.dubas added 1 commit 2024-10-02 10:40:31 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
d9dcfa3846
joao.dubas added 1 commit 2024-10-02 12:31:59 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
fc0d9db7a5
Conflicts:
  mix.exs
  mix.lock
joao.dubas added 2 commits 2024-10-03 22:17:46 +00:00
This module converts a given z-score and Box-Cox values into the related
measurement.
chore(growth): update doc to reflect percentile values
All checks were successful
continuous-integration/drone/pr Build is passing
f3846cad24
This fixes an issue were the returned value represented the measurment
at a given z-score (the centile value).
joao.dubas added 6 commits 2024-10-05 12:59:43 +00:00
joao.dubas reviewed 2024-10-05 13:03:23 +00:00
@ -0,0 +10,4 @@
alias Growth.Calc.Centile
describe "compute/4" do
for %{key: key} = params <- sample() do
Author
Owner
The table-driven test is based on: https://blog.jpalardy.com/posts/a-table-driven-test-template-for-elixir/
joao.dubas added 4 commits 2024-10-05 15:12:00 +00:00
The `ets` tables containing growth indicator has a key in the form of
`{gender :: atom(), unit :: atom(), value :: number()}`.
test(growth): add main module tests
All checks were successful
continuous-integration/drone/pr Build is passing
25cb7508bb
joao.dubas added 1 commit 2024-10-07 12:18:06 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
df16f2ce1c
joao.dubas added 4 commits 2024-10-07 19:29:52 +00:00
With this change it's possible to change the way the application make
requests to WHO website.
This makes easier to test aggregation logic for multiple gender
configuration.
This will be used to mock data from WHO site.
test(growth): add test for happy download paths
All checks were successful
continuous-integration/drone/pr Build is passing
fb38910137
joao.dubas added 1 commit 2024-10-21 01:55:37 +00:00
fix(growth): use Application.app_dir to write/read priv dir
All checks were successful
continuous-integration/drone/pr Build is passing
ffa2a68b7a
joao.dubas added 1 commit 2024-10-21 02:15:47 +00:00
merge: update from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
f6cfff14e7
joao.dubas added 1 commit 2024-10-21 02:16:32 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
69cd36d7e1
joao.dubas added 1 commit 2024-10-30 19:57:20 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
02540e1046
Conflicts:
  mix.exs
  mix.lock
joao.dubas added 1 commit 2024-11-02 12:57:11 +00:00
fix(growth): remove unused match
All checks were successful
continuous-integration/drone/pr Build is passing
aef062dcf5
joao.dubas added 3 commits 2024-11-02 14:27:09 +00:00
Conflicts:
    mix.lock
feat: update deps
All checks were successful
continuous-integration/drone/pr Build is passing
4b643202c3
* `req` from 0.5.6 to 0.5.7
joao.dubas added 1 commit 2024-12-07 15:57:35 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
97b1ef9a6b
joao.dubas added 2 commits 2025-01-28 00:27:03 +00:00
Conflicts:
    mix.exs
    mix.lock
feat(deps): upgrade dependencies
All checks were successful
continuous-integration/drone/pr Build is passing
18759bf234
* `decimal`: from 2.1.1 to 2.3.0
* `earmark_parser`: from 1.4.41 to 1.4.43
* `ex_doc`: from 0.34.2 to 0.36.1
* `req`: from 0.5.7 to 0.5.8

https://diff.hex.pm/diffs?diffs[]=decimal:2.1.1:2.3.0&diffs[]=earmark_parser:1.4.41:1.4.43&diffs[]=ex_doc:0.34.2:0.36.1&diffs[]=req:0.5.7:0.5.8&
joao.dubas added 1 commit 2025-02-14 22:09:38 +00:00
merge: updates from upstream
All checks were successful
continuous-integration/drone/pr Build is passing
81ea8bc06b
All checks were successful
continuous-integration/drone/pr Build is passing
This pull request has changes conflicting with the target branch.
  • mix.lock

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin jpd-feat-add-bmi-module-with-live-view:jpd-feat-add-bmi-module-with-live-view
git checkout jpd-feat-add-bmi-module-with-live-view
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joao.dubas/ex_trainer#80
No description provided.