Assign a reviewer from different groups at different stages of the workflow in Plone

We are introducing Plone as a document management system in a hospital setting. Moreover, the review process requires two stages of verification:

  • when nursing staff scans a document.
  • where doctors look at the document

The problem arises when we find out that nurses are grouped by the types of machines that they process (in particular, the types of scanners, ultrasounds, ...). On these machines they perform all kinds of exams, on all kinds of body parts.

On the other hand, doctors are grouped based on bodybuilding knowledge.

This means that the document related to the ultrasound of the pelvis should be viewed by the ultrasound group in the breastfeeding population and the abdominal group within the doctor's population.

There are about 8 nursing groups and 7 groups of doctors who will consider 56 different workflows for 56 different types of documents ... This seems like a nightmare to maintain.

Is there another way to “dynamically” assign reviewer groups based on the parameters provided to the document? If so, where are the parameters defined at the document type level and assigned at the document instance level?

+4
source share
4 answers

There may be an easier way to approach this.

Plone workflows can be stacked; for example, you can assign more than one workflow to a content type.

This means that you can appoint both a nurse and a doctor’s workflow, each of which conveys specific permissions. If you correctly configured your roles for the workflow, your use case should be easily implemented; just divide the roles into those for nurses and doctors.

So, when the default workflow uses Reviewer, Editor, Member, Member, etc., use DoctorReviewer, NurseReviewer, DoctorEditor, NurseEditor, etc. Thus, two workflows will handle two sets of concurrent permissions, transitions, and states.

I don’t know enough about your use cases if this solves your problems at all, but I just wanted to make sure that you knew about this setting before exploring complex custom plugins.

+4
source

Instead of overloading the very simple built-in "Tags" field, you can also use Archetypes.Schemaextender to create several custom fields (for example, equipment, the main part) that you can assign to each content item, and then use these fields to assign the nursing workflow to the desired a group of nurses and a Doctor’s workflow to the right group of doctors, as described above.

+2
source

you have to write your pas plugin. You can start with this: http://pypi.python.org/pypi/Products.AutoRoleFromHostHeader/ (also works for groups) and create your own, which assigns a role / group. This plugin is very simple and just does it:

security.declarePrivate('getRolesForPrincipal') def getRolesForPrincipal(self, principal, request=None): """ Assign roles based on 'request'. """ 

you can make your own logic and assign a group to the user based on parameters defined at the document type level and assigned at the document instance level.

0
source

PlacefulWorkflow can help if you create folders correctly to reflect groups.

0
source

Source: https://habr.com/ru/post/1400950/


All Articles