Module View (Class Diagram) - SENG-350-2024-fall/Team-11 GitHub Wiki
Class Diagram Modular View Documentation
Primary Representation
The primary presentation is a UML class diagram that outlines the components of the system. The elements, their interactions, and relationships are depicted using UML notations.
- Key to Notation:
<|--
: Generalization (inheritance)o--
: Composition (strong relationship)-->
: Dependency (usage)- Notes: Provide explanations or additional context.
Elements and Relationships
The diagram highlights:
- Core System Components:
- Symptom evaluation system using inheritance and polymorphism.
- Prescription handling with a Command pattern.
- Observer Pattern for Notifications:
- Handles NewPatient registration and notifications.
- Database Interaction:
- Utilizes an Adapter pattern for secure AWS database communication.
- User Role Hierarchy:
- Roles (Patient, EmergencyDepartment, etc.) inherit from a base Role class and extend with specialized functionalities.
Element Catalog
The following table explains elements, their properties, and functionalities:
Element Name | Description |
---|---|
SymptomEvaluator | Core evaluation class with methods for assessing symptoms and making recommendations. |
SpecificSymptomEvaluator | Specialized symptom evaluation class inheriting from SymptomEvaluator . |
SubmitPrescriptionCommand | Command object for executing prescription submissions. |
SubmitPrescriptionInvoker | Invokes prescription commands. |
NewPatient | Handles patient registration and manages observers for notifications. |
Observer | Interface for objects observing new patients. |
IncomingPatientObserver | Implementation of the Observer interface for tracking new patients. |
DatabaseAdapter | Adapter class for database interaction. |
AWSDatabase | Class representing AWS database access. |
Role | Base class for all user roles. |
Patient | User role for patients, extends Role with functions like virtual triage. |
EmergencyDepartment | Role class for ED staff, managing patient flow and communication. |
PrimaryCareClinic | Role class for clinics, managing referrals, records, and patient care. |
Nurse | Role class for nurses, assisting in triage and follow-ups. |
Chemist | Role class for chemists, managing prescriptions and dispensing medications. |
Admin | Role class for administrators with system management privileges. |
Variability Guide
The system can be parameterized or reconfigured in the following ways:
- Number of Instances: For components like
IncomingPatientObserver
orSubmitPrescriptionInvoker
. - Support for Add-Ons: Such as additional evaluator types or new notification mechanisms.
- Compatibility: Can support different runtime environments or database servers (e.g., AWS versions).
- Reference Architecture: The view can be instantiated by adding specific implementations for other roles or connecting with alternate databases.
Other Information
- Design Decisions:
- Observer Pattern: Chosen for managing notifications, ensuring decoupled design.
- Adapter Pattern: Ensures seamless database integration while abstracting underlying implementation.
- Inheritance Structure: Simplifies role-specific behaviors by sharing a common interface (
Role
).
- Rejected Alternatives:
- Direct database access was rejected due to security and maintainability concerns.
- Monolithic design was avoided to improve modularity.
- Analysis Results:
- Modular design facilitates system expansion.
- Secure and scalable database integration with AWS.
- Prototypes and Experiments:
- Implemented and tested notification system using mock observers and patients.