Mapping Between Views - SENG-350-2024-fall/Team-1 GitHub Wiki

This section, in partnership with the information found in the Views section, is essential for understanding how different architectural perspectives interrelate within the MisterED system. This section elucidates the relationships between various views, ensuring a cohesive and comprehensive understanding of the system's architecture.

Mapping Between Module View and Component-and-Connector (C&C) View

The Module View outlines the system's static structure, detailing how the codebase is organized into modules. The C&C View illustrates the dynamic interactions between these modules during runtime.

Patient Interface Module

  • Module View: Represents the React-based frontend responsible for user interactions.
  • C&C View: Functions as a component that communicates with the Flask API component to handle user inputs and display responses.

Flask API Module

  • Module View: Acts as the central backend module managing API endpoints.
  • C&C View: Serves as a component that interacts with the Patient Interface, Triage Engine, Patient Queue, and CSV Database Manager components to process requests and coordinate system operations.

Triage Engine Module

  • Module View: Contains the logic for assessing patient symptoms and determining priority.
  • C&C View: Operates as a component that receives data from the Flask API and updates the Patient Queue component accordingly.

Patient Queue Module

  • Module View: Implements the Singleton pattern to maintain a centralized list of patients awaiting triage.
  • C&C View: Functions as a component that interfaces with the Triage Engine and CSV Database Manager components to manage patient data.

CSV Database Manager Module

  • Module View: Handles data persistence by managing read/write operations to the CSV-based storage.
  • C&C View: Acts as a component that interacts with the Patient Queue and DataStorage components to ensure data integrity.

Mapping Between Component-and-Connector (C&C) View and Deployment View

The C&C View focuses on the runtime interactions between components, while the Deployment View maps these components onto the physical infrastructure.

Patient Interface Component

  • C&C View: Interacts with the Flask API component to send user inputs and receive responses.
  • Deployment View: Deployed on the client's browser or mobile device, accessing the system via the internet.

Flask API Component

  • C&C View: Central hub that coordinates interactions among various components.
  • Deployment View: Hosted on a web server, accessible over HTTPS, ensuring secure communication.

Triage Engine Component

  • C&C View: Processes patient data to determine triage priority.
  • Deployment View: Deployed on the same server as the Flask API or on a dedicated server, depending on performance requirements.

Patient Queue Component

  • C&C View: Maintains the list of patients awaiting triage.
  • Deployment View: Resides on the server, ensuring centralized access and management.

CSV Database Manager Component

  • C&C View: Manages data storage operations.
  • Deployment View: Operates on the server, interfacing with the file system or a dedicated storage service.

DataStorage Component

  • C&C View: Represents the physical storage of patient data.
  • Deployment View: Implemented as CSV files on the server's file system or within a managed storage service.

Mapping Between Module View and Deployment View

The Module View details the organization of the codebase, while the Deployment View shows where these modules are physically deployed.

Frontend Modules

  • Module View: Includes components like App.js, index.js, and other React components.
  • Deployment View: Bundled and served to the client's browser or mobile device, enabling user interaction.

Backend Modules

  • Module View: Comprises files such as app.py, triage.py, patient_queue.py, and csvdatabase.py.
  • Deployment View: Deployed on the server, running within a Python environment to handle backend logic and API requests.

Data Storage Modules

  • Module View: Includes CSV files managed by csvdatabase.py.
  • Deployment View: Stored on the server's file system or within a managed storage service, ensuring data persistence.

By understanding these mappings, stakeholders can gain a comprehensive view of how the MisterED system's architecture is structured, how components interact at runtime, and how they are deployed across the infrastructure.