Open vidi42 opened 2 years ago
@vidi42
not all users which have access to create samples also have access to create cases and contacts
@bernardsilenou
Regarding your first 3 points. You probably are correct that from a purely functional point of view that all the users who can create/edit samples can also create/edit associated entities. The not all users which have access to create samples also have access to create cases and contacts
statement comes from a more technical point of view and can be seen implemented for the Clinician
user role, which has the right to create samples and view contacts, but not the right to create contacts.
Besides that, we need to keep in mind that we are going for a more flexible approach to user rights, where each system can define what rights a role has, so in case we don't enforce this all users that have the right to create samples should also be able to create their associated entities (cases, contacts, ep)
it's very easy to end up with a role that just has the sample create/edit/view rights.
As for the last two points, I think this can be doable, however, the idea with the new task type was to create a reminder in the system and to guide the user a bit through the new workflow instead of asking them to discover it. I can see however how this might become obsolete sometimes in the future.
@MateStrysewske / @MartinWahnschaffe any opinions?
The whole problem here comes from the situation that a clinician is ment to work on cases, but not contacts. So he should acutally never be in a situation where he changes the result of the sample of a contact. But since we don't have sepearate rights to edit the sample of a case and the sample of a contact, this could happen.
Bernard definitely has a point, when he says that these automatic tasks are not a great tool and we have to ask ourselves whether we can find an alternative solution.
At this point I would be in favor of solution 1. If we ever have a need to a allow a user to create/edit samples without creating case/contacts, we cann still do solution 2 or 3 or maybe something else that becomes obvious once we have a clear use case.
@MartinWahnschaffe
Feature Description
A follow-up to #8786
Problem Description
When saving a sample with a positive test result for a contact, the user should receive a message to convert the contact to a case. However, not all users which have access to create samples also have access to create cases and contacts, so it doesn't make sense to ask the user to create a case out of the contact since this will result in an authorization issue.
Proposed Change
Extract from the ticket mentioned above: If a user does not have the
CASE_CREATE
and/orCONTACT_EDIT
user right, instead of showing the popup to create a case for the contact person, ask them whether they want to create a task that is automatically assigned to either the user assigned as the responsible user to the contact, or an eligible user in the contact's jurisdiction (i.e. probably any user that has both theCASE_CREATE
andCASE_RESPONSIBLE
user right, but we'd need to refine this). This would be a new task type, probably called something likeCREATE_CASE_FROM_SAMPLE
, that would be assigned to the contact and would probably need a link to the sample in question in thecreatorComment
field.Possible Alternatives
No alternatives at the moment.
Additional Information
Can be reproduced with a user which has the
Clinician
role. @MateStrysewske @MartinWahnschaffe, please add if any.