Validation

If I get a question that states as bellow

." Add some display logic to this label so that it will only show up if the
woman has fever as a symptom and today is at least 6 months after the last
menstrual period."

Am I right to have the display condition as follows:

/data/woman_symptoms = 'fever' and date(/data/lmp + 182) >= today()

*The bold part how to achieve "today is at least 6 months after LMP" is
that right way to write it? it doesn't seem to work. Any suggestions. *

Hi Mark,

I think you have the >= and <= mixed up. I think you want:
/data/woman_symptoms = 'fever' and today() >= date(/data/lmp + 182)

(Today is after 6mo after LMP).

Thanks,
SHeel

··· On Mon, Mar 14, 2016 at 10:14 AM, Mark Onimbo wrote:

If I get a question that states as bellow

." Add some display logic to this label so that it will only show up if
the woman has fever as a symptom and today is at least 6 months after the
last menstrual period."

Am I right to have the display condition as follows:

/data/woman_symptoms = 'fever' and date(/data/lmp + 182) >= today()

*The bold part how to achieve "today is at least 6 months after LMP" is
that right way to write it? it doesn't seem to work. Any suggestions. *

http://www.unfpa.org

https://www.facebook.com/UNFPA https://twitter.com/unfpa
https://instagram.com/unfpa/ https://www.linkedin.com/company/unfpa
https://www.youtube.com/user/unfpa
https://plus.google.com/+unfpa/posts
http://visitor.r20.constantcontact.com/manage/optin?v=001-YNFZmXHhSP25d9kiBTi0ZxtEwaeIcM-UeLsaXPKYoHs5SAGE1WbNakIrfhkc_3wTTkXkKXbHJpBnXtbqkTATg_O174jFAyLQdNkQkPKQAk=&MERGE0=

--
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.

--
Sheel Shah
Project Manager | Dimagi
m: +1.781.428.5419 | skype: sheel_shah

Hi Mark,

If I understand correctly, a message will display in application at least 6
months after the last menstrual period that the user has entered?

Regards,

Light

··· Le lundi 14 mars 2016 14:14:18 UTC, Mark Onimbo a écrit : > > If I get a question that states as bellow > > ." Add some display logic to this label so that it will only show up if > the woman has fever as a symptom and today is at least 6 months after the > last menstrual period." > > Am I right to have the display condition as follows: > > /data/woman_symptoms = 'fever' and *date(/data/lmp + 182) >= today()* > > *The bold part how to achieve "today is at least 6 months after LMP" is > that right way to write it? it doesn't seem to work. Any suggestions. * >

Thanks Sheel, Much appreciated.

··· On Tuesday, March 15, 2016 at 4:39:40 PM UTC+2, Sheel Shah wrote: > > Hi Mark, > > I think you have the >= and <= mixed up. I think you want: > /data/woman_symptoms = 'fever' and today() >= date(/data/lmp + 182) > > (Today is after 6mo after LMP). > > Thanks, > SHeel > > On Mon, Mar 14, 2016 at 10:14 AM, Mark Onimbo <oni...@unfpa.org > wrote: > >> If I get a question that states as bellow >> >> ." Add some display logic to this label so that it will only show up if >> the woman has fever as a symptom and today is at least 6 months after the >> last menstrual period." >> >> Am I right to have the display condition as follows: >> >> /data/woman_symptoms = 'fever' and *date(/data/lmp + 182) >= today()* >> >> *The bold part how to achieve "today is at least 6 months after LMP" is >> that right way to write it? it doesn't seem to work. Any suggestions. * >> >> >> >> >> >> >> >> >> >> -- >> 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. >> > > > > -- > Sheel Shah > Project Manager | Dimagi > m: +1.781.428.5419 | skype: sheel_shah > > >