Ensure uniqueness of an answer (like ID) across (all) cases?

113 views
Skip to first unread message

Christian Neumann

unread,
Jun 20, 2016, 2:12:34 PM6/20/16
to commcare-users
Hi,

I think I know the answer and I might 'abuse' CommCare with this a little bit. Nevertheless want to make sure that I understand it.

For our referral app we are planning to pre-print unique QR codes as 'referral IDs. These IDs are both handed out to the referred client and are recorded/scanned as an answer in the initial registration form. Now I wonder if there is a way to ensure that one code/ID is not accidentally used for different referral cases. So ideally once one of the pre-printed coded is used for the referral case registration, the app would deny re-assigning/-scanning this for another referral case.

Of course this can't be done with multiple concurrent, offline deployments, but in our case for one screening activity it will be done from only one device. So is there a way to access the form-history of all cases (of one day?) to check for uniqueness?

Thanks,
christian
 

William Pride

unread,
Jun 20, 2016, 2:46:41 PM6/20/16
to commcare-users
Hey Christian,

Please check out this page on minimizing duplicates.

Thanks,
Will

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

Christian Neumann

unread,
Jun 27, 2016, 4:35:37 AM6/27/16
to commcar...@googlegroups.com
Thanks William,

Just found the time now to think more about this and am trying to map this to my use case. 

Not sure if I fully understand the situation described on the wiki page. My current take away is: Enabling registration forms on the case list prevents duplicates as users can now always use the case list (and therefore no longer need to make the decision between registration or ‘followups’ before data capture).

In my scenario I actually don’t need both registration and followup forms available (as they happen at different times, different physical locations, and potentially different users). So for me during registrations I would like to ensure that the scanned barcode is unique (for simplicity just among open cases). Is there any way to query/scan the local database of open cases with a validation condition for one question?

christian

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

William Pride

unread,
Jun 27, 2016, 8:59:41 AM6/27/16
to commcare-users
Hey Christian,

Sorry for not being clear enough. The solution I was trying to suggest with the link above would be:

1) For each case you register, their barcode is scanned and the string associated with the case
2) Then, in the case list on subsequent visits, users would be trained to scan the barcode from the case list first when doing the follow up
3) This would filter the case list so that users could see if the scanned code matched any existing cases

Given your specifics, though, I agree this isn't the cleanest fit. It is possible to do that sort of validation within form entry; however, this would require some custom XML and would potentially be slow if your case database got too large. If you're still interested, please email me directly (wpr...@dimagi.com) and we can go over the custom XML you'd use for this.

Cheers,
Will

Christian Neumann

unread,
Jun 27, 2016, 9:51:35 AM6/27/16
to commcar...@googlegroups.com
Ok. This makes sense now, but like you’ve said doesn’t necessarily match my intended workflow. Will follow up with you as I’m curious about the more advanced usage.

Thanks,
christian
Reply all
Reply to author
Forward
0 new messages