Event listener: SetDefaultOwner

Description

Component: entity-access-rules-api

Activated on patient record creation

Retrieve the configured defaultOwner for the user (either from the user profile or, if missing, from its workgroup)

  • If one defaultOwner entry exists and the value is a valid user or workgroup reference, set the owner accordingly

  • If more than one such entry exists, only look at the first one as described above and ignore the rest

  • If defaultOwner differs from creator, creator needs to be automatically added as managing collaborator

  • If no such entry exists, set the creator as the owner (There is already code that does this. It should be moved here).

Environment

None

Status

Assignee

Veronika Koltunova

Reporter

Marta Girdea

Labels

None

External issue ID

None

External issue ID

None

Priority

Medium
Configure