Registro de saúde do paciente baseado em IoT

IoT based patient health record

This project will develop software that will take patient readings from sensors and send them to the main clinic, where doctors can view the data and analyze the patient's health remotely. We will do this using the FTP protocol and C#.

Required components
Required tools
Tools

  1. Visual Studio 2015 IDE
  2. FTP server

Circuit Diagram

Figure 1 Arduino Connection Diagram

Connect a button to pin number 7 on the Arduino UNO. Make it pull up and detect if the button is pressed down.

Technical information
The software collects data from the sensor and user inputs and then sends it to remote FTP files where a doctor can examine the details. Patient data is collected through Arduino serial communication, and data is sent to the FTP server using the FTP protocol.

In the background, data transfer and storage is done in Excel files.

Block diagram/algorithm

Figure 2 Network Diagram

How it works

  1. Starting the software:
    When opening the software, first enter the following details.

Figure 3 Login to the software

Username: The specific nursing staff username
Password: The password of the username above
Clinic Name: The name of the clinic in which the data needs to be saved. It is the remote location where the FTP file will be saved.
Device port: Temperature sensing unit port number
Server Address: This is the web address of the FTP server where the files are stored.

  1. Downloading the FTP file:
    If all the details are correct, the software will open and the FTP file for that specific clinic will be downloaded to local storage.
  1. Taking patient details

Figure 4 Collecting Patient Data

Now the software user can detail the patient, press the button connected to the Arduino, and it will take a sensor reading and write it in the details section automatically.

  1. Uploading the details to the FTP server
    When clicking the “send to doctor” button, the data is sent to the FTP server and saved there so that the doctor can view the data using the username “Sadmin” and password '123”.
  1. Selling the entries

Figure 5 Looking at server data

Once the data is there, the doctor from anywhere can enter the credentials and see the data present there.

Understanding the source code
The source code can be understood at some points.
There are three forms in the project. Its description is given below.
(please view/download the complete software files attached at the end of the article)

login cs
It takes care of logging into the system and checking usernames and passwords. Additionally, in the background, it downloads the FTP file to local storage to be accessed through the software.
The FTP file download is done within the DownloadFTP function called the FTP function. If all details are correct, open the home page.
Home.cs

Obtaining data from the Arduino UNO and the sensor is done via serial communication.

Inside a callback function that becomes active when some data is received on the serial port, we check if the data contains “temp:”, then we accept the data and store it in the software.
The data is stored within an Excel file in this format
Superadmin.cs
This form is used to show data stored in remote files, accessible only to the doctor. It uses an OleDDb connector which is used to extract data from the database and store Excel files.
The data is then displayed within a grid view style form.

So this is how we can use FTP communication to create the patient's health record and use it in real life.

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.