Skip to content

hospital review of doctor shifts

Tickets in this epic require allowing hospital managers to leave a review of a doctor for a specific shift.

When a review is given, people related to the doctor for that shift will be notified of the review.

CATS-737 outlines the need for creating the relationship between an individual doctor and the person/people who should receive the notification.

We have ‘employees’ table, which are doctors.

A ‘review_recipient’ join table will join employee_id with an email and password, and will allow for potentially multiple recipients per employee/doctor (but may limit to one via the UI to start with). There is a user_id on the table as well which may be used in future to associate with internal CATS users.
However, not all intended recipients are necessarily in CATS at this time.

When review is given, info will be stored in a shift_review table, and a shift_review_recipients table will join the shift_review with the review_recipients entries for the related shift’s doctor.

feature flags

Features::REVIEW_MANAGE_RECIPIENTS
Features::REVIEW_GIVE_DOCTOR_REVIEW
are added and available.

REVIEW_MANAGE_RECIPIENTS will be checked to determine if someone editing an employee has an ability to created/update/delete recipients for a doctor’s shift review. This may be behind another tab in the employee edit screen.

diagram

Potential diagram of implementation.

erDiagram EMPLOYEES { string email int id uuid user_id uuid core_id } USERS { string email uuid id } SHIFTS { uuid id int employee_id } REVIEW_RECIPIENT { uuid core_id uuid employee_core_id string name string email } SHIFT_REVIEW { uuid core_id uuid shift_id uuid user_id string review } SHIFT_REVIEW_RECIPIENT { uuid shift_review_core_id uuid review_recipient_core_id date delivered_date date opened_date string reply_note } EMPLOYEES |o--|| USERS : is EMPLOYEES }o--o{ SHIFTS: allows EMPLOYEES ||--o{ REVIEW_RECIPIENT : allows USERS ||--o{ SHIFT_REVIEW : allows SHIFTS ||--o{ SHIFT_REVIEW : allows

endpoints

GET /api/employee/{employee}/reviewRecipients
POST /api/employee/{employee}/addRecipient
DELETE /api/employee/{employee}/removeRecipient