Entity Relationship Model - SENG-350-2024-fall/Team-11 GitHub Wiki
This Entity-Relationship Diagram (ERD) represents the structure of a healthcare system where various entities interact to manage patient care and operations. Admin plays a central role, managing Patient, Nurse, Chemist, EmergencyDepartment, and PrimaryCareClinic accounts. Patients undergo Triage based on their symptoms, which are evaluated through the Symptom entity. EmergencyDepartment and PrimaryCareClinic manage patient flow and referrals, while Nurse assists patients and Chemist handles prescriptions. The Prescription entity links Patient and Chemist, capturing medication details. This ERD captures the relationships and interactions between different roles and entities in the system.
Cardinalities:
- Patient to Triage (1 to many): Each patient can have multiple triage records, but each triage record is associated with only one patient.
- EmergencyDepartment to Patient (1 to many): An emergency department can manage multiple patients, but each patient is associated with one emergency department.
- PrimaryCareClinic to Patient (1 to many): A primary care clinic can receive multiple referrals from patients, but each patient has one referral.
- Nurse to Patient (1 to many): A nurse can assist multiple patients, but each patient can be assisted by one or more nurses.
- Chemist to Prescription (1 to many): A chemist can handle multiple prescriptions, but each prescription is associated with only one chemist.
- Chemist to Patient (1 to many): A chemist can dispense medications to multiple patients, but each patient can receive medications from multiple chemists.
- Admin to Patient (0.. to 0..*)*: Multiple admins can manage multiple patients, so itโs a many-to-many relationship.
- Admin to Nurse (0.. to 0..*)*: Multiple admins can manage multiple nurses.
- Admin to Chemist (0.. to 0..*)*: Multiple admins can manage multiple chemists.
- Admin to EmergencyDepartment (0.. to 0..*)*: Multiple admins can manage multiple emergency departments.
- Admin to PrimaryCareClinic (0.. to 0..*)*: Multiple admins can manage multiple primary care clinics.
- Symptom to Triage (1 to many): Each symptom can be evaluated in multiple triages, but each triage record is associated with only one symptom.
Primary Keys:
- Patient:
patientID
is the primary key, uniquely identifying each patient. - EmergencyDepartment:
edID
is the primary key, uniquely identifying each emergency department. - PrimaryCareClinic:
clinicID
is the primary key, uniquely identifying each primary care clinic. - Nurse:
nurseID
is the primary key, uniquely identifying each nurse. - Chemist:
chemistID
is the primary key, uniquely identifying each chemist. - Admin:
adminID
is the primary key, uniquely identifying each admin. - Prescription:
prescriptionID
is the primary key, uniquely identifying each prescription. - Symptom:
symptomID
is the primary key, uniquely identifying each symptom. - Triage:
triageID
is the primary key, uniquely identifying each triage record.
Foreign Keys:
- Patient: The
patientID
in entities like Triage and Prescription acts as a foreign key, linking these records to the respective patient. - Chemist: The
chemistID
in Prescription acts as a foreign key, linking prescriptions to the chemists handling them. - Symptom: The
symptomID
in Triage acts as a foreign key, linking triage evaluations to specific symptoms. - Admin: Admins manage multiple instances of entities like Patient, Nurse, Chemist, EmergencyDepartment, and PrimaryCareClinic, though the relationship is many-to-many (0..* to 0..*), meaning an admin can manage multiple entities, and each entity can be managed by multiple admins.
These primary and foreign keys ensure each entity's records are uniquely identifiable and establish the relationships between the entities, maintaining data integrity across the system.