When you add a worker, the first role you add will always be the primary role.
Ending a current primary role
Current secondary role(s) with no end date. | Prohibit end primary role |
Current secondary role(s) with future end date. | Allow ending primary role ONLY IF end date of primary role is equal to or greater than (more recent) the latest secondary role end date. |
No secondary roles for worker (current or ended). | Allow ending primary role. |
Ended secondary role(s) - no current secondary roles. | Allow ending primary role ONLY IF end date of primary role is equal to or greater than (more recent) the latest secondary role end date. |
Ending a current secondary role
Current primary role with no end date. | Allow ending secondary role regardless of date (will be considered when ending primary role). |
No current primary role. | Scenario should not occur due to data fix. If it did, allow ending secondary role. |
Current primary role with future end date. | Allow ending secondary role ONLY IF end date of secondary role is equal to or less than (longer ago) the primary role end date. |
Adding a new primary role
Current primary role. | Check current primary role can be ended on the date of the day before the start date of the new primary role
|
Secondary roles. | Allow adding a new primary role as above. Secondary roles can remain open as long as a primary role exists and more than one primary role can cover the period of a secondary role. |
Editing a current primary role
No other roles on the record. | Primary check box should not be editable |
Ended primary role(s) on the record. | Primary check box should not be editable |
Secondary role(s) on the record. | Primary check box should not be editable. |
Editing a current secondary role
No primary role. | This should not occur, but if it does, allow the secondary role to be saved as a primary (as long as the dates pass all other required criteria - e.g. not overlapping with other primary roles)
|
Current Primary role with no end date. | Primary checkbox should not be editable. |
Current Primary role with a future end date. | Primary checkbox should be uneditable |
