# Fit the model
## Appendix B  
In this appendix section is indicated the whole dataset structure of the information system monitoring patients at home. Figure A1 illustrates the database layout design upgrading the information system architecture of Figure 1a.  
Below are indicated the main requirements of the designed database enhancing possible facilities.  
1. Model for alarm prediction  
The patient _ID_, of sex _SEX_, having pathology _pathology_, born on _BithDay_, is examined at home by the _id_devices_ providing measurements which will be stored in the database. The patient therapeutic status is indicated by _id-therapia_. _Alarms_ is a tuple that contains the relative _code_parameter_ and with the _min_ and _max_ values of the parameter that produced the alarm (thresholds).  
2. Predictive model of patient's health status  
It is possible to predict the status of patients by applying the LSTM algorithm based on historical data processing of vital parameters dataset.  
3. Classification of the adequacy of therapy for each patient who has experienced an alarm  
All patient with _id_parameters_threshold_ having a value above or below the threshold limit, are involved in a particular therapeutic status identified by _id_therap_status_, and by particular _measures_ of _pathology_. _ld_therap_ is the therapy that the patient is following. Every patient with a pathology follows a specific therapeutic program. If the patient's state of health is recorded as critical, then, it will be possible to use an LSTM-based program which, based on historical data, will provide support about the adequacy of his therapy.  
4. Support for the diagnosis and prognosis of the disease  
Starting with the analysis of historical data, it is possible to establish the temporal evolution of the pathology. For example, it is possible to identify the patient that is most \"similar\" to the current patient. The patient _id_patient_ is hospitalized on the first day by communicating _messages to_ the operator, who receives documents typology (_document_typology_), containing _filename_ (properly processed). The LSTM will provide a diagnostic indication of the pathology and a prognostic on its temporal evolution.  
5. Evaluation of the human resources (operators)  
The patient assistance operations will provide important information about Key Performance Indicators (KPI) of operators.  
6. Documents data processing for the development of assisted diagnosis assistances  
The data processing of all the documents and file about a patient will allow to optimize the homecare assistance process.  
7. Analysis of the relationships between classes  
Proper association rules allow us to obtain interesting relationships within the database attributes. In this case it is possible to establish relationships of the type: [_id_patient_, _pathology_] -> \"_parameters\"_, thus supporting the prognostic.  
8. Analysis of devices  
The device records will contain the identification number of the device associated with the patient. All data of devices will be contained into tables associated with the patient _ID_.  
9. Inspection of the pharmacological dosage administered to the patient  
At each patient _id_patient_ is associated with a therapy _id_therapy_. An important relationship to analyze is: id_patient, id_therapy] -> \"alarm\".  
10. Real time Criticality analysis  
The constantly monitored patient conditions can be displayed in real time. Historical measures can be applied in order to predict critical moments.