Case sharing between Users and User Groups

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone else
has input. Thoughts below.

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

··· On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> 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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one caregiver
can be part of more than one healthworker groups.

I think this would be a good idea, though I’m not sure how well it can be

supported on the mobile side today.

Could you brief on how the current group setup is been supported on mobile
side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the ‘healthworker’ groups in
mobile and in the background we should be able to set the owner id
(combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

··· On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone else
has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Hey,

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one caregiver
can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it can be

supported on the mobile side today.

Could you brief on how the current group setup is been supported on mobile
side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the ‘healthworker’ groups in
mobile and in the background we should be able to set the owner id
(combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something like this
you probably could, though I don’t think it’s a workflow we’ll support on
CommCare HQ anytime soon.

thanks,
Cory

··· On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone else
has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups. So if the
caregivers wants to refer a case to any of these healthworker group then
they need to be part of all the healthworker groups. Lets say there are 100
caregivers then we would end up with 100 * 100 groups created.

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

··· On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one caregiver
can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it can be

supported on the mobile side today.

Could you brief on how the current group setup is been supported on
mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the ‘healthworker’ groups in
mobile and in the background we should be able to set the owner id
(combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something like this
you probably could, though I don’t think it’s a workflow we’ll support on
CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone else
has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups. So if
the caregivers wants to refer a case to any of these healthworker group
then they need to be part of all the healthworker groups. Lets say there
are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100 facilities.
Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround solution.
I don’t think CommCare or HQ will support multiple group assignment in the
near term, though we do have it on our overall platform roadmap.

thanks,
Cory

··· On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one caregiver
can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it can

be supported on the mobile side today.

Could you brief on how the current group setup is been supported on
mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the ‘healthworker’ groups
in mobile and in the background we should be able to set the owner id
(combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something like this
you probably could, though I don’t think it’s a workflow we’ll support on
CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone
else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Hi Cory,

Thanks. Just one more question on the current group implementation. How
will the user assign the ownership to a particular group? Can the groups
can be listed automatically in the form or is there some mechanism to
search the groups?

Thanks,
Sathish

··· On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote: > > On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote: > >> Hi Cory, >> >> >> >>> Why would this be a problem? >> >> >> We have around 100 facilities i.e around 100 healthworker groups. So if >> the caregivers wants to refer a case to any of these healthworker group >> then they need to be part of all the healthworker groups. Lets say there >> are 100 caregivers then we would end up with 100 * 100 groups created. >> > > It seems odd that each health worker could be referring to 100 facilities. > Wouldn't they only refer to those near them? > > Regardless, it does sound like you will need to find a workaround > solution. I don't think CommCare or HQ will support multiple group > assignment in the near term, though we do have it on our overall platform > roadmap. > > thanks, > Cory > > >> Regards, >> Sathish >> >> Sathishkumar T | +919840437701 | ThoughtWorks | Chennai >> >> >> >> On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue wrote: >> >>> Hey, >>> >>> On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote: >>> >>>> Hi Cory, >>>> >>>> Thanks for your views. >>>> >>>> The current workaround is not feasible for our scenario as one >>>> caregiver can be part of more than one healthworker groups. >>>> >>> >>> Why would this be a problem? >>> >>> >>>> I think this would be a good idea, though I'm not sure how well it can >>>>> be supported on the mobile side today. >>>> >>>> >>>> Could you brief on how the current group setup is been supported on >>>> mobile side please. >>>> >>>> *Possible approach using option 2:* >>>> A 'caregiver' can refer the 'case' to one of the 'healthworker' groups >>>> in mobile and in the background we should be able to set the owner id >>>> (combining both 'healthworker' group id and 'caregiver' id) to the case >>>> using our application. An API to set the owner id might be required. >>>> >>> >>> If you wanted to hackup the markup and IDs to support something like >>> this you probably could, though I don't think it's a workflow we'll support >>> on CommCare HQ anytime soon. >>> >>> thanks, >>> Cory >>> >>> >>>> Do let me know your view on this approach. >>>> >>>> >>>> Regards, >>>> >>>> Sathish >>>> >>>> >>>> Sathishkumar T | +919840437701 | ThoughtWorks | Chennai >>>> >>>> ... >>>> >>>> On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue wrote: >>>> >>>>> Hey Sathish, >>>>> >>>>> Thanks for the input. I'm cc-ing commcare-developers in case anyone >>>>> else has input. Thoughts below. >>>>> >>>>> On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote: >>>>> >>>>>> *Scenario* >>>>>> >>>>>> 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 be feasible. >>>>>> >>>>> >>>>> 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). >>>>>> >>>>>> >>>>>> *Option 1* >>>>>> >>>>>> 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. >>>>> >>>>> *Option 2* >>>>>> >>>>>> 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. >>>>> >>>>> thanks, >>>>> Cory >>>>> >>>>> >>>>>> 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. >>>>>> >>>>>> >>>>>> >>>>>> Regards, >>>>>> >>>>>> Sathish >>>>>> >>>>>> >>>>>> Sathishkumar T | +919840437701 | ThoughtWorks | Chennai >>>>>> >>>>>> >>>>> >>>> >>> >> >

Sending this again, since I wasn’t on the group before:

Sathish,

Assuming that everything is properly configured in HQ, you can replicate
the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if you’re in
1 group, it automatically sets owner_id to that group ID. Otherwise, it
presents you with an itemset selection question from which you choose the
group that you want to associate as the case owner.

-Clayton

··· On Fri, Apr 20, 2012 at 12:27 AM, sathish wrote:

Hi Cory,

Thanks. Just one more question on the current group implementation. How
will the user assign the ownership to a particular group? Can the groups
can be listed automatically in the form or is there some mechanism to
search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups. So if
the caregivers wants to refer a case to any of these healthworker group
then they need to be part of all the healthworker groups. Lets say there
are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it can

be supported on the mobile side today.

Could you brief on how the current group setup is been supported on
mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the ‘healthworker’ groups
in mobile and in the background we should be able to set the owner id
(combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something like
this you probably could, though I don’t think it’s a workflow we’ll support
on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone
else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Sathish,

This is actually a bug in CommCare HQ that we’re working on getting
resolved ASAP (The form is valid, but we’re validating it with the wrong
schema version). I’ll keep you posted on our progress, but should be soon.

-Clayton

··· On Mon, Apr 23, 2012 at 5:06 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Thanks Clayton.

This helps in understanding groups. But when I tried with the sample form
that you have provided Commcare gives me form validation error. I tried the
select option

with instance

.

But this gives me “multiple instances are not allowed” error. Could you
give me working sample please?

Also is there an option already available to present all the groups to
user instead of those groups that the user is a member of?

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Fri, Apr 20, 2012 at 8:51 PM, Clayton Sims csims@dimagi.com wrote:

Sathish,

Assuming that everything is properly configured in HQ, you can replicate
the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if you’re
in 1 group, it automatically sets owner_id to that group ID. Otherwise, it
presents you with an itemset selection question from which you choose the
group that you want to associate as the case owner.

-Clayton

On Fri, Apr 20, 2012 at 12:27 AM, sathish tsathish@thoughtworks.comwrote:

Hi Cory,

Thanks. Just one more question on the current group implementation. How
will the user assign the ownership to a particular group? Can the groups
can be listed automatically in the form or is there some mechanism to
search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups. So
if the caregivers wants to refer a case to any of these healthworker group
then they need to be part of all the healthworker groups. Lets say there
are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it

can be supported on the mobile side today.

Could you brief on how the current group setup is been supported on
mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the 'healthworker’
groups in mobile and in the background we should be able to set the owner
id (combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something like
this you probably could, though I don’t think it’s a workflow we’ll support
on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case anyone
else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Sathish,

This should be working now. Let me know if you’re still having problems
with your uploaded forms.

-Clayton

··· On Mon, Apr 23, 2012 at 11:06 AM, Clayton Sims wrote:

Sathish,

This is actually a bug in CommCare HQ that we’re working on getting
resolved ASAP (The form is valid, but we’re validating it with the wrong
schema version). I’ll keep you posted on our progress, but should be soon.

-Clayton

On Mon, Apr 23, 2012 at 5:06 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Thanks Clayton.

This helps in understanding groups. But when I tried with the sample form
that you have provided Commcare gives me form validation error. I tried the
select option

with instance

.

But this gives me “multiple instances are not allowed” error. Could you
give me working sample please?

Also is there an option already available to present all the groups to
user instead of those groups that the user is a member of?

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Fri, Apr 20, 2012 at 8:51 PM, Clayton Sims csims@dimagi.com wrote:

Sathish,

Assuming that everything is properly configured in HQ, you can replicate
the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if you’re
in 1 group, it automatically sets owner_id to that group ID. Otherwise, it
presents you with an itemset selection question from which you choose the
group that you want to associate as the case owner.

-Clayton

On Fri, Apr 20, 2012 at 12:27 AM, sathish tsathish@thoughtworks.comwrote:

Hi Cory,

Thanks. Just one more question on the current group implementation. How
will the user assign the ownership to a particular group? Can the groups
can be listed automatically in the form or is there some mechanism to
search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups. So
if the caregivers wants to refer a case to any of these healthworker group
then they need to be part of all the healthworker groups. Lets say there
are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it

can be supported on the mobile side today.

Could you brief on how the current group setup is been supported on
mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the 'healthworker’
groups in mobile and in the background we should be able to set the owner
id (combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something like
this you probably could, though I don’t think it’s a workflow we’ll support
on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case
anyone else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

Hi Clayton,

I pulled latest version of commcare-hq and tried also i tried in
commcare-hq cloud. But it still giving form validation error.

Here http://www.heypasteit.com/clip/0AZ6 is the exception from
https://www.commcarehq.org/formtranslate/

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

··· On Tue, Apr 24, 2012 at 2:54 AM, Clayton Sims wrote:

Sathish,

This should be working now. Let me know if you’re still having problems
with your uploaded forms.

-Clayton

On Mon, Apr 23, 2012 at 11:06 AM, Clayton Sims csims@dimagi.com wrote:

Sathish,

This is actually a bug in CommCare HQ that we’re working on getting
resolved ASAP (The form is valid, but we’re validating it with the wrong
schema version). I’ll keep you posted on our progress, but should be soon.

-Clayton

On Mon, Apr 23, 2012 at 5:06 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Thanks Clayton.

This helps in understanding groups. But when I tried with the sample
form that you have provided Commcare gives me form validation error. I
tried the select option

with instance

.

But this gives me “multiple instances are not allowed” error. Could you
give me working sample please?

Also is there an option already available to present all the groups to
user instead of those groups that the user is a member of?

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Fri, Apr 20, 2012 at 8:51 PM, Clayton Sims csims@dimagi.com wrote:

Sathish,

Assuming that everything is properly configured in HQ, you can
replicate the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if
you’re in 1 group, it automatically sets owner_id to that group ID.
Otherwise, it presents you with an itemset selection question from which
you choose the group that you want to associate as the case owner.

-Clayton

On Fri, Apr 20, 2012 at 12:27 AM, sathish tsathish@thoughtworks.comwrote:

Hi Cory,

Thanks. Just one more question on the current group implementation.
How will the user assign the ownership to a particular group? Can the
groups can be listed automatically in the form or is there some mechanism
to search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups. So
if the caregivers wants to refer a case to any of these healthworker group
then they need to be part of all the healthworker groups. Lets say there
are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well it

can be supported on the mobile side today.

Could you brief on how the current group setup is been supported
on mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the 'healthworker’
groups in mobile and in the background we should be able to set the owner
id (combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something
like this you probably could, though I don’t think it’s a workflow we’ll
support on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.com wrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case
anyone else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

You might need to download and re-upload the form.

Danny: Will Sathish need to do anything to get up to date with the new 2.0
formtranslate change on a local commcarehq deployment?

-Clayton

··· On Tue, Apr 24, 2012 at 12:23 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Clayton,

I pulled latest version of commcare-hq and tried also i tried in
commcare-hq cloud. But it still giving form validation error.

Here http://www.heypasteit.com/clip/0AZ6 is the exception from
https://www.commcarehq.org/formtranslate/

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 24, 2012 at 2:54 AM, Clayton Sims csims@dimagi.com wrote:

Sathish,

This should be working now. Let me know if you’re still having problems
with your uploaded forms.

-Clayton

On Mon, Apr 23, 2012 at 11:06 AM, Clayton Sims csims@dimagi.com wrote:

Sathish,

This is actually a bug in CommCare HQ that we’re working on getting
resolved ASAP (The form is valid, but we’re validating it with the wrong
schema version). I’ll keep you posted on our progress, but should be soon.

-Clayton

On Mon, Apr 23, 2012 at 5:06 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Thanks Clayton.

This helps in understanding groups. But when I tried with the sample
form that you have provided Commcare gives me form validation error. I
tried the select option

with instance

.

But this gives me “multiple instances are not allowed” error. Could you
give me working sample please?

Also is there an option already available to present all the groups to
user instead of those groups that the user is a member of?

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Fri, Apr 20, 2012 at 8:51 PM, Clayton Sims csims@dimagi.com wrote:

Sathish,

Assuming that everything is properly configured in HQ, you can
replicate the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if
you’re in 1 group, it automatically sets owner_id to that group ID.
Otherwise, it presents you with an itemset selection question from which
you choose the group that you want to associate as the case owner.

-Clayton

On Fri, Apr 20, 2012 at 12:27 AM, sathish tsathish@thoughtworks.comwrote:

Hi Cory,

Thanks. Just one more question on the current group implementation.
How will the user assign the ownership to a particular group? Can the
groups can be listed automatically in the form or is there some mechanism
to search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups.
So if the caregivers wants to refer a case to any of these healthworker
group then they need to be part of all the healthworker groups. Lets say
there are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well

it can be supported on the mobile side today.

Could you brief on how the current group setup is been supported
on mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the 'healthworker’
groups in mobile and in the background we should be able to set the owner
id (combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something
like this you probably could, though I don’t think it’s a workflow we’ll
support on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.comwrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case
anyone else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

You might need to download and re-upload the form.

This should work. The formtranslate UI isn’t built to let you validate on
the 2.0 jar yet. Danny, is there backend API support for that or only in
code?

Cory

··· On Tue, Apr 24, 2012 at 10:56 AM, Clayton Sims wrote:

Danny: Will Sathish need to do anything to get up to date with the new 2.0
formtranslate change on a local commcarehq deployment?

-Clayton

On Tue, Apr 24, 2012 at 12:23 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Clayton,

I pulled latest version of commcare-hq and tried also i tried in
commcare-hq cloud. But it still giving form validation error.

Here http://www.heypasteit.com/clip/0AZ6 is the exception from
https://www.commcarehq.org/formtranslate/

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 24, 2012 at 2:54 AM, Clayton Sims csims@dimagi.com wrote:

Sathish,

This should be working now. Let me know if you’re still having problems
with your uploaded forms.

-Clayton

On Mon, Apr 23, 2012 at 11:06 AM, Clayton Sims csims@dimagi.com wrote:

Sathish,

This is actually a bug in CommCare HQ that we’re working on getting
resolved ASAP (The form is valid, but we’re validating it with the wrong
schema version). I’ll keep you posted on our progress, but should be soon.

-Clayton

On Mon, Apr 23, 2012 at 5:06 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Thanks Clayton.

This helps in understanding groups. But when I tried with the sample
form that you have provided Commcare gives me form validation error. I
tried the select option

with instance

.

But this gives me “multiple instances are not allowed” error. Could
you give me working sample please?

Also is there an option already available to present all the groups to
user instead of those groups that the user is a member of?

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Fri, Apr 20, 2012 at 8:51 PM, Clayton Sims csims@dimagi.comwrote:

Sathish,

Assuming that everything is properly configured in HQ, you can
replicate the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if
you’re in 1 group, it automatically sets owner_id to that group ID.
Otherwise, it presents you with an itemset selection question from which
you choose the group that you want to associate as the case owner.

-Clayton

On Fri, Apr 20, 2012 at 12:27 AM, sathish tsathish@thoughtworks.comwrote:

Hi Cory,

Thanks. Just one more question on the current group implementation.
How will the user assign the ownership to a particular group? Can the
groups can be listed automatically in the form or is there some mechanism
to search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups.
So if the caregivers wants to refer a case to any of these healthworker
group then they need to be part of all the healthworker groups. Lets say
there are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.com wrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well

it can be supported on the mobile side today.

Could you brief on how the current group setup is been supported
on mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the 'healthworker’
groups in mobile and in the background we should be able to set the owner
id (combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something
like this you probably could, though I don’t think it’s a workflow we’ll
support on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.comwrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case
anyone else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

If you go to https://www.commcarehq.org/formtranslate/?version=2.0 then
it’ll validate in 2.0.

Cheers,
Danny

··· 2012/4/24 Cory Zue

On Tue, Apr 24, 2012 at 10:56 AM, Clayton Sims csims@dimagi.com wrote:

You might need to download and re-upload the form.

This should work. The formtranslate UI isn’t built to let you validate on
the 2.0 jar yet. Danny, is there backend API support for that or only in
code?

Cory

Danny: Will Sathish need to do anything to get up to date with the new
2.0 formtranslate change on a local commcarehq deployment?

-Clayton

On Tue, Apr 24, 2012 at 12:23 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Clayton,

I pulled latest version of commcare-hq and tried also i tried in
commcare-hq cloud. But it still giving form validation error.

Here http://www.heypasteit.com/clip/0AZ6 is the exception from
https://www.commcarehq.org/formtranslate/

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 24, 2012 at 2:54 AM, Clayton Sims csims@dimagi.com wrote:

Sathish,

This should be working now. Let me know if you’re still having problems
with your uploaded forms.

-Clayton

On Mon, Apr 23, 2012 at 11:06 AM, Clayton Sims csims@dimagi.comwrote:

Sathish,

This is actually a bug in CommCare HQ that we’re working on getting
resolved ASAP (The form is valid, but we’re validating it with the wrong
schema version). I’ll keep you posted on our progress, but should be soon.

-Clayton

On Mon, Apr 23, 2012 at 5:06 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Thanks Clayton.

This helps in understanding groups. But when I tried with the sample
form that you have provided Commcare gives me form validation error. I
tried the select option

with instance

.

But this gives me “multiple instances are not allowed” error. Could
you give me working sample please?

Also is there an option already available to present all the groups
to user instead of those groups that the user is a member of?

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Fri, Apr 20, 2012 at 8:51 PM, Clayton Sims csims@dimagi.comwrote:

Sathish,

Assuming that everything is properly configured in HQ, you can
replicate the setup in this form to do group selection

https://bitbucket.org/dimagi/cc-apps/src/566644860c2f/bihar/mockup/bihar_new_beneficiary.xml

Essentially this checks whether you’re in 1 group or N groups, if
you’re in 1 group, it automatically sets owner_id to that group ID.
Otherwise, it presents you with an itemset selection question from which
you choose the group that you want to associate as the case owner.

-Clayton

On Fri, Apr 20, 2012 at 12:27 AM, sathish <tsathish@thoughtworks.com wrote:

Hi Cory,

Thanks. Just one more question on the current group implementation.
How will the user assign the ownership to a particular group? Can the
groups can be listed automatically in the form or is there some mechanism
to search the groups?

Thanks,
Sathish

On Wednesday, 18 April 2012 00:09:55 UTC+5:30, Cory Zue wrote:

On Tue, Apr 17, 2012 at 1:25 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Why would this be a problem?

We have around 100 facilities i.e around 100 healthworker groups.
So if the caregivers wants to refer a case to any of these healthworker
group then they need to be part of all the healthworker groups. Lets say
there are 100 caregivers then we would end up with 100 * 100 groups created.

It seems odd that each health worker could be referring to 100
facilities. Wouldn’t they only refer to those near them?

Regardless, it does sound like you will need to find a workaround
solution. I don’t think CommCare or HQ will support multiple group
assignment in the near term, though we do have it on our overall platform
roadmap.

thanks,
Cory

Regards,
Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Tue, Apr 17, 2012 at 2:49 AM, Cory Zue czue@dimagi.comwrote:

Hey,

On Mon, Apr 16, 2012 at 4:50 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Hi Cory,

Thanks for your views.

The current workaround is not feasible for our scenario as one
caregiver can be part of more than one healthworker groups.

Why would this be a problem?

I think this would be a good idea, though I’m not sure how well

it can be supported on the mobile side today.

Could you brief on how the current group setup is been
supported on mobile side please.

Possible approach using option 2:
A ‘caregiver’ can refer the ‘case’ to one of the 'healthworker’
groups in mobile and in the background we should be able to set the owner
id (combining both ‘healthworker’ group id and ‘caregiver’ id) to the case
using our application. An API to set the owner id might be required.

If you wanted to hackup the markup and IDs to support something
like this you probably could, though I don’t think it’s a workflow we’ll
support on CommCare HQ anytime soon.

thanks,
Cory

Do let me know your view on this approach.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai

On Thu, Apr 12, 2012 at 7:01 PM, Cory Zue czue@dimagi.comwrote:

Hey Sathish,

Thanks for the input. I’m cc-ing commcare-developers in case
anyone else has input. Thoughts below.

On Thu, Apr 12, 2012 at 6:18 AM, Sathishkumar Thangavel < tsathish@thoughtworks.com> wrote:

Scenario

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

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

Option 1

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.

Option 2

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.

thanks,
Cory

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.

Regards,

Sathish

Sathishkumar T | +919840437701 | ThoughtWorks | Chennai