staff table
The staff table in the Hospital Management System Database Schema schema has 11 columns, keyed by id, with 1 foreign key to departments. 19 columns in doctor_specialties, doctor_schedules, patient_allergies, appointments and 12 more reference it.
One table for every employee. Doctors, nurses, technicians and admin staff differ by role, not by table.
Columns (11)
| Column | Type | Constraints | Description |
|---|---|---|---|
| id | uuid | primary key | |
| department_id | uuid | references departments.id | |
| employee_number | varchar(32) | unique, not null | |
| first_name | varchar(80) | not null | |
| last_name | varchar(80) | not null | |
| role | staff_role | not null | |
| license_number | varchar(60) | unique | |
| varchar(255) | unique | ||
| phone | varchar(32) | ||
| employment_status | employment_status | not null | |
| hired_at | date | not null |
Indexes (2)
(department_id, role)(last_name, first_name)
Relationships
staff.department_idreferencesdepartments.iddoctor_specialties.staff_idreferencesstaffdoctor_schedules.staff_idreferencesstaffpatient_allergies.recorded_by_staff_idreferencesstaffappointments.staff_idreferencesstaffencounters.attending_staff_idreferencesstaffadmissions.admitting_staff_idreferencesstaffvital_signs.recorded_by_staff_idreferencesstaffclinical_notes.author_staff_idreferencesstaffreferrals.referring_staff_idreferencesstaffreferrals.referred_to_staff_idreferencesstaffencounter_diagnoses.diagnosed_by_staff_idreferencesstaffencounter_procedures.performed_by_staff_idreferencesstaffprescriptions.prescriber_staff_idreferencesstaffmedication_administrations.administered_by_staff_idreferencesstaffmedication_administrations.witnessed_by_staff_idreferencesstafflab_orders.ordered_by_staff_idreferencesstafflab_results.verified_by_staff_idreferencesstaffimaging_studies.ordered_by_staff_idreferencesstaffimaging_studies.performed_by_staff_idreferencesstaff