You are on page 1of 81

DESIGN AND IMPLEMENTATION OF A MOBILE APPLICATION FOR

EMERGENCY MEDICAL SERVICE


(A Case Study of the Department of Health Services,University of Benin)

BY

ODIRI EMMANUEL

PSC1707529

DEPARTMENT OF COMPUTER SCIENCE

FACULTY OF PHYSICAL SCIENCE

UNIVERSITY OF BENIN

BENIN CITY

NIGERIA.
DESIGN AND IMPLEMENTATION OF A MOBILE APPLICATION FOR
EMERGENCY MEDICAL, SERVICE
(A Case Study of the Department of Health Services,University of Benin)

BY
ODIRI EMMANUEL

PSC1707529

PROJECT REPORT SUBMITTED TO THE DEPARTMENT O COMPUTER


SCIENCE, FACULTY OF PHYSICAL SCIENCES UNIVERSITY OF BENIN,
EDO STATE, NIGERIA. IN PARTIAI FULFILMENT OF THE REQUIRMENT
FOR THE AWARD O BACHELOR OF SCIENCE(B.Sc.) DEGREE IN
COMPUTER SCIENCE.

DECEMBER,2022

CERTIFICATION

This is to certify that this project work was carred out by Odiri Emmanuel with the matriculation

number PSC1707529 of the department of computer setence.University of Benin,under my

supervision and it is adequate in scope and content for the award of Bachelor of Science

(B.Sc)degree in Computer Science of the University of Benin

Project
Supervisor

DR.(MRS.)V.I.OSUBOR
Date

APPROVAL.

This project is hereby approved by the department of computer science in partial fulfillment of
the requirement for the award of Bachelor of Science Degree(I1.Sc.)in Computer Science of the
University of Benin, Benin City, Nigeria

DR. (MRS.) V.I.OSUBOR


Date
Project Supervisor

PROF.(MRS.) A.O.EGWAI.I Date


Head of Department

DEDICATION

This project is dedicated to God Almighty for His love and mercies throughout my study

period.Also to my dear parent for their great support and to my beloved siblings,close

friends and associates for your immense contributions during the courseof this project

work.

ACKNOWLEDGEMENTS

My profound gratitude to God Almighty for His abundant love,guidance and protection

throughout the cause of my project work.


I really would say words are not enough to express my profound gratitude to my project

supervisor Dr. (Mrs.) V.I.Osubor,for guiding and directing me during the cause of the project

execution.I also sincerely thank the Head of Department and all staffs of the Department of

Computer Science,for their immense contributions during my study period.

All thanks to my lovely parents Mr.and Mrs.Ogheneovo Odiri for their support and words of

encouragement. To my siblings,close friends and the graduating set of 2021 department of

Computer Science,God bless us all.

To the Director Department of Health Services, University of Benin.Dr.Omiyi.the Deputy

Director of Nursing,Mrs.Helene Obazenu and the nurses and medical staff of the Out Patient

Department for your immense contribution towards the successful research and execution of

the project work.Am grateful.

TABLE OF CONTENT

Certification...

Approval...... .·.

Dedication...

Acknowledgement... ---

Table of Content......

List of Figures...

Abstract......

Chapter 1:Introduction......

1.1 Background of Study...

1.2 Motivation......

1.3 Problem Definition...


1.4 Aim and Objectives...

1.5 Scope of Research...

1.6 Research Methodology...

1.7 Significance of Study... 5

1.8 Limitation of the Study.. 6

Chapter 2:Literature Review.... 7

2.1 Emergency Medical Service:An Overview... 7

22 Forms of Emergency Medical Service..... 12

2.3 Emergency Medical Service in Tertiary Institutions in Nigeria...14


2.3.1 Department of Health Services,University of Benin...16

182.4
Mobile Applications:An Overview...
2.4.1 Some Mobile Applications for Emergency Medical Serice.. 21

25Chapter
3:System Analysis and Design...

253.1
System Analysis.....

263.2
Analysis of Existing System..

273.3
Constraints of the Existing System...

283.4
Overview of the Proposed System...

3.4.1 Proposed System Architecture.... 29

3.4.2 Benefits of the Proposed System... 31

System Design... 313.5


3.6 System Design Tools... 32

3.6.1 System Design Tool: UML. (Unified Modeling Language) 32


3.6.2 UML-Use Case Diagram... 33

Chapter 4: Implementation and Documentation... 36

4.1 System Requirements... 36

4.1.1 Hardware Requirement... 36

4.1.2 Software Requirement... 37

4.2 Software Development Tools/Technology... 37


4.3 Implementation Languages.. 37

4.3.1 Dart...... 37
4.4 Software Integrated Development Environment (IDE) and Tools Used
4.4.1 Visual Studio Code... ---38

4.4.2 Android Studio... 38


4.4.3 Flutter... --- 39

4.4.4 Google Chrome... 39

Database Design..- 39

4.5.1 Google Firebase........


39
4.6 User Documentation:System Testing...... 40
4.7 Implementation...... 40

4.7.1 Signup Page... 41

4.7.2 Home Page... 42

4.7.3 Repont Emergency Page......... 43

4.7.4 Edit User Information..... 44

4.7.5 User Reports Page... -- 44

4.7.6 User Information Page....... 45

Chapter 5:Summary,Conclusion and Recommendation... 46


5.1 Summary...... 46
5.2 Conclusion... 46

5.3 Recommendation... 47

References...
48

LIST OF FIGURES

Figure 1.0.Proposed System Architecture... .·..- ... 29

Figure 2.0:Use Case Diagram for Users... ... . 34


.. ..

Figure 3.0:Use Case Diagram for Admin.. ... 35


.... ...

Figure 4.0:A Snapshot of the Signup Page... .. ··· 41


. -

Figure 5.0:A Snapshot of the Home Page... 42


.. .. - -

Figure 6.0: A Snapshot of the Report Emerge cy Page... -- -·. 43

Figure 7.0:A Snapshot of the Edit User Infor mation...... ·-· 44

Figure 8.0: A Snapshot of the User Reports Pa ge.... .·· 45

Figure 9.0,A Snapshot of the User Informati on Page... .·. .·· 45

ABSTRACT

Mobile application technology has radically transformd every aspect of the human cconomy.It

has greatly improved and provided solutions to the computational nceds or

individuals,industries and business organizations.

A major aspect of the deployment of mobile application technology is it improvement on health

care delivery.There are several areas of health care delivery that utilizes mobile application

technology,an important area of interest is in emergency medical services. Emergency medical

services is a system that provides urgent pre-hospital treatment and stabilization for serius
illness and injuries and transport to definitive care most likely an emergency department of a

hospital.

This project work attempts to design and implement a mobile application for emergency

medical service within tertiary institution of learning and serve as a means to provide timely and

coordinated response to medical emergencies thereby promoting a healthy and safe learning

environment.

CHAPTER ONE

INTRODUCTION

1.1 Background of Study

Mobile application,most commonly referred to as an app. is a type of application software designed

to run on a mobile device such as a smartphone or tablet computer. Mobile applications frequently

serve to provide users with similar services to those accessed on Personal

Computers.(Techopedia,2020).

Mobile application technology have radiclly transformed every aspect of human cconomy;

from Communication, Workspace, Entertainmen,Travels,Healthcare, Emergency Medical

Services,Banking,Shopping and many more. It has greatly improved and provided solutions

to the computational needs of individuals,industries and organizations.

The exploding popularity of smartphones and tablets has made mobile application

development an increasingly popular trend among business owners all over the world. The

mobile application development industry has grown leaps and bound ever since its inception.

According to the International Telecommunication Union (ITU),in 2015 there were more than

7 billion mobile telephone subscriptions across the world, over 70% of which were in low or
middle income countries.

A major aspect of mobile application technology is it improvement on health care delivery.

Several medical resources are available on digital distribution platforms of mobile applications

(Google Playstore and Apple App Store) for Android and iOS operating system.(Alejandro et

al.,2020)

According to the World Health Organization,the development of mobile application for the health

domain is directly or indirectly intended to maintain or improve health behaviours,quality of life

and people's well-being (Alejandro et al.,2020).

There are several areas of health care delivery where mobile application technology has been

deployed.An important area of interest is in Emergency Medical Service.

Emergency Medical Service, commonly known as EMS, is an integrated system that provides

emergency medical care.This sysem provides urgent pre-hospital treatment and stabilization for

serious illness and injuries and transport to definitive care,most likely an emergency department

of a hospital.

Emergency Medical Service provides emergency medical care for all types of emergencies

such as medical, surgical, obstetrics and gynaecological,paediatric emergencies,accident and

injuries, disasters and epidemics.(Adetoun et al., 2021).

It is one of the most important health care services as it plays a vital role in saving

people's lives and reducing the rate of mortality and morbidity.

The development of mobile applications is becoming an important resource for

emergency medical services due to their ease of use, broad reach and timely response.

This project attempts to design and implement a mobile application for emergency medical service within

tertiary institution of learning thereby providing a platform that would hamess mobile application technology in
emergency medical service and ensure that those in need of urgent medical care are attended to from the

scene of the incidents to the point of definitive care.

1.2 Motivation

Health care delivery is an important area of concern in our society.The need to save life and prevent

worsened health conditions due to delyed access to medical services is of core concem.

In today's world mobile applications are becoming an important resource for health service delivery

and public health.

Employing mobile application technology in managing emergency medical service would provide a

timely and coordinated response thereby promoting a healthy and safe society.

1.3 Problem Definition

Domestic accidents, fainting attack, cardiac arrest, asthmatic attacks, threatening injuries, severe

headache and vomiting, psychotic disorder,bleeding,acute intoxication,amongst others in recent

times have been cases of emergency medical care within tertiary institution of learning.

Although there are health centerswithin the learning environment,access and timely

response to these emergencies have been a cause of great concer.

There is need to create a system that ensures timely and coordinated response to these
emergencies thereby increasing chances of patient's survival and averting worsened health
conditions.This is a challenge this project seek to address.

1.4 Aim and Objectives

The aim is to build a system that would haress mobile application technology in emergence
medical service within tertiary institution of learning following these objectives;

2
·To study existing systems for emergency medical service

·Propose a mobile application for emergency medical service

·Design and implement the proposed mobile application.

1.5 Scope of Research

This project work focuses on emergency medical service within tertiary institution of

learning using a case study of the University of Benin,Health Services Department.It is

centered on building on a system that employs mobile application technology in

emergency medical service within the learning institution.

1.6 Rescarch Methodology

This project adopted the cross-platform mobile application development method.It is a modern

approach to build mobile applications that can run on different platforms (Android,iOS and Web-

Applications) offering uniformity across all platforms,casy implementation and cost effective

production.

The digital design and prototyping of the user interfaces (ui) and user experience (ux) of the

proposed mobile application was modeled using Figma, a cloud based design tool for interface

design.

Thereafter the design was implemented. Implementation was done using the following set of

tools: Flutter framework, Dart programming language, Android Studio as its Integrated

Development Environment(IDE) and Google Firebase as its cloud hosted database.

1.7 Significance of Study

·Implement mobile application technology in health care delivery and emergency medical

service.
Student in need of urgent medicalcare are offered timely response from the site of injury or

illness to definitive care.

·A broader and coordinated response to medical emergencies within tertiary institutions of

learning.

Create a system that offers closer health service delivery and prompt response to

emergency medical cases.

1.8 Limitation of the Study

This project has greatly motivated me in many ways. It has exposed me to a more
computational and technological approach in mobile application development.However there
were some few limitations encountered during the course of the project.

Getting the required System needed for the implementation of the mobile
application.

Time frame needed for the completion of the project.

CHAPTER TWO

LITERATURE REVIEW

In this chapter,an overview of emergeney medical service was discussed.It went further to examine emergency m

service in tertiary institution,having a review of the Department of Health Services,University of Benin.Finally an overv

mobile applications and a review of some mobile applications for emergency medical service was discussed.

2.1 Emergency Medical Service:An Overview

Emergency Medical Service,commonly known as EMS,i a system that provides emergency m

care. This system provides urgent pre-hospital treatment and stabilization for serious illness and in

and transport to definitive care, most likely an emergency department of a hospital.(Federal Mini

Health Abuja,2016).

5
A medical emergency is an injury or illness that is acute and poses an immediate risk to a

person's life or long-term health and it's extremely important to attend to these patients

immediately. The early identification ofa medical emergency and subsequent management will

be helpful to save a patient's life and prevent irreversible consequences. (Ramanayake et al.,

2014)

Emergency medical service provides emergency medical care for all types of

emergencies such as medical, surgical, obstetrics and gynaecological, paediatric

emergencies,accident and injuries,disasters and epidemics.

The objective of the emergency medical service is to reach those in need of urgent medical care

in order to satisfactorily treat the presenting conditions.from the scene of incidents to the point

of definitive care.

Emergency medical service can also be referred to as ambulance services or paramedic

services.

The emergency medical service consists of the following components: Pre-hospital personnel

(paramedics and paramedic technician),Hospital Physicians, nurses and other health

workers,Emergeney Service infrastructure this include; Ambulances in good working

conditions, Equipped Accident and Emergency units,Emergency drugs and consumables, Side

laboratory, etc. and an informed public that knows what to do in emergency situations.

Modern Emergency Medical Service is considered to have started with Jean Dominique

Larrey,Napoleon's chief physician, who organized a system to treat and transport injured

French soldiers. During the Civil War, the Union Army developedan organized system to

7
evacuate soldiers from the field. Lessons learned during the Civil War were applied as civilian

emergency medical service systems formed duringthe late 1800s.By 1960,a patchwork of

unregulated systems had developed, with services sometimes being provided by hospitals, fire

departments, volunteer groups, or undertakers. Physicians staffed some ambulances, while

others had minimally trainedor untrained personnel. Despite the major expansion in health care

facilities and the emphasis on medical

specializationafter World War II,the emergency medical service system had not

received much attention.(Manish,2006)

The need to enhance health system responsiveness and create a health society has been a great

concemn.In recent time, there have been growing improvements in emergency medical services

around the world.

In most developed nations, te emergency medical service can be summoned by members of the public

(as well as medical facilities,other emergency services,)through an emergency telephone number

which puts them in contact with a control facility,which will then dispatch a suitable resource for the

situation. Examples of such emergency telephone number include: 999 emergency number in the

United Kingdom and 911 in the United States.

Ambulances are the primary vehicles for delivering emergency medical service,though some also use

squad cars,motorcycles,aircraft,or boats.

Emergency medical service exists to accomplish the basic principles of first aid,which are to preserve

life,prevent further injury and promote recovery.

In Nigeria,access to medical cares for urgent or life threatening conditions is a key expectation in many

communities.The timely demand to enhance the health care delivery of the population and ensure an

improved utilization of emergency medical service to achieve a better outcome is imperative. (Adetoun

8
8
et al..2021).

Although efforts has been made in emergency medical service delivery in Nigeria through private and

govemment initiatives such as training of paramedics,accreditation of paramedics training institution,and

establishment of call centres.There is need to coordinate all medical emergency services in Nigeria and

integrate medical emergency components and stakeholders.(Adetoun et al.,2021).

In March 2016,the Federal Ministry of Health,Abuja published a Policy on Emergency Medical Services

(EMS) in Nigeria.The Policy on emergency medical services would help to coordinate and integrate

emergency medical services in Nigeria and ensure timely and coordinated intervention to medical and

surgical emergencies, averting preventable deaths due to delayed access to emergency care (Federal

Ministry of Health Abuja, 2016).

The Component of the Policy on Emergency Medical Service (EMS) in Nigeria entails the following:The

Federal Ministry of Health as Custodian of the health sector policies and lead agency. National

Emergency Management Agency (NEMA),hosting the National Call Centres 112 in collaboration with

National Communication Commission, the Federal Road Safety Commission,regulator and provider of

road sfety,Paramedics schools,Accidents and Emergency Units of all Hospitals (A&Es), Trauma centres

at National and State levels;Emergency service section in all Ministries,Department and Agencies.

Others stakeholders include Private organizations operating Ambulance services,Private Health

facilities,Local Government Health facilities,all Primary Health

Centre,University Health Systems and Non-Govemmental Organizations including

International Agencies(Federal Ministry of Heath Abuja,2016).

Recognizing the immense benefits of an emergency medical service system,in April 2021,the

Nigerian Senate through the Senate Committee on Communications organized a one-day public

hearing on te Nigerian Postal Service Act (Repeal and Establishment) Bil1, 2021 and the
Nationwide Toll-Free Emergency Number (Establishment) Bill, 2021 where stakeholders gathered

to make valuable cntributions and observations on two bills.The aim was to have extensive

discussion towards making the bill more robust to ensure a more effective,uniform and well-

coordinated national emergency number 112. and will also help to establish the Nationwide Toll-

Free Number as a primary emergency number and contact point forall emergency services in the

country.(Punch,2021)

An emergency medical service must be available when needed,easily accessible, affordable and

tailored to the nation's socio-economic status and growth.

There are certain challenges in Nigeria that hinders effective and efficient emergency medical

service system some of which include:poor funding of the health sector,a low substantial effort to

sensitive and mobilize the general public in the area of emergency medical service, poor

infrastructure especially good road networks. (Peter etal.,2019).

The need to address these challenges and create an effective emergency medical service system

across the nation would ensure a healthy and safe society thereby reducing morbidity and

mortality.

2.2 Forms of Emergency Medical Service

Emergency medical service plays a vital role in saving people's lives and reducing the rate of mortality and

morbidity.

In our world today,emergency medical service operates in different forms.These operations includes: focu
to save lives, protection of the environment,assist communities impacted by disasters and nid recover
during emergencies.Some forms of cmergency medical service are briefly explained as follows:

·Government Emergency Medical Service: This is a type of emergency medical service tha
is provided by the government of a state.They are funded by local, provincial or nationa
government. In some countries, these only tend to be found in large cities,whereas in

11
cuntries such as the United Kingdom, almost all emergency ambulances are part of a
national health system.In the United States, ambulance services provided by a local
government are often referred to as "third service" emergency medical service.

In April 2021,the Federal Government of Nigeria announced plans to introduce the National

Emergency Medical Service and Ambulance System.This system would reduce the number of

deaths caused by the delay in accessing health care services and provide prompt and efficient

emergency medical service to the people. This system would also initiate Govemment

Emergency Medical Service across the country (Premiumtimes,2021).

providing emergency medical attention to the public and private sector of the

society(nigerianfinder,2022).

2.3 Emergeney Medical Service in Tertiary Institutions In Nigeria

According to te World Bank (2021),Tertiary education refers to all formal post-secondary education,

including public and private universities, colleges, technical training and vocational schools.

Tertiary educational institutions in Nigeria are institutions offering hiher and advanced forms of

education in the nation's universities, colleges of education,polytechnics and monotechnic.

Generally,cducation serves as a means through which knowledge,learning and skill of a society or

group of people is passed from one generation to generation.Without a doubt, our existene and

survival on the face of the planet as a specie has been helped in no small measure by the

discoveries, knowledge and learning that have,over the course of several centuries,been acquired

in the sciences, arts and other aspect of human learning (Aare 2022).

12
It is important for every learning community to have a ready and accessible health

care facility to cate for the health needs of its members.Every tertiary educational

institution in Nigeria is entrusted with this responsibility.There is need to ensure a

healthy learning environment for students and staff around the university,colleges of

education, polytechnics and monotechnic.(Olumide et al., 209).

In Nigeria,Teaching hospitals are affiliated with approved universities and medical

schools.

However as a result of the fact that these teaching hospitals offer health care delivery to the

general public and in most instances the proximity of these teaching hospitals to the university

campuses are distance apart, each tertiary educational institution is saddled with the responsibility

to provide health centers that would aid in primary health care delivery to students,staff and other

stakeholders within the learning community.

Quality and efficient health care delivery is paramount in any tertiary institution.These health

centers must be functional at all times,accessible and affordable.

Recent happenings across the nation's tertiary institution reveal that some of these health centers

operate in dilapidated structures, lack sufficient ambulance system and insufficient medical

equiment.Hence quality and optimal health care services is needed through improved funding of

the nation's education system. (Nura et al.,2020).

As part of health care delivery in tertiary institutions of learning,handling medical

emergencies aid to ensure a safe and healthy learning environment.

14
14
Fainting attack,cardiac arrest,domestic accidents,asthmatic attacks, threatening injuries, severe

headache,vomiting,bleeding,psychotic disorder, acute intoxication,amongst others in recent times

have been cases of medical emergency within tertiary institution of learning.

Emergency Medical Service in tertiary educational institutions ensures timely and

coondinated response to these emergencies therehy increasing chances of patient's survival

and averting worsened health conditions.

2.3.1 Department of Hlealth Services,University of Benin

Department of Health Services, University of Benin provides secondary health care delivery to

students,staff and their dependents in the university community.The department has a team of

dedicated and energetic medical and paramedical staff who are well trained and experienced in

health care delivery.

The department is charged with the responsibility to promote positive health and vitality,

prevent infectious and non-infectious disease,organize and provide curative services,as well

as diagnosis and treatment in order to ensure a healthy learning environment.

Out-patient services are rendered in the two clinics located in Ugbowo and Ekehuan

Campuses respectively.Other services available include laboratory and environmental

health,In-patients admission facility where patients can be admitted and treated.The

department offers a daily 24 hour service in both campuses.

There are several units in the health services department,which are explained briefly as

follows:

·Administrative Unit: This unit is headed by the Director of the Health Services

Department,assisted by the Deputy Director of Nursing and other heads of various units

in the facility.The administrative unit serves as the decision making unit and

15
15
ensure efficient service delivery.This unit also assists in the coondination of the

National Health Insurance Scheme(NHIS)

Recard Unit: This unit is charged with record keeping.They ensure proper doxumentation of

patient's cases as well as students' registration with the department.

·Out Patient Department (OPD):The Out Patient Depatment consists of the consulting rooms that

serve as a means for medical staff to carry out examinations of patients.

Laboratory Unit:Various medical tests are carried out in the laboratory units. Some of

which are blood test,urine test,faeces test and more.This unit basically service to carry out

medical diagnosis.

Emergency Unit: This unit is also referred to accident and emergency unit (A&E). It

specializes in emergency medical care.

X-ray Unit: X-ray unit helps to carry out x-ray diagnosis for bones and soft tissues.It

also carry out diagnostic ultrasound and Electrocardiogram (ECG).

Theatre Unit: This unit aid in minor surgical operations.

Ward:It consists of male and female ward where patients are admitted and treated.

Dressing and Injection Unit: This unit helps in the treatment of patients wound. Dressing

is carried to stop bleeding, protect against infectin and ease pain. Injections are also

administered in the treatment of illness and infection.

·Ambutance Unit: The Ambulance Unit provides ambulance service in cases of medical

emergencies.

17
·Laundry Unit:The laundry unit assists in washing,drying and ironing of patient's bed

sheets,hospital clothes and other textile materials there by ensuring a clean environment.

The Department of Health Services,University of Benin also provides Emergency Medical

Services to students and other stakeholders in the university community in need of urgent

medical care. The department offers a 24-hour ambulance service.All cases that canno be

treated by the department are referred to the University of Benin Teaching Hospital (UBTH).

2.4 Mobile Applications:An Overview

Mobile application,most commonly referred to as an app, is a type of application software

designed to run on a mobile device such as a smartphone or tablet computer. Mobile

applications frequently serve to provide users with similar services to those accessed on

Personal Computers. (Techopedia, 2020).

The mobile application industry is an ever growing industry that is now an integral part of any

business we think about.

Mohile applications allow users to have easy, functional access to information,products and

services and processes that they need in real-time and are optimized for hands on interaction.

The exploding popularity ofsmartphones and tablets has made mobile application development

an increasingly popular trend among business owners all over the world. Furthermore with the

growing number of people accessing the internet via smartphones and tablets,mobile

applications has the unique ability to access a large number of potential customers.

It is very evident that people consume digital media majorly on a mobile phone and mobile

applications take up 90% of the time spent on a mobile phone apart from using it for calls and

short message service (SMS)(Thomas C.G.,etal.,2021).

18
The mobile application industry market had its value as $106.27 Billion in 2018 and is expected

to reach $407.31 Billion by the year 2026(Thomas C.G.,et al.,2021).

In Nigeria,the smartphone sector is among the fastest growing sector of the economy.

In the most recently measured period,there were almost 81 million mobile internet users in

Nigeria and mobile phone internet usage is particularly popular. The internet penetration

amounted to over 38% of the population in 2022 and is set to reach 48% in 2027(Statista,2022).

In today's world, mobile applications are essential as they provide functionalities that can serve

useful purposes such as finding a location, booking movie tickets online,assisting in e-

learning,increase business accessibility and visibility and many more.

Mohile applications can be downloaded from various platforms such as Google Play Store and

iOS App Store.

A mohile application can also be referred to as an app,web app or iPhone app.There are free

apps as well as paid apps. Some apps can be used for free for a specific amount of time before

suhscribing for premium membership.

Mobile application development is the set of processes and procedures involved in wnting

software for small,wireless computing devices such as smartphones and other hand-held

devices.

There are several types of mobile application development technologies,some of which are

explained briefly as follows:

·Native Applications: These applications are basically platform specific that is they

are targeted towards a particular mobile platform therefore an appintended for Apple

device does not run in Android device. They built using integrated development

environments (IDEs) and languages of specific mobile operating systems such as

19
Apple iOS or Google Android.Native apps enables the developer to customize

necessary features,incorporate best-in-classuser interface modules but they can be

more costly than other technologies.

·Web-based Applcations: A web-based applications are implemented with the standard

weh technologies of HTML, CSS, and JavaScript. These mobile applications are

developed using web technologies.They are cheap and quick to develop however they

are less powerful than native apps.

·Hybrid Applications: The concept of Hybrid Applications is a mistureof native and weh-hased

app.They are made to support web and native mobile development technologies acrons multiple

platforms. Theve apps are easier and faster to develop.This is because it involves a single codehase

which works in multiple mohile operating systems. Apps developed using Xamarin, React

Native,Flutter and other frameworks are categorized as hybrid applications.

2.4.1 Some Mobile Applications for Emergency Medical Service

Accarding to the world health organization,the development of apps for the health domain is

directly or indirectly intended to maintain or improve healthy behaviours, quality of life and

people's well-being(Alejandro et al.,2020).

Mobile applications in the health sector are continually growing; several medical resources are

availahle on digital distribution platforms of mobile apps on the Google Play Store and Apple

App Store for Android and iOS operating systems. (Alejandro et al,2020).

Although an emerging and rapidly developing field,mobile application technology has

contributed immensely in transforming health care delivery.An important the area of concern is

in emergency medical service.

20
There are several mobile applications for emergency medical services available on

Google Play Store and Apple App Store,cach of them provides a common objective

which is to ensure personal safety and increase patient's chances of survival in

emergency situation.A review of some of these mobile applications for medical

emergencies is discussedl briefly:

·SOS Alert App:The SOS Alert is an emergency mpp which helps you out whenever your sa
at risk by reachingout to your emergency contacts and providing them with your current loca
case of an emergency,the user presses the SOS Widget or Button in the app;thereafter t
searches your current location on Google Maps and sends a link of your current location
SMS to the emergency contacts that registered on the app so they can locate you accurate
uniqueness of this app is that it offers the very basic user interface and ease of use by just o
of the SOS Widget.

·ICE (In Case of Emergency) App: This application creates a notification visible on your lock scree

notification contains all the necessary inforation about the registered app user.This information ca

be accessed by emergency medical services if the registered user is unable to tell them about

medical history or contacts.An amazing feature of this app is the Emergency SOS to allows u

send their location to emergency contacts and alert emergency services.

Prime Alert App: Prime Alert App is an emergency alert app that helps to protec

save lives.It is user friendly and cost effective. The uniqueness of this app is

that it is designed to provide automated alerts,and manage thenumhber of

dependents location.

21
21
·Medical ID App: Medical ID App is an emergency alert app that allows users to create

medical profiles that are accesible from their lock screen.In case of emergency,the app

allows quick access to medical data from your lock screen.It also directs call from your

lock screen and contains an alert feature to send an SMS in one tap.

·HELP App: HELP (Health Emergency Linkage Portal) App offers swift access to

emergency care.It is one of the indigenous mobile applications for emergency medical

service. It allows users to request ambulances in emergencies or schedule one in

advance. Upon request,users not only get access to available ambulances within

proximity but they also get affordable options to choose from. Health Emergency

Linkage Portal is a Nigerian based health care logistics company.

·DRO Health App: DRO Health App is another indigenous mobile application for health

care delivery and medical emergencies.It makes health care delivery casy, accessible

and affordable.This app also offers unlimited consultation with doctors online,proper

documentation of medical history.prescriptions and drug delivery at patient's door step.

Most of the mobile applications available on the android and iOS operating systems;

function on a larger area metropolis and very few of these apps are available to offer

emergency medical service for leaming institution. Thus here is need to design a mobile
arplication system for emergency medical service in tertiary institutionof learning in ovder te
provide a closer health care delivery for students and other stakeholders in the leaming
community.The analysis and design are postulated in the next chapter.

CHAPTER THREE

SYSTEM ANALYSIS AND DESIGN

23
3.1 System Analysis

System analysis is the process of collecting and interpreting facts,identifying problems, and

decomposition of a system into its component.

System analysis is conducted for the purpose of studying a system or its parts in order to identify its

objectives. It is a problem solving technique that improves the system and ensures that all the

components of the system work efficiently to accomplish their purpose.

There are various methodologies used in System Analysis and Design, these include:

Object-Oriented System Analysis and Design Methodology

Structured System Analysis and Design Methodology

A methodology consists of an approach to software development, a set of techniques and notations

that support the approach and a life cycle model to structure the development process.(Jeffery A.H.et

al.,2017)

For this project work, Object-Oriented System Analysis and Design (OOSAD)

Methodology was adopted.

Ohject-Oriented System Analysis and Design is a technical approach for analyzing and designing an

application or system,by applying object-onentedl concepts,as well as visual modeling throughout the

softwar development process.(Jeffery A.H.et al.,2017)

This methodology was chosen because the entire scope and features of this application is not yet

known and development will be carried out in an iterative format with incremental features as the need

arises unlike the structured system analysis and design methodology that insist that the entire

requirement and scope of the application must be provided before commencing the development

process.

3.2 Analysis of Existing System

25
In this project,the Department of Health Services,University of Benin was selected as the

system under study.The department has a team of dedicated medical and paramedical staff

who are well trained and experienced in health care delivery especially as it pertains to

emergency medical services.

Students and other stakeholders in need of emergency medical care place a phone call across

to the department through its existing emergency phone numbers. These emergency phone

numbers are available on designated signpost in some locations around the university learning

environment. Also there are other publications as well as the institution website that host these

emergency phone numbers.

Once a distress call is made,the personnel in charge of the OutPatient Department respond to the caller

quickly notify the ambulance unit.Thereafter the ambulance is sent to the scene of the distress call along

a medical staff.

There are cases of stable and unstable medical emergency conditions. For stable condition,the affected vi

in need of emergency medical care can still respond to treatment and give out vital information need

his/her medical proceeding.However for cases of unstable medical condition, an individual especially

close to the victim or at the scene of the incident can assist to render vital information that would help in the

-hospital treatment and stabilization before arrival at the health centre.

Upon arrival at the health centre,the patients are immediately taken to the emergency unit of the Out Pa

Department (OPD)where they are admitted into the male or female ward and other medical treatm

continues. There is a team of standby medical doctor and nurses that are available to administer treatme

patients who are admitted to the emergency unit. All medical cases that cannot be treated by the departm

of health services are referred to the University of Benin Teaching Hospital (UBTH).

26
3.3 Constraints of the Existing System

Although the existing system uses voice communication through phone call to request

emergency medical care, there are still a few constraints that apply to the system;

·Low awareness of the existing emergency medical phone numbers:As a result of

the fact that the existing emergency lines are distributed on strategic locations and

are hosted on printed publications as well as on theinstitution website,in situations where victims in need of

emergency medical care are not in close proximity to these locations there is usually delayed access to

health care.

Single Channel of Communication:The existing system operates using voice communication through phone

call.However in the event of network downtime, this will pose a great threat to efficient emergency medical

service delivery.

Delayed update of emergency medical phone numbers:When there are changes on the existing

emergency lines,these changes will be effected only during the period of maintenance of the

existing platforms where these numbers are inscribed and hosted.

3.4 Overview of the Proposed System

The proposed system is called Unicare. It was coined using two keywords“University and"Health Care”.

Unicare is a mobile application which uses mobile phone voice communication as well as an

instant messaging web service technology to provide timely and coordinated response in

managing medical emergency service within the university.

This system was developed using cross-platform mobile application development

approach which consisted of flutter framework and dart programming language. Cross-

27
platform approach utilizes object-oriented system analysis anddesign methodology

offering uniformity,object oriented programming concept,easy implementation and cost

effective production.

Unicare operates as two unique mobile applications working colaboratively,offering timely

and prompt response to those in need of emergency medical service from the scene of the

incidents to the point of definitive care.Unicare is composed of the User App as well as the

Administrator App.The users of this platform consist of students, staffs (academic and non-

academic)and their dependents. The administrator is the department of health services,

emergency unit,tasked with the responsibility of keeping records of daily registered users

and emergency reports sent by users.

3.4.1 Proposed System Architecture

Fig 1.0 Proposed System Architecture

28
28
The steps needed to reques for an emergency medical service are as follows:

The users which consist of students,staff and their dependents are required to register on the platform as first time

users.This registration is done on the signup page.Onlythe user's name and telephone number is required for this

process.As soon as registration is done, the user is directed immediately to the home page. Users on this platform

are not required to login their details again on the mobile application as their registered data are stored on the

Admin app using Google firebase database management system.They are automatically directed to the home

page whenever they launch the app.

The home page displays the designated campus (Ugbowo and Ekenwan) of the University.Users are

required to just click on the call button of either of the campuses which automatically allows them to dial the

existing emergency number and place cellular phone call across to the department of health services.

Alternatively users can also use the instant messaging platform,by clicking on the

“Report Emergency Button" on the home page and fill in the required information and

click on send report. Thereafter an instant message is sent across from the administrator

acknowledging the report. A call is immediately placed across by the department of

health services communicating with the user and thereafter attending to the emergency

medical condition.

3.4.2 Benefits of the Proposed System

the proposed system is a mobile application for emergency medical service within the university

designed to ensure safety and prevent worsened health conditions due to delayed access to

medical services. Other notable benefits are;

i. Provides a greater awareness among students and other stakeholders of the

existingemergency medical phone numbers through mobile application technology thereby

providing a closer and broader reach in health care services.

30
ii. Alternative Channel of Communication: Outside the voice communication cell phone

technology,users have an altemative means of instant messaging platform. This would

provide a timely and efficient health care service delivery in cases of network downtime.

iii. Developing a Culture of Innovation: The exploding popularity of smartphones and tablets

has made mobile application an increasingly popular trend in every sector of the human

economy. The proposed system would help to harness mobile application technology in

emergency medical service and welcome new innovations and technological approach

within the uniersity environment.

3.5 System Design

System Design is the process of planning a new business system or replacing an existing

system by defining its components or modules to satisfy the specific requirements. System

design could be seen as an application of system theory to product development.

A designer uses the design tools to express the information and knowledge in the

structure of system that is defined by a consistent set of rules and definitions.

3.6 System Design Tools

System design tools play an important role in system development.A few design tools used by so

designers include:

1. Data Flow Diagram (DFD): a data flow diagram is a graphical representation of flow of d

an informtion system. It is often used as a preliminary step to create an overview o

system,which can later be elaborated. The DFD is capable of depicting incoming

flow,outgoing data flow and stored data.It mentions nothing as to how data flows in a system

31
2. Unified Modelling Language (UML): is a general-purpose modeling language for systems

engineering applications. It was designed to provide a standard way to visualize the design of a

system. UML offers a way to visualize a systems architectural blueprint in a diagram including

elements such as:activities, individual components of the system and how they interact with other

software components,how entities interact with others, how the system will run,external user

interface.

3.6.1 System Design Tool: UML (Unified Modeling Language)

The Unified Modeling Language was chosen as the tool for modeling the designs for

the software application. To properly design the system for implementation,selected

components of UML were used: class,diagrams,activity diagrams and use case diagrams.These

components were selected due to the fact that it is self-illustrative if pmopertly designed, it is simple

and suits the nature of the system. It is also easy for end usersto understand the model for the sofware

system.

1.6.2UML-USE CASE DIAGRAM

A use cse is a list of actions or event steps typically defining the interactions between a role (an

actor) and a system, to achieve a goal. Simply put, it is a description of the systems behavior

from user's point of view with measurable result or value. Table 3.1 denotes use case notations

for use case designs.

Table 1.0: Use Case diagram notations and descriptions

Objects Symbol Description

32
Actor
They are the systems users.The
actorcould a person, organization or
externalsystem. They perform a role
in thesystem.

Use Case
Use case is a lot of steps,
typicallydefining interactions
between an actorand a system to
achieve a goal.

System
System A system is a rectangle spanning all

theuse cases in the system that defines

thescope of your system.Anything

withinthe box represents a functionality

that isin scope and anything outside is

not.

Relationship
<<include>> Illustrates the relationship
between anactor and a use case
<<Extend>> with a simpleline.It also illustrates
the relationshipbetween the use
cases (include &extend)

The use case for the actors on this platform are depicted in the following diagrams below

User:The users of this system consist of students, staff and their dependents are required to

register on the platform as first time users. This process is carried out on the Signup

33
Page.Once registration is complete, the user gains access to the home page and the Report

Emergency Page. Users can as well edit their information on the home page.

Fig 2.0: Use Case Diagram for Users

Admin:The admin of this system is the department of health services. The admin is in change of
keeping records of emergency reports sent by users of the system as well as monds of newly
registered users.

Fig 3.0: Use Case Diagram for Admin

The implementation and documentation of the proposed system are postulated in the
next chapter.

CHAPTER FOUR

IMPLEMENTATION AND DOCUMENTATION

34
System Implementation is the development,integration and testing of system components and delivery

of that system into production. The chapter provides the user guide of the implementation of the system

developed and its corresponding documentation.

4.1 System Requirements

All system needs certain components resources to function and execute effectively.There are

basically two types of system requirement.They are:

Hardware Requirement

Software Requirement

4.1.1 Hardware Requirement

The hardware requirements for the mobile application to function and exccute effectively are:

2GB RAM or more

At least 16GB available Storage

64 bit based

Processor Modes- Qualcomm, Snapdragon (Version 630 and


higher),Samsung Exynos, Hisilicon Kirim

1.8GHz Octa Core Processor or more

4.1.2 Software Requirement

The software requirement for the mobile application to function and execute effectively is:

Android versions 6.0 and higher versions

Software Development Tools/Technology

36
These are the languages, tools, and technologies that has helped in the creation and/or modification

and testing of the services implemented in this project.

4.3 Implementation Languages

These are the programming languages used to achieve the goal of this project.

4.3.1.Dart

Dart is an open source, general purpose, object oriented programming language developed

by Google. The purpose of Dart programming language is to create frontend user interfaces

for mobile and web applications. It supports most of the common concepts of programming

languages like classes,functions.In recent times, dart programming language used on the

flutter framework to develop cross platform applications from a single codebase.

4.4 Software Integrated Development Environment (IDE) and Tools used

An integrated development environment (IDE) is a software suite that consolidates basic

tools required to write and test software. The IDE integrate and manage these tools and

ome as a single frameworkIrsimplifhtes sofware development and help identify and

mimimnize coding mistakes.

The IDE used during the system development are:

Visual Studio Code, Android Studio and Flutter

4.4.1 Visual Studio Code

Visual Studio Code is a code editor and an Integrated Development Environment (IDE) that e

developers build and debug mobile,web and cloud application.It contains feature

debugging,syntax highlighting,intelligent code completion, snippets, code refactoring and e

allows programmers code in any programming language without switching editors.

37
Visual Studio Code was developed by Microsoft for Windows,Linux and Mac operating system.

4.4.2 Android Studio

Android Studio is an Integrated Development Environment (IDE) for android application

development. It is the official IDE for Google's Android Operating System.It has a flexible

gradle-based build system, fast and feature-rich emulator for app testing, it has a

consolidated environment where application developers can develop for all android devices.

It also provides extensive testing tools and framework and build-in supports for Google

Cloud platform.

4.4.3 Flutter

Fluter is an Open-Souree User Interface Software Development Kit created by Google for
building and developing cross platform applications for Android, iOS, Linux, Mac, Windows and
Web from a single codebase, Flutter applications are coded in Dart Language.

Flutter features expressive and flexible UI, widgets that incorporates cross all application
platforms such as Stack Widget, Wrap Widgets, Scaffold Widgets, Basic Material
Widgets.

44.4 Google Chrome

oogle Chrome is a cross platform web browser developed by Google. It is an open ource

application for accessing the world wide web and running web-based applications. t was first

released in 2008 for Microsoft Windows and was later ported to Linux, nacOS, iOS and Android.

4.5 Database Design

he Database used for the mobile application development was Google Firebase

38
4.5.1 Google Firebase

irebase is acloud hosted database. It was developed by Google. It provides developers with a

variety of tools and services to help them deveop quality apps and grow their user base. It is built

on Google's infrastructure.

key features includle Authentication, Realime Database, Hosting, Test lab and

Notifications.

1.6 User Documentation:System Testing

System testing is a level of testing which validates the complete and fully integrated

softwareproduct.The test carried out was an internal acceptance test which is based on olpha testing

in which the system developer used the systen as if'it was being used in the intended

workenvironment.The testing done on the mobile application involved:

Registration of New Users

Dialing the Emergency Numbers for each campus

Change an existing user telephone number

Sending emergency report

Checking reports on the admin app

Checking list of registered users

4.7 Implementation

System Implementation is the process of defining how a system should be built, ensuring

that the system is operational and meets quality standard.

39

39
4.7.1 Signup Page

Sign Up Now
Please bil the detals

Telephone Number

Fig 4.0: A Snapshot of the Signup Page

The Signup Page contains the Username Field and the Password field as the two input

fields.In this page the registration of new users of the mobile application is carried out.

472 Home Page

40
EMERGENCY

Fig 5.0:A Snapshot of the Home Page

The Home Page contains the call icon button for the two campuses that is Ugbowo and

Ekenwan Campus. In emergency medical situation, registered users simply click on the

call icon button and in the process place a phone call by dialing the emergency phone

number.

Report Emergency Page

42
Phone Numbet(Optional)

HOME

41
Fig 6.0: A Snapshot of the Report Emergency Page

The Report Emergency Page provides an alternative medium over voice call communication for

reporting emergency medical cases. It is an instant messaging portal that consists of two main

fields that is the Emergency situation and Location.While the Phone number field is optional for

registered users. Once an emergency report is sent, it i received on the admin app. The admin

been the department of health services,can reach out to the reporter.

Edit User Information

Change Phone Number

43

Fig 7.0: Snapshot of the Edit User Information

The Edit User Information Icon is located on the home page. It allows registered users to

admin,which the health services department to call reporters during emergency medical

situations.

4.7.5 User Reports Page

43
Fig 8.0:A Snapshot of the User Reports Page

messaging portal on the user app. The Report page can only be accessed by the

that thedepartment of health services and reach out to the reporter requesting
44
omergency medical service.

47.6 User Information Page

Users Info

Odirl Emmanuel

Fig 9.0: A Snapshot of the User Information Page

The User information page contains the list of registered users on the platform. It is

contained in the admin app.

43
CHAPTER FIVE

SUMMARY, CONCLUSION AND RECOMMENDATION

5.1 Summary

The project work covered all the basic processes involved in designing and implementing a mobile

application for emergency medical service within tertiary institution. It was designed to provide a

platform that would harness mobile application technology in emergency medical service and ensure

that students and other stakeholders within University in need of urgent medical care are attended to

from the scene of the incidents to the point of definitive care.

The scope of the project focused on emergency medical service within tertiary institution of

learning using a case study of the Health Services Department, University of Benin.

A review on emergency medical services was discussed as well as examination of some

mobile applications for emergency medical service.

Cross-platform mobile application development method was used. This approach utilizes

object-oriented system analysis and design. It consists of User App as well as the Admin App

working collaboratively and offering timely and prompt response to emergency medical

services.

5.2 CONCLUSION

This project work offers a mobile application that can address emergency medical service

within tertiary institution, providing a timely and coordinated response and promoting a health

and safe learning environment.

RECOMMENDATION

46
Tertiary institutions especially univerities should embrace and implement the developedl

system as it would provide timely and coordinated response in managing emergency

medical service.

Public and Private Hospitals can as well implement the developed system as it would
provide a greater awareness to sensitize the public and prevent worsened health

conditions due to delayed access to medical services.

Further work can be done on the developed system by Govemment and other private stakcholders

to ensure a broader reach in managing emergency medical services especially in larger city

metropolis.

REFERENCE

Aare Afe Babalola, (2020) The Power of Education. The Journal of Sustainable Dorlopment
Law and Policy December 2020.

Adetoun A. Ejimele and Adesegun O. Fatusi (2021) Emergency Preparedness in Hcalth


Institutions in Nigeria: Current Situation and Framework for Action. The Proceedings of the
Nigerian Academy of Science Volume 14, No 1,2021

Alejandro P. R., Goncalo M., Beariz S. D., Francisco M. R., Carlos P. V, (2020) Mobile Halth
Apps for Medical Emergencies: Systenatic Review. JMIR Mhealth Uhealth 2020 vol.8 iss.12

Anitha Ashishdeep, Jitendra Bhatia, Krunal Varma (2015) Software Process Models for Mobile
Application Development:A Review.International Journal of Computer Science and
Communication 2015,Voume 7 March 2016 pp150-153.

Jeffrey A. H., Joey F. G., Joseph S. V. (2017). Modern System Analysis and Design, Eight
Edition.

Manish N.Shah (2006) The Formation of the Emergency Medical Services System. American
Journal of Public Health March 2006, Vol.96.No.3

Michelle Lin,Salim Rezaie (2014) Top 10 mobile apps in Emergency Medicine: Emergency Medicine
Journal February 2014

47
Olumide Abiodun, Faithman Ovat, Oluwatosin Olu-Abiodun (2019) Provider-Related
Predictors of Utilization of University Health Services in Nigeria. Ethiopian Journal of Health
Sciences March 2019 Volume 29 No.2

Peter Asaga Mac,Axel Kroeger, Philomena Ehi Airiohuodion (2019) Needs Assessment of
Emergency Medical and Rescue Services in Abuja/Nigeria and Environs.BMC Emergency
Medicine 2019

Palicy on Emergency Medical Services (EMS) In Nigeria March 2016. Federal Mimistry

Health, Ahuju March 2016


Gicneal Practice: Role of General Practitioners. Journal of Family Medicine and Primary Care October
2014 Volume 3 Issue 4

Thomas C. G,and Jayanthila D. A. (2021) A Study and Overview of the Mobile App
Industry. International Journal of Applied Engineering and Management Letters
(EML),ISSN: 2581-7000, Vol. S, No.1,June 2021

Werld Health Organization Seventy-First World Health Assembly Provisional agenda


item 12.4, March 2018

https://nigerianfinder.com/ambulance-services-in-nigerial

https://www.premiumtimesng.com/news/top-news/454982-nigeria-to-introduce-
emergency-medical-ambulance-services-official.html.

https://punchng.com/nigeria-to-have-national-emergency-number/

https://www.scp-health.com/blog/top-10-emergency-medicine-mobile-apps/

https://www.statista.com/statistics/183849/internet-users-nigeria/

https://www.techopedia.com/definition/2953/mobile-application-mobile-app

https://www.worldbank.org/en/topic/tertiaryeducation

MAIN_PAGE

ert puackage:unicare/pages bottomNav Bar/bottomNavBar.dart';

48
import hackage:firebase_core/firebase_core.darr;

final getX=GetStorage():
wid main()asyne{

WidgetsFlutterBinding.ensurelnitialized();

await Firebase.initializeAppO;

await GetStorage.init();

runApp(const MyApp());

Constants constants=Constants();

class MyApp extends StatelessWidget

const MyApp({Key?key}):super(key:key);

@override

Widget build(BuildContext context){

return MaterialApp(

title:'Unicare',

theme:ThemeData(
primarySwatch:Colors.orange,

debugShowCheckedModeBanner:false,
home:check());

Widget check(){

if(getX.read("is_first_time")!=nu
e")!=null)

retum const BottomNavBar();

else
return const SignUp();

sIGNUP_PAGE

import dart:io;

import package:cloud_firestore/eloud_firestore.dart;

import 'package:flutter/services.dart';

import'package:fluttertoast/fluttertoas.dart;

import 'package:unicare/main.dart';

import 'package:unicare/pages/bottomNavBar/bottomNavBar.dart';

class SignUp extends StatefulWidget(

const SignUp((Key? key}):super(key:key);

@override

SignUpState createStatetate()=>_SignU

class_SignUpState extends State<SignUp>

TextEditingController nameControlle TextEditingController();

TextEditingController phoneNumberControlleller=TextEextEditingControlle();

bool isLoading=false;

@override

Widget build(BuildContext context){

return Scaffold(

backgroundColor: Colors.white,
body:SafeArea(

child:ListView(

children:[

const SizedBox(

height:70,

).

const Align

alignment:Alignment.topCenter,

child:Text(

"Sign Up",

style:TextStyle(

color:Colors.black,

fontSize:35,

fontWeight:FontWeight.w700),

),

).

const SizedBox(

height:120,

Padding(

padding:const Edgelnsets.symmetric(horizontal: 20),

child:Card(

elevation:6,
shape:RoundedRectangleBorder(

borderRadius:BorderRadius.circular(10)),

child:TextField(

controller:nameController,

enabled:isLoading? false:true,

textCapitalization:TextCapitalization.words,

style:const TextStyle(

fontSize:18,fontWeight:FontWeight.w500),

decoration:const InputDecoration(

prefixlcon:Icon(Icons.person),

alignLabelWithHint:true,

labelText:'Name',

floatingLabelBehavior:FloatingLabelBehavior.never,

labelStyle:TextStyle(

fontSize:16,

fontWeight:FontWeight.w800,

color:Colors.grey).

border:InputBorder.none,

contentPadding: Edgelnsets.fromLTRB(10,0,10,15),

)).

).

).
const SizedBox(

height:30,

Padding(

padding:const Edgelnsets.symmetric(horizontal:20).

child:Card(

elevation:6,

shape:RoundedRectangleBorder(

borderRadius:BorderRadius.circular(10)).

child:TextField(

controller:phoneNumberController,

keyboardType:TextInputType.number,

inputFormatters:[LengthLimitingTextInputFormatter(11)].

enabled:isLoading?false:true,

style:const TextStyle(

fontSize:18,fontWeight:FontWeight.w500),

decoration:const InputDecoration(

alignLabelWithHint:true,

prefixlcon:Icon(Icons.call),

labelText:'Phone Number',

floatingLabelBehavior:FloatingLabelBchavior.never,

labelStyle:TextStyle(
fontSize:16,
fontWeight:FontWeight.w800,

color:Colors.grey).

bonder:InputBorder.none,

contentPadding:Edgelnsets.froLTRB(10,0,10,15),

)).

const SizedBox(

height:100,
).

Padding(

padding:const Edgelnsets.symmetric(horizontal:20).

child:SizedBox(

height:50,

//width:200,

child:ElevatedButton(

onPressed:isLoading

?null

:0(

if(nameController.text.isNotEmpty &&

phoneNumberController.text.isNotEmpty)

if(phoneNumberController.text.length!=11){
Fluttertoast.showToast(

msg:"Phone number is incomplete",


textColor:Colors.white,

gravity:ToastGravity.TOP,

backgroundColor: Colors.black87);

}else{
setState((){

isLoading=true;

1)

_signupO;

I else {

Fluttertoast.showToast(

msg:"All fields must be filled",

textColor:Colors,white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

child:isLoading

?const SizedBox(

height:20,

width:20,

child:CircularProgressIndicator(

valueColor:AlwaysStoppedAnimation(Colors,white)))
:const Text(
"Sign Up",
style:TexStyle(

color:Colors.white,

fontSize:16,

fontWeight:FontWeight.w800),

).

style: ButtonStyle(

backgroundColor: MaterialStateProperty.all<Color>(

constants.primaryColor),

shape:MaterialStateProperty.all<RoundedRectangleBorder>(

RoundedRectangleBorder(

borderRadius:BorderRadius.circular(10)))).
1.

signup0){

FirebascFirestore.instance

collection('users')

.doc(phoneNumberController.text)

set({
'name':nameController.text,
'phoneNumber':phoneNumberController.text,

).then((value){

getX.write("is_first_time",true);

getX.write("phone_number",phoneNumberController.tex1);

getX.write("name",nameController.text);

setState((){

nameController.clear();

phoneNumberController.clear();

isLoading=false;

ng=false;

Fluttertoast.showToast(

msg:"Registration completed",

textColor:Colors,white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);
Navigator.push(

_)=>const
context, MaterialPageRoute(builder: (_) =>const BottomNavBar()));

)catchEmor((error)

setState((){

oading=false;

isLoading=false;
1)

if(error.erroris SocketException)(

Fluttertoast.showToast(

msg:"Check yourinternet connection",

textColor:Colors,white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

//myWidgets.showToast(");

else{

Fluttertoast.showToast(

msg:"An Error Occured",

textColor:Colors.white,

backgroundColor:Colors.black87);

).timeout(Duration(seconds: 40), onTimeout:0{

Fluttertoast.showToast(

msg:"Check your internet connection”,

textColor:Colors.white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

1);
HOME_PAGE
import package:flutter/material.dart';

import 'package:unicare/main.dart;

import 'package:unicare/pages/changeNumber/changeNumber.dart';

class HomePage extends StatelessWidget

const HomePage((Key?key}):super(key:key):

@override

Widget build(BuildContext context)

retum Scaffold(

backgroundColor:Colors,white,

appBar:AppBar(

backgroundColor:Colors.white,

elevation:0,
leading:IconButton(

onPressed:0{
Navigator.push(

context,MaterialPageRoute(builder:(=>const ChangeNumber()));
(=>const(

1,

icon:const Icon(Icons.person,size:30,)).

body:SafeArea(

child:ListView(
children:[

const SizedBox(
height:30,

Lottic.asset("assets/bellalert.json",height: 100,width:100),

const SizedBox(
height:20,

),

Column(

children:[
const Text(

"Medical Help",

style:TextStyle(

color:Colrs.black,
fontSize:35,

fontWeight:FontWeight.w700),

const Text(

"Needed?",
style: TextStyle(

color:Colors.black,

fontSize:35,
), fontWeight:FontWeight.w700),

const SizedBox(
height:30,

Text(

"Just elick the call button",

style:TextStyle(

color:constants.primaryColor,

fontSize:18,

fontWeight:FontWeight.w700),

1.

),
const SizedBox(

height:40,

Padding(

padding:const Edgelnsets.symmetric(horizontal:30),

child:Row(

mainAxisAlignment:MainAxisAlignment.spaceBetween,

children:[

Container(

height:40,

width:170,
decoration:BoxDecoration(

borderRadius: BorderRadius.circular(20),

color:constants.primaryColor),

child:const Center(

child:Text(

"Ugbowo Campus",
style:TextStyle(

color.Colors.white,

fontSize:18,

fontWeight:FontWeight.w700),

GestureDetector(

onTap:0
dialNumber(consants.ugbowoCampusNumber);
child;Container(
height:40,

width:40,
decoration:BoxDecoration(

shape:BoxShape.circle,

color:constants.primaryColor),

child:

const lcon(Icons.call,size:30,color:Colors.white),
),

1.

).

).

const SizedBox(

height:40,

).

Padding(

padding:const Edgelnsets.symmetric(horizontal:30).

child:Row(

mainAxisAlignment:MainAxisAlignment.spaceBetween,

children:[

Container(

height:40,

width:170,
decoration:BoxDecoration(

borderRadius: BorderRadius.circular(20),

color:constants.primaryColor),
child:const Center(
child:Text(

"Ekenwan Campus",

style:TextStyle(
color:Colors.white,

fontSize: 18,
), fontWeight:FontWeight.w700),

).

GestureDetector(
onTap:()(
dialNumber(constants,ckenwanCampusNumber);
child:Container(
height:40,
width:40,
decoration:BoxDecoration(

shape:BoxShape.circle,

color:constants.primaryColor),
child:
const Icon(Icons.call,size:30,color:Colors.white).
),
),

).

).
);
Future<void>dialNumber(String phoneNumber)asyne{
bool?res=await
FlutterPhoneDirectCaller.callNumber(phoneNumber);
REPORT_EMERGENCY PAGE

imponrt'huckage cloud firestoreicloud frestore dar

impuert package:fluttertoast/nuttertoast.darr';

const ReportMessage((Key? key)):super(key:key);


@override

ReportMessageState createState()c()=>_R_ReportMessageState();

class_ReportMessageState extends State<ReportMessage> |

TextEditingController reportController=TextEditingController();

e e ditingController phoneNumberController=TextEditingController();

TextEditingController locationController
TextEditingController();

bool isLoading=false;

g=false
@override

Widget build(BuildContext context)|

return Scaffold(
backgroundColor:Colors.white,

body:SafeArea(

child:ListView(

children:[

const SizedBox(
height:30,

),

Container(

height:70,

width:70,

decoration: BoxDecoration(

shape:BoxShape.circle,color;constants.primaryColor),

child:const lcon(Icons.message,size:45,color:Colors.white).

),

const SizedBox(

height:80,

),
Padding(
padding:const Edgelnsets.symmetricthorizontal:20).

child:Card(

elevation:6,

shape:RoundedRectangleBorder(

borderRadius:BorderRndius.circular(10)),

child:TextField(

controller:reportController,
maxLines:5,

enabled:isLoading ? false:true,

textCapitalization:TextCapitalization.sentences,

style:const TextStyle(

fontSize: 18,fontWeight:FontWeight.w500),

decoration:const InputDecoration(

alignLabelWithHint:true,
labelText:'What is the Emergency?.

floatingLabelBehavior:FloatingLabelBehavior.never,

labelStyle:TextStyle(

fontSize:16,

fontWeight:FontWeight.w800,

color:Colors.grey),

border:InputBorder.one,

contentPadding: Edgelnscts.fromLTRB(10,0,10,8),

)).

).
const SizedBox(

height:15,

Padding(

padding:const Edgelnsets.symmetric(horizontal:20),

child:Card(

elevation:6,

shape:RoundedRectangleBorder(

borderRadius:BorderRadius.circular(10)),

child:TextField(

maxLines:2,

controller:locationController,

enabled:isLoading? false:true,

style:const TextStyle(

fontSize:18,fontWeight:FontWeight.w500),

decoration:const InputDecoration(

alignLabelWithHint:true.

labelText:'Location',
nloatingLabelBehavior:FloatingLabelBchavior.never.

labelStyle:TxtStyle(

fontSize:16,

fontWeight:FontWeight.w800,

color.Colors.grey).

border:InputBorder.none,

contentPadding:EdgeInsets.fromLTRB(10,0,10,15),

)),

).

const SizedBox(

height:15,

Padding(

padding:const Edgelnsets.symmetric(horizontal:20),

child:Card(

elevation:6,

shape:RoundedRectangleBorder(

borderRadius:BorderRadius.circular(10)).

child:TextField(

//maxLines;5.

controller:phoneNumberController,

keyboardType:TextInputType.number,

inputFormatters:[LengthLimitingTextInputFormatter(11)],

enabled:isLoading?false:true,

style:const TextStyle(

fontSize: 18,fontWeight: FontWeight.w500),

decoration:const InputDecoration(

alignLabelWithHint:true,
labelText:'Phone Number(Optional),

nloatingLabelBehavior:FloatingLabelBehavior.never,

labelStyle:TextStyle(

fontSize:16,

fontWeight:FontWeight.w800,

color:Colors.grey),

border:InputBorder.none,
contentPadding: EdgeInsets.fromLTRB(10,0,10,15).
)),

).
).
const SizedBox(

height:30,

Center(

child:SizedBox(

height:40,

width:150,

child:ElevatedButton(

onPressed:isLoading

?null

:01

if(reportController.text.isNotEmpty &&

locationController.text.isNotEmpty)

iflphoneNumberController.text.isNoEmpty &&

phoneNumberController.text.length!=11)(

Fluttertoast.showToast(

msg:"Phone number is incomplete".


textColor:Colors.white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

Jelse{

setState(O){

isLoading=true;

));
submitReport();

)else(
Fluttertoast.show Toast(

msg:"All fields must be filled",


textColor:Colors.white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

child:isLoading

?const SizedBox(

height:20,
width:20.
child:CircularProgressIndicator

valueColor:AlwaysStoppedAnimation(Colors,white)))

:const Text(

"SEND REPORT",

style:TextStyle(

color.Colors.white,

fontSize: 16,
fom Weight:FontWeight.w800).
style:ButtonStylet
backgroundColor:MaterialStateProperty.all<Color>(

constants.primaryColor).

shape:MaterialStateProperty.all<RoundedRectangleBorder-(

RoundedRectangleBorder(
),
borderRadius:BorderRadius.circular(10))i).

1.

);

submitReport(){

FirebaseFirestore.instance.collection('reports').add(l

report_body:reportController.text,

'report_location':locationController.text,

'phoneNumber:

phoneNumberController.text.isNotEmpty?phoneNumberController.text:getX.read("ph
one_

'report_time':formatDateTime().

timestamp': FieldValue.serverTimestamp()

).then((value){

setState(0){

reportController.clear();

phoneNumberController.clear();

locationController.clear();

isLoading=false;
1);

showDialog(

context:context,

builder:(BuildContext context)(

return AlertDialog(

content:Column(

mainAxisSize:MainAxisSize.min,

children:[

const Texi(

"Thank you for your report".

style:TextStyle(

color:Colors.black87,

fontSize:16,

fontWeight:FontWeight.w400),

const Text(

"we will get across to you soon",

style:TextStyle(

color: Colors.black87,

fontSize:16,

fontWeight:FontWeight.w400),

const SizedBox(height:20),

Container(

height:45,

width:45,

decoration:const BoxDecoration(

color:Colors,green,shape:BoxShape.circle),
child:const Center(

child:Icon(

lcons.check,

color:Colors.white,

)),

),

);
1);

)catchError((error)(

setState((){

isLoading=false;
1):

if(error.error is SocketException)(

Fluttertoast.showToast(

msg:"Check your internet connection",

textColor:Colors.white,
gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

//myWidgets.showToast(");

else{
Fluttertoast.show Toast(

msg:"An Error Oceured",

textColor.Colors,white,

backgroundColor: Colors.black87);

).timcout(const Duration(seconds: 40), onTimeout:0)

Fluttertoast.show Toast(
msg:"Check your internet connection",

textColor.Colors,white,

gravity:TastGravity.TOP,

backgroundColor;Colors.black87);

String formatDateTime() (

//fomatting date

String dayday=DateTiateTime.now().day.toString();

String month=DateTime.now().month.toString();

gyear=DateateTime.now().year.toString();

//formatting time

ur24=DateTim「ime.now().hour;

String hour;
String minunute=DateteTime.now().minute.toString();

String noon;

f(hour24>12)(

hour=hour12.toString();
noon='PM';

else(

hour=hour24.toString();
print(hour24.toStriString());

noon='AM';

return('Sday/Smonth/Syear Shour.SminuteSnoon');

Botton_Navigation_Bar Page
import 'package:futter/material dart';

mpaut package:unicare/pages/message/messagef'age.darr;

const BottomNavBar((Key?key )):super(key:key);

@override

BottomNavBarState createState() _BottomNavBarState():

ass_BottomNavBarState extends State<BottomNavBar>(

int currentnt_index=0;

eens=const[

HomePage().

ReportMessage()

void updatelndex(int value){

setState((){

current_indexindex=value;

));

@override

Widget build(BuildContext context){

return Scaffold(

body:screens[current_index],

bottomNavigationBar:BottomNavigationBar(

enableFeedback:false,

elevation:0,
backgroundColor:Colors.white,

type:BottomNavigationBarType.fixed,

currentIndex:current_index,

onTap:updateIndex,
unselectedltemColor:constants.secondaryColor,

selectedltemColor:constants.primaryColor,

items:[

BottomNavigationBarltem(

label:"",
icon:Container(

//height:40,

//width:120,
padding:const Edgelnsets.symmetric(horizontal:8,vertical:8).

decoration:BoxDecoration(

borderRadius:BorderRadius.circular(10),

color: current_index=0?constants.primaryColor:Colors.white
)。

child:Row(
mainAxisAlignment:MainAxisAlignment.center,

mainAxisSize:MainAxisSize.min,

children:[

Icon(Icons.home,color:current_index==0?Colors.white:constants.scco

const SizedBox(width:5.).

Text(

"HOME",
style:TextStyle(
fontSize:16,
color: current_index==0?Colors.white:constants.secondaryColor,

fontWeight:FontWeight.w800),

),

),
)),
BottomNavigationBarltem(

label:"",

icon:Container(

//height:45,
//width:140,
padding: const Edgelnsets.symmetric(horizontal: 8,vertical:8),

decoration:BoxDecoration(

borderRadius:BorderRadius.circular(10).

color:current_index==1?constants.primaryColor:Colors.white
child:Row(

mainAxisAlignment:MainAxisAlignment.center,
mainAxisSize:MainAxisSize.min,
children:[

Icon(lcons.message,color:current_index==
1?Colors.white:constants.secondaryColor),

Column(

crossAxisAlignment:CrossAxisAlignment.start,
mainAxisAlignment:MainAxisAlignment.center,
children:[
Text(
"REPORT",
style:TextStyle(
fontSize:16,
color:current_index==1?Colors,white:constants.secondaryColor,

), fontWeight:FontWeight.w800).

Text(
"EMERGENCY",

style:TextStyle(

fontSize:16,
color:current_index==1?Colors,white:constants.secondaryColor,

fontWeight:FontWeight.w800),

1.

CHANGE NUMBER PAGE

mout yuchage cloud firestore cloud firestore.dart

import package:flutter/services.darr

mont yuckage:unicare/main.darr;

ChangeNumber extends StatefulWidget{

■overde

ChangeNumberState createState() ChangeNumberState();

ChangeNumberState extends State<ChangeNumber>( TextEditingController


phoneNumberController TextEditingController(); tol isLoading=false;
@override

Widget build(BuildContext context)(

return Scaffold(

backgroundColor:Colors.white,

appBar:AppBar(

backgroundColor:Colors.white,

clevation:0,

).

body:SafeArea(

child:ListView(

children:[

const SizedBox(

height:40,

).

const Align(

alignment:Alignment.topCenter,

child:Text(

"Change Phone Number",

textAlign:TextAlign.center,

style:TextStyle(
color:Colors.black,

fontSize:35,
fontWeight:FontWeight.w700).

const SizedBox(
height:100,

Padding(
padding:const Edgelnsets.symmetric(horizontal:20),

child:Text(
"Current phone number:S(getX.read("phone_number")|",

style:const TextStyle(

//color:Colors.black,
fontSize:18,
fontWeight:FontWeight.w500),
),
),
const SizedBax(
height:10,

Padding(
padding:const Edgelnsets.symmetric(horizontal:20),
child:Card(
elevation:6,

shape:RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10)),
child:TextField(
controller:phoneNumberController,
keyboardType:TextInputType.number,
inputFormatters:[LengthLimitingTextInputFormatter(11)],
enabled:isLoading?false:tue,
style:const TextStyle(
fontSize:18,fontWeight:FontWeight.w500),
decoration:const InputDecoration(
alignLabelWithHint:true,
prefixlcon:Icon(Icons.call),
labelText:'New Phone Number',
floatingLabelBehavior:FloatingLabelBehavior.never,
labelStyle:TextStyle(
fontSize:16,

fontWeight:FontWeight.w800,

color:Colors.grey),

border:InputBorder.none,

contentPadding:Edgelnsets.fromL.TRB(10,0,10,15).
)).

const SizedBox(

height:80,

Center(

child:SizedBox(

height:50,

width:150,

child:ElevatedButton(

onPressed:isLoading

?null

:01

if(phoneNumberController.text.isEmpty)

Fluttertoast.show Toast(
msg: "Phone number field must be filled",

textColor:Colors.white,
gravity:ToastGravity.TOP,
backgroundColor:Colors.black87);

Jelse if(phoneNumberController.text.length!=11)(

Fluttertoast.showToast(
msg:"Phone number is incomplete",
textColor:Colors.white,

gravity:ToastGravity.TOP,
backgroundColor: Colors.black87);

Jelse if(phoneNumberController.textxt==getX.read.read("phone_numl
Fluttertoast.showToast(
msg:"New phone number is the same as the current one",
textColor:Colors.white,
gravity:ToastGravity.TOP,
backgroundColor: Colors.black87);

}else{
setState(()
isLoading-true;

1):

changeNumber();

child:isLoading

?const SizedBox(

height:20,

width:20,

child:CircularProgressIndicator(
valueColor:AlwaysStoppedAnimation(Colors.white)))

:const Text(

"Change Number",

style:TextStyle(

color:Colors.white,

fontSize:16,

fontWeight:FontWeight.w800),

),
style:ButtonStyle(

backgroundColor:MaterialStateProperty.all<Color>(

constants.primaryColor),

shape:MaterialStateProperty.all<RoundedRectangleBo
rder>(

RoundedRectangleBorder(

borderRadius:BorderRadius.circular(10)))),
),

),

),

);

changeNumber(){
FirebaseFirestore.instance

.collection('users')
.doc(phoneNumberController.text)
.set({

'name':getX.read("name"),
phoneNumber':phoneNumberController.text,
1).then((value)(

getX.write("phone_number",phoneNumberController.text);

setState((){

phoneNumberController.clear();

isLoading=false;
1)

Fluttertoast.showToast(

msg:"Phone number changed successfully,

textColor:Colors.white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

Navigator.pop(context);

).catchError((error)(

setState((){

isLoading=false;

if(error.error is SocketException)(

Fluttertoast.showToast(

msg:"Check your internet connection",

textColor: Colors,white,

gravity:ToastGravity.TOP,

backgroundColor:Colors.black87);

//myWidgets.showToast(");

else{
Fluttertoast.showToast(
msg:"An Error Occured",

textColor:Colors.white,

backgroundColor: Colors.black87);

).timeout(const Duration(seconds:40), onTimeout:(){

Fluttertoast.showToast(

msg:"Check your internet connection",


textColor:Colors.white,

gravity:ToastGravity.TOP,
backgroundColor:Colors.black87);
1);
CONSTANT_DECLARATION_PAGE

import package:flutter/material.dart;

class Constants {

olor=const 0(250,74,58,1) Color


primaryColor=const Color.fromRGBO(250

Color secondaryColor =const Color.fromRGBO(15O(15,14,32,1 1);

String ugbowoCampusNumberber = "08062936058";

String ekenwanCampusNumber=r="080

You might also like