Making WHO z-scores work

I am unsuccessful in creating a validation condition for child anthropometry (weight-for-age) using the Z-score functions, I tried with ch_age s a double or a long integer, but I get errors in both cases.

Try 1:
ch_age (var type: double) calculated from DOB using CenturyMonthCode(date_month,date_year)
ch_sex (var type categorical:single select; 1=Boy; 2=Girl)
ch_weight: numeric (incl decimals)

Validation:
ZScore.Wfa(ch_age,ch_sex==1,ch_weigth).InRange(-5,5)

Error: Validation condition has a syntax error: Argument 1: cannot convert ‘double?’ to ‘long?’

**Try 2 (changed ch_age var from double to long integer)
ch_age (var type: long integer) calculated from DOB using CenturyMonthCode(date_month,date_year)
ch_sex (var type categorical:single select; 1=Boy; 2=Girl)
ch_weight: numeric (incl decimals)

Validation:
ZScore.Wfa(ch_age,ch_sex==1,ch_weigth).InRange(-5,5)

Error: Validation condition has a syntax error: ‘double’ does not contain a definition for ‘InRange’ and the best extension method overload ‘Extensions.InRange(long?, long?, long?)’ requires a receiver of type ‘long’

Please, see the example section “Z-score demo” in “Public example User questions and common patterns” in which I demonstrate how the z-score functions may be used for validation of anthropometric information.

Regards, Sergiy Radyakin

Many thanks! This was the example I was looking for.

One follow-up question.
Can you please give the arguments to make the ZScore.Wfl () work?

  1. ZScore.Wfl(ch_sex==1,weight,length) produces an error (boolean/double)

  2. ZScore.Wfl(weight,ch_sex==1, length) This does not produce any error, but does not calculate any value either. Example output is static text with results of variables HAZ, WHZ, and WAZ:

HAZ est -4.27054058171299, le WHZ est […] et le WAZ est -6.15693874633849

Best regs, L

The functions receive parameters in the following order:

  • Wfl: length, boy, weight , where length must be in [45.0; 110.0]
  • Wfh: height, boy, weight, where height must be in [65.0, 120.0]

Best regards, Sergiy