Class Diagram - SENG-350-2024-fall/Team-1 GitHub Wiki

Diagram Description:

Key Entities and Relationships:

  1. Person:

    • The base class for human actors in the system such as Patient and Staff
    • Class contains personal information like names, date of registration with mister ED, and methods of contact (phone number, and email).
    • Methods are available to update contact info, log out, and send notifications.
  2. Patient:

    • Inherits from Person, contains attributes allergies, birthdate (which can derive age), prescriptions, emergency contact, and occupation.
    • Patients can log in using a healthcare card number and see their medical history, emergency contacts, triage reports, and telemedicine appointments.
    • Patients are associated with care providers, ED queues, and hospitals when they are using the triage of mister ED.
  3. Staff:

    • Inherits from Person, includes roles Doctor, Nurse, OnlineNurse, EMT, and Admin.
    • Staff has attributes for their shift schedule, on-call status, username, password, department information, and availability if they are currently with a patient or able to take a new patient.
    • There are methods to allow staff to log in, view and update shift schedules, view assigned patients, assign patients to care, remove patients from their care, and manage their availability.
  4. Doctor Class (inherits from Staff):

    • Represents a doctor with a list of their specialties and list of current patients.
    • They have the ability to order medical scans for patients (orderScan()).
  5. Nurse Class (inherits from Staff):

    • Represents a nurse with a list of specialties and current patients they are tending to.
  6. OnlineNurse Class (inherits from Staff):

    • Represents a nurse working online, responsible for handling virtual consultations with patients.
    • Can retrieve the next patient from their queue using the getNextPatient() method.
  7. EMT Class (inherits from Staff):

    • Represents an emergency medical technician or paramedic.
    • Contains methods for dispatching to a patient, getting the closest emergency department to their location, and accessing information about the current patient under care.
  8. Admin Class (inherits from Staff):

    • Represents the system administrator.
    • Admins have the attributes Username, Password, and Permissions, and they can manage medical records if there are errors in medical files via the Alters class.
  9. Hospital Class:

    • Represents a hospital with attributes Location the physical address of the hospital, EstimatedWaitTime the approximate wait time a patient can expect in the emergency room, PhoneNumber, Capacity the number of patients the hospital can accommodate, and the EDQueue the list of patients currently waiting treatment at the hospital.
    • Methods to manage hospital capacity, wait times, and patient queues.
  10. MedicalRecord Class:

  • Represents a patient's medical record, with attributes like FileName, FileSize, FileType, LastUpdated, DateCreated, and Patient.
  • Methods to update or view file details.
  1. TriageReportFile, MedicalImaging, and MedicationFile Classes:
  • These classes represent different types of medical records and inherit from MedicalRecord.
    • TriageReportFile: Stores triage information and symptoms.
    • MedicalImaging: this is MRI images or Xray images or other medical images the hospital may produce, diagnoses, and observations.
    • MedicationFile: Stores information about medications including prescribing doctors, and prescription details. Also includes a method to cancel prescriptions.
  1. Treats Class:
  • Represents actions related to a care physician treating a patient.
  • Doctors can diagnose patients, prescribe medications, admit patients, and discharge them using methods from this class.
  1. Triages Class:
  • Represents actions related to triaging a patient.
  • Nurses and online nurses can edit triage reports, admit patients, update patient priority, and assign patients to hospital queues.
  1. Assists Class:
  • Represents actions related to assisting emergency medical technicians.
  • EMTs can edit triage reports, update patient priorities, and get patient locations.
  1. Alters Class (New Addition):
  • The Alters class has methods for editing patient files (editPatientFile()) and deleting files (deletePatientFile()).
  • It is connected to Admin, since only system administrators to can alter patient history if there is a mistake in their records.
  1. Relationships:
  • Patient is related to Doctor by being treated, Nurse by being triaged, OnlineNurse by being triage, and EMT by being assisted.
  • Person is the base class for Patient and Staff.
  • Staff includes different healthcare workers like Doctor, Nurse, OnlineNurse, EMT, and Admin.
  • MedicalRecord is connected to different types of records: TriageReportFile, MedicalImaging, and MedicationFile and are associated with specific Patient objects.
  • Admin is linked to MedicalRecord through the Alters class, allowing them to correct patient files.
  • Hospital employs Staff and maintains patient queues.

Diagram:

image

`@startuml class Person { -NameLast: String -NameFirst: String -NameMiddle: String -RegistrationDate: Date -PhoneNumber: String -Email: String

+updateContactInfo(phone: String, email: String): void
+logout(): void
+Notify(message: String): void

}

class Patient { #Location: String #Home: String +Allergies: List -GeneralPractitioner: String +Gender: String #Birthdate: Date +/Age: int -Prescriptions: List #EmergencyContact: Person +Occupation: String -HealthCareCardNumber: String #CurrentCareProviders: List +InEDQueue: Boolean +CurrentPriority: int +Appointment: Date #EDsInRange: List #TriageReport: TriageReportFile #MedicalHistory: List

+login(healthCareCardNumber: String): Boolean
+updateAllergies(allergies: List<String>): void
+viewMedicalHistory(): List<PatientFile>
+updateEmergencyContact(contact: Person): void
+createTriageReport(symptoms: List<String>): TriageReportFile
+scheduleTelemedicineAppointment(staff: Staff, date: Date): Boolean
+getPriority(): int
+getMedications(): List<String>
+getAllergies(): List<String>
+createPatientFile(file: PatientFile): Boolean
+assignPriority(priority: int): void

}

class Staff { #ShiftSchedule: List #OnCallStatus: Boolean +Username: String -Password: String +EDId: List +Available: Boolean

+login(username: String, password: String, departmentId: int): Boolean
+viewShiftSchedule(): List<String>
+updateShiftSchedule(schedule: List<String>): void
+viewAssignedPatients(): List<Patient>
+assignPatientToCare(patientId: int): Patient
+removePatientFromCare(patientId: int): void
+setAvailability(available: Boolean): void
+getAvailability(): Boolean
+updateDepartment(newDepartment: int): void

}

class Doctor { +Specialty: List #CurrentPatients: List

+orderScan(scanType: String, patient: Patient): PatientFile

}

class Nurse { +Specialty: List #CurrentPatients: List }

class OnlineNurse { #CurrentPatient: Patient #PatientsToCall: List

+getNextPatient(): Patient

}

class EMT { +Location: String +CurrentPatient: Patient

+dispatchToPatient(patient: Patient): void
+getClosestED(): Hospital

}

class Admin { +Username: String -Password: String +Permissions: List }

class Hospital { +Location: String +EstimatedWaitTime: String +PhoneNumber: String +Capacity: int #EDQueue: List

+updateCapacity(newCapacity: int): void
+updateWaitTime(newWaitTime: String): void
+getQueue(): List<Patient>
+removePatientFromQueue(patient: Patient): void
+getWaitTime(): String
+addPatientToQueue(patient: Patient): List<Patient>

}

class MedicalRecord { +FileName: String +FileSize: Double +FileType: String +LastUpdated: Date +DateCreated: Date +Patient: Patient

+updateFile(updatedFile: PatientFile): void
+viewFileDetails(): String

}

class TriageReportFile { +ReportContent: String +Symptoms: List

+viewReport(): Image

}

class MedicalImaging { +MRIImage: Image +Diagnosis: String +Observations: List

+addImage(image: Image): void
+addObservation(obs: String): void

}

class MedicationFile { +Perscription: String +PerscribingDoctor: List +StartDate: Date +EndDate: Date +Cancelled: Boolean

+cancelPerscription(): void

}

class Treats { +diagnosePatient(patient: Patient, diagnosis: String): void +prescribeMedication(patient: Patient, medication: String): void +admitPatient(patient: Patient): Boolean +dischargePatient(patient: Patient): void }

class Triages { +editTriageReport(patient: Patient, updatedFile: TriageReportFile): void +admitPatient(patient: Patient): Boolean +updatePatientPriority(patient: Patient, priority: int): void +assignPatientToQueue(patient: Patient, hospital: Hospital): void }

class Assists { +editTriageReport(patient: Patient, updatedFile: TriageReportFile): void +getPatientLocation(): String +updatePatientPriority(patient: Patient, priority: int): void }

class Alters { +editPatientFile(file: MedicalRecord): void +deletePatientFile(file: MedicalRecord): void }

MedicalRecord <|-- TriageReportFile MedicalRecord <|-- MedicalImaging MedicalRecord <|-- MedicationFile

Patient "0.." - "1.." Doctor (Patient, Doctor) .. Treats Patient "0.." - "0.." Nurse (Patient, Nurse) .. Triages Patient "0..1" - "0..1" OnlineNurse (Patient, OnlineNurse) .. Triages Patient "0..1" - "2" EMT (Patient, EMT).. Assists

Person <|-- Patient Person <|-- Staff Staff <|-- Doctor Staff <|-- Nurse Staff <|-- OnlineNurse Staff <|-- EMT Staff <|-- Admin

Patient "1.." --o "0.." MedicalRecord Staff "0.." - "0.." MedicalRecord : Accesses Admin "0.." - "0..*" MedicalRecord : Manages

Hospital "1.." - "0.." Staff : Employs

(Admin, MedicalRecord) .. Alters @enduml`

⚠️ **GitHub.com Fallback** ⚠️