This project consists of 2 main elements.
• On the one hand, an electronic device (called eDoctor) for the patient who is in a state of recovery, either in a hospital, clinics, isolation centers or at home, which consists of an M5stack ESP32 GRAY, a GSM SIM800 modem, a protoboard module, and a YS2000A sensor (and an optional LoraWan module will be added soon).
• On the other hand, a web system (called mejotAR) that concentrates the information received from all the patients who are monitored with the eDoctor device which consists of an MQTT broker (Mosquitto), a database (influxDB) and a web viewer (Grafana).
The eDoctor device is provided to the recovering patient (who is at home, in an isolation center, or in a hospital). Before handing over the eDoctor device to the patient, the doctor performs some configurations through the mejorAR web application, where data such as name, surname, age, gender, frequency of measurements, history, etc. are loaded. These settings are written to a JSON file in the M5Stack's flash memory.
In order to be configured, the eDoctor goes into "configuration mode". In this mode, a random code is displayed on the screen (Security PIN). This code is necessary to be able to identify the device to configure from the application. In this way, a high level of security is achieved when handling the equipment, since it is necessary to know the value of this PIN when configuring the eDoctor.
When the device is powered on, it reads those JSON file settings from Flash memory and sends them to the server using MQTT, where the new patient table is automatically created in the database.
To achieve synchronism with the measurement schedules in the eDoctor, the time is configured by NTP.
When it is the time to perform a measurement predetermined by the doctor, the eDoctor alerts the user audibly and visually. At this time, the device indicates step-by-step procedures to be followed by the patient to put on the sensors and start measurements.
When the eDoctor considers that the measurement is valid, it sends them to the server. For this, it considers that the temperature is stabilized (and in a coherent range) and that the SpO2 and heart rate sensor enable the measurement.
The patient can also take a measurement at any time and send it to the server. You can also view the results of the last measurement taken.
All the measurements of all the patients are sent by MQTT to the mejorAR server (private server in the cloud), where a Python script sends the data to an InfluxDB database, and they are visualized in Grafana.
The mejorAR system has 2 panels, one where the table of all patients is shown, highlighting those that have measurements with results in certain ranges, and another where each individual patient is detailed, with graphs of the measurement history and other considerations.
Both the communication by MQTT, the database, and the access to the web application, have security methods (authentication, encryption) due to the fact that the patient data is considered confidential.
Results:
Measurements were achieved with a resolution of 1% for SpO2, 1 BPM for Pulse Rate and 0.1ºC for temperature. The full time to carry out the measurements and send the data to the cloud is between 2 and 4 minutes, depending mainly on the temperature measurement.
Sensor accuracies per manufacturer's specifications are:
• SPO2 Accuracy: ± 2% (70-100%)
• Pulse Rate ± 1% (25-250BPM)
• Temperature: 0.2 ° C
With this development, it is possible for doctors to have regularly updated information on the health status of basic parameters of patients, thus reducing the time of exposure to the virus. In addition, a database is nurtured, and in this way it is possible to make advance decisions based on the experiences left by previous patients before the evolution of the virus.
A fully functional prototype has been achieved to demonstrate the capacity of the developed system.
Comments