Calculation Logic for Growth Monitoring of Under 5 Children

Hello all,

I started to CommCare HQ to develop a test application for Growth
Monitoring of Under 5 Children. In order to describe Nutritional Status of
children automatically, I need calculation logic. For ‘Weight for age’, I
copied from an application found in CommCare Exchange. For 'Height for age’
and ‘Weight for height’, I develop calculation logic based on the existing
one but they don’t work at all. Could any of you please help me with this?
Looking forward to your kind help! Thanks!!!

Hi Chan Nyein Myat Aung,

It would be interesting to get more info to help you resolve your issue:

  • what is the CommCare Exchange application you are talking about ?
  • what do you write in each field of each relevant question ?
  • what is the error: do the computations return something wrong or do they cannot compute at all ?
  • did you check your question IDs from you application ? It may appears that you have changed the IDs, so the computation don’t get the data they need to process.

You name seems like you come from Myanmar, are you based in Yangon ? We are a few users here who may be able to help you directly, face to face.

Thanks,

··· On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote: > Hello all, > > I started to CommCare HQ to develop a test application for Growth > Monitoring of Under 5 Children. In order to describe Nutritional Status of > children automatically, I need calculation logic. For 'Weight for age', I > copied from an application found in CommCare Exchange. For 'Height for age' > and 'Weight for height', I develop calculation logic based on the existing > one but they don't work at all. Could any of you please help me with this? > Looking forward to your kind help! Thanks!!! > >


Charles Flèche
mHealth Advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org

Hello Charles,

Thanks for your help! The followings are the info you asked:

  • To generate calculation for “Weight for Age”, I used the calculation
    logic from an application named “FH - Mozambique - Child Nutrition” and it
    works well in my application too. For “Height for Age” calculation, I
    developed the calculation logic based on the calculation logic for “Weight
    for Age”. And for “Weight for Height” calculation, I used the calculation
    logic from an application named “WHO Growth Standards”.
  • To calculate “Height for Age”, the type of logic is Hidden Value,
    question ID is “hfa_zscore_lookup” and calculate condition is
    "if(count(instance(‘chart’)/zscore/gender[@id=/data/child_gender]/month[@id
    = /data/age_months]/length[@low < /data/child_height][@high = ‘none’ or
    @high >= /data/child_height]) = 1,
    instance(‘chart’)/zscore/gender[@id=/data/child_gender]/month[@id =
    /data/age_months]/length[@low < /data/child_height][@high = ‘none’ or @high

= /data/child_height], ‘invalid entry’)".
To calculate “Weight for Height”, the type of logic is Hidden Value,
question ID is “wfh_zscore_lookup” and calculate condition is
"if(count(instance(‘chart’)/zscore/gender[@id=/data/child_gender]/length[@id
= /data/child_height]/weight[@low <= /data/child_weight][@high = ‘none’ or
@high > /data/child_weight]) = 1,
instance(‘chart’)/zscore/gender[@id=/data/child_gender]/length[@id =
/data/child_height]/weight[@low <= /data/child_weight][@high = ‘none’ or
@high > /data/child_weight], ‘invalid entry’)".

  • The computations for “Height for Age” and “Weight for Height” return
    message is “invalid entry”.
  • I changed the question IDs for all three calculations to remember them
    easily. But I used these IDs to generate grades (i.e in labels).

Yes, I’m from Myanmar and my base is Yangon. I think we have met once,
during ICT4D Team Meet up at Green Gallery Thai Restaurant. It’ll be great
if you can help me face to face. Thanks a lot for your time and help.

··· On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote: > > Hi Chan Nyein Myat Aung, > > > > It would be interesting to get more info to help you resolve your issue: > > > > - what is the CommCare Exchange application you are talking about ? > > - what do you write in each field of each relevant question ? > > - what is the error: do the computations return something wrong or do they > cannot compute at all ? > > - did you check your question IDs from you application ? It may appears > that you have changed the IDs, so the computation don't get the data they > need to process. > > > > You name seems like you come from Myanmar, are you based in Yangon ? We > are a few users here who may be able to help you directly, face to face. > > > > Thanks, > > > > > > > > On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote: > > > Hello all, > > > > > > I started to CommCare HQ to develop a test application for Growth > > > Monitoring of Under 5 Children. In order to describe Nutritional Status > of > > > children automatically, I need calculation logic. For 'Weight for age', > I > > > copied from an application found in CommCare Exchange. For 'Height for > age' > > > and 'Weight for height', I develop calculation logic based on the > existing > > > one but they don't work at all. Could any of you please help me with > this? > > > Looking forward to your kind help! Thanks!!! > > > > > > > > > > -- > > Charles Flèche > > mHealth Advisor > > Télécoms Sans Frontières http://www.tsfi.org > > Première Urgence - Aide Médicale Internationale http://www.pu-ami.org > > >

Hello,

Did you just copy the calculation, or did you copy the actual form from the
exchange? The forms contain tables which are required in order for this
calculation to work. I would recommend copying the form and then making
modifications, being careful to keep the names of all the key inputs
(child_weight, child_height, etc.) exactly the same.

Jeremy

··· On Wed, May 6, 2015 at 1:47 AM, Chan Nyein Myat Aung < channyeinmyataung@gmail.com> wrote:

Hello Charles,

Thanks for your help! The followings are the info you asked:

  • To generate calculation for “Weight for Age”, I used the calculation
    logic from an application named “FH - Mozambique - Child Nutrition” and
    it works well in my application too. For “Height for Age” calculation, I
    developed the calculation logic based on the calculation logic for “Weight
    for Age”. And for “Weight for Height” calculation, I used the calculation
    logic from an application named “WHO Growth Standards”.
  • To calculate “Height for Age”, the type of logic is Hidden Value,
    question ID is “hfa_zscore_lookup” and calculate condition is
    "if(count(instance(‘chart’)/zscore/gender[@id=/data/child_gender]/month[@id
    = /data/age_months]/length[@low < /data/child_height][@high = ‘none’ or
    @high >= /data/child_height]) = 1,
    instance(‘chart’)/zscore/gender[@id=/data/child_gender]/month[@id =
    /data/age_months]/length[@low < /data/child_height][@high = ‘none’ or @high

= /data/child_height], ‘invalid entry’)".
To calculate “Weight for Height”, the type of logic is Hidden Value,
question ID is “wfh_zscore_lookup” and calculate condition is
"if(count(instance(‘chart’)/zscore/gender[@id=/data/child_gender]/length[@id
= /data/child_height]/weight[@low <= /data/child_weight][@high = ‘none’ or
@high > /data/child_weight]) = 1,
instance(‘chart’)/zscore/gender[@id=/data/child_gender]/length[@id =
/data/child_height]/weight[@low <= /data/child_weight][@high = ‘none’ or
@high > /data/child_weight], ‘invalid entry’)".

  • The computations for “Height for Age” and “Weight for Height” return
    message is “invalid entry”.
  • I changed the question IDs for all three calculations to remember them
    easily. But I used these IDs to generate grades (i.e in labels).

Yes, I’m from Myanmar and my base is Yangon. I think we have met once,
during ICT4D Team Meet up at Green Gallery Thai Restaurant. It’ll be great
if you can help me face to face. Thanks a lot for your time and help.

On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote:

Hi Chan Nyein Myat Aung,

It would be interesting to get more info to help you resolve your issue:

  • what is the CommCare Exchange application you are talking about ?

  • what do you write in each field of each relevant question ?

  • what is the error: do the computations return something wrong or do
    they cannot compute at all ?

  • did you check your question IDs from you application ? It may appears
    that you have changed the IDs, so the computation don’t get the data they
    need to process.

You name seems like you come from Myanmar, are you based in Yangon ? We
are a few users here who may be able to help you directly, face to face.

Thanks,

On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote:

Hello all,

I started to CommCare HQ to develop a test application for Growth

Monitoring of Under 5 Children. In order to describe Nutritional Status
of

children automatically, I need calculation logic. For ‘Weight for age’,
I

copied from an application found in CommCare Exchange. For ‘Height for
age’

and ‘Weight for height’, I develop calculation logic based on the
existing

one but they don’t work at all. Could any of you please help me with
this?

Looking forward to your kind help! Thanks!!!

Charles Flèche

mHealth Advisor

Télécoms Sans Frontières http://www.tsfi.org

Première Urgence - Aide Médicale Internationale http://www.pu-ami.org


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

Dear Chan Nyein Myat Aung,

Jeremy gave great advices, however if you still have issues please feel free to pop at our office at your convenience. It very close to Kabar Aye Pagoda. Directly send me an email if you need more direction.

Charles

··· On Wednesday 06 May 2015 22:27:47 Jeremy W. wrote: > Hello, > > Did you just copy the calculation, or did you copy the actual form from the > exchange? The forms contain tables which are required in order for this > calculation to work. I would recommend copying the form and then making > modifications, being careful to keep the names of all the key inputs > (child_weight, child_height, etc.) exactly the same. > > Jeremy > > On Wed, May 6, 2015 at 1:47 AM, Chan Nyein Myat Aung < channyeinmyataung@gmail.com> wrote: > > > Hello Charles, > > > > Thanks for your help! The followings are the info you asked: > > > > - To generate calculation for "Weight for Age", I used the calculation > > logic from an application named "FH - Mozambique - Child Nutrition" and > > it works well in my application too. For "Height for Age" calculation, I > > developed the calculation logic based on the calculation logic for "Weight > > for Age". And for "Weight for Height" calculation, I used the calculation > > logic from an application named "WHO Growth Standards". > > - To calculate "Height for Age", the type of logic is Hidden Value, > > question ID is "hfa_zscore_lookup" and calculate condition is > > "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id > > = /data/age_months]/length[@low < /data/child_height][@high = 'none' or > > @high >= /data/child_height]) = 1, > > instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id = > > /data/age_months]/length[@low < /data/child_height][@high = 'none' or @high > > >= /data/child_height], 'invalid entry')". > > To calculate "Weight for Height", the type of logic is Hidden Value, > > question ID is "wfh_zscore_lookup" and calculate condition is > > "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id > > = /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' or > > @high > /data/child_weight]) = 1, > > instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id = > > /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' or > > @high > /data/child_weight], 'invalid entry')". > > - The computations for "Height for Age" and "Weight for Height" return > > message is "invalid entry". > > - I changed the question IDs for all three calculations to remember them > > easily. But I used these IDs to generate grades (i.e in labels). > > > > Yes, I'm from Myanmar and my base is Yangon. I think we have met once, > > during ICT4D Team Meet up at Green Gallery Thai Restaurant. It'll be great > > if you can help me face to face. Thanks a lot for your time and help. > > > > On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote: > >> > >> Hi Chan Nyein Myat Aung, > >> > >> > >> > >> It would be interesting to get more info to help you resolve your issue: > >> > >> > >> > >> - what is the CommCare Exchange application you are talking about ? > >> > >> - what do you write in each field of each relevant question ? > >> > >> - what is the error: do the computations return something wrong or do > >> they cannot compute at all ? > >> > >> - did you check your question IDs from you application ? It may appears > >> that you have changed the IDs, so the computation don't get the data they > >> need to process. > >> > >> > >> > >> You name seems like you come from Myanmar, are you based in Yangon ? We > >> are a few users here who may be able to help you directly, face to face. > >> > >> > >> > >> Thanks, > >> > >> > >> > >> > >> > >> > >> > >> On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote: > >> > >> > Hello all, > >> > >> > > >> > >> > I started to CommCare HQ to develop a test application for Growth > >> > >> > Monitoring of Under 5 Children. In order to describe Nutritional Status > >> of > >> > >> > children automatically, I need calculation logic. For 'Weight for age', > >> I > >> > >> > copied from an application found in CommCare Exchange. For 'Height for > >> age' > >> > >> > and 'Weight for height', I develop calculation logic based on the > >> existing > >> > >> > one but they don't work at all. Could any of you please help me with > >> this? > >> > >> > Looking forward to your kind help! Thanks!!! > >> > >> > > >> > >> > > >> > >> > >> > >> -- > >> > >> Charles Flèche > >> > >> mHealth Advisor > >> > >> Télécoms Sans Frontières http://www.tsfi.org > >> > >> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org > >> > >> > >> > > -- > > You received this message because you are subscribed to the Google Groups > > "commcare-users" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to commcare-users+unsubscribe@googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. > > > > > >


Charles Flèche
mHealth Advisor
Télécoms Sans Frontières http://www.tsfi.org
Première Urgence - Aide Médicale Internationale http://www.pu-ami.org

Hello Jeremy,

Now I know that I need tables for calculation of Z scores. Thanks for your
great advice! In order to learn how to build a form with look-up tables, I
downloaded the form as X Form (xml) and converted into xlsx form using
online converter (like www.zamzar.com and http://www.luxonsoftware.com).
Then I updated my form (in xlsx format) by inserting necessary tables and
converted to X Form (xml) again and upload to CommCare HQ Form-builder. But
I don’t see anything in my recently uploaded form. I noticed that the xlsx
file I converted is not in the same format as described in
http://xlsform.org and I think that’s the problem. How can I convert a X
Form (from CommCare HQ) to a xlsx (in the same format as described in
www.xlsform.org)? I’m really sorry if my questions are unclear and make you
confuse and upset. Hope you understand my issue and look forward to your
kind help!

··· On Thursday, May 7, 2015 at 8:58:08 AM UTC+6:30, Jeremy Wacksman wrote: > > Hello, > > Did you just copy the calculation, or did you copy the actual form from > the exchange? The forms contain tables which are required in order for this > calculation to work. I would recommend copying the form and then making > modifications, being careful to keep the names of all the key inputs > (child_weight, child_height, etc.) exactly the same. > > Jeremy > > On Wed, May 6, 2015 at 1:47 AM, Chan Nyein Myat Aung < channyei...@gmail.com > wrote: > >> Hello Charles, >> >> Thanks for your help! The followings are the info you asked: >> >> - To generate calculation for "Weight for Age", I used the calculation >> logic from an application named "FH - Mozambique - Child Nutrition" and >> it works well in my application too. For "Height for Age" calculation, I >> developed the calculation logic based on the calculation logic for "Weight >> for Age". And for "Weight for Height" calculation, I used the calculation >> logic from an application named "WHO Growth Standards". >> - To calculate "Height for Age", the type of logic is Hidden Value, >> question ID is "hfa_zscore_lookup" and calculate condition is >> "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id >> = /data/age_months]/length[@low < /data/child_height][@high = 'none' or >> @high >= /data/child_height]) = 1, >> instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id = >> /data/age_months]/length[@low < /data/child_height][@high = 'none' or @high >> >= /data/child_height], 'invalid entry')". >> To calculate "Weight for Height", the type of logic is Hidden Value, >> question ID is "wfh_zscore_lookup" and calculate condition is >> "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id >> = /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' or >> @high > /data/child_weight]) = 1, >> instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id = >> /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' or >> @high > /data/child_weight], 'invalid entry')". >> - The computations for "Height for Age" and "Weight for Height" return >> message is "invalid entry". >> - I changed the question IDs for all three calculations to remember them >> easily. But I used these IDs to generate grades (i.e in labels). >> >> Yes, I'm from Myanmar and my base is Yangon. I think we have met once, >> during ICT4D Team Meet up at Green Gallery Thai Restaurant. It'll be great >> if you can help me face to face. Thanks a lot for your time and help. >> >> On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote: >>> >>> Hi Chan Nyein Myat Aung, >>> >>> >>> >>> It would be interesting to get more info to help you resolve your issue: >>> >>> >>> >>> - what is the CommCare Exchange application you are talking about ? >>> >>> - what do you write in each field of each relevant question ? >>> >>> - what is the error: do the computations return something wrong or do >>> they cannot compute at all ? >>> >>> - did you check your question IDs from you application ? It may appears >>> that you have changed the IDs, so the computation don't get the data they >>> need to process. >>> >>> >>> >>> You name seems like you come from Myanmar, are you based in Yangon ? We >>> are a few users here who may be able to help you directly, face to face. >>> >>> >>> >>> Thanks, >>> >>> >>> >>> >>> >>> >>> >>> On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote: >>> >>> > Hello all, >>> >>> > >>> >>> > I started to CommCare HQ to develop a test application for Growth >>> >>> > Monitoring of Under 5 Children. In order to describe Nutritional >>> Status of >>> >>> > children automatically, I need calculation logic. For 'Weight for >>> age', I >>> >>> > copied from an application found in CommCare Exchange. For 'Height for >>> age' >>> >>> > and 'Weight for height', I develop calculation logic based on the >>> existing >>> >>> > one but they don't work at all. Could any of you please help me with >>> this? >>> >>> > Looking forward to your kind help! Thanks!!! >>> >>> > >>> >>> > >>> >>> >>> >>> -- >>> >>> Charles Flèche >>> >>> mHealth Advisor >>> >>> Télécoms Sans Frontières http://www.tsfi.org >>> >>> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org >>> >>> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jeremy Wacksman > Dimagi , Inc. > >

Thanks for your advice, Jeremy and Charles! As I just came back from the
field trip, I haven’t tried Jermey’s advice yet. I’ll try that soon!

··· On Thursday, May 7, 2015 at 9:19:57 AM UTC+6:30, Charles Flèche wrote: > > Dear Chan Nyein Myat Aung, > > > > Jeremy gave great advices, however if you still have issues please feel > free to pop at our office at your convenience. It very close to Kabar Aye > Pagoda. Directly send me an email if you need more direction. > > > > Charles > > > > > > > > On Wednesday 06 May 2015 22:27:47 Jeremy W. wrote: > > > Hello, > > > > > > Did you just copy the calculation, or did you copy the actual form from > the > > > exchange? The forms contain tables which are required in order for this > > > calculation to work. I would recommend copying the form and then making > > > modifications, being careful to keep the names of all the key inputs > > > (child_weight, child_height, etc.) exactly the same. > > > > > > Jeremy > > > > > > On Wed, May 6, 2015 at 1:47 AM, Chan Nyein Myat Aung < channyei...@gmail.com > wrote: > > > > > > > Hello Charles, > > > > > > > > Thanks for your help! The followings are the info you asked: > > > > > > > > - To generate calculation for "Weight for Age", I used the calculation > > > > logic from an application named "FH - Mozambique - Child Nutrition" and > > > > it works well in my application too. For "Height for Age" calculation, > I > > > > developed the calculation logic based on the calculation logic for > "Weight > > > > for Age". And for "Weight for Height" calculation, I used the > calculation > > > > logic from an application named "WHO Growth Standards". > > > > - To calculate "Height for Age", the type of logic is Hidden Value, > > > > question ID is "hfa_zscore_lookup" and calculate condition is > > > > > "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id > > > > = /data/age_months]/length[@low < /data/child_height][@high = 'none' or > > > > @high >= /data/child_height]) = 1, > > > > instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id = > > > > /data/age_months]/length[@low < /data/child_height][@high = 'none' or > @high > > > > >= /data/child_height], 'invalid entry')". > > > > To calculate "Weight for Height", the type of logic is Hidden Value, > > > > question ID is "wfh_zscore_lookup" and calculate condition is > > > > > "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id > > > > = /data/child_height]/weight[@low <= /data/child_weight][@high = > 'none' or > > > > @high > /data/child_weight]) = 1, > > > > instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id = > > > > /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' > or > > > > @high > /data/child_weight], 'invalid entry')". > > > > - The computations for "Height for Age" and "Weight for Height" return > > > > message is "invalid entry". > > > > - I changed the question IDs for all three calculations to remember > them > > > > easily. But I used these IDs to generate grades (i.e in labels). > > > > > > > > Yes, I'm from Myanmar and my base is Yangon. I think we have met once, > > > > during ICT4D Team Meet up at Green Gallery Thai Restaurant. It'll be > great > > > > if you can help me face to face. Thanks a lot for your time and help. > > > > > > > > On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote: > > > >> > > > >> Hi Chan Nyein Myat Aung, > > > >> > > > >> > > > >> > > > >> It would be interesting to get more info to help you resolve your > issue: > > > >> > > > >> > > > >> > > > >> - what is the CommCare Exchange application you are talking about ? > > > >> > > > >> - what do you write in each field of each relevant question ? > > > >> > > > >> - what is the error: do the computations return something wrong or do > > > >> they cannot compute at all ? > > > >> > > > >> - did you check your question IDs from you application ? It may > appears > > > >> that you have changed the IDs, so the computation don't get the data > they > > > >> need to process. > > > >> > > > >> > > > >> > > > >> You name seems like you come from Myanmar, are you based in Yangon ? > We > > > >> are a few users here who may be able to help you directly, face to > face. > > > >> > > > >> > > > >> > > > >> Thanks, > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> > > > >> On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote: > > > >> > > > >> > Hello all, > > > >> > > > >> > > > > >> > > > >> > I started to CommCare HQ to develop a test application for Growth > > > >> > > > >> > Monitoring of Under 5 Children. In order to describe Nutritional > Status > > > >> of > > > >> > > > >> > children automatically, I need calculation logic. For 'Weight for > age', > > > >> I > > > >> > > > >> > copied from an application found in CommCare Exchange. For 'Height > for > > > >> age' > > > >> > > > >> > and 'Weight for height', I develop calculation logic based on the > > > >> existing > > > >> > > > >> > one but they don't work at all. Could any of you please help me with > > > >> this? > > > >> > > > >> > Looking forward to your kind help! Thanks!!! > > > >> > > > >> > > > > >> > > > >> > > > > >> > > > >> > > > >> > > > >> -- > > > >> > > > >> Charles Flèche > > > >> > > > >> mHealth Advisor > > > >> > > > >> Télécoms Sans Frontières http://www.tsfi.org > > > >> > > > >> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org > > > >> > > > >> > > > >> > > > > -- > > > > You received this message because you are subscribed to the Google > Groups > > > > "commcare-users" group. > > > > To unsubscribe from this group and stop receiving emails from it, send > an > > > > email to commcare-user...@googlegroups.com . > > > > For more options, visit https://groups.google.com/d/optout. > > > > > > > > > > > > > > > > > > > > -- > > Charles Flèche > > mHealth Advisor > > Télécoms Sans Frontières http://www.tsfi.org > > Première Urgence - Aide Médicale Internationale http://www.pu-ami.org > > >

Hello,

Thanks for your response- couple of quick points/thoughts:

  • You can get an Excel version of a form spec by using Export Form
    Contents
    https://help.commcarehq.org/display/commcarepublic/Export+Form+Contents.
    However, this export will not be easy to update and upload again, it is
    meant more for being able to view the form structure in Excel and share it.
  • When trying to build a form in Excel I recommend building the form one
    time, using a converter like xlsform, uploading to CommCareHQ and then
    doing all subsequent changes in the CommCareHQ form builder. If you need to
    hand-edit the xml you can download the form and upload it again, or just go
    to Tools -> Edit Source XML. If I need to make a table, like for the growth
    standards, I try to do it in Excel in a text editor, and then copy it into
    a form.
  • Alternatively if it is a very big lookup table, I would recommend
    trying to use the CommCare Lookup Tables
    https://help.commcarehq.org/display/commcarepublic/Lookup+Tables.
  • We do have some apps on the Exchange which contain field-table
    versions of the WHO growth standards embedded in the form - you found one
    of them. I would recommend copying the app, and then making modifications
    to the form in the form builder; the table is already embedded in the form
    if I recall correctly.
  • We also had an internal discussion and hope to publish more of these
    tables in a modular form over the coming weeks, I’ll update this thread
    when we have something ready to share. In the interim if you email me off
    thread I can see if we have what you are looking for.

I hope this helps!

Jeremy

··· On Tue, May 12, 2015 at 5:56 AM, Chan Nyein Myat Aung < channyeinmyataung@gmail.com> wrote:

Hello Jeremy,

Now I know that I need tables for calculation of Z scores. Thanks for your
great advice! In order to learn how to build a form with look-up tables, I
downloaded the form as X Form (xml) and converted into xlsx form using
online converter (like www.zamzar.com and http://www.luxonsoftware.com).
Then I updated my form (in xlsx format) by inserting necessary tables and
converted to X Form (xml) again and upload to CommCare HQ Form-builder. But
I don’t see anything in my recently uploaded form. I noticed that the xlsx
file I converted is not in the same format as described in
http://xlsform.org and I think that’s the problem. How can I convert a X
Form (from CommCare HQ) to a xlsx (in the same format as described in
www.xlsform.org)? I’m really sorry if my questions are unclear and make
you confuse and upset. Hope you understand my issue and look forward to
your kind help!

On Thursday, May 7, 2015 at 8:58:08 AM UTC+6:30, Jeremy Wacksman wrote:

Hello,

Did you just copy the calculation, or did you copy the actual form from
the exchange? The forms contain tables which are required in order for this
calculation to work. I would recommend copying the form and then making
modifications, being careful to keep the names of all the key inputs
(child_weight, child_height, etc.) exactly the same.

Jeremy

On Wed, May 6, 2015 at 1:47 AM, Chan Nyein Myat Aung < channyei...@gmail.com> wrote:

Hello Charles,

Thanks for your help! The followings are the info you asked:

  • To generate calculation for “Weight for Age”, I used the calculation
    logic from an application named “FH - Mozambique - Child Nutrition” and
    it works well in my application too. For “Height for Age” calculation, I
    developed the calculation logic based on the calculation logic for “Weight
    for Age”. And for “Weight for Height” calculation, I used the calculation
    logic from an application named “WHO Growth Standards”.
  • To calculate “Height for Age”, the type of logic is Hidden Value,
    question ID is “hfa_zscore_lookup” and calculate condition is
    "if(count(instance(‘chart’)/zscore/gender[@id=/data/child_gender]/month[@id
    = /data/age_months]/length[@low < /data/child_height][@high = ‘none’ or
    @high >= /data/child_height]) = 1,
    instance(‘chart’)/zscore/gender[@id=/data/child_gender]/month[@id =
    /data/age_months]/length[@low < /data/child_height][@high = ‘none’ or @high

= /data/child_height], ‘invalid entry’)".
To calculate “Weight for Height”, the type of logic is Hidden Value,
question ID is “wfh_zscore_lookup” and calculate condition is
"if(count(instance(‘chart’)/zscore/gender[@id=/data/child_gender]/length[@id
= /data/child_height]/weight[@low <= /data/child_weight][@high = ‘none’ or
@high > /data/child_weight]) = 1,
instance(‘chart’)/zscore/gender[@id=/data/child_gender]/length[@id =
/data/child_height]/weight[@low <= /data/child_weight][@high = ‘none’ or
@high > /data/child_weight], ‘invalid entry’)".

  • The computations for “Height for Age” and “Weight for Height” return
    message is “invalid entry”.
  • I changed the question IDs for all three calculations to remember them
    easily. But I used these IDs to generate grades (i.e in labels).

Yes, I’m from Myanmar and my base is Yangon. I think we have met once,
during ICT4D Team Meet up at Green Gallery Thai Restaurant. It’ll be great
if you can help me face to face. Thanks a lot for your time and help.

On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote:

Hi Chan Nyein Myat Aung,

It would be interesting to get more info to help you resolve your issue:

  • what is the CommCare Exchange application you are talking about ?

  • what do you write in each field of each relevant question ?

  • what is the error: do the computations return something wrong or do
    they cannot compute at all ?

  • did you check your question IDs from you application ? It may appears
    that you have changed the IDs, so the computation don’t get the data they
    need to process.

You name seems like you come from Myanmar, are you based in Yangon ? We
are a few users here who may be able to help you directly, face to face.

Thanks,

On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote:

Hello all,

I started to CommCare HQ to develop a test application for Growth

Monitoring of Under 5 Children. In order to describe Nutritional
Status of

children automatically, I need calculation logic. For ‘Weight for
age’, I

copied from an application found in CommCare Exchange. For ‘Height
for age’

and ‘Weight for height’, I develop calculation logic based on the
existing

one but they don’t work at all. Could any of you please help me with
this?

Looking forward to your kind help! Thanks!!!

Charles Flèche

mHealth Advisor

Télécoms Sans Frontières http://www.tsfi.org

Première Urgence - Aide Médicale Internationale http://www.pu-ami.org


You received this message because you are subscribed to the Google
Groups “commcare-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.


You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeremy Wacksman
Dimagi http://www.dimagi.com, Inc.

Hello,

Thanks for your continuous support! I can’t edit source XML as it is too
complicated for me, a beginner. And I can’t use Lookup Tables as my
software plan is just Community. But it’s so great to hear that you are
going to publish WHO Growth Standard tables in modular form. And it’ll be
best if you publish a form containing all three Growth Standard Tables
(Weight for Age, Height for Age and Weight for Height). I believe that I
will see such form in CommCare Exchange soon! Thanks!!!

··· On Wednesday, May 13, 2015 at 2:29:32 AM UTC+6:30, Jeremy Wacksman wrote: > > Hello, > > Thanks for your response- couple of quick points/thoughts: > > - You can get an Excel version of a form spec by using Export Form > Contents > . > However, this export will not be easy to update and upload again, it is > meant more for being able to view the form structure in Excel and share it. > - When trying to build a form in Excel I recommend building the form > one time, using a converter like xlsform, uploading to CommCareHQ and then > doing all subsequent changes in the CommCareHQ form builder. If you need to > hand-edit the xml you can download the form and upload it again, or just go > to Tools -> Edit Source XML. If I need to make a table, like for the growth > standards, I try to do it in Excel in a text editor, and then copy it into > a form. > - Alternatively if it is a very big lookup table, I would recommend > trying to use the CommCare Lookup Tables > . > - We do have some apps on the Exchange which contain field-table > versions of the WHO growth standards embedded in the form - you found one > of them. I would recommend copying the app, and then making modifications > to the form in the form builder; the table is already embedded in the form > if I recall correctly. > - We also had an internal discussion and hope to publish more of these > tables in a modular form over the coming weeks, I'll update this thread > when we have something ready to share. In the interim if you email me off > thread I can see if we have what you are looking for. > > I hope this helps! > > Jeremy > > On Tue, May 12, 2015 at 5:56 AM, Chan Nyein Myat Aung < channyei...@gmail.com > wrote: > >> Hello Jeremy, >> >> Now I know that I need tables for calculation of Z scores. Thanks for >> your great advice! In order to learn how to build a form with look-up >> tables, I downloaded the form as X Form (xml) and converted into xlsx form >> using online converter (like www.zamzar.com and >> http://www.luxonsoftware.com). Then I updated my form (in xlsx format) >> by inserting necessary tables and converted to X Form (xml) again and >> upload to CommCare HQ Form-builder. But I don't see anything in my recently >> uploaded form. I noticed that the xlsx file I converted is not in the same >> format as described in http://xlsform.org and I think that's the >> problem. How can I convert a X Form (from CommCare HQ) to a xlsx (in the >> same format as described in www.xlsform.org)? I'm really sorry if my >> questions are unclear and make you confuse and upset. Hope you understand >> my issue and look forward to your kind help! >> >> >> On Thursday, May 7, 2015 at 8:58:08 AM UTC+6:30, Jeremy Wacksman wrote: >>> >>> Hello, >>> >>> Did you just copy the calculation, or did you copy the actual form from >>> the exchange? The forms contain tables which are required in order for this >>> calculation to work. I would recommend copying the form and then making >>> modifications, being careful to keep the names of all the key inputs >>> (child_weight, child_height, etc.) exactly the same. >>> >>> Jeremy >>> >>> On Wed, May 6, 2015 at 1:47 AM, Chan Nyein Myat Aung < channyei...@gmail.com> wrote: >>> >>>> Hello Charles, >>>> >>>> Thanks for your help! The followings are the info you asked: >>>> >>>> - To generate calculation for "Weight for Age", I used the calculation >>>> logic from an application named "FH - Mozambique - Child Nutrition" and >>>> it works well in my application too. For "Height for Age" calculation, I >>>> developed the calculation logic based on the calculation logic for "Weight >>>> for Age". And for "Weight for Height" calculation, I used the calculation >>>> logic from an application named "WHO Growth Standards". >>>> - To calculate "Height for Age", the type of logic is Hidden Value, >>>> question ID is "hfa_zscore_lookup" and calculate condition is >>>> "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id >>>> = /data/age_months]/length[@low < /data/child_height][@high = 'none' or >>>> @high >= /data/child_height]) = 1, >>>> instance('chart')/zscore/gender[@id=/data/child_gender]/month[@id = >>>> /data/age_months]/length[@low < /data/child_height][@high = 'none' or @high >>>> >= /data/child_height], 'invalid entry')". >>>> To calculate "Weight for Height", the type of logic is Hidden Value, >>>> question ID is "wfh_zscore_lookup" and calculate condition is >>>> "if(count(instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id >>>> = /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' or >>>> @high > /data/child_weight]) = 1, >>>> instance('chart')/zscore/gender[@id=/data/child_gender]/length[@id = >>>> /data/child_height]/weight[@low <= /data/child_weight][@high = 'none' or >>>> @high > /data/child_weight], 'invalid entry')". >>>> - The computations for "Height for Age" and "Weight for Height" return >>>> message is "invalid entry". >>>> - I changed the question IDs for all three calculations to remember >>>> them easily. But I used these IDs to generate grades (i.e in labels). >>>> >>>> Yes, I'm from Myanmar and my base is Yangon. I think we have met once, >>>> during ICT4D Team Meet up at Green Gallery Thai Restaurant. It'll be great >>>> if you can help me face to face. Thanks a lot for your time and help. >>>> >>>> On Tuesday, May 5, 2015 at 5:59:47 PM UTC+6:30, Charles Flèche wrote: >>>>> >>>>> Hi Chan Nyein Myat Aung, >>>>> >>>>> >>>>> >>>>> It would be interesting to get more info to help you resolve your >>>>> issue: >>>>> >>>>> >>>>> >>>>> - what is the CommCare Exchange application you are talking about ? >>>>> >>>>> - what do you write in each field of each relevant question ? >>>>> >>>>> - what is the error: do the computations return something wrong or do >>>>> they cannot compute at all ? >>>>> >>>>> - did you check your question IDs from you application ? It may >>>>> appears that you have changed the IDs, so the computation don't get the >>>>> data they need to process. >>>>> >>>>> >>>>> >>>>> You name seems like you come from Myanmar, are you based in Yangon ? >>>>> We are a few users here who may be able to help you directly, face to face. >>>>> >>>>> >>>>> >>>>> Thanks, >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> On Monday 04 May 2015 21:24:47 Chan Nyein Myat Aung wrote: >>>>> >>>>> > Hello all, >>>>> >>>>> > >>>>> >>>>> > I started to CommCare HQ to develop a test application for Growth >>>>> >>>>> > Monitoring of Under 5 Children. In order to describe Nutritional >>>>> Status of >>>>> >>>>> > children automatically, I need calculation logic. For 'Weight for >>>>> age', I >>>>> >>>>> > copied from an application found in CommCare Exchange. For 'Height >>>>> for age' >>>>> >>>>> > and 'Weight for height', I develop calculation logic based on the >>>>> existing >>>>> >>>>> > one but they don't work at all. Could any of you please help me with >>>>> this? >>>>> >>>>> > Looking forward to your kind help! Thanks!!! >>>>> >>>>> > >>>>> >>>>> > >>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> Charles Flèche >>>>> >>>>> mHealth Advisor >>>>> >>>>> Télécoms Sans Frontières http://www.tsfi.org >>>>> >>>>> Première Urgence - Aide Médicale Internationale http://www.pu-ami.org >>>>> >>>>> >>>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "commcare-users" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to commcare-user...@googlegroups.com. >>>> For more options, visit https://groups.google.com/d/optout. >>>> >>> >>> >>> >>> -- >>> Jeremy Wacksman >>> Dimagi , Inc. >>> >>> -- >> You received this message because you are subscribed to the Google Groups >> "commcare-users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to commcare-user...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jeremy Wacksman > Dimagi , Inc. > >

Has anything further happened with this? I am also creating an app in to use WHO standards for weight vs age, height vs age, and MUAC to monitor for children under 5 years of age. I found weight vs age and muac but cannot find any public apps with height vs age. I also am currently new to commcare and find it difficult to write the code for this.

Hello,

I haven’t checked that app for quite a long time. As I am not the one who
wrote the codes for this app, I can’t provide inputs on this. I think it
would be better to ask experts. Have a nice day!

··· On Friday, 26 August 2016, Christine Hedstrom wrote:

Has anything further happened with this? I am also creating an app in to
use WHO standards for weight vs age, height vs age, and MUAC to monitor for
children under 5 years of age. I found weight vs age and muac but cannot
find any public apps with height vs age. I also am currently new to
commcare and find it difficult to write the code for this.


You received this message because you are subscribed to a topic in the
Google Groups “commcare-users” group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/commcare-users/qrPJ9yhagy8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
commcare-users+unsubscribe@googlegroups.com <javascript:;>.
For more options, visit https://groups.google.com/d/optout.