Milestone 4: Architecture Background - SENG-350-2024-fall/Team3 GitHub Wiki

Problem Background

Mister Ed is an online web application that provides a medical virtual triage service as an alternative to in-person triage in an Emergency Department (ED). The application is designed to alleviate the long wait times and overcrowding issues that commonly arise in EDs, benefiting both patients and ED staff. By delegating the triage process to a digital platform, patients avoid potential physical congestion and receive recommendations for the appropriate course of action, streamlining emergency care.

System Overview

The Mister Ed system is a virtual triage and patient management platform aimed at improving emergency care services. It provides patients with the ability to undergo a virtual triage, assess ED loads, book necessary appointments with healthcare providers, and receive personalized healthcare recommendations. For ED administrators, Mister Ed offers tools to monitor and manage patient loads, adjust triage criteria, and communicate efficiently with patients.

Key components include:

  • Patient Portal: Allows patients to register, perform triage, receive notifications, book appointments, and update their profile.
  • Admin Dashboard: Provides real-time insights into ED load and tools for managing triage criteria and patient notifications.
  • Triage Decision Engine: Delivers data-driven recommendations based on modern medical protocols and patient input from the triage.
  • Appointment Booking Engine: Determines the closest hospitals and clinics based on the patient’s location and specific care needs, allowing patients to book available time slots.

Context

Mister Ed addresses critical challenges faced by EDs, aligning with healthcare goals to enhance accessibility, efficiency, and patient satisfaction. The software architecture supports:

  • Integration with existing healthcare systems.
  • Scalability to handle varying patient volumes.
  • Reliability to ensure uninterrupted service delivery.

The architecture leverages modular design principles, ensuring flexibility and adaptability throughout the system's lifecycle. Its role extends beyond emergency care, with potential applicability to urgent care and telemedicine scenarios.

Driving Requirements

  1. Virtual Triage Recommendation Calculation:

    • The system must process patient inputs (e.g., symptoms, medical history) and apply established medical protocols to determine the most appropriate recommendation.
    • Recommendations should consider urgency, patient condition, and proximity to healthcare facilities.
    • The triage engine must provide real-time feedback to users and ensure accuracy in advice given.
  2. User Information:

    • Patients must be able to register and manage personal information, including medical history, contact details, and preferences.
    • Personal data should be securely stored and comply with privacy regulations.
  3. Patient Access:

    • Patients should have 24/7 access to the platform via web browsers and mobile devices.
    • The user interface must be intuitive and accessible, adhering to accessibility standards.
    • Notifications for triage updates, appointment confirmations, and ED load status should be delivered promptly.
  4. Admin Access:

    • ED administrators must be able to monitor real-time patient volumes and adjust triage protocols dynamically.
    • Reporting features must include analytics on ED usage, triage outcomes, and appointment statistics.
  5. Appointment Booking:

    • The system should integrate with hospital and clinic schedules to provide real-time availability for appointments.
    • Patients must be able to search for and book appointments based on their location, urgency, and care needs.
  6. User Access:

    • Users must authenticate using secure login credentials.
    • Role-based access controls should restrict patient and admin functionalities appropriately.

Solution Background

The architecture of Mister Ed emphasizes modular design principles to enhance maintainability, scalability, and integration with existing healthcare systems. Drawing inspiration from "Designing Enterprise Applications with J2EE", the application is divided into distinct modules to reduce interdependencies, streamline development, and facilitate third-party integration.

The following modules form the backbone of Mister Ed's architecture:

  • Control Module: Manages user registration, profiles, and data storage in a secure database. Handles interactions with the patient portal for updates and notifications.
  • Sign-On Module: Ensures secure authentication for both patients and administrators. Verifies credentials using industry-standard encryption and login practices.
  • Triage Decision Engine: Processes patient-provided data and medical history using established protocols. Delivers triage recommendations tailored to patient needs and location.
  • Appointment Booking Engine: Integrates with hospital and clinic scheduling systems to provide real-time availability. Facilitates booking based on patient location, urgency, and care requirements.
  • Admin Dashboard Module: Provides administrators with tools for real-time ED monitoring, protocol adjustments, and report generation. Enables efficient communication between ED staff and patients.
  • Messaging Module: Delivers notifications regarding triage outcomes, appointment confirmations, and ED load status. Supports asynchronous communication for timely updates.

These approaches ensure the system's resilience, flexibility, and alignment with healthcare best practices.

Architectural Approaches

The architecture of Mister Ed leverages several design patterns to enhance modularity, maintainability, and flexibility. These patterns are tailored to address the specific requirements of the project, ensuring robust and scalable development.

  1. Model-View-Template (MVT) Pattern

    • Approach: Used as the core architectural pattern because of the Django framework. This pattern organizes the project into three components:
      • Model: Handles data and business logic.
      • View: Manages UI and presentation logic.
      • Template: Contains HTML templates for rendering the user interface.
    • Benefits:
      • Simplifies development and maintenance.
      • Enforces separation of concerns, improving modularity and scalability.
  2. Decorator Pattern

    • Approach: Dynamically adds behavior to objects without affecting others in the same class. Used extensively for authentication checks with decorators like @login_required.
    • Benefits:
      • Promotes code reusability by abstracting cross-cutting concerns like authentication.
      • Enhances modularity and reduces boilerplate code.
  3. Form-View Pattern

    • Approach: Implements structured form handling by separating form creation and rendering. For example, the user sign-up form is instantiated in views.py and rendered in signup.html.
    • Benefits:
      • Encourages reusability of forms across multiple views.
      • Simplifies form management and improves code readability.
  4. Strategy Pattern

    • Approach: Encapsulates algorithms for runtime selection. This pattern is used in triage.html to dynamically determine the next set of triage questions based on previous responses.
    • Benefits:
      • Flexibility to adapt to user inputs.
      • Enhances the modularity of decision-making algorithms in the triage process.
  5. Factory Pattern

    • Approach: Provides a method for creating objects without specifying their exact classes. This is implemented in factories.py to create user objects, supporting extensibility for additional user roles like admins and paramedics.
    • Benefits:
      • Simplifies object creation by abstracting the instantiation process.
      • Facilitates scalability as new user roles can be added with minimal changes.

Analysis Results

There are no results available. Trade studies, quantitative modeling, or other analysis results have not been scheduled.

Mapping Requirements to Architecture

  1. Virtual Triage Recommendation Calculation
    Addressed by the Triage Decision Engine, which processes patient inputs (e.g., symptoms, medical history) and applies medical protocols to generate recommendations.

  2. User Information Management
    Handled in the Model layer, where user data structures are defined. This allows for the management and storage of user information such as medical history and contact details.

  3. Patient Access
    Managed in the View layer, which ensures patients can easily access the system through web and mobile interfaces. The system supports secure login, and the interface is designed to be intuitive and accessible. Notifications about triage updates and appointments are handled through Django’s messaging framework.

  4. Admin Access
    Implemented through the Admin Dashboard, where ED administrators can monitor patient volumes, adjust triage protocols, and review analytics on ED usage and appointment statistics.

  5. Appointment Booking
    Managed by the Appointment Booking Engine, which integrates with hospital and clinic schedules to provide real-time availability. The system allows patients to search for and book appointments based on location, urgency, and care needs.

  6. User Authentication
    Authentication is handled through Django’s authentication system, which ensures that only authorized users can access certain parts of the application. Role-based access controls are implemented to restrict functionalities based on user type (e.g., patient, admin).

These components of the architecture are directly aligned with the system requirements, ensuring a well-integrated solution that meets the functional and non-functional needs of the platform.