You are on page 1of 59

1

PROTOTYPE OF BASIC AMBULANCE DISPATCH SYSTEM FOR


EMERGENCY MEDICAL SERVICES

GAN JING WEN

UNIVERSITI TEKNOLOGI MALAYSIA


i

PROTOTYPE OF BASIC AMBULANCE DISPATCH SYSTEM FOR


EMERGENCY MEDICAL SERVICES

GAN JING WEN

A report submitted in partial fulfilment of the


requirements for the award of the degree of
Bachelor of Engineering (Electrical - Mechatronics)

Faculty of Electrical Engineering


Universiti Teknologi Malaysia

JUNE 2013
iii

Dedicated to my beloved parents


iv

ACKNOWLEDGEMENT

First and foremost, I would like to express my greatest gratitude to my project


supervisor, Dr Lim Cheng Siong for the valuable guidance and advices. Other than
that, his patience, motivation, enthusiasm, and immense knowledge had guided me
toward the road of excellence. Without his encouragement and guidance, this project
would not have materialized.

Besides my supervisor, I would like to convey my thanks to my fellow


teammates Sim Lee Sen and Vikent Woon for their large commitment in the
competition.

Besides, I would like to convey my thanks to Hafiz for his guidance and help
throughout this project.

Lastly, I would like to thank my parents for their motivation, support and
consideration along the period of project development.
v

ABSTRACT

Emergency medical services delivery efficiency is significant to reduce the


mortality and disability rate. The system used in emergency medical services to
manage the fleet of ambulances based on the desired policy is called ambulance
dispatch system. The aim of this project is to develop a prototype of basic ambulance
dispatch system that based on client server architecture for local emergency medical
services. This system consists of two programs: server program, which is installed in
computer of ambulance dispatch center such as hospital; and client program, which is
installed on the Intel Atom Board (placed in an ambulance). This system is designed
to enable the communication between hospital and ambulance via 3G technology.
The system provides Global Positioning System navigation to guide the ambulance
driver to the emergency scene; at the same time to update the location of ambulance
automatically so that an accurate dispatch operation can be assigned to the
ambulance that is the closest to the emergency scene. There is another special feature
of this system which is able to send SOS Short Message Service. The server can send
short message service to notify volunteers that have registered as first aider so that
those close to the emergency scene can provide first aid to the victim before the
arrival of ambulance. As this is an initial prototype, it has only an end terminal
installed in a car (representing an ambulance) and a server that host the program
running the desired ambulance dispatch policy. It is expected that the prototype can
be further developed into a full featured ambulance dispatch system.
vi

ABSTRAK

Kecekapan penghantaran perkhidmatan perubatan kecemasan adalah penting


untuk mengurangkan kadar kematian dan kecacatan. Sistem yang digunakan di
perkhidmatan perubatan kecemasan untuk menguruskan armada ambulans
berdasarkan dasar yang dikehendaki dipanggil sistem penghantaran ambulans.
Tujuan projek ini adalah untuk membina prototaip sistem penghantaran ambulans
asas yang berdasarkan seni bina pelanggan pelayan untuk perkhidmatan perubatan
kecemasan tempatan. Sistem ini terdiri daripada dua program: program pelayan,
yang dipasangkan dalam komputer ambulans pusat penghantaran seperti hospital dan
program pelanggan, yang dipasangkan di Papan Atom Intel (diletakkan di dalam
ambulans). Sistem ini direkabentuk untuk membolehkan komunikasi antara hospital
dan ambulans melalui teknologi 3G. Sistem ini menyediakan sistem kedudukan
global navigasi untuk membimbing pemandu ambulans ke tempat kejadian
kecemasan sambil mengemaskini lokasi ambulans secara automatik supaya operasi
penghantaran tepat boleh diberikan kepada ambulans yang paling dekat dengan
kecemasan tempat kejadian. Satu lagi ciri istimewa sistem ini ialah kemampuan
untuk menghantar SOS perkhidmatan pesanan ringkas. Pelayan boleh menghantar
pesanan ringkas kepada sukarelawan yang telah mendaftar sebagai ahli pertolongan
cemas supaya mereka yang paling berhampiran dengan tempat kejadian kecemasan
boleh memberi pertolongan cemas kepada mangsa sebelum ketibaan ambulans.
Disebabkan ini adalah prototaip awal, ia hanya mempunyai satu terminal akhir
dipasang di dalam kereta (mewakili ambulans) dan pelayan yang menjadi tuan rumah
program ini menjalankan dasar penghantaran ambulans dikehendaki. Dijangkakan
prototaip ini boleh dimajukan menjadi sistem penghantaran ambulans yang lengkap.
vii

TABLE OF CONTENTS

CHAPTER TITLE PAGE

DECLARATION ii

DEDICATION iii

ACKNOWLEDGEMENTS iv

ABSTRACT v

ABSTRAK vi

TABLE OF CONTENTS vii

LIST OF TABLES x

LIST OF FIGURES xi

LIST OF ABBREVIATIONS xiii

1 INTRODUCTION 1

1.1 Introduction 1

1.2 Problem Statement 2

1.3 Objectives of Research 3


viii

1.4 Scopes of Research 3

1.5 Research Methodology 4

1.6 Thesis Outline 7

2 LITERATURE REVIEW 8

2.1 Introduction 8

2.2 GPS 8

2.3 NMEA Protocol 10

2.4 Client and Server Application 11

2.5 Siemens TC35 GSM Development Board 13

2.6 Examples of Application Based Client Server 15


System Project

2.6.1 Ambulance Service Dispatch 15


Software Prototype

2.6.2 Optimization of EMS based on Multi- 16


Team Robot System Architecture for
Application in Malaysia

2.6.3 Mobile Emergency System and 18


Integration

2.6.4 Urgences-santé Uses GIS to Save 20


Lives

2.7 Conclusion 21
ix

3 SYSTEM DESIGN 24

3.1 Introduction 24

3.2 Project Overview 24

3.3 Project Flow 26

3.4 Hardware Design 26

3.5 Software Design 28

3.6 Summary 32

4 RESULTS AND DISCUSSION 33

4.1 Introduction 33

4.2 Results 33

4.3 Limitations and Problem Encountered 37

5 CONCLUSION AND FUTURE WORKS 39

5.1 Introduction 39

5.2 Conclusion 39

5.3 Direction for Future Works 40

REFERENCES 41
x

LIST OF TABLES

TABLE NO. TITLE PAGE

2.1 Type of NMEA record 10


2.2 Interpretation of GGA sentence 10
2.3 Type of position fix 11
2.4 Summary of related project 21
3.1 Peripherals and respectively functionality 25
3.2 Colors information in status bar 31
xi

LIST OF FIGURES

FIGURE NO. TITLE PAGE

1.1 Process flow of ADS. 6


1.2 Chapters mapping based on the project research
methodology. 7
2.1 Step by step explanation of 3D trilateralation. 9
2.2 The basic socket connection process. 12
2.3 TC35 Development Board with USB to UART
Converter and UART to RS232 Converter. 13
2.4 Setting for GSM TC35. 14
2.5 Sample of AT Command for sending SMS. 15
2.6 Graphical representation for the delivery of EMS
during simulation. 17
2.7 Communication flow between all system 19
components.
2.8 Digital Road Network Synchronization Module that
is used to improve the quality of the digital road
network, simplifies the process of updating and
integrating road data to CAD system. 20
3.1 Project flow of developing ADS. 26
3.2 Hardware block diagram of server. 27
3.3 Hardware block diagram of client. 28
3.4 Sequence diagram of client server communication. 29
3.5 GUI of server program. 30
3.6 GUI of client side application. 31
xii

3.7 GUI of SMS Sender program. 32


4.1 Connection between laptop, GSM module and USB
3G dongle. 34
4.2 Connection between Intel Atom board, GPS module
and USB 3G dongle. 34
4.3 Screenshot of server and client programs during
operation. 35

4.4 Screenshot of SMS Sender program GUI when it is


in operation 36

4.5 Log files on server and client programs after the


ADS live test. 36
xiii

LIST OF ABBREVIATIONS

3D - Three Dimensional
3G - Third generation
ADS - Ambulance dispatch system
ART - Ambulance Response Time
ASCII - American Standard Code for Information Interchange
CAD - Computer aided dispatch
COM Port - Communication port
EMD - Emergency Medical dispatcher
EMS - Emergency medical service
GPRS - General Packet Radio Service
GPS - Global positioning system
GSM - Global System for Mobile Communication
GUI - Graphical User Interface
HEDS - Hospital Emergency Department System
ID - Identity
IDE - Integrated Development Environment
LCD - Liquid crystal display
MCS - Main Central System
NMEA - National Marine Electronics Association
OEHR - Online Electronic Health Record
OS - Operation System
PhD - Doctor of Philosophy
PPS - Precise Positioning Service
RS232 - Recommended Standard 232
SIM - Subscriber Identity Module
SMS - Short Message Service
SOA - Service-Oriented Architecture
xiv

SOAP - Simple Object Access Protocol


SPI - Serial Peripheral Interface
SPS - Standard Positioning Service
SSD - Solid-state drive
UART - Universal Asynchronous Receiver-Transmitter
UMCL - University Medical Center Ljubljana
USB - Universal Serial Bus
UTM - Universiti Teknologi Malaysia
WIMAX - Worldwide Interoperability for Microwave Access
1

CHAPTER 1

INTRODUCTION

1.1 Introduction

An emergency medical service (EMS) is responsible to provide fast and


efficient medical assistance to patients of sudden injury or illness and transport them
to definitive care (Adler, 1976). The computer aided dispatch (CAD) system is a
system that efficiently receives a phone call from public, records the details of an
emergency incident, accurately find the right ambulance and dispatches the
ambulance within certain period of time (El-Masri and Saddik, 2011). In general, the
overall performance of an ambulance service is evaluated based on Ambulance
Response Time (ART) (Meara et al., 2005).

In Malaysia, government hospitals managed by Ministry of Health are the


main EMS providers. Other than that, Civil Defense, Ministry of Education and non-
governmental organization such as St.John‟s Ambulance and Red Crescent also
provide EMS to Malaysian public (Hisamuddin et al., 2007).

In contrast, the EMS provider in the advanced countries such as the


Corporation of Urgences-santé in the Province of Québec has made use of CAD
system for emergency ambulance routing (Adam et al., 2007). The device that
installed on each ambulance sends its current location to the central system. Besides,
the color assigned to an ambulance changes accordingly to its latest status is
displayed on a map. The location of incoming call is automatically located and the
most suitable ambulance is dispatched. The shortest route is displayed on the device
that installed on each ambulance to guide the driver. The CAD system also takes
2

account the traffic condition at different periods and days when planning for the
ambulance dispatch.

This project aims to develop a basic ambulance dispatch system (ADS) based
on client server architecture in which client (ambulance) can send its latest
coordinate information to server (center) and update its location on electronic map.
Meanwhile, server can receive the latest coordinate information from client and
display the updated location of client on electronic map as well. At the same time,
the server can send SOS short message service (SMS) to all registered first aider.

1.2 Problem Statement

In the present time, there is no uniform EMS communication and dispatching


system in Malaysia (Hisamuddin et al., 2007). Besides, the commonly used
communication tools such as Walkie Talkie on ambulance are outdated.

A study shows that the university hospital (HUSM) ART (913.2 seconds) is
far below the international standard of ART (276.5 seconds) as a benchmark of a
good ambulance service (Shah et al., 2008). A short survey in 2004 shows that after
conducting emergency medical dispatcher (EMD) training program, ART is reduced
by 45% (Hisamuddin et al., 2007). However the ART in Malaysia was still far below
the international standard due to outdated communication tool in EMD program
(Shah et al., 2008).

Therefore, there is a need to develop a basic ADS to improve current EMS in


terms of efficiency in Malaysia.
3

1.3 Objectives of Research

The objectives are:

(i) To develop a basic client server system

(ii) To develop client application

(iii) To develop server application

(iv) ADS live test

1.4 Scopes of Research

This project consists of three main parts which are hardware design, software
development and ADS live test.

The first part, hardware design focuses on the functionality of several


peripheral devices in this project. The compatibility of peripheral devices with laptop
and Intel Atom board is considered. Skylab SKM53 Global Positioning System (GPS)
module and Siemens TC35 Global System for Mobile communication (GSM)
Development Board needs to connect to Universal Asynchronous Receiver-
Transmitter (UART) to Universal Serial Bus (USB) converter before connecting to
Intel Atom board.

The second part, software development focuses on the development of


programs on host computer and Intel Atom board respectively to act as ADS system.
In details, host computer act as server is responsible to open connection, listen for
request, accept the request, receive coordinate information from client, send
operation enquiry to client, keep receiving the coordinate information from client if
enquiry is accepted, and lastly keep updating the latest coordinate information on
electronic map. Meanwhile, server is also responsible for sending SMS to all
registered first aider. On client side, Intel Atom board that act as client is responsible
for opening connection, requesting for services, waiting request to be accepted,
sending current coordinate information to server, accepting or rejecting the operation
4

enquiry, keep sending coordinate information to server with certain time period if
operation enquiry is accepted, and lastly keep updating the latest coordinate
information on electronic map. Besides, software development also focuses on
acquiring the GPS information from GPS module through Serial Peripheral Interface
(SPI) using Intel board, and processing the information. To be specific, it is to extract
the longitude and latitude information from the National Marine Electronics
Association (NMEA) sentence before sending out the coordinate information to
server.

The third part is real time live test on the functionality and efficiency of the
ADS. The functionality and efficiency of the ADS is evaluated based on the stability
of established connection between server and client programs and also the accuracy
of location on both server and client programs. A car representing an ambulance is
used in the live test. The live test covers Universiti Teknologi Malaysia (UTM) area
only.

1.5 Research Methodology

First of all, a basic communication of server and client is developed. In this


stage, the connection between client and server is established and text can be sent
and received.

Second, client program is developed. In this stage, GUI is developed and


several functions are added such as Identity (ID) assignation or identification, GPS
coordinate information extraction, and update of client status along the travel path.

Third, server program is developed. In this stage, GUI is developed and


several functions are added such as Identity (ID) assignation, GPS coordinate
information extraction, and update of client status along the travel path.

Forth, the server and client programs are tested to verify their functionality.
The functionality is judged based on the comparison of saved GPS coordinate log file
between client and server.
5

Fifth, the SMS Sender program is developed. In this stage, GUI is developed
and several functions are added such as initialization of GSM, mode choosing of
GSM, SMS services, display of all received SMS, and waiting of incoming SMS.

The research methodology is summarized in Figure 1.1. It shows the


activities of research methodology from literature review until achieving the outcome
of the project. The research objectives and scopes during different stages of the
research activities are highlighted.
6

Start
Problem
To develop a basic ADS based on client
server architecture
Literature Review

Objective 1
To develop a basic communication
program of client server
Basic client server
communication Scope
development -- Connection between server and client is
established.
-- Text can be sent and received

Objective 2
To develop client program with GUI

Client program Scope


development -- ID recognition, GPS coordinate
information extraction, update of client
status

Objective 3
To develop server program with GUI and
SMS Sender program with GUI.
Server program
development
Scope
No -- ID assignation, GPS coordinate
information extraction, update of client
status
-- GSM initialisation, GSM mode
choosing, SMS sending, display of all
received SMS, waiting of incoming SMS
Integration of client
server program
Objective 4
Live test ADS

Scope
Experimental ADS -- Comparison of GPS coordinate between
tested working? server and client
-- Accuracy of sent/received information

Yes
Outcome
Functional ADS A working of basic ADS based on client
server architecture

End

Figure 1.1: Process flow of ADS. Begin from the literature review on theory and
related project, then to client and server program development, and lastly live test the
functionality of ADS.
7

1.6 Thesis Outline

The rest of this thesis is organized in the following manner. In Chapter 2, the
theory of GPS, NMEA Protocol, and client server application are presented. Besides,
three related projects and one existing CAD system are reviewed and summarized in
Chapter 2.

In Chapter 3, the basic ADS design is explained in details. The system mainly
consists of two parts of design which are hardware design and software design.
Hardware design covered the peripheral devices used in this project while software
design covered the connection between server and client, functions included in each
program respectively and the design of SMS Sender program.

Chapter 4 presents the experimental setup and results obtained. There is also
discussion on problems encountered throughout this project.

Chapter 5 summarizes this thesis. The conclusion and limitations of this


project is presented. Besides that, the direction of future works is also outlined. The
mapping of the mentioned chapters according to the research methodology is showed
in Figure 1.2.

Scope of Research

Literature Reviews Future Works


Output

Chapter 2 Chapter 3 Chapter 4 Chapter 5

Figure 1.2: Chapters mapping based on the project research methodology. Chapter 2
discusses the theory and reviews of related project. Chapter 3 discusses hardware and
software design. Chapter 4 discusses on the equipment setup and result obtained.
Chapter 5 summarizes the project and outlined the direction of future works.
8

CHAPTER 2

LITERATURE REVIEW

2.1 Introduction

This chapter illustrates some basic concepts about GPS, NMEA Protocol and
client server application. Besides, some related projects are presented in this chapter.

2.2 GPS

GPS is a satellite-based navigation system that provides location and time


information. GPS is initially designed for U.S. military‟s use but soon opened up to
public.

The basic operation of GPS is based on a simple mathematical principle


which is Three Dimensional (3D) trilateralation (Marshall, 2006). Figure 2.1 shows
the step by step explanation of 3D trilateralation with the aid of diagram. First, GPS
receiver will find its distance x, y and z to 3 satellites respectively. Each satellite
form their own sphere with radius of distance x, y and z. Then, three spheres overlap
with each other and 2 points of intersection are formed. One of the points is on Earth
while the other point is on space. The receiver dismisses the point on space and thus
the location on Earth is found.
9

(a) (b)

(c) (d)

(e) (f)
Figure 2.1: In picture (a), GPS finds the distances to three known position satellite.
In picture (b), the distance is imagined as the radius of one satellite. In picture (c) and
(d), the two imaginary spheres form by two satellites will overlap and form a ring of
possible GPS receiver position. In picture (e) and (f), the third imaginary sphere form
by third satellite overlap with the ring and there will be two points of intersection;
one point located in the space while another point located on Earth. By dismisses the
point located in the space, the GPS receiver position can be determined.
10

2.3 NMEA Protocol

GPS receiver uses simple American Standard Code for Information


Interchange (ASCII), serial communications protocol or known as NMEA protocol
to transmit data. Each sentence begins with $ and ends with <CR><LF>. Data is
comma-delimited and must be included as they act as markers. The standard also
defines the contents of each sentence type so that all listeners can parse messages
accurately.
For an example: $GPGGA,hhmmss.ss, ddmm. mmmm, N, dddmm.mmmm, E, x, xx,
x.x, x.x, M, x.x, M, x.x, xxxx. Table 2.1 gives a description about these sentences
while Table 2.2 and Table 2.3 show an interpretation of GGA sentence and type of
position fix respectively.

Table 2.1: Type of NMEA record

NMEA Record Description


GLL GPS fixed data
GGA Geographic position
latitude/longitude
GSA GNSS DOP and active satellites
GSV GNSS satellites in view
RMC Recommended minimum
specific GNSS data
VTG Course over ground and ground
speed
ZDA Date and Time
DTM Datum reference

Table 2.2: Interpretation of GGA sentence

Name Example Units Description


Message ID $GPGGA GGA protocol header
UTC Position 033410.000 hhmmss.sss
Latitude 2232.1745 ddmm.mmmm
N/S Indicator N N=north or S=south
Longitude 11401.1920 dddmm.mmmm
E/W Indicator E E=east or W=west
Position Fix 1 See Table 2.3
Indicator
Satellites Used 07 Range from 0 to 12
11

HDOP 1.1 Horizontal Dilution of


Precision
MSL Altitude 107.14 Meters Altitude (referenced to
Ellipsoid)
AltUnit M Meters Altitude Unit
GeoSep 0.00 Meters Geoidal Seperation
GeoSepUnit M Meters Geoidal Seperation Unit
Age of Diff. Corr <NULL> Meters NULL when not used
Diff.Ref.Station <NULL> NULL when not used
ID
Checksum *64
EOL <CR><LF> End of message termination

Table 2.3: Type of position fix

Value Description
0 Fix not available or in valid
1 GPS SPS Mode, fix valid
2 Differential GPS, Standard
Positioning Service (SPS)
Mode, fix valid
3 GPS Precise Positioning
Service (PPS) Mode, fix
valid

2.4 Client Server Application

Same communication principle is applied to every application that wishes to


communicate over a network (Chapman, 1998).

In general, there are two applications which are server application and client
application that form a client server system. For server side application, the functions
of server application are mainly to open a connection, and wait for another
application to open a communication connection. This stage is called “listening” for
request from other application. It is similar to wait a phone to ring if you expecting
someone to call.

On the other side, the application at client side must try to connect to the
server application. It is similar to calling someone on the telephone. To be simple,
12

this client server connection is analogy to connection between two telephones A and
B. Telephone A must have connected to a network so that B can reach A. Before B
call to A, what A do is listening and waiting for B to call. In order for B to call A, B
must know the phone number of A. If B does not know the phone number, B can
look it up using A‟s name. So similar to client application, it must know the network
location or address of the server application.

Once the connection between server and client application is successfully


connected, the messages can be transfer among two applications. This connection is
called two-way communication. Similar to A can talk to B and B can talk to A as
well.

Finally, the connection between two application can be closed if either one of
the application chose to end the connection. Similar to either A or B can hang up to
end the connection between two telephones.
.

Figure 2.2: The basic socket connection process. Server will open the socket and
listen for any incoming request. Once the client send its connection request to server
and server accept the connection request, the connection between server and client is
established and message can be send to-and-fro between each other.
13

2.5 Siemens TC35 GSM Development Board

Figure 2.3: TC35 Development Board with USB to UART Converter and UART to
RS232 Converter.

With the help of USB to UART Converter and UART to Recommended


Standard 232 (RS232) Converter, the TC35 GSM development board is easily set up
with the laptop. It is ready to send and receive SMS after the TC35 GSM
development board is powered up and a Subscriber Identity Module (SIM) card (with
credit) is plugged in. After the TC35 GSM Development board is ready, we can start
sending command to use it.
The command code for this modem is AT command. AT commands are
instructions used to control a modem. AT is the abbreviation of Attention. Every
command line starts with "AT" or "at".
By following the steps below, the server will be able to send the location
details to mobile phone via SMS.

1. Find out which Communication port (COM Port) the modem is connecting
2. Use any software that sent data to COM Port
3. Open new connection. Change Bits per second to "9600".
4. Type "AT" and press Enter.
5. Type "AT+CMGF=1" and press Enter (It is to set the GSM modem to operate in
14

SMS text mode.)


6. Type "AT+CMGW="+600146168365" " and press Enter (it'll show ">"."+60" is
country code, "146168365" is recipient's number)
7. Start typing SMS. When finished, press Ctrl + Z (it'll show "+CMGW: 1", it
means the message is stored as index: 1 in the message storage)
8. Type "AT+CMSS=1" and press Enter (It'll show something like "+CMSS: 219".
"219" is the reference no of the sent message)
9. If it shows "OK" at the end, it means the message is successfully sent.

Figure 2.4: Setting for GSM TC35. Baud rate setting for GSM TC35 is 9600 bits per
second, data bits setting is 8 bits, parity setting is none stop bits setting is 1 bit and
flow control setting is none.
15

Figure 2.5: Sample of AT Command for sending SMS. First AT command is to


check the readiness of GSM TC35, then AT+CMGF=1 command is set to send
message mode, after that AT+CMGW=”+601461638365” command is to send
message to that particular mobile phone number.

2. 6 Examples of Application Based Client Server System Project

A lot of research has been done by universities and organizations worldwide


about client server system in ADS. The following are four client server systems in
ADS projects collected from different sources.

2. 6.1 Prototype of Ambulance Service Dispatch Software

This is a group project from University Medical Center Ljubljana. The


prototype developed is for University Medical Center Ljubljana (UMCL) ambulance
service. This project aimed to produce dispatch software prototype for call receiving,
dispatching and basic system status management.
16

This project use Microsoft Visio 2000 Enterprise Edition for current database
analyzing and new database modeling. The new database was built up using
Microsoft Access 2000. Microsoft Visual Basic 6.0 Enterprise Edition is to program
the software prototype.

This project follows two basic dispatch algorithms of UMCL Ambulance


Service. The developed prototype allows user administration, multi user
simultaneous work, separate call receiving and call dispatching, work schedule
creation, and printing of different reports (Fink et al., 2003).

This project includes the basic function of an ADS such as call receiving and
dispatching. Besides, it also include the built up of new database to ease the system
management. Although the software prototype is developed using Microsoft Window
platform which differs from the Linux platform that is used in this project, the
functions included in this software prototype can be referred.

2. 6.2 Optimization of EMS based on Multi-Team Robot System Architecture


for Application in Malaysia

This project is a Doctor of Philosophy (PhD) project from UTM. One of the
objectives of this project is to find out the potential model and policy to optimize
current EMS system.

This project using multi-robot platform and EMS simulator to find out the
average calls response time and thus the potential model to optimize current EMS
can be identified. Figure 2.3 shows the graphical representation for the delivery of
EMS using a simulator. An ambulance is represented by a circle while the number
inside the circle indicates the total numbers of ambulances at that location. The status
of an ambulance is represented by the color of circle: green symbolizes free status,
yellow symbolizes less urgent calls dispatch, red symbolizes urgent calls dispatch,
while blue symbolizes busy at serving or transporting a victim (Lim et al., 2011).
17

The cons of this project is it evaluates the performance of different model and
policies in EMS by using multi-team robot system, and developed EMS simulator in
order to reduce cost involved. However, this project does not integrate a real map
inside the simulation.

Figure 2.6: Graphical representation for the delivery of EMS during simulation. An
ambulance is represented by a circle while the number inside the circle indicates the
total numbers of ambulances at that location. A hospital is represented by a light blue
rectangular with „H‟ inside. The status of an ambulance is represented by the color of
circle: green symbolizes free to accept any call, yellow symbolizes less urgent calls
dispatch, red symbolizes urgent calls dispatch, while blue symbolizes busy at serving
or transporting a victim.
18

2. 6.3 Mobile Emergency System and integration

This paper proposed a new advanced Medical Emergency System. This


system aimed to eliminate all human errors as it computerized the whole process
starting from receiving an incoming report accident call until the emergency
department in the hospital prepares and monitors incoming patients and ambulances.
This system consists of 5 components which are emergency requester device, the
Main Central System (MCS), the Ambulance system, the Online Electronic Health
Record (OEHR), and the Hospital Emergency Department System (HEDS). Figure
2.4 shows the communication flow between all system components.

All system components communicate with each other based on mobile web
services using Simple Object Access Protocol (SOAP) and the technology of Service
Oriented Architecture (SOA). Besides, all components are assumed to have fast
wireless internet access through General Packet Radio Service (GPRS) or Worldwide
Interoperability for Microwave Access (WIMAX) (El-Masri and Saddik, 2011).

The advantages of this system are it is fully computerized throughout the


whole process, based on new advanced technology such as web services, reduce time
to find and send an ambulance, ambulance officer can effectively treat the patient as
patient‟s medical history is showed on the devices installed on ambulance, and it
allows hospital emergency department to prepare and monitor incoming patients and
ambulances.
19

Figure 2.7: Communication flow between all system components. Emergency


request with known GPS coordinate is received by MCS and MCS will dispatch
nearest ambulance to accident site. Meanwhile, MCS will send estimated arrive time
and distance to emergency requester. After the ambulance pick up the patient, the
patient ID will send to HEDS and HEDS will access patient‟s record and monitoring
incoming ambulance until the arrival of ambulance.
20

2. 6.4 Urgences-santé Uses GIS to Save Lives

The Corporation of Urgences-santé is the largest emergency pre-hospital


services provider in the Province of Québec serving a population of more than 2.24
million and covering a territory that includes the cities of Laval and Montreal (744
square kilometres). With nearly 1,300 employees and 160 ambulances, Urgences-
santé responds to more than 900 calls and carries out more than 530 ambulance
transports per day. In North America, Urgences santé is regarded as a pioneer for
their use of a CAD system for emergency ambulance routing. Figure 2.4 shows one
of the modules used to improve the quality of the digital road network, simplify the
process of updating and integrating road data to CAD system.

The ambulances are tracked by Urgences-santé using GPS. Different colors


that represent the status of the ambulances are displayed on a map. The locations of
incoming calls are automatically located and most appropriate ambulance is
dispatched to the accident site. There is a device installed in every ambulance so that
the shortest path to travel can be displayed to the driver. Beside that, the up-to-date
traffic data is integrated to the CAD system so that the shortest route can be
displayed to the ambulances (Adams, 2007).
21

Figure 2.8: Digital Road Network Synchronization Module that is used to improve
the quality of the digital road network, simplify the process of updating and
integrating road data to CAD system.

2. 7 Conclusion

The information collected in this chapter is important in the development of a


basic ADS based on server client architecture. The four listed related project is
summarize in Table 2.4.

Table 2.4: Summary of related project


Project Key features
Prototype of Ambulance
(i) Objective: To produce dispatch software prototype
Service Dispatch
for call receiving, dispatching and basic system status
Software (Fink et al.,
management.
2003)

(ii) Function:
a. User administration
b. Multi user simultaneous work
c. Separate call receiving
d. Call dispatching
e. Work schedule creation

(iii) Software:
a. Microsoft Visio 2000 Enterprise Edition for
current database analyzing and new database
modeling.
b. Microsoft Access 2000 for new database built up.
c. Microsoft Visual Basic 6.0 Enterprise Edition is to
program the software prototype.

Optimization of EMS
(i) Objective: To find out the potential model and policy
22

based on Multi-team to optimize current EMS system


Robot System
(ii) Tools: multi-robot platform and EMS simulator
Architecture for
Application in Malaysia (iii) Advantages: Cost reduction by using multi-team
(Lim et al., 2011) robot system and developed EMS simulator to
represent real ambulances.

(iv) Disadvantages: Does not integrate a real map inside


the simulation.

Mobile Emergency
(i) Objectives: To respond to the needs of an efficient
System and integration
and error free emergency system
(El-Masri and Saddik,
2011) (ii) 5 components
a. Emergency requester device
b. MCS
c. Ambulance system
d. OEHR
e. HEDS

(iii) Based on mobile web services using SOAP protocol


and the technology of SOA.

(iv) Advantages:
a. Fully computerized throughout the whole process
a. Based on new advanced technology such as web
services
b. Reduce time to find and send an ambulance
c. Ambulance officer can effectively treat the patient
as patient‟s medical history is showed on the
devices installed on ambulance
d. Allows Hospital emergency department prepare
and monitor incoming patients and ambulances.
Urgences-santé Uses GIS
(i) Largest emergency pre-hospital services provider in
23

to Save Lives (Adams, the Province of Québec.


2007)
(ii) Serving a population of more than 2.24 million

(iii) Covering area of 744 square kilometers

(iv) Responds to more than 900 calls and carries out more
than 530 ambulance transports per day

(v) Pioneer for the use of a CAD system for emergency


ambulance routing

(vi) Function:
a. Tracking of ambulances using GPS
b. Status display of ambulances
c. Automatic locate the location of incoming calls
d. Dispatching of most appropriate ambulance
based on up-to-date traffic data.
e. Display shortest route to ambulance driver
within the mobile data terminal.
24

CHAPTER 3

SYSTEM DESIGN

3.1 Introduction

This chapter includes the methods of developing a basic ADS based on client
server architecture. This chapter covered hardware design and software design that
are implemented in this project. Besides that, the project flow of this project is also
discussed.

3.2 Project Overview

This project consists of three main parts which are hardware design, software
development and live test. The first part, hardware design focuses on the interfacing
of several peripherals in this project. Besides, compatibility of peripheral with Intel
Atom board is considered. GPS module Skylab SKM53 requires the use of Universal
Asynchronous Receiver-Transmitter (UART) to Universal Serial Bus (USB)
converter for connecting to Intel Atom board. Table 3.1 shows the peripherals used
in the project and their function respectively.
25

Table 3.1: Peripherals and their function respectively

Peripherals Functionality

GPS module Skylab SKM53 To receive the current GPS coordinate

Siemens TC35 GSM To send SMS


Development Board

UART to USB converter To connect the GPS module to USB port of Intel
Atom Board

USB Third Generation (3G) To ensure the connectivity of server and client
dongle

The second part, software development focuses on the development of server


program and SMS Sender program that runs on host computer, and client program
runs on Intel Atom board respectively to act as ADS. In details, host computer that
acts as server is responsible for opening connection, listening for request, accepting
the request, receiving coordinate information from client, sending operation enquiry
to client, keep receiving the coordinate information from client if enquiry is accepted,
keep updating the latest coordinate information on electronic map and lastly
providing the destination coordinate information to client. Beside, server is also
responsible to send out SMS to all registered first aiders. On the other hand, Intel
Atom board that acts as client is responsible for trying to open connection, requesting
for services, waiting request to be accepted, sending current coordinate information
to server, accepting/rejecting the operation enquiry, keep sending coordinate
information to server with certain time period if operation enquiry is accepted, keep
updating the latest coordinate information on electronic map and lastly displaying the
shortest route to destination. Besides, software development also involves acquiring
the GPS information from GPS module through SPI using Intel board and processing
the information. To be more specific, it is to extract the longitude and latitude
information from the NMEA sentence and save it before sending out the coordinate
information to server.

The third part is live test on the functionality and efficiency of the ADS. The
functionality and efficiency of the ADS are evaluated based on the stability of the
26

established connection between server and client, and also the accuracy of location
on both server and client.

3.3 Project Flow

Figure 3.2 shows the sequence of flow to this project. The flow of this project
begins with literature review on various internet articles, journal and thesis relevant
to this project. After gaining enough information, the process of selecting the
compatible peripherals is carried out. The functionality of selected peripherals is
tested by interfacing them using Linux build-in software called Minicom. After the
peripheral is proven to be functioning well, the features of server, SMS Sender and
client program are designed and determined. Lastly, GUI is design according to the
features of server, SMS Sender and client program.

Figure 3.1: Project flow of developing ADS

3.4 Hardware Design

This ADS consists of two programs: server program, which is installed in


computer of ambulance dispatch center such as hospital; and client program, which is
installed on the Intel Atom Board (placed in an ambulance). Both applications run on
Linux platform.
27

A laptop that acts as a server is connected to a GSM modem and a USB 3G


dongle. GSM modem is used to send SMS to registered first aiders so that the nearby
first aiders can reach the emergency scene before the arrival of ambulance. USB 3G
dongle is used to connect to the client (ambulance) via 3G technology. Figure 3.2
shows the peripherals connected to the server.

Connect to the
client (Ambulance)
via 3G technology

USB 3G Dongle

Send message to
Laptop GSM Modem
first aider

Figure 3.2: Hardware block diagram of server

The Intel Atom board acts as a client and is connected to Liquid crystal
display (LCD), GPS receiver, USB 3G dongle, keyboard, and mouse. LCD is used as
an interface for displaying the GUI of client program. GPS receiver is essential to
trace ambulance‟s location and record the route taken by an ambulance in order to
monitor and provide minute-to-minute log throughout the whole ambulance‟s
operation. USB 3G dongle is used to connect to the server, uploads live data
collected such as location of participated ambulances, and traces of routes from the
main server. Besides it can be used to receive instructions and also live data of other
areas from the main server. Other than that, keyboard and mouse are used as an
interface for key in the message or clicking the button on GUI. Figure 3.3 shows the
block diagram of the mentioned peripherals.
28

Display the GUI of


client side
application on
screen

LCD

Interface with the


Connect to the
Keyboard and Intel Atom Board
server via 3G USB 3G Dongle Intel Atom Board
Mouse - Key in input
technology
- Click on button

GPS receiver
module

Update the current


location of
Ambulance

Figure 3.3: Hardware block diagram of client

3.5 Software Design

Software design involves the development of simple program on host


computer and Intel Atom board respectively to act as ADS. There are 2 programs
which are server and client program which is to establish the connection and
exchange of information between server and client.

In details, host computer that acts as server is responsible for opening


connection, listening for request, accepting the request, receiving coordinate
information from client, sending operation enquiry to client, keep receiving the
coordinate information from client if enquiry is accepted and lastly keep updating the
latest coordinate information on electronic map. Meanwhile, the server is also
responsible to initialize the GSM module, set the mode of GSM module and lastly
send SMS to all first aider.
29

In client side, Intel Atom board that acts as client is responsible for trying to
open connection, requesting for services, waiting request to be accepted, sending
current coordinate information to server, accepting or rejecting the operation enquiry,
keep sending coordinate information to server with certain time period if operation
enquiry is accepted and lastly keep updating the latest coordinate information on
electronic map. Figure 3.4 illustrate the sequence diagram of client server
communication.

Server (Dispatch Center)


GSM Message Sender Client (Ambulance)

Initialize GSM module

Open connection

Trying to open connection


Mode Selection (Receive/Send) Listening from request

Request server

Send Message Mode


All first aider Accept request

Send GPS coordinate

Receive message Mode


Caller or patients -- Receive GPS coordinate
-- Place marker in map in operation-not serious

status enquiry in operation - serious

Close GSM free

Continuosly updating map

Figure 3.4: Sequence diagram of client server communication. Once the connection
between server and client (ambulance) is established, ambulance will send its current
GPS coordinate to server and server will update the ambulance location in electronic
map. If the accident site is located near to that particular ambulance, server will send
operation request to ambulance. If that particular ambulance is free and accepted to
pick up patient, its location will be keep updated in electronic map. If that particular
ambulance is in operation, the server will send operation request to any other nearby
ambulances. Meanwhile, the server will change to send SMS mode and send SMS to
all the first aider. After the SMS is sent, server needs to change to receive SMS mode
back again to wait for any incoming call and incoming SMS.
30

Other than that, software design also involves the design of server program‟s
GUI and client program‟s GUI. In details, Server‟s GUI consists of several
components with their specific functions. Start Server Button is responsible for
opening connection, listening for request, and accepting the client‟s request.
Disconnect Button is responsible for disconnecting the client and cleaning up server
socket, socket, and input or output buffer information. ID Combo Box and Send
Request Button allow the user to select the most appropriate ambulance unit to be
dispatched and send an operation request to that particular ambulance. Text Area is
to display all the incoming information from client; meanwhile Text Field is to let
user key in the message to be sent. Send Button sends the keyed in message to client
if it is clicked. It also sends the coordinate information to GSM modem if destination
coordinate information is keyed in. Map displays the current location of ambulance
using marker and the shortest path to emergency scene with red route. Figure 3.5
shows the GUI of server program and the function of each component in GUI. The
status bar indicates different types of connections. Table 3.2 lists various colors that
might appear on the status bar of the server program.

Figure 3.5: GUI of server program


31

Table 3.2: Colors information in status bar

Disconnected
Connecting
Connected
Error!! Could not connect!!

On the other hand, client‟s GUI also consists of several components with
their specific functions. Connect Server Button is responsible for trying to open
connection, requesting for services, and waiting request to be accepted. Disconnect
Button is responsible for disconnecting from server and cleaning up socket and input
or output buffer information. The user can accept the operation request by clicking
on the Accept Button. Send Location Button is used to send the current coordinate
information to server. Update location is used to send the up-to-date coordinate
information to server continuously. Text Area is to display all the incoming
information from server; meanwhile Text Field is to let user key in the message to
send. Send Button sends the keyed in message to server if it is clicked. Map displays
the current location of ambulance using marker and the shortest path to emergency
scene with red route. Figure 3.6 shows the GUI of client program and the function of
each component in GUI.

Figure 3.6: GUI of client program


32

Besides sending the patient location from the server to client, (ambulance
dispatch center to ambulance), the server also sends the coordinate details to the
registered first aiders for emergency aid. Once the server obtains the exact location
of the patient, the client sends the location details to the mobile phones of the first
aiders around the incident via SMS using GSM modem. This process takes less than
a second. The advantage of the ADS is the trained first aiders can reach the
emergency scene right before the ambulance to conduct first aid. This greatly boosts
the survivability of the patient. Figure 3.7 shows the GUI of SMS Sender program
which is one part of the server program and the function of each component in GUI.

Figure 3.7: GUI of SMS Sender program

3.4 Summary

This chapter discusses the ADS in terms of its hardware design and software
design. To ensure the ADS is functioning well, all the hardware and software elements
have been carefully selected, designed and tested according to the project‟s objectives.
Finally, the developed server and client program is able to communicate between each
other and the SMS Sender program is able to send and receive SMS.
33

CHAPTER 4

RESULTS AND DISCUSSION

4.1 Introduction

This thesis is aimed to develop a basic ADS for EMS based on client server
architecture in order to reduce ART. This chapter focuses on the results and
problems encountered throughout this project. Besides, the ADS live test result is
evaluated in order to measure the effectiveness of this system and discussion is
presented based on the evaluation.

4.2 Results

The basic ADS consists of two programs which are server program and client
program in which both are designed, developed and lastly installed in the computer
and Intel Atom board respectively. Other than developing the software, this project
also involved the interface of Intel Atom board and GPS module as well as USB 3G
dongle. Figure 4.1 shows the connection between laptop, GSM module and USB 3G
dongle while Figure 4.2 shows the connection between Intel Atom board, GPS
module and USB 3G dongle. Figure 4.3 (a), (b) are the screenshots of server and
client programs. Figure 4.4 shows are the screenshots of SMS Sender program
during operation. Besides, Figure 4.5 (a) and (b) are the log file that contain the GPS
coordinate on server and client programs respectively.
34

Figure 4.1: Connection between laptop, GSM module and USB 3G dongle

Figure 4.2: Connection between Intel Atom board, GPS module and USB 3G dongle.
The GPS module is connected to Intel Atom board through a USB to UART
converter as the GPS module is UART pin out.
35

(a)

(b)

Figure 4.3: Picture (a) and (b) are the screenshots of server and client programs
during operation. The pictures showed the messages can be delivered to and fro
between server and client programs. The location of the ambulance is displayed as a
yellow marker dot on the map once the client clicked the send location button that
will send its location to the server. The shortest route is displayed on both programs
after a destination location is given by server.
36

Figure 4.4: Screenshot of SMS Sender program GUI during operation

(a)
37

(b)

Figure 4.5: Picture (a) showed the log file that contains the GPS coordinates on
server program after the ADS live test. Picture (b) showed the log file that contains
the GPS coordinates on client program after the ADS live test. The contents of both
log files are compared in order to evaluate the effectiveness and accuracy of ADS.

4.3 Limitations and Problems Encountered

There are several limitations and problems encountered throughout the


process of developing ADS.

(i) The GPS module can only function outdoor and when the weather is good.
(ii) The serial port cannot be access by user initially because of the multi-user
concept in Linux made the security and permission is crucial for every user.
Serial port can only be access once you add yourself to the group dialout.
(iii) RXTX library version mismatch error occurred during compilation in
NetBeans Integrated Development Environment (IDE). The error stated that
Jar version = RXTX-2.2pre1while native lib Version = RXTX-2.2pre2. The
error doesn‟t exist if reading serial data using terminal. The error can be
solved by remove all the openjdk java package in Linux because the pre-
installed java package contains native lib version that contradicts with the
newly installed Oracle Java package.
38

(iv) User failed to access serial port during the second time. This is because the
read serial data program is terminated forcefully by user and thus the lock file
is not being deleted. In Linux, lock files are used to prevent more than one
program accessing a port at a time. Therefore, the existing lock file
preventing the program to create a new lock file on that particular serial port
during second run time.
(v) Lock file creation error in Linux Fedora. This is because fedora expect to
hold device lock in /var/lock/lockdev, and IDE try to make lock in /var/lock,
so had to change access rights on this directory by key in the following
command in terminal
$ sudo chown root.lock /var/lock
$ sudo chmod g+rw /var/lock
(vi) Linkage error shows the librxtxSerial.so cannot be found even though the
library is on the right path in Fedora. This is because SELINUX-Targeted
Policy disallows restore segment prot after reloc which can be corrected by
switching to SELINUX-permissive policy. This can be achieved temporarily
by issuing
$ setenforce permissive
(vii) No main manifest attributes error when trying to execute the builded jar file.
This is because the main java file is not selected as Main class to execute
when clean and build the whole project in NetBeans IDE. First, go to
Netbeans, right click on the project, go to Properties, go to Run in Categories
tree, set the Main Class in the right side panel and lastly build the project.
(viii) The firewall of both host computer and Intel Atom board must be turned off
so that they can ping each other.
(ix) The connection between server and client can only be established by using
same network operator such as Digi operator in this project.
39

CHAPTER 5

CONCLUSION AND FUTURE WORKS

5.1 Introduction

This thesis aimed to develop a prototype of basic ADS for EMS on purpose
to reduce the ART. The limitations in this project and some recommendations for
future works are presented in this final chapter.

5.2 Conclusion

The following are the main conclusions of this project that have shown to met
all of its objectives:

(i) To develop a basic client server system

(ii) To develop client application

(iii) To develop server application

(iv) ADS live test


40

5.3 Direction for Future Works

There are several aspects and features that can be added in to speed up the
ART so that the international standard of ART can be met.
(i) ADS with auto-routing ability using specific path finder algorithm.

(ii) Server program with feature that is able to track the location of caller even he
or she is in indoor via Wifi IP address or Facebook check in will make the
system more reliable.

(iii) Server program with feature that is able to inform the caller on the identity of
the attending first aider will make the system more reliable.

(iv) Phone application that can show map routing to accident scene to first aider
so that he or she can provide first aid to the patient before the ambulance
arrived.

(v) Phone application that is able to send its exact location through GPS to the
server to avoid giving wrong address.

(vi) A website that shows the location of ambulance and its up-to-date routing to
accident scene will make the system more transparent and credible.
41

REFERENCES

Adams, H. (2007). Urgences-santé Uses GIS to Save Lives. ArcNorth News, 10(1),
13.

Adler, J. S. (1976). Emergency medical services communication system design.


IEEE Transactions on Vehicular Technology, 25(4), 172–175.

How GPS Receivers Work. Retrieved November 30, 2012, from


http://electronics.howstuffworks.com/gadgets/travel/gps.htm

Lim, C. S. (2011). Optimization of emergency medical services based on multi-team


robot system architecture for application in Malaysia (Doctoral dissertation,
Universiti Teknologi Malaysia, Faculty of Electrical Engineering).

Chapman, D. (1998). Sams teach yourself Visual C++ 6 in 21 Days. Sams.

El-Masri, S., & Saddik, B. (2011, June). Mobile Emergency System and Integration.
In Mobile Data Management (MDM), 2011 12th IEEE International Conference on
(Vol. 2, pp. 67-72). IEEE.

Fink, A., Planinc, S., and Vehar, T. (2003). Ambulance Service Dispatch Software
Prototype. bledconference.org, 74–75

Hisamuddin, N. A., Hamzah, M. S., and Holliman, C. J. (2007). Prehospital


emergency medical services in Malaysia. The Journal of emergency medicine, 32(4),
415.

Gausman, M. B. (1976). Electronic equipment requirements for emergency medical


service systems. Vehicular Technology, IEEE Transactions on, 25(4), 171-172.
42

O‟Meara, P. (2005). A generic performance framework for ambulance services: an


Australian health services perspective. Journal of Emergency Primary Health Care,
3(3).

Shah, C. H. M. S., Ismail, I. M., and Mohsin, S. S. J. S. (2008). Ambulance response


time and emergency medical dispatcher program: a study in Kelantan, Malaysia. The
Southeast Asian Journal of Tropical Medicine and Public Health, 39(6), 1150–1154.