There is a growing number of frail patients whose health conditions require constant monitoring by the physician. Unfortunately, the budget restrictions of hospitals and the concomitant resolution of patients to stay home require that this control is to be carried out remotely. Today, IoT wearables are the most promising technology solution for sensing patients' physiological values h24. Those measurements need to be stored permanently and then processed in order to provide support to physicians in charge of taking in-time clinical decisions consistent with the patient health status. In many studies appeared so far, the processing of the Patient-Generated Health Data (PGHD) is done by Supervised Machine Learning (SML) algorithms. These methods provide optimal solution to the classification and regression problems. On the contrary, SML are not suitable when the objective is to provide physicians with basic descriptive statistics based on the physiological measurements, over a given time interval (e.g., hourly, daily, weekly, and so on). The DataBase Management System is the best software technology that suits such a need.
In the present paper, the PGHD are simulated by means of the ThingsBoard IoT platform, while their storage and processing are done by making recourse to PostgreSQL. In detail, a PostgreSQL relational database collects the PGHD, a set of SQL views implement the classical operators of descriptive statistics. The solution is parametric, so the interval of investigation can be customized according to physician's needs. In addition, an SQL trigger implements an alert each time a potential critical situation in the health status of the patient is identified.