Skip to content

Automated Shift Approval

Summary

Implement bypass of scheduler approval to cancel opened shifts that meet defined criteria.

Business Context - why are we doing this

Increase efficiency of IV schedulers so they can focus time on activities that add value and/or require human intervention.

Criteria

Shifts of all status’ can now be auto-cancelled. ✅

IF the shift has internal notes it can NOT be auto-cancelled. ✅

IF the shift is within 30 days and is assigned or approved, it can NOT be cancelled. ✅ - It is important to note that, even though this is being checked in the auto-cancel logic, the UI prevents this thus making this a moot point.

Additional Requirements

  • Hospital manager can also request to cancel all the shifts in a repeating shift series via the repeating shifts screen.

    • As stated in the READ ME the implementation is happening in the Observer for the respective model. That said, if a shift change record is created from a repeating series, the observer should process the change record the same as it would a single change record. Testing will be performed however to ensure that this is the case.
  • Shift audit table must show cancellation by a system user

    • The updated_by value should be the last item changed on the records assuming it is actually cancelled. This updated_by will be set to the system user which means this should completed.

Tests

The tests for this functionality can be found at AutoCancelShiftTest