Close case on commcareHQ

Sending this to commcare-users listserv.

··· On Tue, Aug 16, 2011 at 8:01 AM, Peter D Lubambi wrote:

Hi all,
I wan’t to close case if answer to a certain question is Delivered OR
Dead OR Mother moved OR no pregnancy, on commcareHQ it allows to set
only one answer option.
Any idea on how I can go about this?
Thanks.

Peter.

Dear Users,

Peter brings up a good point. He wants to close a case conditionally on
something more complicated than the answer to one question. I’m making a fix
this week that will allow the following to work, so keep an eye out for an
email.

Even though this will not work right now, it will work in just a few days,
so I wanted to let you know the solution so that you can get started. The
right way to do this is to have a calculated node (i.e. a “data node”) that
you could call something like “close_case”. When you create the form, make
sure to put in all of the custom logic you need for whether to close the
case in the calculate attribute of this node. In the end it should have one
of two values (like “yes”/“no” or “true”/“false”). Then in the Cases and
Referrals section, you will be able to select ‘Close case if the answer to
"close_case" is “true”’, where you will have to type in “true” into a
textbox. This last step is what currently isn’t ready.

I’ll let you know when it’s ready which will be before COB Monday.

Cheers,
Danny

··· 2011/8/16 Jonathan Payne

Sending this to commcare-users listserv.

On Tue, Aug 16, 2011 at 8:01 AM, Peter D Lubambi plubambi@gmail.comwrote:

Hi all,
I wan’t to close case if answer to a certain question is Delivered OR
Dead OR Mother moved OR no pregnancy, on commcareHQ it allows to set
only one answer option.
Any idea on how I can go about this?
Thanks.

Peter.

Dear Users, especially Peter,

I made the fix that was needed. Here are the instructions for closing a case
conditionally. (It’s mostly copied from my previous email.)

The right way to do this is to have a calculated node (i.e. a “data node”)
that you could call something like “close_case”. When you create the form,
make sure to put in all of the custom logic you need for whether to close
the case in the calculate attribute of this node. In the end it should have
one of two values (“true” or “false”). Then in the Cases and Referrals
section, in the section ‘Close case if the answer to…’, you will be able
to select “/data/close_case (hidden)” (or whatever the node is called) from
the drop down, and then a textbox will appear where you can type “true”.

Let me know if you have any issues!

Cheers,
Danny

··· 2011/8/16 Daniel Roberts

Dear Users,

Peter brings up a good point. He wants to close a case conditionally on
something more complicated than the answer to one question. I’m making a fix
this week that will allow the following to work, so keep an eye out for an
email.

Even though this will not work right now, it will work in just a few days,
so I wanted to let you know the solution so that you can get started. The
right way to do this is to have a calculated node (i.e. a “data node”) that
you could call something like “close_case”. When you create the form, make
sure to put in all of the custom logic you need for whether to close the
case in the calculate attribute of this node. In the end it should have one
of two values (like “yes”/“no” or “true”/“false”). Then in the Cases and
Referrals section, you will be able to select ‘Close case if the answer to
"close_case" is “true”’, where you will have to type in “true” into a
textbox. This last step is what currently isn’t ready.

I’ll let you know when it’s ready which will be before COB Monday.

Cheers,
Danny

2011/8/16 Jonathan Payne paynejd@gmail.com

Sending this to commcare-users listserv.

On Tue, Aug 16, 2011 at 8:01 AM, Peter D Lubambi plubambi@gmail.comwrote:

Hi all,
I wan’t to close case if answer to a certain question is Delivered OR
Dead OR Mother moved OR no pregnancy, on commcareHQ it allows to set
only one answer option.
Any idea on how I can go about this?
Thanks.

Peter.

Hi Danny,
it worked for me.

Thanks

Peter.

··· On Thu, Aug 18, 2011 at 12:03 AM, Daniel Roberts wrote: > Dear Users, especially Peter, > I made the fix that was needed. Here are the instructions for closing a case > conditionally. (It's mostly copied from my previous email.) > The right way to do this is to have a calculated node (i.e. a "data node") > that you could call something like "close_case". When you create the form, > make sure to put in all of the custom logic you need for whether to close > the case in the calculate attribute of this node. In the end it should have > one of two values ("true" or "false"). Then in the Cases and Referrals > section, in the section 'Close case if the answer to...', you will be able > to select "/data/close_case (hidden)" (or whatever the node is called) from > the drop down, and then a textbox will appear where you can type "true". > Let me know if you have any issues! > Cheers, > Danny > > > 2011/8/16 Daniel Roberts >> >> Dear Users, >> >> Peter brings up a good point. He wants to close a case conditionally on >> something more complicated than the answer to one question. I'm making a fix >> this week that will allow the following to work, so keep an eye out for an >> email. >> Even though this will not work right now, it will work in just a few days, >> so I wanted to let you know the solution so that you can get started. The >> right way to do this is to have a calculated node (i.e. a "data node") that >> you could call something like "close_case". When you create the form, make >> sure to put in all of the custom logic you need for whether to close the >> case in the calculate attribute of this node. In the end it should have one >> of two values (like "yes"/"no" or "true"/"false"). Then in the Cases and >> Referrals section, you will be able to select 'Close case if the answer to >> "close_case" is "true"', where you will have to type in "true" into a >> textbox. This last step is what currently isn't ready. >> I'll let you know when it's ready which will be before COB Monday. >> Cheers, >> Danny >> 2011/8/16 Jonathan Payne >>> >>> Sending this to commcare-users listserv. >>> >>> On Tue, Aug 16, 2011 at 8:01 AM, Peter D Lubambi wrote: >>>> >>>> Hi all, >>>> I wan't to close case if answer to a certain question is Delivered OR >>>> Dead OR Mother moved OR no pregnancy, on commcareHQ it allows to set >>>> only one answer option. >>>> Any idea on how I can go about this? >>>> Thanks. >>>> >>>> Peter. >>> >> > >