Skip to content

shift reviews

CATS-729/730/731 outline the desire for hospital managers to ‘review’ shifts.

Shifts which are ‘review-eligible’ will be shown to managers on their dashboard screen, with a button to open a small review modal to provide their feedback.

review-eligible

A shift is eligible to be reviewed if either of the following are true:

  • it is a doctor’s first shift at the hospital site
  • the doctor has not had a shift at the hospital site reviewed in the last 30 days

data

Shift review table will be created to hold review info for an eligible shift.

Table will be * internal id * core id * shift_core_id * employee_id * site_id
* status * review object * reviwed_by * completed_at * created_at * updated_at * expire_at * deleted_at

Entry for shift review will be created if shift is ‘eligible’ when

  • shift is clocked out by user, or
  • shift is clocked out by admin

and other eligiblility requirements are met.

If the shift is not clocked out of, a shift review option will not be created.

relations

When shift review is created, one entry is created for each active manager at a hospital at the time of creation. Each manager user will see a review entry relating to them. Two managers at a hospital can each give a separate review of the same doctor/shift.

review data

Currently the data is stored as a json object in the review_data field. If there’s a need for more robust reporting, and view of the data can be created to show individual field data for more granular inspection.

/indevets/shifts-reviews URL takes user to screen to review/export all reviews. User can filter by time range, hospital or employee. ChartJS chart shows basic info.

check for expired

Command shift:review-cleanup runs hourly and will update the status of any expired review objects as ‘expired’ and also trigger a ShiftReviewExpired event.
Listener can listen for event and notify users as needed.

send reminder for upcoming expirations

Configurable via core.shift.reviews.days_expire_notify, system will daily check for shift reviews that will expire X days from ‘now’. A ‘ShiftReviewsExpiring’ event is fired with the site and list of shifts relating to upcoming shift review expirations. Only will send if feature flag ‘REVIEW_SEND_SHIFT_REVIEW_REMINDER’ is enabled.

submission behaviour

When submitted, a ShiftReviewSubmitted event is triggered. A listener can listen for this event and send an email to any and all parties needed, perhaps check the severity/values of the shift review (bad numbers?) and take other action.

new feature flags

  • REVIEW_SEND_SHIFT_REVIEW_REMINDER (check if manager users should be sent expiration reminders)
  • REVIEW_MANAGE_RECIPIENTS (added in earlier Jan 2022 code to manage recipients)
  • REVIEW_GIVE_SHIFT_REVIEW (check if user can give review)
  • ADMIN_SHIFT_REVIEW_ACCESS (check if user can look at reviews)

new events

  • ShiftReviewSubmitted
  • ShiftReviewsExpiring
  • ShiftReviewExpired

new commands

  • shift:review-cleanup (run hourly)
  • shift:review-expiry-notify (run daily)