Thanks for the input. I’m cc-ing commcare-developers in case anyone else
has input. Thoughts below.
Lets assume caregiver ‘cg1’ creates a case ‘c1’ and refers this case to a
facility with a group of Health workers (H1,H2…Hn). We have requirement to
share this case ‘c1’ across both caregiver ‘cg1’ and health workers. In
order to meet this requirement we decided to add ‘h1,h2…hn’ to a group
’HWG1’ manually (as there are very few health workers and facilities) and
change the owner id of the case ‘c1’ to ‘HWG1’.
But by doing so the caregiver ‘cg1’ lost access to the case ‘c1’.
To resolve this we can add ‘cg1’ to ‘HWG1’ , but the downside to that will
be if there are say 100 caregiver and 100 facilities then we might end up
with lots of combination of groups being created. We think this wouldn’t
So the way we currently workaround this is by having the health workers be
members of multiple groups (essentially one per care giver). So if you had
2 healthworkers and 3 caregivers your groups would be:
group 1: hw1, hw2, cg1
group 2: hw1, hw2, cg2
group 3: hw1, hw2, cg3
This way all of cg1’s cases end up in group 1, etc. but the health workers
still get all the cases.
We understand that programatically editing the groups would be the best
option for this. Since we don’t have it now, we thought of trying couple of
things which can get done faster (may be).
Allowing the user who has created the case to access the case even if they
are not in the group which is the owner of the case.
I’m not a fan of this option, as it feels like a bit of a hack, and there
are definitely times when you don’t want the creator of the case to
continue to have it on their phone.
Allow multiple owner to be specified in the case with some delimiters.
i.e. We can add the user id and the group id value in owner id field.
I think this would be a good idea, though I’m not sure how well it can be
supported on the mobile side today.
···On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < firstname.lastname@example.org> wrote:
For each these I have attached a patch in the email. I do understand that
you need to consider design of the system and other impact before accepting
it. But since I was playing with the code I thought I would send it to you.
Do let me know what you think.
Sathishkumar T | +919840437701 | ThoughtWorks | Chennai