Case detail only shows one of the answers selected

22 views
Skip to first unread message

nic...@opfistula.org

unread,
Nov 27, 2017, 6:21:38 AM11/27/17
to commcare-users
Hi, We have a check box question where the surgeon can select several options. However, when we put this in the case detail, only one of the answer options is shown. The others dont appear. Can anyone explain if I have done something wrong or a work around? thanks Nicola

William Pride

unread,
Nov 27, 2017, 6:56:49 AM11/27/17
to commcare-users
Hi Nicola,

Can you specify how you're displaying the question in the detail? Checkbox question answers are stored in a space separated list, so if you select options one, three, and four then the answer value would be '1 3 4'. This means that displaying the answer in the usual ways often doesn't make sense.

There are a few patterns for dealing with this. One would be to have a different detail for each possible selection and use the selected function to get a true/false value for whether that option was chosen.

Cheers,
Will

On Mon, Nov 27, 2017 at 6:21 AM, <nic...@opfistula.org> wrote:
Hi, We have a check box question where the surgeon can select several options. However, when we put this in the case detail, only one of the answer options is shown. The others dont appear. Can anyone explain if I have done something wrong or a work around? thanks Nicola

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

Nicola Floyd

unread,
Nov 27, 2017, 6:59:27 AM11/27/17
to commcar...@googlegroups.com
Hi Will, For a simple example Im asking 'which antiobiotics were given?' and its checkbox so surgeon can select as many as he likes. When I use the case detail page (so the surgeon can look back at the previous notes - for example at the post op stage), the case detail screen only shows the first option that was selected. Does that make sense? thanks Nicola


Nicola Floyd
Head of Impact and Analysis

Operation Fistula

USA                                            UK
401 Congress Avenue                10 Queen Street Place
Suite 1540                                   London
Austin, TX 78701                        EC4R 1BE

--
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/7rIbRoLud6U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-users+unsubscribe@googlegroups.com.

Nicola Floyd

unread,
Nov 27, 2017, 7:42:29 AM11/27/17
to commcar...@googlegroups.com
Hi William, Is it possible to send me an example of this? Also we are using ID mapping, will the ID mapping still work? thanks nicola

Nicola Floyd
Head of Impact and Analysis

Operation Fistula

USA                                            UK
401 Congress Avenue                10 Queen Street Place
Suite 1540                                   London
Austin, TX 78701                        EC4R 1BE

On Mon, Nov 27, 2017 at 11:56 AM, William Pride <wpr...@dimagi.com> wrote:

--
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/7rIbRoLud6U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-users+unsubscribe@googlegroups.com.

William Pride

unread,
Nov 27, 2017, 2:39:36 PM11/27/17
to commcare-users
Nicola,

Could you send over a screenshot of your configuration?

Cheers,
Will

Nicola Floyd

unread,
Nov 28, 2017, 8:18:03 AM11/28/17
to commcar...@googlegroups.com
Hi William, please see attached a screen shot of the question we are asking - which antiobiotics were given (checkbox) and then the case detail showing which antiobiotics were given which also uses the ID mapping. 
Thanks Nicola


Nicola Floyd
Head of Impact and Analysis

Operation Fistula

USA                                            UK
401 Congress Avenue                10 Queen Street Place
Suite 1540                                   London
Austin, TX 78701                        EC4R 1BE

Screen Shot 2017-11-28 at 13.15.16.png
Screen Shot 2017-11-28 at 13.14.42.png

William Pride

unread,
Nov 28, 2017, 9:04:16 AM11/28/17
to commcare-users
Hi Nicola,

Thank you for sending that over.

As I mentioned above, when multiple options in a checkbox questions are chosen then the answers are stored in a space-separated list. So if you selected "Ampicillin" and "Ceftriaxone", then the checkbox question answer would be "Ampicillin Cetriaxone". As such this won't match any of your ID mappings, though it sounds like what's happening is CommCare is matching the first and trimming the later answers.

In order to do this with an ID mapping you'd need to add every possible combination of medicines, so that "Ampicillin Cetriaxone" matched a specific value (IE "Ampicillin and Cetriaxone".

Alternatively, as I mentioned above you could have a separate detail display for each possible answer. This would be a calculate type detail with the value (to take one example) `selected(F_prophylactic_antibiotic_op_notes, 'Cetriaxone')` and then this would show true or false for each selections.

Cheers,
Will

am...@agimpact.org

unread,
Nov 28, 2017, 9:03:03 PM11/28/17
to commcare-users
It would be great if this was fixed in CommCare. i.e. if the user selects that the ID mapping is for a checkbox then have all the selected values mapped. 
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.

--
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/7rIbRoLud6U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

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

--
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/7rIbRoLud6U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to commcare-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

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

Clayton Sims

unread,
Nov 29, 2017, 12:18:05 PM11/29/17
to commcare-users
Hi Nicola,

There is a way to generate what you are looking for, but it requires that the select values be chosen from a Lookup table. Does that happen to be the case in your app?

-Clayton

To unsubscribe from this group and stop receiving emails from it, send an email to commcare-users+unsubscribe@googlegroups.com.

Nick Nestle

unread,
Nov 30, 2017, 2:11:58 PM11/30/17
to commcare-users
Hi Nicola,

I noticed in your screenshot that your ID Mappings don't appear to be changing the values that are mapped. Have you tried just setting that field as "Plain" instead of ID Mapping? Plain should display the selected values as a space-separated list.

-Nick

Nick Nestle
Technical Project Manager | Dimagi Inc.


Nicola Floyd

unread,
Dec 1, 2017, 4:09:59 AM12/1/17
to commcar...@googlegroups.com
no but I could easily do this. Does it work for different languages? thx 

Nicola Floyd
Head of Impact and Analysis

Operation Fistula

USA                                            UK
401 Congress Avenue                10 Queen Street Place
Suite 1540                                   London
Austin, TX 78701                        EC4R 1BE

To unsubscribe from this group and all its topics, send an email to commcare-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages