Skip to main content

Locum Replacement

A locum is a temporary replacement. The system keeps both the original assignment (as historical context) and the locum assignment (as the operative row).

Flow

sequenceDiagram
participant E as Employee
participant SM as ShiftManager
participant API as Laravel API

E->>SM: Suggest replacement (out-of-band)
SM->>API: POST /roster/{assignment_id}/locum { locum_employee_id }
API->>API: Verify locum is eligible (active, not on leave, no shift conflict)
API->>API: Original assignment.status = 'replaced'
API->>API: Create new assignment with locum_for_id = original.employee_id
API->>API: Audit both rows; notify locum

Attendance Separation

  • The locum's punches are attributed to their own employee record.
  • The original employee is treated as on leave / absent for that day (depending on whether a leave was filed).
  • Reports and payroll exports carry the locum_for_id so downstream systems can reconcile.

Eligibility

A locum must be:

  • Active and deployed to (at least) the same organization.
  • Not already assigned to another shift overlapping the replaced shift's time window.
  • Category in {permanent, locum} (consultants and interns are not eligible).

Undo

If the locum can't show up, revoke:

POST /api/v1/roster/{locum_assignment_id}/revoke

Revoking restores the original assignment to planned and removes the locum row (it's soft-deleted for audit).