0% found this document useful (0 votes)
72 views44 pages

Project Theseas

This document is a project report submitted by 4 students for their Bachelor of Engineering degree in Electronics and Communication Engineering at Government College of Engineering, Bargur. It presents an Ambulance Alerting System as their project. The system aims to reduce traffic time for ambulances by sending messages to traffic police about an approaching ambulance so they can clear traffic. This will help save critical time for patients to receive treatment during the golden hour after an accident. The report includes sections on planning and analysis, tools used, the database schema, and a user guide for different users of the system like ambulance drivers, traffic police, and hospitals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views44 pages

Project Theseas

This document is a project report submitted by 4 students for their Bachelor of Engineering degree in Electronics and Communication Engineering at Government College of Engineering, Bargur. It presents an Ambulance Alerting System as their project. The system aims to reduce traffic time for ambulances by sending messages to traffic police about an approaching ambulance so they can clear traffic. This will help save critical time for patients to receive treatment during the golden hour after an accident. The report includes sections on planning and analysis, tools used, the database schema, and a user guide for different users of the system like ambulance drivers, traffic police, and hospitals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

Ambulance Alerting System

A Project Report

Submitted by
CIBI.P 1912106
NIYASKHAN.M 1912129
SIVAPRAKASH.T 1912144
NARASIMMAN.R 2012907

Guided BY:
Dr.A.CHARLES M.E.,Ph.D

In partial fulfilment for the award of the degree


of
Bachelor of Engineering
in
Electronics and Communication Engineering

Government College of Engineering- Bargur


(Autonomous)
Krishnagiri-635104, Tamil Nadu
Anna University: Chennai-600025

i
BONAFIDE CERTIFICATE
Certificated that this project work-II “Ambulance Alerting System” is
the bonafide work done by the following students under my supervision

CIBI.P 1912106
NIYASKHAN.M 1912129
SIVAPRAKASH.T 1912144
NARASIMMAN.R 2012907

SIGNATURE SIGNATURE
Dr.A.CHARLES M.E.,Ph.D.,(AP/ECE) Dr.S.LETITA M.E.,Ph.D.,
Supervisor, Head of the Department,
Department of ECE, Department of ECE,
Government college of Engineering, Government college of Engineering,
Bargur-635 104 Bargur-635 104

Submitted for project work-II viva-voce examination held on


…..…..………………… at Government College of Engineering, Bargur-635104.

INTERNAL EXAMINER EXTERNAL EXAMINER

ii
ACKNOWLEDGEMENT
We feel glad to take this opportunity to cordially acknowledge a number of people who
provided us with great support during our project.

We would like to express our deep sense of gratitude to our respected Principal
Dr.R.VIJAYAN, M.E., Ph.D., who has bestowed his kind grace and affection on us in
accomplishing this project.

Sincere thanks to Dr.S.LETITA M.E., Ph.D., Head of the Department of Electronics and
Communication Engineering, Bargur on providing facilities to do the project work and utilise
all the facilities in this college.

We would like to thank our project Coordinator, R.RANJITH M.E., Assistant Professor ,
Department of Electronics and Communication Engineering, who guided us throughout the
entire phase of our projects with his esteemed presence . It is his motivation and guidance
which made us explore our project.

It is our opportunity to express gratitude and sincere thanks to our guide Dr.A.CHARLES
M.E.,Ph.D.,(AP/ECE) Supervisor who gave us the motivation to do our project. We are also
thankful to all the faculty members and laboratory assistants for our department for their
constructive guidance and encouragement.

Finally, we thank our parents, teaching, non-teaching staff and friends who helped us in
completing this project successfully.

iii
TABLE OF CONTENTS

ACKNOWLEDGEMENT iii

TABLE OF FIGURE vi

LIST OF TABLES vii

ABSTRACT ix

CHAPTER 1: Introduction of Ambulance Alerting System 1

1.1. Introduction 1

1.2. Problem Statement 1

1.3. Aim of the project 2

1.4. Motivation 2

CHAPTER 2: Planning and Analysing 3

2.1. Project User Interaction Analysis: 3

2.2. Flow Diagram 4

2.3. Block Diagram 5

CHAPTER 3: Tools used 7

3.1. Front-End 8

3.1.1. HTML (Hyper Text Markup Language) 8

3.1.2. CSS (Cascade Style Sheet) 9

3.1.3. JavaScript 10

3.2. Back-end 11

3.2.1. Python 11

3.2.2. Flask 12

3.2.3. MySQL 13

3.3. ngrok 17

3.4. MapMyIndia 17

3.4.1. MapMyIndia Direction Plugin 18


iv
3.4.2. MapMyIndia NearBy Search Plugin 18

3.5. Discord 19

3.5.1. Discord Server 19

3.5.2. Discord Webhook 20

CHAPTER 4: Project - Database Schema 22

4.1. MySQL Ambulance alerting database Schema 22

CHAPTER 5: User Guide 25

5.1. Register User 25

5.2. User Login 26

5.3. Ambulance driver page guide 27

5.4. Traffic Police page guide 29

5.5. Hospital page user guide 30

CHAPTER 6: Result 31

CHAPTER 7: Limitation and Future Scope 33

7.1. Limitation 33

7.2. Future Scope 33

CHAPTER 8: Conclusion 34

REFERENCE 35

v
Page No
TABLE OF FIGURE
Fig. 1.2.1: Ambulance Alerting System 1
Fig. 2.2.1: Flow diagram 4
Fig. 2.3.1: Block Diagram 6
Fig. 3.4.2: MapMyIndia Direction Plugin 18
Fig. 3.4.1: MapMyIndia Nearby plugin 18
Fig. 5.1.1: User Registration page for Admin 25
Fig. 5.1.2: Register Page for Hospital 25
Fig. 5.1.3: Register Page for Traffic Police 25
Fig. 5.2.1: Login Page 26
Fig. 5.2.2: Traffic Police Page 26
Fig. 5.2.3: Hospital Page 26
Fig. 5.2.4: Ambulance Driver Page 27
Fig. 5.3.1: Asking for location access 27
Fig. 5.3.2: Nearby Hospitals in the ambulance driver area 28
Fig. 5.3.3: Direction to Hospital 28
Fig. 5.3.4: From-to form for ambulance driver 28
Fig. 5.3.5: Message to hospital 29
Fig. 5.3.6: Message to Traffic police 29
Fig. 5.3.7: Show Road and hospital availability status 29
Fig. 5.4.1: Traffic police page guide 30
Fig. 5.5.1: Hospital page guide 30
Fig. 5.5.1: Admin Page result 31
Fig. 5.5.2: Ambulance driver page result 32
Fig. 5.5.3: Message is sent to the traffic police and hospital 32
Fig. 5.5.4: Hospital Page 32
Fig. 5.5.5: Traffic police page result 32

vi
Page No
LIST OF TABLES
Table 2.1: Project Analysis 3
Table 3.1: Tools used in this project 7
Table 4.1: User Table Description 22
Table 4.2: User Table Example 22
Table 4.3: Traffic signal table description 23
Table 4.4: Traffic signal table example 23
Table 4.5: Hospital table description 24
Table 4.6: Traffic signal table example 24

vii
LIST OF ABBREVIATION
S. No. Abbreviation Full Form

1 HTML Hyper Text Markup Language

2 CSS Cascading Style Sheet

3 JS JavaScript

4 SQL Structured Query Language

5 DBMS Data Base Management System

6 GPS Global Positioning System

7 UI User Interface

8 UX User Experience

viii
ABSTRACT
It is a common sight at busy traffic junctions where ambulances struggle to find a
way to carry patients for treatment during the golden hour. It even happens in this world with
the technology that able to send satellites to space. By reducing the traffic time on the roads
for the ambulance we may able to save the patients. If we can able to save that time, doctor
utilise those time to give first aid and diagnose the problem. The problem is that the traffic
police do not aware of the ambulance that stuck in the traffic. Our concept is to send a message
about that the ambulance coming way to the traffic police. So that, they can clear the traffic on
that way, so the ambulance doesn’t need to wait for in the traffic. It is helpful for the highly
populated and highly traffic cities like Chennai, Coimbatore, Bangalore, etc. According to a
report published by Times of India about 146,133 people were killed in road accidents in India
in the year 2016. Unfortunately, about 30% of deaths are caused due to delayed ambulance.
Another Indian Government data shows, more than 50% of heart attack cases reach hospital
late, which can constitute unavailability of ambulances too but majority of it is due to patients
stuck in traffic.

ix
CHAPTER 1
1. Introduction of Ambulance Alerting System

1.1. Introduction

Ambulance is used to take the patient to the hospital at maximum fast that it could
take the patient to the hospital. But in the high populated city or high traffic city, some
ambulance struck at the traffic that is unnoticed by the traffic police to make a way for it.
Taking the patients early to the hospital will increase the probability of the life of the patient.
We need some technology or system that send the information to the traffic police regarding
the ambulance is coming in this route so they can make the way for it and ambulance can able
to reach the hospital early. To solve this, we introduce an Ambulance Alerting System which
will able to send the ambulance information to the traffic police.

1.2. Problem Statement

It is a common sight at busy traffic junctions where ambulances struggle to find a


way to carry patients for treatment during the golden hours. Employing a system that can send
an ambulance coming information to the traffic police, so he can able to give path. Which help
ambulance to reach hospital early.

Fig. 1.2.1 Ambulance Alerting System

1
1.3. Aim of the project

Aim of this project is take the patient to the hospital in ambulance as early by not get
struck in the traffic by sending the ambulance coming information to the traffic police, so
he/she can make the way for it. This may save the patient's life.

1.4. Motivation

Taking the patient to the hospital as early as possible can able to save the life of the
patient. Ambulance plays an important role in taking the patients to the hospital. But the traffic
in the high traffic city struck the ambulance in the traffic. A report published in Times of India
about 146,133 people were killed in road accidents in India in the year 2016. Unfortunately,
about 30% of deaths are caused due to delayed ambulance. Another Indian government data
shows more than 50% of heart attack patients reach hospital late, which can constitute
unavailability of ambulances too but majority of it is due to patients’ stocks in traffic. It
motivated us to do the Ambulance alerting system.

2
CHAPTER 2
2. Planning and Analysing

2.1. Project User Interaction Analysis:

Application
interacting What they do? What the Application need to do?
person

● Application shows the best


hospital to go fast and it need
show based on the availability of
● Ambulance Driver can able the bed and the doctor in the
to enter the type of hospital hospital
(Heart, Brain, General
Ambulance Hospital. Etc), current and ● It shows the number of signals in
Driver destination location between and send the message to
the traffic police to clear the
● Able to see the direction to traffic in those signals
the destination
● It needs to send the information
to the required hospital in the
destination location.

● Need to clear the traffic in


the ambulance travelling
● Send the details about the
road to make ambulance
ambulance travelling road details
reach the hospital early
to make them free by the traffic
Traffic Police ● If the traffic is high traffic police
police need to send the road
● Send the high traffic details so
is busy message to the
that the ambulance can take the
ambulance drive so the
alternative path
ambulance drive choose the
alternative road

● They need to get the patient


details and make the first
aid ready and the bed ready
● Send the details about the patient
for the patient
to the hospital
Hospital ● They need to send message
● Send the bed availability details
if the hospital is full so the
to the ambulance driver
ambulance driver can take
the patient to the next
available hospital
Table 2.1: Project Analysis
3
2.2. Flow Diagram

Fig. 2.2.1: Flow diagram

4
When user login to our website it checks whether the user is registered or not, if not
it shows invalid login credentials. If the user record is found in the database, then it checks
whether the user is ambulance driver. If no then it checks whether the user is hospital. If yes it
loads the hospital page and the hospital can able to update whether the hospital has vacancy or
not. If user is not the hospital, then it loads traffic police page and the traffic police can able to
update whether traffic is free or not. If the user is ambulance driver, then the ambulance driver
page will be loaded. Then it will access the location, then loads the MapMyIndia plugin for
direction and nearby search plugin, displays the hospital availability and traffic status in signals
in between the destination.

2.3. Block Diagram

The Home page of the of Ambulance alerting system is login page. Based on the
login details, the server automatically redirects the user to the ambulance driver page, traffic
police page, hospital page respectively. The ngrok makes the localhost website to internet.
Python (flask server) is used to serve the html, CSS, js and also act as the backend. In
ambulance driver page they can able to see the nearby hospitals and the direction for that
hospital, this is done using the MapMyIndia Direction API and Nearby API. Ambulance driver
can able to select the destination and current location to send the information to traffic police
and hospital discord channels using a discord webhook. Ambulance driver can able to see the
list of hospital in the destination and the bed availability of that hospital in the webpage.
Hospital can change the hospital bed availability status to yes or no from there page. Similarly,
Traffic police can change the road status to free or busy based on the traffic from the webpage.
MySQL is used to store the data in form of the table. Using the Admin page we can register
the ambulance driver, traffic police, hospital. So, they able to login on the website and perform
the necessary action.

5
Fig. 2.3.1: Block Diagram

6
CHAPTER 3
3. Tools used

S.NO Tools Usage in this project

Front-End Visual content that appears in the screen

3.1.1 HTML Used to display the content in the webpage


3.1
3.1.2 CSS Used to style the webpage

3.1.3 JavaScript Used to make website functionable

Back-End Process the instruction

3.2.1 Python The back-end code is written in Python

3.2
3.2.2 Flask Flask is the framework of python that serve
front-end

3.2.3 MySQL Used to store data

3.3 ngrok Used to serve the localhost to internet

MapMyIndia Map tool

3.4.1 MapMyIndia Used to give direction to the ambulance


Direction Plugin driver
3.4
3.4.2 MapMyIndia Used to give nearby hospital to ambulance
Nearby Search driver
Plugin

Discord Discord message app

3.5.1 Discord Server Used to send and receive message in the


3.5 discord app

3.5.2 Discord Webhook Used to send message from python to the


discord server
Table 3.1: Tools used in this project

7
3.1. Front-End

Front-end web development, also known as client-side development is the practice


of producing HTML, CSS and JavaScript for a website or Web Application so that a user can
see and interact with them directly. The challenge associated with front end development is
that the tools and techniques used to create the front end of a website change constantly and so
the developer needs to constantly be aware of how the field is developing.

The objective of designing a site is to ensure that when the users open up the site,
they see the information in a format that is easy to read and relevant. This is further complicated
by the fact that users now use a large variety of devices with varying screen sizes and
resolutions thus forcing the designer to take into consideration these aspects when designing
the site. They need to ensure that their site comes up correctly in different browsers (cross-
browser), different operating systems (cross-platform) and different devices (cross-device),
which requires careful planning on the side of the developer.

3.1.1. HTML (Hyper Text Markup Language)

The Hypertext Markup Language or HTML is the standard markup language for
documents designed to be displayed in a web browser. It can be assisted by technologies such
as Cascading Style Sheets (CSS) and scripting languages such as JavaScript.

Web browsers receive HTML documents from a web server or from local storage
and render the documents into multimedia web pages. HTML describes the structure of a web
page semantically and originally included cues for the appearance of the document.

HTML elements are the building blocks of HTML pages. With HTML constructs,
images and other objects such as interactive forms may be embedded into the rendered page.
HTML provides a means to create structured documents by denoting structural semantics for
text such as headings, paragraphs, lists, links, quotes, and other items. HTML elements are
delineated by tags, written using angle brackets. Tags such as <img /> and <input /> directly
introduce content into the page. Other tags such as <p> surround and provide information about
document text and may include other tags as sub-elements. Browsers do not display the HTML
tags but use them to interpret the content of the page.

HTML can embed programs written in a scripting language such as JavaScript, which
affects the behaviour and content of web pages. The inclusion of CSS defines the look and

8
layout of content. The World Wide Web Consortium (W3C), former maintainer of the HTML
and current maintainer of the CSS standards, has encouraged the use of CSS over explicit
presentational HTML since 1997. A form of HTML, known as HTML5, is used to display
video and audio, primarily using the <canvas> element, in collaboration with JavaScript.

3.1.2. CSS (Cascade Style Sheet)

Cascading Style Sheets (CSS) is a style sheet language used for describing the
presentation of a document written in a markup language such as HTML or XML (including
XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript.

CSS is designed to enable the separation of content and presentation, including


layout, colours, and fonts. This separation can improve content accessibility; provide more
flexibility and control in the specification of presentation characteristics; enable multiple web
pages to share formatting by specifying the relevant CSS in a separate .CSS file, which reduces
complexity and repetition in the structural content; and enable the .CSS file to be cached to
improve the page load speed between the pages that share the file and its formatting.

Separation of formatting and content also makes it feasible to present the same
markup page in different styles for different rendering methods, such as on-screen, in print, by
voice (via speech-based browser or screen reader), and on Braille-based tactile devices. CSS
also has rules for alternate formatting if the content is accessed on a mobile device.

The name cascading comes from the specified priority scheme to determine which
style rule applies if more than one rule matches a particular element. This cascading priority
scheme is predictable.

The CSS specifications are maintained by the World Wide Web Consortium (W3C).
Internet media type (MIME type) text/CSS is registered for use with CSS by RFC 2318 (March
1998). The W3C operates a free CSS validation service for CSS documents.

In addition to HTML, other markup languages support the use of CSS including
XHTML, plain XML, SVG, and XUL.

9
3.1.3. JavaScript

JavaScript, often abbreviated as JS, is a programming language that is one of the core
technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites
use JavaScript on the client side for webpage behaviour, often incorporating third-party
libraries. All major web browsers have a dedicated JavaScript engine to execute the code on
users' devices.

JavaScript is a high-level, often just-in-time compiled language that conforms to the


ECMAScript standard. It has dynamic typing, prototype-based object-orientation, and first-
class functions. It is multi-paradigm, supporting event-driven, functional, and imperative
programming styles. It has application programming interfaces (APIs) for working with text,
dates, regular expressions, standard data structures, and the Document Object Model (DOM).

The ECMAScript standard does not include any input/output (I/O), such as
networking, storage, or graphics facilities. In practice, the web browser or other runtime system
provides JavaScript APIs for I/O.

JavaScript engines were originally used only in web browsers, but are now core
components of some servers and a variety of applications. The most popular runtime system
for this usage is Node.js.

Although Java and JavaScript are similar in name, syntax, and respective standard
libraries, the two languages are distinct and differ greatly in design.

The use of JavaScript has expanded beyond its web browser roots. JavaScript engines
are now embedded in a variety of other software systems, both for server-side website
deployments and non-browser applications. Initial attempts at promoting server-side JavaScript
usage were Netscape Enterprise Server and Microsoft's Internet Information Services, but they
were small niches. Server-side usage eventually started to grow in the late 2000s, with the
creation of Node.js and other approaches. Electron, Cordova, React Native, and other
application frameworks have been used to create many applications with behaviour
implemented in JavaScript. Other non-browser applications include Adobe Acrobat support for
scripting PDF documents and GNOME Shell extensions written in JavaScript. JavaScript has
recently begun to appear in some embedded systems, usually by leveraging Node.js.

10
3.2. Back-end

3.2.1. Python

Python is a high-level, general-purpose programming language. Its design


philosophy emphasizes code readability with the use of significant indentation. Python is
dynamically-typed and garbage-collected. It supports multiple programming paradigms,
including structured (particularly procedural), object-oriented and functional programming. It
is often described as a "batteries included" language due to its comprehensive standard library.
Guido van Rossum began working on Python in the late 1980s as a successor to the ABC
programming language and first released it in 1991 as Python 0.9.0. Python 2.0 was released
in 2000 and introduced new features such as list comprehensions, cycle-detecting garbage
collection, reference counting, and Unicode support. Python 3.0, released in 2008, was a major
revision that is not completely backward-compatible with earlier versions. Python 2 was
discontinued with version 2.7.18 in 2020.Python consistently ranks as one of the most popular
programming languages.

Python can serve as a scripting language for web applications, e.g., via mows for the
Apache webserver. With Web Server Gateway Interface, a standard API has evolved to
facilitate these applications. Web frameworks like Django, Pylons, Pyramid, Turnovers,
web2py, Tornado, Flask, Bottle, and Zopf support developers in the design and maintenance
of complex applications. Pyjs and IronPython can be used to develop the client-side of Ajax-
based applications. SQLAlchemy can be used as a data mapper to a relational database. Twisted
is a framework to program communications between computers, and is used (for example) by
Dropbox. Libraries such as NumPy, SciPy, and Matplotlib allow the effective use of Python in
scientific computing,with specialized libraries such as Biopython and Astropy providing
domain-specific functionality. SageMath is a computer algebra system with a notebook
interface programmable in Python: its library covers many aspects of mathematics, including
algebra, combinatorics, numerical mathematics, number theory, and calculus.OpenCV has
Python bindings with a rich set of features for computer vision and image processing. Python
is commonly used in artificial intelligence projects and machine learning projects with the help
of libraries like TensorFlow, Keras, Pytorch, and Scikit-learn. As a scripting language with a
modular architecture, simple syntax, and rich text processing tools, Python is often used for
natural language processing.Python can also be used to create games, with libraries such as
Pygame, which can make 2D games. Python has been successfully embedded in many software

11
products as a scripting language, including in finite element method software such as Abaqus,
3D parametric modelers like FreeCAD, 3D animation packages such as 3ds Max, Blender,
Cinema 4D, Lightwave, Houdini, Maya, modo, MotionBuilder, Softimage, the visual effects
compositor Nuke, 2D imaging programs like GIMP,Inkscape, Scribus and Paint Shop Pro,and
musical notation programs like scorewriter and capella. GNU Debugger uses Python as a pretty
printer to show complex structures such as C++ containers. Esri promotes Python as the best
choice for writing scripts in ArcGIS. It has also been used in several video games, and has been
adopted as first of the three available programming languages in Google App Engine, the other
two being Java and Go.Many operating systems include Python as a standard component. It
ships with most Linux distributions, AmigaOS 4 (using Python 2.7), FreeBSD (as a package),
NetBSD, and OpenBSD (as a package) and can be used from the command line (terminal).
Many Linux distributions use installers written in Python: Ubuntu uses the Ubiquity installer,
while Red Hat Linux and Fedora Linux use the Anaconda installer. Gentoo Linux uses Python
in its package management system, Portage. Python is used extensively in the information
security industry, including in exploit development. Most of the Sugar software for the One
Laptop per Child XO, developed at Sugar Labs since 2008, is written in Python. The Raspberry
Pi single-board computer project has adopted Python as its main user-programming language.
LibreOffice includes Python and intends to replace Java with Python. Its Python Scripting
Provider is a core feature since Version 4.0 from 7 February 2013.

3.2.2. Flask

Flask is a micro web framework written in Python. It is classified as a


microframework because it does not require particular tools or libraries. It has no database
abstraction layer, form validation, or any other components where pre-existing third-party
libraries provide common functions. However, Flask supports extensions that can add
application features as if they were implemented in Flask itself. Extensions exist for object-
relational mappers, form validation, upload handling, various open authentication technologies
and several common framework related tools. Applications that use the Flask framework
include Pinterest and LinkedIn.

Components

The microframework Flask is part of the Pallets Projects (formerly Pocoo), and based
on several others of them, all under a BSD license.

12
Werkzeug Werkzeug (German for "tool") is a utility library for the Python programming
language for Web Server Gateway Interface (WSGI) applications. Werkzeug can instantiate
objects for request, response, and utility functions. It can be used as the basis for a custom
software framework and supports Python 2.7 and 3.5 and later.

Jinja Main: Jinja (template engine) Jinja, also by Ronacher, is a template engine for the Python
programming language. Similar to the Django web framework, it handles templates in a
sandbox.

MarkupSafe MarkupSafe is a string handling library for the Python programming language.
The eponymous MarkupSafe type extends the Python string type and marks its contents as
"safe"; combining MarkupSafe with regular strings automatically escapes the unmarked
strings, while avoiding double escaping of already marked strings.

ItsDangerous: ItsDangerous is a safe data serialization library for the Python programming
language. It is used to store the session of a Flask application in a cookie without allowing
users to tamper with the session contents.

Features of flask

● Development server and debugger


● Integrated support for unit testing
● RESTful request dispatching
● Uses Jinja templating
● Support for secure cookies (client side sessions)
● 100% WSGI 1.0 compliant
● Unicode-based
● Complete documentation
● Google App Engine compatibility
● Extensions available to extend functionality

3.2.3. MySQL

MySQL is an open-source relational database management system (RDBMS). Its


name is a combination of "My", the name of co-founder Michael Widenius's daughter My, and
"SQL", the abbreviation for Structured Query Language. A relational database organizes data
into one or more data tables in which data may be related to each other; these relations help

13
structure the data. SQL is a language programmers use to create, modify and extract data from
the relational database, as well as control user access to the database. In addition to relational
databases and SQL, an RDBMS like MySQL works with an operating system to implement a
relational database in a computer's storage system, manages users, allows for network access
and facilitates testing database integrity and creation of backups. MySQL is free and open-
source software under the terms of the GNU General Public License, and is also available under
a variety of proprietary licenses. MySQL was owned and sponsored by the Swedish company
MySQL AB, which was bought by Sun Microsystems (now Oracle Corporation). In 2010,
when Oracle acquired Sun, Widenius forked the open-source MySQL project to create
MariaDB. MySQL has stand-alone clients that allow users to interact directly with a MySQL
database using SQL, but more often, MySQL is used with other programs to implement
applications that need relational database capability. MySQL is a component of the LAMP web
application software stack (and others), which is an acronym for Linux, Apache, MySQL,
Perl/PHP/Python. MySQL is used by many database-driven web applications, including
Drupal, Joomla, phpBB, and WordPress. MySQL is also used by many popular websites,
including Facebook, Flickr, MediaWiki, Twitter, and YouTube.

Feature:

MySQL is offered under two different editions: the open source MySQL Community
Server and the proprietary Enterprise Server. MySQL Enterprise Server is differentiated by a
series of proprietary extensions which install as server plugins, but otherwise shares the version
numbering system and is built from the same code base.

Major features as available in MySQL 5.6:

● A broad subset of ANSI SQL 99, as well as extensions


● Cross-platform support
● Stored procedures, using a procedural language that closely adheres to SQL/PSM
● Triggers
● Cursors
● Updatable views
● Online Data Definition Language (DDL) when using the InnoDB Storage Engine.
● Information schema
● Performance Schema that collects and aggregates statistics about server execution and
query performance for monitoring purposes.
14
● A set of SQL Mode options to control runtime behaviour, including a strict mode to
better adhere to SQL standards.
● X/Open XA distributed transaction processing (DTP) support; two phase commit as
part of this, using the default InnoDB storage engine
● Transactions with savepoints when using the default InnoDB Storage Engine. The NDB
Cluster Storage Engine also supports transactions.
● ACID compliance when using InnoDB and NDB Cluster Storage Engines
● SSL support
● Query caching
● Sub-SELECTs (i.e. nested SELECTs)
● Built-in replication support
○ Asynchronous replication: master-slave from one master to many slaves\or
many masters to one slave
○ Semi synchronous replication: Master to slave replication where the master
waits on replication\
○ Synchronous replication: Multi-master replication is provided in MySQL
Cluster.\
○ Virtual Synchronous: Self managed groups of MySQL servers with multi
master support can be done using: Galera Cluster or the built in Group
Replication plugin
● Full-text indexing and searching
● Embedded database library
● Unicode support
● Partitioned tables with pruning of partitions in optimizer
● Shared-nothing clustering through MySQL Cluster
● Multiple storage engines, allowing one to choose the one that is most effective for each
table in the application.
● Native storage engines InnoDB, MyISAM, Merge, Memory (heap), Federated,
Archive, CSV, Blackhole, NDB Cluster.
● Commit grouping, gathering multiple transactions from multiple connections together
to increase the number of commits per second.
The developers release minor updates of the MySQL Server approximately every two months.
The sources can be obtained from MySQL's website or from MySQL's GitHub repository, both
under the GPL license.
15
Limitations

When using some storage engines other than the default of InnoDB, MySQL does
not comply with the full SQL standard for some of the implemented functionality, including
foreign key references. Check constraints are parsed but ignored by all storage engines before
MySQL version 8.0.15.

No triggers can be defined on views.

MySQL database's inbuilt functions like UNIX_TIMESTAMP() will return 0 after 03:14:07
UTC on 19 January 2038. Recently, there had been an attempt to solve the problem which had
been assigned to the internal queue.

Deployment

MySQL can be built and installed manually from source code, but it is more
commonly installed from a binary package unless special customizations are required. On most
Linux distributions, the package management system can download and install MySQL with
minimal effort, though further configuration is often required to adjust security and
optimization settings.

LAMP software bundle, displayed here together with Squid.

It is still most commonly used in small to medium scale single-server deployments,


either as a component in a LAMP-based web application or as a standalone database server.
Much of MySQL's appeal originates in its relative simplicity and ease of use, which is enabled
by an ecosystem of open source tools such as phpMyAdmin. In the medium range, MySQL
can be scaled by deploying it on more powerful hardware, such as a multi-processor server
with gigabytes of memory.

There are, however, limits to how far performance can scale on a single server
('scaling up'), so on larger scales, multi-server MySQL ('scaling out') deployments are required
to provide improved performance and reliability. A typical high-end configuration can include
a powerful master database which handles data write operations and is replicated to multiple
slaves that handle all read operations.[96] The master server continually pushes binlog events to
connected slaves so in the event of failure a slave can be promoted to become the new master,
minimizing downtime. Further improvements in performance can be achieved by caching the

16
results from database queries in memory using memcached, or breaking down a database into
smaller chunks called shards which can be spread across a number of distributed server clusters.

3.3. ngrok

ngrok is a cross-platform application that enables developers to expose a local


development server to the Internet with minimal effort. The software makes your locally-hosted
web server appear to be hosted on a subdomain of ngrok.com, meaning that no public IP or
domain name on the local machine is needed. Similar functionality can be achieved with
Reverse SSH Tunneling, but this requires more setup as well as hosting of your own remote
server. ngrok is able to bypass NAT Mapping and firewall restrictions by creating a long-lived
TCP tunnel from a randomly generated subdomain on ngrok.com (e.g. 3gf892ks.ngrok.com)
to the local machine. After specifying the port that your web server listens on, the ngrok client
program initiates a secure connection to the ngrok server and then anyone can make requests
to your local server with the unique ngrok tunnel address. The ngrok developer's guide contains
more detailed information on how it works. Various tunnel servers are available around the
world and locations include: US (Ohio), Europe (Frankfurt), Asia (Singapore), and Australia
(Sydney). Alternatively, the ngrok server software can be self-hosted on a VPS or dedicated
server. By default, ngrok creates both HTTP and HTTPS endpoints, making it useful for testing
integrations with third-party services or APIs that require valid SSL/TLS domains. Other use
cases include: quickly showcasing local demos to clients, testing mobile application backends,
and running personal cloud services from your home PC. One praised feature of ngrok is the
ability to track and replay HTTP requests via ngrok's web console . The replay functionality is
highly useful when testing API calls or webhooks as one can easily inspect all header content
and request/response data in one place via the console UI. A premium version of ngrok, ngrok
link, is available for developers to use in production and offers features such as API automation
and credential management, making it suitable for remote IoT management in a professional
setting.

3.4. MapMyIndia

MapmyIndia offers Navigation, Tracking, IoT, Analytics and web mapping service
for desktop and mobile devices. The company also offers advanced GPS tracking devices, car
in-dash infotainment & plug & play on-board diagnostics car tracker. The navigation service
features street view, public transit information and turn-by-turn navigation with spoken

17
instructions for vehicles. It later launched offline navigation app, Navimaps that uses offline
vector data to offer 3D terrains and city models and 3D building for in-car infotainment systems

Fig. 3.4.1: MapMyIndia Nearby plugin Fig. 3.4.2: MapMyIndia Direction Plugin

3.4.1. MapMyIndia Direction Plugin

This plugin, offered by MapmyIndia Places & Directions SDK for Web, uses
integrated places searches for directions for several modes of transportation, including driving,
biking and walking.

The plugin offers the following basic functionalities:

● Takes support of MapmyIndia Place search for searching locations of origin,


destinations and via points.
● It allows to use origin and destinations in MapmyIndia's digital address (semicolon
separated) eLoc or WGS 84 geographical coordinates both.
● The ability to set the vehicle profile like driving, and biking.
● Easily set the resource for traffic and ETA information.

3.4.2. MapMyIndia NearBy Search Plugin

A simple plugin / widget to search for nearby places powered by the best online maps
from MapmyIndia. The Nearby Search plugin for MapmyIndia Web Map JS library is provided
as a means to enable radially searching for Nearby Places on MapmyIndia Maps.

18
The plugin can be used in combination with our Interactive Map JS library but it also
possesses the adaptability to be used as an independent plugin within any web app
implementation. Thus it enables developers to include MapmyIndia Places SDK in their own
customized solutions easily.

The SDK offers the following basic functionalities:

● Ability to search for nearby places directly with or without MapmyIndia Maps visual
interface.
● A MapmyIndia.nearby() method to initiate nearby search across all categories of places
available on MapmyIndia.
● Ability to get information from MapmyIndia Place Search plugin through a callback
● Include the Nearby Search Plugin with or without an interactive Map component

3.5. Discord

Discord is a VoIP and instant messaging social platform. Users have the ability to
communicate with voice calls, video calls, text messaging, media and files in private chats or
as part of communities called "servers".A server is a collection of persistent chat rooms and
voice channels which can be accessed via invite links. Discord runs on Windows, macOS,
Android, iOS, iPadOS, Linux, and in web browsers. As of 2021, the service has over 350
million registered users and over 150 million monthly active users.

3.5.1. Discord Server

Discord communities are organized into discrete collections of channels called


servers. Although they are referred to as servers on the front end, they are called "guilds" in the
developer documentation. Users can create servers for free, manage their public visibility, and
create voice channels, text channels, and categories to sort the channels into. Any given server
can have up to 800,000 members, as discovered when the official Discord server for the video
game Genshin Impact reached maximum capacity, although Discord raised the capacity to over
one million members for their Snowsgiving 2021 event, an official Discord-controlled server
made for the 2021 winter holiday season. Starting October 2017, Discord allows game
developers and publishers to verify their servers. Verified servers, like verified accounts on
social media sites, have badges to mark them as official communities. A verified server is
moderated by its developers' or publishers' own moderation team. Verification was later

19
extended in February 2018 to include esports teams and musical artists. By the end of 2017,
about 450 servers were verified. Members can help servers obtain perks in three levels via the
"Server Boost" feature, which unlocks higher quality voice channels, more emoji slots, and
other perks. Users can buy boosts for servers for $4.99 a month. "Discord Nitro" subscribers
get two boosts included in the price of Nitro, and 30% off for additional boosts. In 2020,
Discord unveiled a new feature, known as "Community servers". It includes such features like
a custom welcome screen, server insights, and the ability to advertise on Discord's Server
Discovery page.

We can create in discord that may be either used for voice chat and streaming or for instant
messaging and file sharing. The visibility and access to channels can be customized to limit
access for certain users; for example, marking a channel "NSFW" (Not Safe For Work) requires
that first-time viewers confirm they are over 18 years old and willing to see such content. Text
channels support some rich text using Markdown-like syntax, e.g. *text* to emphasize text,
and ||text|| notation for inline spoilers. Code blocks with language-specific highlighting can also
be used. There is also a nonstandard, Discord-specific __text__ syntax that underlines the text.
Discord launched Stage Channels in May 2021, a feature similar to Clubhouse which allows
for live, moderated channels, for audio talks, discussions, and other uses, which can further be
potentially gated to only invited or ticketed users. Initially, users could search for open Stage
Channels relevant to their interests through a Stage Discovery tool, which was discontinued in
October 2021. In August 2021, Discord launched Threads, which are temporary text channels
that can be set to automatically disappear. This is meant to help foster more communication
within servers. In September 2022, Discord launched Forum Channels, which gives the ability
provide a space for organized discussions within a channel. Users can create multiple "posts"
which work like Threads, organised in a forum-like manner.

3.5.2. Discord Webhook

Webhooks are a utility used to send messages to text channels without needing a
Discord application. Webhooks are useful for allowing something to send messages without
requiring a Discord application. You can also directly edit or delete messages you sent through
the webhook. There are two structures to make use of this functionality: Webhook and
WebhookClient. WebhookClient is an extended version of a Webhook, which allows you to
send messages through it without needing a bot client.

20
Webhooks are a utility used to send messages to text channels without needing a
Discord application. Webhooks are useful for allowing something to send messages without
requiring a Discord application. You can also directly edit or delete messages you sent through
the webhook. There are two structures to make use of this functionality: Webhook and
WebhookClient. WebhookClient is an extended version of a Webhook, which allows you to
send messages through it without needing a bot client.

Bots receive webhook messages in a text channel as usual. You can detect if a
webhook sent the message by checking if the Message.webhookId is not null.

21
CHAPTER 4
4. Project - Database Schema

4.1. MySQL Ambulance alerting database Schema

User table:

User table has user_id, name, email_id, proffession, password column. It is used to
authenticate the users and after authentication redirect to the specified page based on there
profession.

Table Description:

Field Type Null Key Default Extra

user_id int NO PRI NULL auto_increme


nt

name varchar(20) NO NULL

email_id varchar(50) NO UNI NULL

proffession varchar(3) NO NULL

password varchar(20) NO NULL


Table 4.1: User Table Description

Example table:

user_id name email_id proffession password

1 sam [email protected] trp sam1234

2 adhi [email protected] amd adhi1234

3 same [email protected] hpt same1234

4 hello [email protected] hpt hello1234

5 value [email protected] hpt value1234


m

6 Samuela [email protected] hpt samuela1234


om

7 Saem [email protected] hpt saem1234


Table 4.2: User Table Example

22
Traffic signal:

This table stores signal_id, from location, to location,signal location, traffic police
name, road status, discord_name columns.

Table Description:

Field Type Null Key Default Extra

sgnal_id int NO PRI NULL auto_increme


nt

f_rom varchar(255) NO NULL

t_o varchar(255) NO NULL

location varchar(255) NO NULL

name varchar(60) NO NULL

s_s_status bit(1) NO NULL

discord_name varchar(100) NO NULL


Table 4.3: Traffic signal table description

Table Example:

sgnal_id f_rom t_o location name s_s_status discord_na


me

1 tambaram thiruvanmui thambaram sam 0 vinotham#1


r 23

2 thiruvanmui t nagar thambaram sam 0 vinotham#1


r 23
Table 4.4: Traffic signal table example

Hospital table:

These table has hospital name, hospital location, availability of accepting the patient

Table description:

Field Type Null Key Default Extra

h_id int NO PRI NULL auto_increme


nt

23
h_discord_na varchar(100) NO Chapter 5: NULL
me

hospital_name varchar(100) NO NULL

accept_patient int NO NULL

location varchar(200) NO NULL


Table 4.5: Hospital table description

Table Example:

h_id h_discord_name hospital_name accept_patient location

1 dfaf EWRds 0 ewrfafew

2 samuela#1234 yyy hospital 1 tambaram

3 saem#1234 yxyx Hospital 0 thiruvanmuir


Table 4.6: Traffic signal table example

24
CHAPTER 5
5. User Guide

5.1. Register User

1. Only the admin can able to register the new user.


2. He/She needs to visit <domain>/admin page in the browser.

Fig. 5.1.1: User Registration page for Admin

3. The webpage shown above will be loaded.


4. Based on the profession selected it ask for the additional details

Fig. 5.1.2: Register Page for Hospital .

Fig. 5.1.3: Register Page for Traffic Police

6. Admin need to fill these details and able to register the new user.

25
5.2. User Login

1. User need to visit www. <domain>.com. The below webpage will be loaded.

Fig. 5.2.1: Login Page

2. User need to enter their registered email id and password. It automatically takes the
user to the respective home page.

Fig. 5.2.2: Traffic Police Page

Fig. 5.2.3: Hospital Page

26
Fig. 5.2.4: Ambulance Driver Page

5.3. Ambulance driver page guide


1. When the user login in this page, it is programmed to automatically get the ambulance
driver location and to list the nearby hospital. To do so it asks for the location
permission. Click allow.

Fig. 5.3.1: Asking for location access

27
2. Based on the location it shows the list of nearby hospitals as shown below. If you tap
the location, it will show the direction

Fig. 5.3.2: Nearby Hospitals in the ambulance driver area

Fig. 5.3.3: Direction to Hospital

3. To send the message to the traffic police regarding the coming of the ambulance, select
the from and to location in the form shown below

Fig. 5.3.4: From-to form for ambulance driver

4. Once you submit, it automatically sends the message to both hospital and traffic police
as shown below in the discord channel.

28
Fig. 5.3.5: Message to hospital

Fig. 5.3.6: Message to Traffic police

5. The webpage also whether the signal is busy or free, hospital is free or busy, traffic police
name, etc… as shown below.

Fig. 5.3.7: Show Road and hospital availability status

5.4. Traffic Police page guide


1. The role for the traffic police is simple. They can able to update whether their location
signal is free or busy by submitting the below form.

29
Fig. 5.4.1: Traffic police page guide

2. If he/she receive any message from ambulance alerting system bot he/she need to clear
the road mentioned in the message.

5.5. Hospital page user guide

1. They need to mention whether the hospital is available for patient to admit or not by
using the below page.

Fig. 5.5.1: Hospital page guide

2. They also get message regarding the patient.

30
CHAPTER 6
6. Result
1. The New record is successfully inserted to the database from the admin page as shown in
the below.

Fig. 5.5.1: Admin Page result

31
2. Message is sent to the discord and the required details are shown in the website for the
ambulance driver page. Nearby hospital and direction of the hospital is shown in the
website

Fig. 5.5.2: Ambulance driver page result

Fig. 5.5.3: Message is sent to the traffic police and hospital

3. Hospital accepting patient column is changed as expected.

Fig. 5.5.4: Hospital Page

4. Traffic signal is status is change as expected.

Fig. 5.5.5: Traffic police page result

32
CHAPTER 7
7. Limitation and Future Scope

7.1. Limitation

● The security of the website is less


● UI and UX of the website are not much attractive
● There is an amount of time need to be spent by the ambulance driver in the website,
that need to be reduced.
● There is no app
● Limited location in database
● Only 20 attempts on the MapMyIndia website are reached at a day
● The website is not that much compact to phones
● More bugs

7.2. Future Scope


● The security of the website can be increased
● The website should be made compact for phones
● UI and UX of the website can be improved
● There is an amount of time need to be spent by the ambulance driver in the website,
that need to be reduced by simple processes or automation
● App can be created
● Bugs should be created
● Can be improved to automatically control the traffic lights by the server based on the
information taken from the ambulance driver

33
CHAPTER 8
8. Conclusion
The Ambulance alerting system is used to intimate the traffic police regarding the coming of
the ambulance. So, he/she can able to clear the traffic on the road to give path to the ambulance.
This makes ambulance can able to reach as early as possible. The system also able to send the
information to the hospital to get ready to accept the patient. The hospital can able to update
whether the hospital is fill or having vacancy, using this information ambulance driver can able
to go to the right hospital. Traffic police can also able to update the information, whether the
road is free or busy, using this information the ambulance driver can decide the best path to
take the patient to the hospital.

34
Reference:
[1] https://medium.com/@bkshashi9/ambulance-stuck-in-traffic-scary-right-
7b539ce518b9
[2] https://frontendmasters.com/guides/front-end-handbook/2018/what-is-a-FD.html
[3] https://github.com/MapmyIndia/mapmyindia-places-n-directions-web-
sdk/tree/main/Directions-plugin
[4] https://github.com/MapmyIndia/mapmyindia-places-n-directions-web-
sdk/tree/main/nearbySearch-plugin
[5] https://www.tutorialspoint.com/flask/index.htm
[6] https://www.w3schools.com/python/python_mysql_getstarted.asp
[7] https://www.w3schools.com/html/html_css.asp

35

You might also like