Fast Ambulance Database Mod

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Name : Paula Gawargious Malak Gorge

Login : GOR0096

1- Project specification:

Motivation:

In a world that is over populated and there’s no city that doesn’t suffer
from a traffic jams ,heart attacks and other accidents kills more and more
people and this can be solved by simply providing fast aiding to the
patients but how ?

By simply providing a smart system that checks people vital measurements


like heart beats rate and blood pressure and so on..

Roles:
The role with the highest privileges will be the system admin, who’s
responsible of management the system and monitor user activities
(Monitoring malicious activities especially from the paramedics) also upload
video tutorials for the paramedics . Furthermore, the system will be used by
paramedics and they will be the ones whom responses for emergencies and
finally Patient (or the case) the system will monitor their vitals and alarm the
paramedics when needed so basically the Patient will send emergency calls
when needed to the paramedics this is their only role in the system.
Inputs:
The system will mainly deal with patients who have emergencies and the
paramedic should response to these cases.

1. In case of system admin creating new tutorial : we will need to create a


tutorial (name, description), also we will need to create videos for this
tutorial so we will need (url, tutorial id) since the relation between
tutorials and videos is one to many.

2. In case of registering a new paramedic : we will need his (name, age ,


email , password) so he login into the system in the future.

3. In case of registering a new user we will need his (age, name, email ,
password).

4. In the case of patient vital readings are up normal : a case will be


created and we will need the paramedic ID since the cases have a one to
many relation with cases and also user id because the relation between
the user and cases is one too.

5. In the case of paramedic taking a tutorial : we will need to register him


into paramedics tutorials so we will need (paramedic id , tutorial id)
because the relation of paramedic to a tutorials is many to many.

6. In the case of paramedic watching a video tutorial : we will track the


percentage of the videos he watched of the tutorial in paramedics
tutorial and also we will track if the paramedic finished the tutorial or
not.

7. In the case of of paramedic completed a tutorial : we will create a


certification and we will need (issued at, paramedic id , tutorial id) also
there’s a relation between paramedic and certifications and it’s one to
many.
Outputs:

The system will show the list of cases after being saved in the cases table for
the paramedics with in 10 KM ,The cases table will save the GeoLocation for
the case and the system will compare this GeoLocation with the live
GeoLocation of the paramedic.

The system will to the case which paramedic is coming to save him after the
acceptance and also show the same result to the system admin.

The system will show the list of tutorials mandatory for the paramedic to
watch so he can be verified as a paramedic and each tutorial will have list of
videos which the paramedic will have to finish before get his certificate .

Finally a full data representation will be shown to the system admin like the
list of cases and the list of paramedics and certifications of paramedics and
etc..

Functions:
The main task of the system is provide free services and save cases life
through giving a quick assistance through a trained paramedic therefore we
will make sure that they’ve the proper training and they watched the right
tutorials through a cronjob which will update the paramedics table and
change is authorized to true if he posses the right courses and tutorials.
2- Data Analysis
Conceptual Data Model:
Relational Data Model
Data Dictionary:

Table Admins

Attribute Name Data Type Length Key Null IR Description


id INTEGER PRIMARY NO Automatically incremented Primary Key.
email TEXT 360 NO Email used for login.
password VARCHAR 60 NO Password is hashed by bcrypt algorithm
name VARCHAR 15 NO First and Last names combined

Table Certifications

Attribute Name Data Type Length Key Null IR Description


Id INTEGER PRIMARY NO Automatically incremented Primary Key.
issued_at DATETIME NO Timestamp for certifications
paramedic_id INTEGER NO Foreign (paramedics)
tutorial_id INTEGER NO Foreign (tutorials)

Table Paramedics

Attribute Name Data Type Length Key Null IR Description


id INTEGER PRIMARY NO Automatically incremented Primary Key.
email TEXT 360 NO Email used for login.
password VARCHAR 60 NO Password is hashed by bcrypt algorithm.
name VARCHAR 15 NO First and Last names combined.
date_of_birth DATE NO Date when paramedic was born.

Table Users

Attribute Name Data Type Length Key Null IR Description


id INTEGER PRIMARY NO Automatically incremented Primary Key.
email TEXT 360 NO Email used for login.
password VARCHAR 60 NO Password is hashed by BCRYPT algorithm.
name VARCHAR 15 NO First and Last names combined.
date_of_birth DATE NO Date when paramedic was born.

Table Paramedics_Tutorials

Attribute Name Data Type Length Key Null IR Description


paramedic_id INTEGER PRIMARY NO Foreign (paramedics)
tutorial_id INTEGER PRIMARY NO Foreign (tutorials)
is_finished BOOLEAN NO Boolean indicator to indicate if tutorial is finished or not.
finished_percentage INTEGER PRIMARY NO YES Progress of the tutorial for one paramedic.
Table Cases

Attribute Name Data Type Length Key Null IR Description


id INTEGER PRIMARY NO Automatically incremented Primary Key.
paramedic_id INTEGER NO Foreign (paramedics).
user_id INTEGER NO Foreign (users).
happened_at DATETIME NO Timestamp for creation of case.
location_lat DECIMAL 8,6 NO Latitude of location in decimal points.
location_long DECIMAL 9,6 NO Longitude of location in decimal points.

Table Tutorials

Attribute Name Data Type Length Key Null IR Description


id INTEGER PRIMARY NO Automatically incremented Primary Key.
name VARCHAR 15 NO Name of the tutorial.
description TEXT NO Description for the tutorial content.

Table Videos

Attribute Name Data Type Length Key Null IR Description


id INTEGER PRIMARY NO Automatically incremented Primary Key.
url TEXT NO URL for the video tutorial.
tutorial_id INTEGER NO Foreign (tutorials).

Integrity resitrications:
location_lat : must follow latitude specific format 8 digits before the point and 6 digits after the point.
location_long : must follow longitude specific format 9 digits before the point and 6 digits after the point.
finished_percentage : must have max value of 100.

You might also like