Skip to content

Didula98/e18-3yp-Patient-Monitoring-System-for-Ambulances

 
 

Repository files navigation

Project Overview

There’s no existing system to monitor the patients while they are taken to the hospital by emergency vehicles in Sri Lanka. In some scenarios, due to the lack of facilities and resources, patients are transferred from one hospital to another hospital. This can be inconvenient for both parties; the patient and the hospital. It might be a risk to the patient’s life as well. Even after admitting to the hospital, it may take some time to arrange things for the patient and check the status of the patient. Other than the test results, the Status and the condition of the patient are normally conveyed by a guardian of the patient and there can be reliability issues in such information.

These problems can be addressed separately by a real-time monitoring device for checking the status of the patient and a location tracking system for the ambulance which is connected to a cloud such that hospitals can get information and take decisions. As an example, they can monitor the real-time status of the patient (pulse rate, heart rate etc.) together with a summary report of the patient, and can get the predictions at which time a particular ambulance reaches their hospital. So that hospital staff will get enough time to do the necessary arrangements for that patient and allocate their staff appropriately. Not only that, when considering the emergency vehicle service side(ambulance) they can track the nearest available hospitals for this particular patient after submitting his/her pre-conditions. So, they can directly take patients to the appropriate hospitals without wasting the time.

Solution Architecture

final sol arc

Hardware and Software Designs

Hardware Components

NodeMCU ESP8266
nodemcu

Microcontroller is like brain of the system because it communicates with inputs and outputs and controls the entire operation of the system. Here we are using NodeMCU ESP8266 as the Microcontroller.It consists of inbuilt WIFI module. Reading longitude and latitude from GPS modem, reading health parameters of the patient from the sensors, desplaying them on a user interfaces and send these data to the cloud are the various functions of the Microcontroller.

GPS Modem NEO6MV2

gps

Main function of GPS modem is provide longitude and latitude of the ambulance to the Microcontroller. It receives data from satellite and transfer them into Microcontroller through serial communication. As ambulance moves along the way from patient’s home to hospital, the co- ordinates of ambulance location will change and these variations are given to Microcontroller.

Heart Rate Oxygen Pulse Sensor Module MAX30100
bpm

MAX30100 is a multipurpose sensor used for multiple applications. It is a heart rate monitoring sensor along with a pulse oximeter. The sensor comprises two Light Emitting Diodes, a photodetector, and a series of low noise signal processing devices to detect heart rate and to perform pulse oximetry.

Temperature Sensor Module DS18B20
ds18b20resized

DS18B20 digital temperature sensor works on a single bus and it has 64-bit ROM to store the serial number of component. It can get quite a few DS18B20 sensors connected to a single bus in parallel. With a microcontroller, you can control so many DS18B20 sensors that are distributed around a wide range.

Circuit Diagram & Pin Configuration

circuitdiagramNEW PINCONFIGURATION_new

Technology Stack

The technologies we used for build up our system is as follows.

  • For the cloud server system AWS IoT Core has been used which allows clients to publish and subscribe messages related to different topics.
  • There're main 3 categories as the clients. namely; Hardware device which programmed using Arduino IDE & C++, Web application and Mobiles Application which are creted usig Flutter.
  • All these 3 clients use MQTT protocol to communicate with the thing in IoT core and in there these messages are handled by MQTT message broker
  • Web application and mobile application retrieve data from database which created using Amazon DynamoDB through two gateways which implemented using Amazon API Gateway which consists of a collection of REST APIs
  • HTTP protocol is used in this process and relevant functions are implemented inside AWS Lambda to retrieve data from Amazon Dynamo DB

techstack

DataBase

In this system two main information has to be stored.

  • User Credential details which are usefull when login to the web application and the mobile application.
  • Information about Hospitals which areuseful when suggesting nearest hospitals and connecting with them.

User Credential Details

Device ID Password

Hopitals details

Hospital ID Contact No Hospital Name Lattitude Longitude

Mainly 3 AWS services are useful in the data retrieving & storing process in the database.

  • For the Database Amazon Dynamo DB which is fully managed, serverless, key-value NoSQL databasehas been used. It consists of built-in security, continuous backups, automated multi-Region replication, in-memory caching, and data import and export tools.
  • Functions to aceess the database are implemented inside AWS Lambda which lets to run code for virtually any type of application or backend service without managing a server.
  • To create and RESTful APIs which enables real-time two-way communication applications Amazon API Gateway is used. (Here REST APIs act as the front door for applications to access data, business logic, or functionality from the backend services)

lambda      db      gateway

UI Design

Mobile Application

1 2 3 4 5 6

Web Site

1 2 3 4 5 6 pdf

Wire frames

Mobile Application

1 2 3 4 5 6

Web Site

11 12
13 14

Testing

Testing Type Functionlities to be checked Software used
[Hardware Testing Input data from sensors Platform.io platformio
Web-Application Testing Login validation Flutter driver driver
Mobile Application Testing Login validation Flutter driver driver
API Testing GET ,DELETE ,PUT requests about users and hospitals Postman postman

Security Aspects

  • User credentials for both the end users (hospitals, medical officers)
  • Connection to the app is authorized by the device
  • MQTT - Authentication - AWS certificates
  • MQTT - Authorization - AWS Policies
  • HTTP - Authentication - AWS certificates
  • HTTP - Authorization - AWS Roles
  • Both are end-to-end encrypted

Detailed Budget

Item Quantity Price (LKR)
NodeMCU ESP8266 CP2102 1 2000
Temperature Sensor DS18B20 1 480
Heart rate & Oxygen sat. level sensor MAX30100 1 900
GPS Modem NEO6MV2 1 1700
GSM sensor SIM800L 1 2250
128 x 64 Oled mini display 0.96 inch 1 870
Female to female jumper wires(40pcs) 1 220
Push button, Switch 1 80
Copper board (5cm x 7cm) 1 250
4.7k Ohm resistor, LED strips 2 250
Outer cover & Other - 3000
Total 12000

Conclusion

Currently, there’s no system for real-time patient monitoring and updating the hospital from the ambulance exists. Normally medical officers/nurses in there will contact hospitals via mobile calls in critical situations which are not that reliable. And there’s no location tracking or time prediction system for ambulances that exists. Also, in case of finding a suitable hospital, ambulances prefer the nearest hospital or general hospital without considering the conditions or facilities available at the moment which will be caused previously mentioned issues. Considering the current situation regarding this matter, this project will be able to highly contribute to rebuilding this system.

Releases

No releases published

Packages

No packages published

Languages

  • Dart 54.2%
  • C++ 33.5%
  • CMake 8.2%
  • Python 1.3%
  • HTML 0.8%
  • Swift 0.7%
  • Other 1.3%