HRHR-project / e-registry-app

0 stars 1 forks source link

Alternate solution: Mask events created by another user for control user role (or group) for 2 program stages #94

Closed AkubaD closed 6 years ago

AkubaD commented 6 years ago

Hi @lukasewvd @Bekkalizer We have 4 stages for ANC. Below are their names, UIDs and descriptions (control/intervention, ANC1 or subsequent visit) | UID | Name | Description 1 | WZbXY0S00lP | ANC 1st visit | ANC 1 Intervention 2 | edqlbukwRfQ | ANC visit | ANC subsequent visits intervention 3 | piRv8jtcLQV | ANC 1st visit | ANC 1 Control 4 | IlSUGDq9QDc | ANC visit | ANC subsequent visits control

Currently, control users only see the control stages, and intervention users see only the intervention stages. For the next phase of our implementation, we want the Intervention users to be able to see both the control and intervention stages. To make it user friendly (and not have intervention users have to click 2 different ANC menus to see all ANC visits for a client who has been to both Control and Intervention clinics), we want all the stages to be put together as one menu item, like we do for ANC1 and ANC subsequent visit.

AkubaD commented 6 years ago

Here is the behavior we would expect: sample control user: chcp_control_trial1 sample intervention user: chcp_int_trial1 password for both: eReg!234

Since the control user groups don't have access to the intervention stages, their view of their ANC1 and ANC visit (control) should stay the same - 1) they should only see the control stages 2) when adding an ANC stage, they should first get the ANC1 control stage, and then the ANC visit control stage as it is now for control users 3) For control users, the intervention stages should not be available options for adding a new stage

The intervention users will have READ access only to the control stages. So 1) they will see all the stages 2)when adding an ANC stage, they should first get the ANC1 intervention stage, and then the ANC visit intervention stage as it is now for intervention users 3) but the control stages should not be available options for adding a new stage for intervention users

AkubaD commented 6 years ago

Hi @Bekkalizer Could @lukasewvd work on this now? It should be a quick fix.

Bekkalizer commented 6 years ago

Hey @AkubaD - this seems not to be a simple fix, as we would have to rebuild the framework for how we hardcode and chain the stages togheter. It is currently only possible to hardcode one first stage, and then subsequent stages - the automatic fallback that is invisioned for intervention users based on access level is not possible to model at the moment.

AkubaD commented 6 years ago

Hi @Bekkalizer could we do this instead: Mask all events created by another user if the user is a control user (detected by either user role or user group) and only for the 2 ANC program stages We had talked last year about using masking to deal with control and intervention users before we knew about the v29 program stage access by user group. Can we do masking for just 2 specific program stages? They are 1)| WZbXY0S00lP | ANC 1st visit | ANC 1 Intervention 2) edqlbukwRfQ | ANC visit | ANC subsequent visits intervention

The control user group is tnXCdap5Ucc The control user role is moQCqVTW1Kz You can use either user role or user group, whichever is easier. That means we will delete the 2 Control ANC stages and just use the current intervention ANC stages for all users.

AkubaD commented 6 years ago

Discussed with Markus. Decided would create unpredictable behavior.