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

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.
is_accepting BOOLEAN 0 NO Accepting cases if the nearest automatically

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 restrictions:
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.
Functional Analysis:

1. User Management:
Responsibility: User
• 1.A: Registering a new user: The system should allow users to register by providing their name, age,
email, and password.
• 1.B: User login: The system should allow registered users to log in using their email and password.
• 1.C: Send SOS signal: The User should be able to send an SOS signal to the nearby Paramedics with
longitude and latitude.
• 1.D: Get user data : The System should return the user data after login.

2. Paramedic Management:
Responsibility: Paramedic.
• 2.A: Registering a new paramedic: The system should allow the admin to register new paramedics by
providing their name, age, email, and password and assign all of the tutorials available to the
paramedics.
• 2.B: Paramedic login: The system should allow registered paramedics to log in using their email and
password.
• 2.C: Watching Video Tutorial: The system should allow the paramedic to see video tutorials and
complete them.
• 2.E: Calculating the percentage of tutorial: The system should provide the percentage of completion of
the tutorial.
• 2.F: Get list of video tutorials for each tutorial: The system should provide list of tutorial per each
tutorial with progress to the paramedic.
• 2.G: Get list of tutorials: The system should provide list of tutorials combined with progress of each
tutorial
• 2.H: Get Paramedic data: The system should return paramedic data after login.
• 2.L: Accept Case : The system should allow the paramedic to accept the cases if still not accepted and
also disable auto accept if it’s on.
• 2.M: Get list of Active Cases: The system should allow the paramedic to get list of active cases within
10km from his position.
• 2.N: Update Auto Accept: The system should update the auto update to YES or NO
3. Tutorial Management:
Responsibility: Paramedic and Admin.
• 3.A: Creating a new tutorial: The system should allow the admin to create new tutorials by providing a
name and description and assign this video tutorial to all of the paramedics. Responsibility: Admin only.
• 3.B: Adding videos to a tutorial: The system should allow the admin to add videos to a tutorial by
providing a URL and tutorial ID. Responsibility: Admin only
• 3.C: Paramedic tutorial registration: The system should allow paramedics to register for tutorials by
providing their ID and tutorial ID. Responsibility: Paramedic

4. System Administration:
Responsibility: Admin.

4.A: The System should show the statistics of cases compared to the paramedics per year and show it
inside of a Graph in side of the main page.

4.B: The System should show the list of paramedics with their tutorial which is finished and videos and
when the tutorial is finished and when they got the certification of complication of the tutorial and this
query have some filters like happened in and paramedic name and case name and case description and
all of these filters are optional.

4.C: Getting the paramedics with their tutorials and video tutorials associated with these tutorials and
also check if it’s finished or not and get with finished or not and with tutorial name and paramedic
name and finished at but all of these filters are optional.

4.D: Detach paramedic from tutorial and video.


Detail Description of Functions
Function System Administration:

4.A-Get Statistics of the paramedics:


Inputs:
• #startDate – start date is constrain to show statistic from the beginning of
specific date also can be null
• #endDate – end date is constrain to show statistic from before the end of
specific date also can be null

This function should simply get statistics of the paramedics compared to the number of cases
per each year.
4.B-Get List of the paramedics with tutorials:
Inputs:
• #paramedicName – Name of paramedic – not mandatory can be null

• #tutorialName – Name of tutorial – not mandatory can be null

• #videoName – Name of tutorial – not mandatory can be null

• #IsFinished – is tutorial finished – not mandatory can be null

• #FinishedPercentage – finished percentage of tutorial – not mandatory can be


null

• #Offset – means get data start from specific count – mandatory

• #Limit – many how many rows we should return – mandatory

This function should simply get list of paramedics with their tutorials and video .
4.C-Get Cases with paramedics :
Inputs:
• #paramedicName – Name of paramedic – not mandatory can be null

• #caseName – Name of the case – not mandatory can be null

• #caseDescription – Description of the case – not mandatory can be null

• #HappenedAt – Happened At is the date of when the case happened – not


mandatory can be null

The function should get the list of cases along side with the paramedic saved
the case and the date of the case.
3.A-Create new tutorial:
Inputs:
• #name – Name of the tutorial – mandatory.

• #description – Description of the tutorial – mandatory.

• #urlsOfVideos – URLs with the count of the videos – mandatory.

• #HappenedAt – Happened At is the date of when the case happened – not


mandatory can be null

The Function should create tutorials and create videos and associate it with
them and finally assign the tutorials to the paramedics
2.A: Registering a new paramedic
Inputs:
• #password – password of the paramedic
• #email – email of the paramedic
• #date_of_birth – date of birth of the paramedic
• #name – name of the paramedic

The function is being represented as a transaction and this transaction is


creating a paramedic and associate all of the tutorials to this paramedic.
1.C: Send SOS signal:

Inputs:
• #lat – the latitude of case
• #long – the longitude of case
• #description – description for the case.
• #name – name of the user

The function should send A SOS signal to the paramedics but also the transaction
will search the database of the nearest by paramedic that have is accepting = 1
if found assign the case should be assigned on the paramedic immediately.

You might also like