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

Architecture Documentation Package for MisterEd


Introduction

Project Overview:
MisterEd is a medical information system designed to assist Emergency Departments (ED) with virtual triage, patient registration, ED load monitoring, and scheduling of virtual clinic appointments.

Milestone 4 Focus:

  • Merging branches with different designs, database models, and code approaches.
  • Implementing a smarter triage system using AI (ChatGPT).
  • Adding missing features and improving user, staff, and admin flows.
  • Establishing support for multiple user roles and dashboards.
  • Enabling real-time ED load and queue monitoring.

Module Views

High-Level Module View

The system comprises the following modules:

  1. Package MisterEd

    • Root package containing all sub-packages and core functionalities.
  2. Package triage

    • Manages virtual triage, symptom input, and analysis using AI.
  3. Package admin

    • Tools for ED monitoring, schedule management, and reporting.
  4. Package booking

    • Facilitates appointment scheduling and virtual meeting setup.
  5. Package messaging

    • Handles user notifications and email communication via SMTP.
  6. Package security

    • Manages authentication, user roles, and access control.

Detailed Module Descriptions

Package MisterEd

Description:
The root package serves as the entry point to the system and orchestrates the integration of all sub-packages.

Package triage

Description:
Implements an adaptive triage system with AI-based analysis.
Features:

  • Submission box for detailed user inputs.
  • Integration with ChatGPT for triage evaluation and queue prioritization.
  • Real-time ED queue monitoring and position assignment.

Package admin

Description:
Provides tools for administrators to monitor and manage ED operations.
Features:

  • Dashboards for user, doctor, and load statistics.
  • Schedule management via database access tools.

Package booking

Description:
Supports the scheduling of appointments (virtual and in-person).
Features:

  • Improved Schedule models.
  • Real-time database updates for appointment status.

Package messaging

Description:
Enables asynchronous notifications and updates.
Features:

  • Email notifications for ED visits and appointment confirmations.

Package security

Description:
Manages role-based access control for users, staff, and admins.
Features:

  • Role-specific redirections to home, staff, or admin dashboards.

Runtime Views

MisterEd Application Workflow

  1. User Flow:

    • Logs in via secure authentication.
    • Accesses resources, medical records, and profile information.
    • Completes triage analysis and schedules appointments.
  2. Staff Flow:

    • Redirected to the staff dashboard upon login.
    • Views general user information for medical evaluation.
  3. Admin Flow:

    • Redirected to the admin dashboard.
    • Monitors ED loads and manages database entries for users, doctors, and schedules.
  4. Real-Time ED Load Monitoring:

    • Users see queue lengths and select an ED.
    • Queue position is dynamically updated using AI-based prioritization.

Data Model

ERD - MisterEd Database

  • User

    • Fields: UserID, Name, Role, ContactInfo, PasswordHash.
  • Patient

    • Fields: PatientID, UserID, MedicalHistory, Preferences.
  • TriageSession

    • Fields: SessionID, PatientID, Symptoms, Recommendations, Timestamp.
  • Appointment

    • Fields: AppointmentID, PatientID, DoctorID, ScheduleID, Status.
  • Doctor

    • Fields: DoctorID, Name, Specialty, Availability.
  • ED

    • Fields: EDID, Location, QueueLength, Load.

Deployment Views

Deployment Topology

  1. Web Application Hosting:

    • Hosted on a cloud server (e.g., AWS/Heroku) with redundancy for high availability.
  2. Database:

    • PostgreSQL database hosted on a separate secure instance.
  3. Real-Time Updates:

    • WebSockets for real-time queue and load updates.
  4. SMTP Server:

    • For sending email notifications (appointment confirmations, ED visit updates).

Milestone 4 Enhancements

Summary of Improvements

  1. Branch Merging:

    • Unified disparate designs and database models into a cohesive system.
    • Addressed compatibility issues through code rewrites and redesigns.
  2. Triage Enhancements:

    • Added a submission box for detailed user inputs.
    • Integrated ChatGPT for smarter, non-linear analysis.
  3. Role-Based Access Control:

    • Redirects users, staff, and admins to appropriate dashboards.
  4. Virtual Clinic Appointments:

    • Fully implemented scheduling and real-time database updates.
  5. Real-Time ED Monitoring:

    • Queue length visualization and dynamic prioritization using AI.
  6. UI/UX Improvements:

    • Unified design across all pages for consistency.

Conclusion

MisterEd successfully achieves its goals for Milestone 4, providing a comprehensive, adaptive, and user-friendly system for virtual triage, appointment scheduling, and ED load monitoring. The system now supports multiple user roles, advanced AI-driven triage analysis, and real-time functionality for critical healthcare operations.