feat(growth): calculate z-score/centile for all indicators
All checks were successful
continuous-integration/drone/pr Build is passing
All checks were successful
continuous-integration/drone/pr Build is passing
This commit is contained in:
parent
2545a796c3
commit
79aec9f7e5
@ -13,6 +13,7 @@ defmodule Growth do
|
|||||||
|
|
||||||
alias __MODULE__.Calc.Age
|
alias __MODULE__.Calc.Age
|
||||||
alias __MODULE__.Calc.BMI
|
alias __MODULE__.Calc.BMI
|
||||||
|
alias __MODULE__.Score
|
||||||
|
|
||||||
@type gender :: :male | :female
|
@type gender :: :male | :female
|
||||||
|
|
||||||
@ -107,6 +108,7 @@ defmodule Growth do
|
|||||||
|> with_age_in_weeks()
|
|> with_age_in_weeks()
|
||||||
|> with_age_in_months()
|
|> with_age_in_months()
|
||||||
|> with_bmi()
|
|> with_bmi()
|
||||||
|
|> with_results()
|
||||||
end
|
end
|
||||||
|
|
||||||
for precision <- [:day, :week, :month] do
|
for precision <- [:day, :week, :month] do
|
||||||
@ -143,6 +145,18 @@ defmodule Growth do
|
|||||||
growth
|
growth
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def with_results(growth) do
|
||||||
|
Score.Scorer.results(growth, [
|
||||||
|
Score.BMI,
|
||||||
|
Score.Height,
|
||||||
|
Score.Weight,
|
||||||
|
Score.TricepsSkinfold,
|
||||||
|
Score.SubscapularSkinfold,
|
||||||
|
Score.ArmCircumference,
|
||||||
|
Score.HeadCircumference
|
||||||
|
])
|
||||||
|
end
|
||||||
|
|
||||||
defp default_opts do
|
defp default_opts do
|
||||||
Enum.map(@valid_measures, fn
|
Enum.map(@valid_measures, fn
|
||||||
:date_of_measurement = key ->
|
:date_of_measurement = key ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user