Ambulance Tracking System Using Restful Api.

Saving peoples live is the most important in today’s world. The best way to save lives is to have an ambulance system which is effective and can be reachable to the user/client, this paper gives the solution which focus to make the ambulance available to a nearby user/client/patient in the least possible time which will help save many lives. After extensive study and analysis new technology evolved. Navigator.geolocation method based on Rest FUL Web Services is used this will help the ambulance location to be updated in the database so that it can be seen by the user who is using this application and makes it easy for him to book the ambulance. The client’s location will be pin pointed on the google map and even the ambulance which is nearby the user will be pin pointed on the map, once the patient is on board the ambulance location is taken and then the list of hospitals are pointed out on the map which helps the ambulance driver to choose the nearby hospital to take the patient on time.


INTRODUCTION
Ambulance Tracking System, a new and a great experience in the world of hospital.This is a web based application which helps the user to find the nearby ambulance and the nearby hospital based on their location.It helps the user to book the ambulance or call it to the place of emergency so that the patient can be taken to the hospital on time and their life can be saved.The user can completely track the ambulance based on their location.This system will help the common people in day to day life as there are many accidents on the road, patients suffering from cardiac arrest, pregnant ladies who are due etc.This system aims at providing a better ambulance facilities to the patients and help save lives.Application uses RESTful web API for more efficient use.

literature survey
Traffic is the major problem these days and tidal flow management were recognized as major problems in the urban areas, which have caused more problems for the ambulance on reaching the hospital on time with patients.Road accidents in the city have increased and to reduce the loss of life due to the accidents is even more important.
Implementation of an intelligent traffic control system to pass emergency vehicles such as ambulance smoothly.Each and every ambulance is attached with special radio frequency identification (RFID) tag which is placed at every traffic signals and not visible to the general public, which makes it impossible to remove or destroy the RFID tag. 1 In this the assumption is that the user/ client is using an android device.They have come up with a Route Tracker application.As the user/client moves from one place to another with their Android mobile device, this application (route tracker) keep strack of the user's/client's location, by showing a route on a map which can be monitored by the users.The user/client selects the 'Start Tracking' button to start the route tracking.The map refreshes as the user location keeps changing, showing users/ clients current location on the screen.The route is being marked with a red line along with black dots which acts 10 data points received by the application. 2e RSA crypto system which was first published by Ronald Rivest, Adi Shamir and Leonard Adleman in 1997 which is more than 25 years ago.It has been widely used for many years for security and authentication on the internet for in many applications including the online card payments, remote login and email.This discusses another important use of RSA algorithm that is using designing of an encryption technique with this algorithm.The geo-location (latitude and longitude of source and destination) will be used as keys along with the public and private keys of RSA algorithm. 3 the field of science and engineering Google is constantly trying to implement innovative ideas which can help people solve their problems.The implementation of kML (keyhole Markup Language) is used on Google android phone to find path from source to the destination.Many services are implemented with the API's that Google has provided.Methods to draw path from given source to the destination is presented here.Many travelling application requires path drawing on the map which can be useful in many applications like driving direction and projecting the path where our child moves using mobile with this application implemented. 4th the growing Internet world, it is an expectation that each and every device (mobiles, tabs, desktops, etc.), will be connected to the Internet, as it is called the world of IoT (Internet of things).The proposal of two upcoming methods: REST API caching and REST API grouping.First, the web service composition results in reducing latency in communication and consumption in energy by composing or building two or more REST web services into one major web service.Second, caching technique in the web service provides frequently accessed or fast access to the most recently accessed.This experiments is conducted with the help of Jersey REST web service server.Results of the experiments shows that our approach outperforms conventional approaches 5.

Existing System
These days, automation plays a major role in many industries.Microcontrollers in today's world are widely used for the automating everything possible to reduce the cost so it can be used by every individual and to improve the standards with its efficiency.In the present traffic condition the ambulance will take a lot of time to reach the hospital.Many people lose their lives or is in trouble due to heavy traffic.The government or the general public should come with some special ideas for the ambulance so that they are able to take the patients to the hospital on time and save their life.The ambulance is embedded with special GPS and GSM units which in order sends the exact location of the ambulance to the control room.If the exact location of the ambulance is identified, the hospital will get all the information required through the control room.Once the location of the ambulance is found, signals in the traffic can be controlled from control room.The main is to use the wireless communication to control the traffic.With the help of the computer the traffic signals is controlled from the control room and guides the easiest and fastest route for the ambulance to reach the hospital.
The entire system is take to another level with the help of the internet connection.The GPS is set up in vehicles so that the position of the ambulance is found.
GSM is used to send the ambulance location to the control room.Ambulance location is tracked by using GPS and is sent via GSM which is fixed in every ambulance along with the GPS module as shown in the figure below.The control room monitors the current location of the ambulance which is continuously received through GSM with the help of internet and servers.

Working of restful web services
Rest FUL Web service is a service that is being offered by one electronic device to another electronic device, to help communicating with each other via the WWW (World Wide Web).In Web service, the Web technology used to make it better to communicate is HTTP (Hypertext Transfer Protocol), it is designed in such a way to help in better communication between the human and machine, this is also helpful for the communication between machines, more specifically for transferring machine readable file formats such as XML and JSON.The Web service provides a typical objectoriented Web-based interface to a database server, utilized for example a mobile application, another Web server, or by a mobile application, that provides a user interface to the end user.Another common application offered to the end user may be mash up, where a Web server consumes several Web services at different machines and compiles the content into one user interface 6.
A conferencing API (Application Program Interface) or any API for that matter allows communicate to take place between a software application and a remote application over the Internet through a series of calls.An API is a definition, an interface, it is something that defines the way in which two or more entities communicate.
Using APIs, the calls between applications are managed through Web services.Web services are a collection of technological standards and protocols, which help in an effective completion of communication, languages including XML (Extensible Markup Language), JSON and other programming language can be used.

Proposed system
In this application (Ambulance Tracking System using Rest FUL API) we are helping our user to track the nearby ambulance for emergency purpose such as accidents, cardiac arrest, and ladies who are due to deliver, etc so that patients can be taken to the hospital as soon as possible and their life can be saved.The user checks the nearby ambulance books it so that the patient can be taken to the hospital, if there are three ambulance there latitude and longitude will be compared with all three and then will show the one ambulance which is near to the user.Once the ambulance arrives to the patient's location the ambulance location is taken and the nearby hospital and clinics is shown so that the patient can be taken.The user apart from booking the nearby ambulance they can see all the hospitals, clinics and medical stores located in a particular area.The location of the ambulance has to be updated by the driver so it is stored in the database, once the user logs into the application they can see the nearby ambulance but the catch here is that the user and the ambulance must be in the same IP address that is when the user will be able to see the ambulance.

Work flow of the Proposed System
Every system that is connected to the internet has a unique identification which is known as the IP address.Like for sending an Email you need to have the Email ID or address similarly every computers and devices have a unique identifier to send data to a specific computer or device on the network.Most networks today, including all on the internet, uses the TCP/IP protocol as the standard for communicating through a network.This IP address uses 32 binary bits to create a single unique address on the network.This address is separated by four numbers separated by dots.

RESULTS
In this application everything goes with a flow without facing any problems.In the pointing out the location there will be very small changes in the actual location with the latitude and longitude.
In the Picture below the user's/client's location is marked on the Google map, there might be many ambulance (for example three ambulance is taken) the location is stored in the database and all the three ambulance location is calculated and compared and finally the ambulance which is nearby to the user/client that is shown on the Google map.
The Calculation to find out which ambulance is nearby to the user is shown below.
In the picture below all the hospitals, clinics and medicals are marked on the Google map only if they are registered is they are not then it will not be marked and displayed as it is shown below.Before showing this it takes in the current location of the user or the ambulance and then they are marked based on their location, the radius form the user's or the ambulance's location can be predefined so that within that radius all the hospitals, clinics and medicals are shown so that the patients can be taken as soon as possible.These information can be achieved with help of an URL which consists of the API key which helps in to fetch the desired information.There are two URLs with the API key which is as follows: The first one is for getting the users location and also pointing the nearby ambulance.h t t p s : / / m a p s .g o o g l e a p i s .c o m / m a p s / a p i / j s ?k e y = A I z a S y A T 9 S 7 7 A D -l8y9k2gfmHDTeB1lsd41lSk8. 8 The second one is for getting all the hospitals, clinics and medicals based on the users or the ambulance location.h t t p s : / / m a p s .g o o g l e a p i s .c o m / m a p s / a p i / js?key=AIzaSyAT9S77AD-l8y9k2gfmHDTeB1lsd 41lSk8&libraries=places. 8

CONCULUSION
Those old day are gone where they use to call the ambulance and ask them to come to the user's location to take the patient to the hospital.As everything is available at a user's finger tips implementing it would help save a lot of patience life as the ambulance can be tracked at any location from the user's location.
In the future this application can be upgrades to the next level by making it more interactive in such a way that during the time of the users registration a form will be given for the user's to fill in all their medical details which can be stored on the cloud, then once the patient is in the ambulance all the medical details that was filled by the patient at the time of their registration along with the present patient condition will be sent to the hospital even before the ambulance reaches the hospital so that the doctors can be ready to treat the patients and same many life.
Step1: Start.Step2: Registration for the clients/users and ambulance so that the ambulance details can be sent to the client/user.Step3: Login as Admin (Ambulance) or Client/ User.Step4: Ambulance System update all the ambulance location in the database.Step5: Client/User-Location(latitude and longitude) of the client/user is shown.• Get Distance it will show the ambulance which is near to the client.• Get Hospitals it will point out all the hospitals, clinics on the map.Step6: End.