---
# System prepended metadata

title: OtherFunctionality

---

# OtherFunctionality

```mermaid
graph TD;
A(OtherFunctionality) --> B(SensorDataManager)
    B -->|interface| BA(SensorDataMgmt)
        BA -->|interface| BAA(addSensorData)
        BA -->|interface| BAB(getAllSensorDataOfPatient)
        BA -->|interface| BAC(getAllSensorDataOfPatientBefore)
A(OtherFunctionality) --> C(PatientManager)
    C -->|interface| CA(OtherDataMgmt)
    C -->|interface| CB(PatientRecordMgmt)
A(OtherFunctionality) --> D(SecurityManager)
A(OtherFunctionality) --> E(GatewayManager)
A(OtherFunctionality) --> F(CommunicationManager)
A(OtherFunctionality) --> G(ExternalDataSourceManager)
A(OtherFunctionality) --> H(ExternalDataManager)
```

## SensorDataManager

### <SensorDataMgmt>

- store all sensor data
  
- make sensor data available
  

## PatientManager

### <OtherDataMgmt>

- manage the patient status
  - when changed, should automatically be send to HIS

### <PatientRecordMgmt>

- get patient record from HIS (getPatientRecord)
  
- send patient status to HIS (updateRiskLevel)
  

<>

- cache EHR for when HIS is down
  
- make link patient-gateway (for resolving)
  
- interface to create a new patient
  
  - link both the gateway device and the sensors to the patient
  - send credentials to the `SecurityManager`
- deregister a patient (also the gateway and the wearable)
  
- access control via `SecurityManager`
  
- store patient's permissions for external data sources
  
- store the patient's risk assesment configuration
  
- allow for configuration of the risk assesment
  
- when risk assesment changed, automatically schedule a risk estimation
  

## PatientConsultationManager

- access control
  
- filtering of data based on type of user
  

## SecurityManager

- store credentials
  
- interface for validating received tokens / general security
  
- access control
  
- manage accounts (of both patients, GPs, administrators, ...) -> misschien ergens anders
  
- store credentials/auth tokens for external data sources
  

## CommunicationManager

- receive sensordata (how to make scalable?)
  
- push emergency notifications to gateway devices
  
- translate patientID to the target gateway device (gateway address can change, does gateway have to ping)
  
- detect failures and notify necessary people
  
- try different channels / check them all for when gateway in degraded mode
  
- confidentiality & integrity?
  
- logging (before each request gets processed)
  
- detect tampering with data
  
- can request a gateway for current data
  

## Logger

- log incoming requests (before they get processed)
  
- log changed risk assesment configurations
  
- log consultations
  
- log patient deregistration
  

## GatewayManager

- manage gateway devices and their addresses

=> wel nodig, gateway toch uniek gebonden met patient?

## ExternalDataSourceManager

- extensible communication subsystem
  
- regular synchronisation
  

modifiability with minimal change

## ExternalDataManager

- store data from external sources
  
- make data available to new MLModel types (without destroying existing interfaces for model prediction each time an external source gets added)
  

## EstimationController

- launch risk estimation when new sensor data becomes available
  
- combine all sources of data (sensor, fitness trackers, ...)
  
- get the configation for the patient risk assesment from the `PatientManager`
  

## NotificationManager

- determine whether a notification should be send
  
- look up registered parties (get accounts from `SecurityManager`)
  
- construct notifications specifically for the different parties with different info
  
- priorities of notifications: red > yellow > green
  
- send notification to a `NotificationSender` process
  
- interface for creating notifications based on detected failure [P1]
  

## NotificationSender

- determine the address to send the notification to [P1]
  
- send notification (with confirmation / retries) [P1]
  
- detect when channel is down and notify necessary people (apparte interface voor `NotificationManager`, enkel voor communicatie tussen gateway en pms en intern in pms) [Av2]