PALM-3000 Status and the 3388-actuator Xinetics Deformable Mirror
MOBILE HEALTHCARE APPLICATION FOR …eprints.utar.edu.my/3388/1/FYP_FULL_REPORT.pdfMOBILE HEALTHCARE...
Transcript of MOBILE HEALTHCARE APPLICATION FOR …eprints.utar.edu.my/3388/1/FYP_FULL_REPORT.pdfMOBILE HEALTHCARE...
MOBILE HEALTHCARE APPLICATION FOR BREATHING TRAINING
MONITORING AND GAMIFICATION IN HEART RATE VARIABILITY
FOR WELL-BEING
VASANTA LIM XIN JING
A project report submitted in partial fulfilment of the
requirements for the award of Bachelor of Science
(Hons.) Software Engineering
Lee Kong Chian Faculty of Engineering and Science
Universiti Tunku Abdul Rahman
May 2018
ii
DECLARATION
I hereby declare that this project report is based on my original work except for
citations and quotations which have been duly acknowledged. I also declare that it
has not been previously and concurrently submitted for any other degree or award at
UTAR or other institutions.
Signature :
Name : Vasanta Lim Xin Jing
ID No. : 1504600
Date :
iii
APPROVAL FOR SUBMISSION
I certify that this project report entitled “MOBILE HEALTHCARE
APPLICATION FOR BREATHING TRAINING MONITORING AND
GAMIFICATION IN HEART RATE VARIABILITY FOR WELL-BEING”
was prepared by VASANTA LIM XIN JING has met the required standard for
submission in partial fulfilment of the requirements for the award of Bachelor of
Science (Hons.) Software Engineering at Universiti Tunku Abdul Rahman.
Approved by,
Signature :
Supervisor : Dr. Lee Poh Foong
Date :
Signature :
Co-Supervisor : Ms. Chean Swee Ling
Date :
iv
The copyright of this report belongs to the author under the terms of the
copyright Act 1987 as qualified by Intellectual Property Policy of Universiti Tunku
Abdul Rahman. Due acknowledgement shall always be made of the use of any
material contained in, or derived from, this report.
© 2019, Vasanta Lim Xin Jing. All right reserved.
v
ACKNOWLEDGEMENTS
I would like to thank everyone who had contributed to the successful completion of
this project. I would like to express my gratitude to my research supervisor, Dr. Lee
Poh Foong and co-supervisor, Miss Chean Swee Ling for their invaluable advice,
guidance and his enormous patience throughout the development of the research.
In addition, I would also like to express my gratitude to my loving parents
and friends who had helped and given me encouragement and motivation during the
whole process of the development of the project.
vi
ABSTRACT
Nowadays, people are under stress due to high workload. These people often ignore
their physical health as well as mental health. Some stress-related diseases such as
cardiac disease, depression and asthma have all become more and more common in
our society. Hence, this project is developed with the objectives: To design a mobile
application that allows users to check their well-being level, to provide a mobile
application that provides training in deep breathing to reduce stress, and to design a
mobile application game that encourages the users to achieve a healthy breathing rate
with Heart Rate Variability (HRV) measurement.
To achieve the objectives, the mobile application is designed to provide deep
breathing exercise guidance to the users and allow the user to measure their HRV by
using phone camera. The mobile application also encourages the users to achieve
healthy breathing rate by awarding the users when they achieve a better HRV results.
Prototyping methodology is selected as the system development methodology
of this project, while research, questionnaires and prototyping are chosen as the
research methodology. A mobile application and a web application are developed
successfully and pass all the test cases.
In conclusion, this project is a successful project that has met all the project’s
objectives. All the users’ data and records of using the mobile application are stored
in the web application. From the data collected, it is proved that most of the users
have positive feeling (happy, calm, and sleepy) after measuring HRV or performing
breathing training exercise.
vii
TABLE OF CONTENTS
DECLARATION ii
APPROVAL FOR SUBMISSION iii
ACKNOWLEDGEMENTS v
ABSTRACT vi
TABLE OF CONTENTS vii
LIST OF TABLES xi
LIST OF FIGURES xiii
LIST OF APPENDICES xvii
CHAPTER
1 INTRODUCTION 1
Background 1
Problem statement 2
Objectives of Project 2
Proposed solution 3
Technology involved 4
Development Tools 8
Proposed approach 9
Scope 10
Deliverables 10
Modules 10
Justification 11
2 LITERATURE REVIEW 12
Introduction 12
Existing similar mobile application 13
Breathe2Relax 13
Welltory 14
viii
Champions of the Shengha 15
Comparison between existing mobile applications 16
System Development Methodology 17
Waterfall 17
Scrum 18
Prototyping 19
The Verdict 20
Research Methodology 20
Research 20
Questionnaires 20
Prototyping 20
Heart Rate Variability Application 21
Heart Rate Variability 21
Method to measure HRV using smartphone 23
Deep Breathing Exercise 24
3 METHODOLOGY AND WORK PLAN 25
Introduction 25
System Development Methodology 25
Prototyping 25
Work Flow 27
Work Breakdown System 27
Gantt Chart 29
4 REQUIREMENT GATHERING AND FACT FINDING 32
Introduction 32
Questionnaire 32
Respondents’ information 32
Stress of respondents 33
HRV application 38
Summary 39
Project Requirement Specification 40
Functional requirements 40
ix
Non-functional Requirements 41
5 SYSTEM DESIGN 42
Behavioural UML Diagram 42
Use Case Diagram 42
Activity Diagram 49
Structural UML Diagram 54
Design Class Diagram 54
Database Diagram 55
Data Flow Diagram (DFD) 55
Entity Relationship Diagram (ERD) 57
Mobile Application User Interface 58
Home Screen 58
Menu Screen 59
Setting Screen 59
Change Password Screen 60
Feeling Screen 60
Breathing Training Screen 61
HRV Game Screen 62
Measure HRV Screen 64
Reward Screen 64
History Screen 65
Web Application User Interface 66
Main page 66
Login page 66
Home page 67
6 IMPLEMENTATION AND TESTING 69
Implementation of Mobile Application 69
Collection of Inter-beat Interval (IBI) 69
HRV Calculation 70
Unit Testing 71
Register Module 71
x
Login Module 72
Forgot Password Module 72
Setting Module 72
Feeling Module 73
Breathing Training Module 73
HRV Game Module 74
HRV Measurement Module 75
History Module 75
Reward Module 76
Integration Testing 76
Register and Login 76
Breathing training with feeling before and after 76
Breathing training with feeling before and after 76
Measure Initial HRV with feeling before and after 77
Measure Initial HRV with feeling before and after 77
Measure HRV with feeling before and after 77
Measure HRV with feeling before and after 77
System Testing 78
Perform Breathing Training 78
Measure HRV 79
7 CONCLUSIONS AND RECOMMENDATIONS 80
Contribution of Application 80
Limitations of Application 80
Recommendations for Future Improvement 80
Conclusion 81
REFERENCES 82
APPENDICES 85
xi
LIST OF TABLES
Table 1.1: Comparison of the market share between different
operating system 5
Table 1.2: Development Tools 8
Table 2.1: Comparison between existing mobile applications 16
Table 5.1: Register Account Use Case 43
Table 5.2: Login Account Use Case 43
Table 5.3: Reset Password Use Case 44
Table 5.4: Retrieve New Password Use Case 44
Table 5.5: Select Current Mood Use Case 45
Table 5.6: Take Breathing Training Use Case 45
Table 5.7: Measure HRV Use Case 46
Table 5.8: View HRV History Use Case 47
Table 5.9: View Reward Use Case 47
Table 5.10: Retrieve Users’ Apps Data Use Case 48
Table 6.1: Register Module Unit Test 71
Table 6.2: Login Module Unit Test 72
Table 6.3: Forgot Password Module Unit Test 72
Table 6.4: Setting Module Unit Test 72
Table 6.5: Feeling Module Unit Test 73
Table 6.6: Breathing Training Module Unit Test 73
Table 6.7: HRV Game Module Unit Test 74
Table 6.8: HRV Measurement Module Unit Test 75
Table 6.9: History Module Unit Test 75
Table 6.10: Reward Module Unit Test 76
xii
Table 6.11: Register and Login Integration Test 76
Table 6.12: Breathing training with feeling before and after
Integration Test 76
Table 6.13: Measure Initial HRV with feeling before and after
Integration Test 77
Table 6.14: Measure HRV with feeling before and after
Integration Test 77
Table 6.15: Performing Breathing Training System Test 78
Table 6.16: Measure HRV System Test 79
xiii
LIST OF FIGURES
Figure 1.1: Flow Chart of modules 3
Figure 1.2: Laravel MVC framework 7
Figure 1.3: React Native 8
Figure 1.4: SQLite 8
Figure 1.5: Heroku 8
Figure 1.6: Laravel 8
Figure 1.7: Prototyping process 9
Figure 2.1: Screenshot of Breath2Relax breathing exercise 13
Figure 2.2: Screenshot of Welltory 14
Figure 2.3: Screenshot of Champions of the Shengha 15
Figure 2.4: Waterfall model 17
Figure 2.5: Scrum model 18
Figure 2.6: Prototyping model 19
Figure 2.7: Electrocardiogram 21
Figure 2.8: Reflection and transmission modes for video
acquisition 23
Figure 3.1: Prototyping model 25
Figure 3.2: Gantt Chart Diagram for Planning 29
Figure 3.3: Gantt Chart Diagram for Fact Finding 29
Figure 3.4: Gantt Chart Diagram for Literature Review 29
Figure 3.5: Gantt Chart Diagram for Interface Design 30
Figure 3.6: Gantt Chart Diagram for Development Phase 30
Figure 3.7: Gantt Chart Diagram for Testing Phase 31
Figure 4.1: Respondents’ gender 32
xiv
Figure 4.2: Age of respondents 33
Figure 4.3: Frequency of stress 33
Figure 4.4: Source of stress for different age group 34
Figure 4.5: Ways to handle stress for different age group 36
Figure 4.6: Respondents who know what is HRV 38
Figure 4.7: Respondents experience in using mobile application
to measure HRV 38
Figure 4.8: Respondents that are interested in the mobile
application to be developed 39
Figure 5.1: Use Case Diagram 42
Figure 5.2: Activity Diagram for Login 49
Figure 5.3: Activity Diagram for Register 49
Figure 5.4: Activity Diagram for Breathing Training 50
Figure 5.5: Activity Diagram for Measure HRV 51
Figure 5.6: Activity Diagram for View History 52
Figure 5.7: Activity Diagram for View Rewards 52
Figure 5.8: Activity Diagram for Generate Users Apps Data 53
Figure 5.9: Design Class Diagram 54
Figure 5.10 Context Diagram 55
Figure 5.11: DFD Diagram (Level 1) 56
Figure 5.12: Entity Relationship Diagram 57
Figure 5.13: Home Screen 58
Figure 5.14: Login Screen 58
Figure 5.15: Register Screen 58
Figure 5.16: Forgot Password Screen 58
Figure 5.17: Menu Screen 59
xv
Figure 5.18: Setting Screen 59
Figure 5.19: Change Password Screen 60
Figure 5.20: Feeling Screen (Before) 60
Figure 5.21: Feeling Screen (After) 60
Figure 5.22: Breathing Training Screen 61
Figure 5.23: HRV Game Screen 62
Figure 5.24: HRV Game Screen 62
Figure 5.25: HRV Game Screen 62
Figure 5.26: HRV Game Screen 62
Figure 5.27: Message popup when user haven’t done any
measurement 63
Figure 5.28: Message popup when user done the initial
measurement 63
Figure 5.29: Message popup when user’s HRV is higher than
initial HRV 63
Figure 5.30: Message popup when user’s HRV is lower than
initial HRV 63
Figure 5.31: Measure HRV Screen 64
Figure 5.32: Reward Screen 64
Figure 5.33: Main Page 66
Figure 5.34: Login page 66
Figure 5.35: Home page when login as normal user 67
Figure 5.36: Home page when login as admin (Overall user data) 67
Figure 5.37: Home page when login as admin (Overall breathing
training data) 68
Figure 5.38: Home page when login as admin (Overall HRV data)
68
Figure 6.1: IBI Calculation 69
xvi
Figure 6.2: SDNN Calculation 70
xvii
LIST OF APPENDICES
APPENDIX A: Questionnaires 85
1
CHAPTER 1
1 INTRODUCTION
Background
Mind-body dualism is a view in the philosophy of mind that mental is two distinct
substances. Dualism believes that there is a two ways interaction between mental and
physical substances. Mental health and physical health are closely related and
affecting each other (Ohrnberger et al., 2017).
Stress is a part of life. Everyone experience stress but not everyone can
handle stress well. The sources of stress for every group age are different. People
who are 18 to 47 years old have the highest average stress level. Students suffer
stress from their studies, and after they graduate, they suffer stress from job stability,
financial stress and also stressed by work. Then for those who are over 48 years old
will start to feel stress about their health problem (American Psychological
Association, 2012).
There are positive benefits of stress such as increase one’s efficiency and
even boost memory. Stress also brings negative impact on health if people do not
handle stress effectively. Constant stress can lead to depression disorder and anxiety
disorder (Khan and Khan, 2017). Some stress-related diseases such as cardiac disease,
depression and asthma have all become more and more common in our society.
Heart rate variability (HRV) is known as psychological stress indicator (Kaur
et al., 2014). It is a new way to track well-being as it can be used to measure how
well people can handle stress. Researchers also indicates that higher HRV represents
good general health (Jarczok et al., 2015). Therefore, HRV will be used in this
project to measure the wellness of a person.
2
Problem statement
Nowadays, people are under stress and tension. The daily workload can
sometimes be unbearable. These people need help to keep track of their wellness and
provide ways for them to distress.
Using the traditional heart rate variability device to check for the stress level is
very inconvenience as the sensor needs to be wet and worn flat against the skin.
Performing daily measurement can be a burden. Besides, these HRV devices are
expensive for some people. These people need a low-cost setting method in
regulating their mood and check for their well-being level.
Objectives of Project
i. To design a mobile application that allows users to check their well-being
level.
ii. To provide a mobile application that provides training in deep breathing
to reduce stress.
iii. To design a mobile application game that encourages the users to achieve
a healthy breathing rate with Heart Rate Variability (HRV) measurement.
3
Proposed solution
HRV can be used to measure the well-being level of a person as it was positively
associated with cheerfulness and calmness (Geisler et al., 2010). To measure the
HRV of the user, the user’s pulse is detected from a finger by using the phone
camera assist with flashlight beside the camera. This allows us to measure the
wellness of the user in a quick way. By using this approach, the user can save extra
medical fees and knows his/her well-being level instantly. After the user checks for
his/her HRV, it will be recorded as the initial HRV value.
There are some ways for us to reduce stress in life. One of the techniques is
deep breathing (Cheng et al., 2017)(Cheng et al., 2018)(Kabat-Zinn et al.,
1992)(Dusek et al., 2008)(Cuijpers et al., 2014). Deep breathing is the easiest and
cheapest way to make a people calm down. Furthermore, deep breathing helps ones
to focus and relax the muscle. Therefore, the deep breathing training will be provided
in the application to guide the user to achieve healthy breathing rate.
After the breathing training, the user can choose to measure his/her HRV
again. The measurement for HRV is conducted in game based. When the latest user’s
HRV is better than the initial HRV, the user will be awarded a ‘puzzle’. This will
encourage the user to achieve a healthy breathing rate with HRV measurement.
Figure 1.1: Flow Chart of modules
Measure initial HRV
Deep breathing training
Reward
Measure HRV
If HRV higher than
initial HRV
If HRV better than
initial HRV
If HRV lesser than
initial HRV
If HRV better than
initial HRV
4
Technology involved
Several technologies are involved in a mobile application development in order to
achieve some functionality. Technologies involved in this project include the mobile
database engine, mobile operating system and also mobile application framework.
Besides, a web application also developed to support the mobile application.
1.4.1.1 Mobile Database Engine
Mobile database engine is required in this project to store data. SQLite database is
used in this project as SQLite’s features are very suitable for this project and it is free
to use.
SQLite database (SQLite, n.d) needs no server to run. The application can
directly communicate with the SQLite database to retrieve and store data. Next,
SQLite database is cross-platform and self-contained. This means that SQLite is
usable in any environments including the embedded devices such as iPhone and
Android devices.
For this project, the SQLite database is used to store the user’s HRV records
and user’s rewards. The HRV records included the date and time the user measures
HRV, and also the HRV results. This HRV data is stored in the user’s device and
viewable by the user.
5
1.4.1.2 Mobile Operating System
There are a lot of mobile operating system such as iPhone OS, Android OS,
Windows OS, BlackBerry OS, Symbian, and web OS.
Table 1.1: Comparison of the market share between different operating system
(Gartner, 2017)
According to the table above, 80% of the users use Android OS, while
approximately 18% of the users use iPhone OS. Android has the greatest amount of
users while other operating system has too little amount of users, hence this is major
reason that this project is developed for Android operating system.
Another reason for choosing Android operating system is because it is open
source and android applications are free to develop. Besides, the price for publishing
the application on Google Play Store (Android) is much cheaper than App Store
(iOS). Google Play Developer Account only cost $25 (around RM102.08), while
Apple iTunes Developer Account costs $99 per year (around RM404.22 per year). It
will be a large amount of money for publishing an iOS application compare to
Android application.
Therefore, in this project, the mobile application is built for Android
platforms.
6
1.4.1.3 Mobile Application Framework
As the mobile application for this project is built for Android OS and future it can be
improved to support iOS, the cross-platform mobile application frameworks such as
React Native is chosen for the application development.
React Native is a famous cross-platform framework developed by Facebook.
React native allows developers to build mobile apps using only JavaScript and it is
impossible for the user to differentiate from application built using C or Java as it
shares the same UI building blocks as usual iOS and Android Apps (Facebook, 2017).
Besides, using react native can help developers to increase the development
time as react native have the feature – hot reloading. The developers do not need to
waste time recompiling code after they edited their code, but only reload the apps.
React native provides a better way to develop a mobile application as it can
be easily converted between Android and iOS. This makes the application to have
more space for development in future.
1.4.1.4 Cloud Application Platform
In this project, the web application is deployed on Heroku.
Heroku is a free and flexible cloud application platform. It provides free web
hosting and allows developers to spend more time on developing rather than managing
servers, deployment, ongoing operations, or scaling.
For this project, all data that are collected from the application will be stored
in Heroku and admin can view the data collected from the developed web page.
7
1.4.1.5 Web Application Framework
In this project, a web-based application is created using Laravel framework.
Laravel is a Model-View-Controller framework. This means that it separate
the business logic code from presentation code. Therefore, developer can change the
appearance of a web page easily without touching the backend code or change the
backend code without touching the front end code. This makes Laravel project easier
to maintain.
Laravel framework is chosen to develop this web-based application is
because Laravel is built with authentication and authorization systems. This makes
implementing authentication become simple. Besides, Laravel is integrated with mail
services. Functions provided in Laravel were fully utilised in this project.
API is created using Laravel in this project for authentication and
authorization purpose. It includes login, register, reset password and send password
to user’s email address. API also created for storing HRV data and breathing data
from the mobile application, and for retrieving the HRV and breathing data to
present in web view.
Figure 1.2: Laravel MVC framework
8
Development Tools
There are several tools that I used to develop my project. Following are the tools that
I used:-
Tools Description
Figure 1.3: React Native
React Native is used in this project to develop the
mobile application.
Figure 1.4: SQLite
The SQLite database is created in the mobile application
for storing the apps data on the local devices.
Figure 1.5: Heroku
Heroku is used in this project for the web application.
The web application is deployed on Heroku.
Figure 1.6: Laravel
Laravel is used in this project to develop the web
application.
Table 1.2: Development Tools
9
Proposed approach
The proposed methodology for this project is prototyping.
Figure 1.7: Prototyping process
Prototype (Volchko, 2017) is a simple model of the system to be developed.
It shows how the actual system looks like with some basic functionalities. This
allows the developer to evaluate an idea and also gather the feedback.
The main aim for prototype is to test the product and usually it is used to
demonstrate, testing, and communication. It enables developer to understand the
requirements at early development stage. In the prototyping process, after the
developer understands the requirements, a simulation model will be developed for
the user to interact with it.
After showing the prototype to the user, developer is able to get valuable
feedback and this helps developer to understand what is expected from the user. This
allows the developer to identity the missing functionalities easily. After received
feedback from the user, developer will continue improve the model until the user is
satisfied with it, and lastly, the developer implements the actual system.
10
Scope
Deliverables
This project is developed a mobile application for breathing training monitoring with
heart rate variability (HRV). It is a game-based mobile app for well-being. Therefore,
this mobile application should provide breathing training to help users achieve
healthy breathing rate. Next, this mobile application is able to connect with phone
camera and flashlight to detect the users’ pulse from finger. The users’ pulse is
detected by processing the image captured by the camera. The mobile application
also calculates the HRV of the user and save it in the centralised database. This
project also includes a web-based application. Admin can check all users breathing
data and HRV data from the webpage.
Modules
1. Registration and login
a. Users are required to register if they are the first-time users, and
then login in in-order to use the mobile application.
2. HRV Measurement
a. Use Smartphone Application Frame Processing to process the
image of users’ finger.
b. Analyse pulse using the frame of image
c. Calculate HRV from the frames.
d. Display stress level based on pulse and heart rate of users.
3. Breathing Training
a. Provide a breathing training for users to guide them on how to
deep breathe in order to achieve healthy breathing rate.
4. History
a. Users can view the history of their HRV results on particular time
and day at history activity.
11
5. Reward
a. Users will be awarded a piece of puzzle when the HRV measured
is better than the initial HRV value.
6. Web-based application
a. Admin can view all users’ data from the webpage.
Justification
This mobile application brings convenience to those who are eager to know about
their HRV value. Users can use this application anywhere, anytime, as long as they
have their personal mobile device with them. They can view their history records of
HRV records in the application and keep track of their mental healthiness.
Besides, this mobile application provides breathing training to assist the users
to achieve a healthy breathing rate. Users will calm down when they focus in the
breathing training. This helps users to reduce stress, and keep their mind fresh.
12
CHAPTER 2
2 LITERATURE REVIEW
Introduction
There are a lot of methods that can help people to release stress and maintain mental
health and well-being. Common ways that people use to handle their stress are
exercising, entertainment, talk to someone, and also eating. Some of the people use
‘unhealthy’ ways such as overeating or smoking to escape from the stress in real life.
These ways might help them to reduce pressure, but also cause negative impact to
their health. According to the researchers, meditation can encounter stress effectively
in a healthy way (Cheng et al., 2017)(Cheng et al., 2018)(Chiesa and Serretti, 2009).
Deep breathing involves contraction of the diaphragm, expansion of the lung,
and deepening of inhalation and exhalation, which consequently decreases the
respiration frequency and maximises the amount of blood gases. During deep
breathing, the neurons will spread signals that can make people calm. Practice deep
breathing can improve physical and mental health. Therefore, in this project, the
mobile application will provide deep breathing training for the users to help them
maintain their well-being-ness.
13
Existing similar mobile application
Breathe2Relax
Breathe2Relax is a free of charge mobile application developed by National Center
for Telehealth & Technology in both iOS and Andriod platforms. This mobile
application provides the users detailed information on the effects of stress on the
body and also provides breathing exercise to help users manage their stress.
This application can capture users’ heart rate using Healthkit and Apple
Watch throughout the breathing exercise to improve user relaxation experience.
Besides, users are allowed shortening or lengthening the exhale time in the
application according to their own condition.
Figure 2.1: Screenshot of Breath2Relax breathing exercise
14
Welltory
Welltory is a mobile application developed by Welltory Inc for both iOS and
Android devices. This mobile application is free to use and offers In-App Purchases.
It has a high rating and high user’s amount.
This mobile application will break down the users’ HRV result into 3 areas,
performance, energy and stress. The application will provide recommendations
according to the biofeedback to help users to plan their day.
It tracks the users’ heartbeat using photoplethysmography (PPG) technique
and then run through the heart rate variability algorithm. PPG is an optical technique
used to detect volumetric changes in blood in peripheral circulation (Peng et al.,
2015)(Kurylyak et al., 2012). The HRV measurement can be done using phone’s
camera or external heart rate monitor.
Figure 2.2: Screenshot of Welltory
15
Champions of the Shengha
Champions of the Shengha is a mobile game developed by BfB Labs. The
application is free to download and there is no any In-App purchase for this game,
but the users need to purchase a wearable device called “Magic Transmitter”. The
Magic Transmitter costs £39.95 including shipping fee, which is about RM 212.62.
Champions of the Shengha is a real-time card battling game play through a
heart-rate monitor. The Magic Transmitter needs to be clipped on the users’ ear to
track the users’ heart rate. This Magic Transmitter will illuminate light to the skin to
measure the users’ heart rate variability and determine the users’ emotional state.
Users need to keep calm and focus in order to cast their spell.
Besides, this mobile game provides breathing training to teach the users on
how to regulate their emotions. After go through the breathing training, users can
learn to stay focus and their magic power in the game will increase.
Figure 2.3: Screenshot of Champions of the Shengha
16
Comparison between existing mobile applications
Breathe2Relax Welltory Champions of the
Shengha
Multiplatform – iOS and
AndroidOS
Multiplatform – iOS and
AndroidOS
Multiplatform – iOS and
AndroidOS
Measure user’s heart rate
using Apple Watch or
Healthkit. (iOS user only)
Measure user’s heart rate
using smartphone camera
Measure user’s heart rate
using sensory device
Provide a lot of
information about health
and stress to user.
Provide information about
user’s stress, performance
and energy.
Do not provide any
information about health
and stress to user.
Provide breathing training
for user to release stress.
Do not provide any way to
counter stress.
Provide breathing training
for user to learn how to
regulate their emotions.
Allow users to review
their stress data.
Allow users to review their
stress data.
Users cannot review their
stress data.
Activities are not
interactive.
Activities are not
interactive.
Interactive, able to duel
with players all around the
world.
Free to download and use. Free to download, provide
In-App purchase.
Free to download, need to
purchase external device.
No privacy policy Privacy policy is applied High privacy policy
No disclosed information
sharing or data gathering
functions are included.
May disclosed information
sharing or data gathering
functions.
No disclosed information
sharing, have data
gathering functions
Table 2.1: Comparison between existing mobile applications
From the comparison above, it can conclude that a good design of the mobile
application should be:
1. Easy to use
2. Interactive
3. Measure heart rate variability accurately in an easy way
4. Provide breathing training to guide users on stress reducing
5. Allow users to review their stress data
17
System Development Methodology
There are a lot of system development methodology that can be chosen to use in a
project. Each methodology is unique and has their advantages and disadvantages.
Therefore, there is no best methodology but the most suitable methodology.
Waterfall
Figure 2.4: Waterfall model
Waterfall model is a classical software development process introduced by Dr.
Winston W. Royce in a paper published in 1970. It is named as waterfall because this
model has 6 phases and each phase has to be completed before going to the next
phase. This type of model is suitable for small projects that have no uncertain
requirements. Planning should be done before enter the implementation phase and
software testing will only start after the development is completed. Strictly no
backward of development allowed.
Advantages of waterfall model
1. Simple and easy to understand and use.
2. Can have tight control throughout the development process.
3. Project can be well documented.
4. Provide predictable end result of time, scope and cost.
18
Disadvantages of waterfall model
1. High risk if the project requirement is in uncertainty and if the technology is not
enough mature.
2. No end users or stakeholders involvement throughout the process.
3. Does not follow the general testing principle as the testing will be carried out
after development completed. And this will increase the cost of a bug.
Scrum
Figure 2.5: Scrum model
Scrum is a well-known agile method developed by Ken Schwaber. This framework
focuses on gaining experience-based knowledge and the decision is made using the
knowledge learned. The team will have meeting very frequently to share their
updates, plan for the implementation and decide the duration for each phase.
Advantages of scrum model
1. Easy to cope with any changes on the requirements.
2. Able to change the development at any stages.
3. Spend time and money effectively.
4. Get feedback from stakeholders.
Disadvantages of scrum model
1. Project may fail if less commitment from the team members.
2. Need to have experienced team members in the project to accomplish tasks.
3. High pressure, need to spend a lot of effort on project development.
19
Prototyping
Figure 2.6: Prototyping model
Prototyping is a useful system development methodology that shows how the actual
product will be. After gathers the requirement, developer will do a quick design and
built the prototype. This simulation prototype will show to the customer. This allows
the developer to get a fast feedback from customer. After refining the prototype, the
developer will repeat the steps until the developer and customer satisfied with the
idea.
Advantages of prototyping
1. High user involvement in the development.
2. Fast user feedback.
3. Enhance communication between user and developer.
4. Helps to identify missing or misunderstood features.
Disadvantages of prototyping
1. May increase the complexity of the project as the scope may expand beyond the
original plans.
2. May cause project duration increase.
3. Developer may invest too much effort on building prototypes.
4. User may think prototype is the real product.
20
The Verdict
After compare and contrast the software methodology mentioned above, prototyping
methodology is chosen for this project. Prototype model can help the developer to
have better understanding on the project. It also can inspire the developer to have
better idea on the design of interface. Last but not least, this prototype model can
adapt to change of requirements in any phase of development.
Research Methodology
A few methods are used to collect data and gather important information that is
related to this project.
Research
Nowadays, existing documents in the field that have been studied or solved by other
professional researchers can be easily found online. Developers can analyse these
existing documents and collect data that is related to the project. This existing
document will shorten the research time and provide ideas on the problem solution.
Questionnaires
Questionnaire is a common research instrument that consists of a set of questions
with a choice of answer. By using questionnaires, developers can gather information
from large amount of respondents as questionnaires can be spread easily using some
online templates such as Google Form and Survey Monkey. Larger the sample size,
higher the accuracy (Marley, 2017). Therefore, 200 respondents from different age
groups are found to gather information for this project.
Prototyping
Prototyping is a good way for developer to gather information, and it is the pre-
design of the project. A prototype is often done by developer to show the
stakeholders how the product to be developed will look like and how it will work like.
This can foster communication between the stakeholders and the developer.
Stakeholders can understand the project well and even pointed out what functionality
the developer had missed out.
21
Heart Rate Variability Application
Nowadays, people need not buy expensive devices to measure their heart rate. HRV
can be measure using a phone application. These Heart Rate Variability (HRV)
applications allow users to record and store their R-R intervals on the phone to
analyst their HRV. This is definitely good news for users who are unwilling to
purchase expensive HRV device and users who are urge to know their HRV value.
Heart Rate Variability
Figure 2.7: Electrocardiogram
(Reed et al., 2012)
HRV is the degree of fluctuation in the length of the intervals between heartbeats (R-
R interval / inter-beat interval) and it is measured in millisecond (ms). Measurement
of HRV included time domain method and frequency domain method. The time
domain analysis such as standard deviation of NN intervals (SDNN) and Root Mean
Square of the Successive Differences (RMSSD) reflects the activity of cardiac
system while the frequency domain analysis such as Lower Frequency Power (LF)
and Higher Frequency Power (HF) reports the sympathovagal balance of the
autonomic nervous system (ANS) (Marek Malik et al., 1996) (Wang and Huang,
2012).
22
SDNN is the most straightforward and useful metric (Wang and Huang,
2012). SDNN is the standard deviation of all normal RR intervals. In our heart, there
is a node call atrioventricular node (AV node). This node contributes to the PR
intervals in an electrocardiogram. The practice of time domain measures will neglect
the presence of fluctuations in PR interval. During calculating the SDNN, any RR
interval that begins or ends with premature ventricular contractions (PVCs) and
premature atrial contractions (PACs) is simply deleted from the sequence. Below is
the formula of SDNN:
SDNN = √1
𝑁−1∑ (𝑅𝑅𝑗 − 𝑅𝑅̅̅ ̅̅ )2𝑁
𝑗=1
where
SDNN = Standard deviation of NN intervals
RR = Normal to normal RR intervals
HRV will increase when heart is beating slowing and decrease when heart
beats quickly. Therefore, when people feel stressed, HRV value will decreased
(Saravanan et al., 2014) (Kim et al., 2018). Decreased in HRV also can be related to
cardiac diseases, fatigue and also burnout (Olsson, 2010). While higher HRV
represents good general health (Jarczok et al., 2015).
23
Method to measure HRV using smartphone
Photoplethysmography (PPG) technique can be used to track the user’s heartbeats.
PPG is an alternate non-invasive technique for the detection of blood volume
changes. There are two possible PPG operation modes, reflection mode and
transmission mode.
Reflection mode Transmission mode
Figure 2.8: Reflection and transmission modes for video acquisition
(Damianou, 1995)
Nowadays, smart phones are equipped with high-resolution camera,
processors and LEDs. Therefore PPG technique is able to apply on smartphone to
detect heart rate. The light sources will be replaced by smartphone’s LEDs, while
photo detector will be replaced by smartphone’s camera. For smartphone-based
photoplethysmogram, reflection mode will be used for video acquisition.
To detect HRV using smartphone, the user needs to cover the smartphone’s
camera and LEDs with his/her fingertip. The light illuminated by LEDs will be
absorbed by blood in the user’s fingertip. When the capillaries are rich in blood,
more light is absorbed by the blood and this leads to lower reflective index and darker
frame intensities (Chandrasekaran, 2010).
A video will be recorded to obtain the pulse wave. From the frame, an
analysed region will be selected to analyse the change of intensity of light on the
frame. Usually the video frame will be split into 4 quadrants and the first quadrant
will be selected as analysed region. This is because this region has most changes and
the fluctuations are predominant (Zhang et al., 2011).
24
Deep Breathing Exercise
Deep breathing is an exercise that helps in mood regulations and it is good for mental
and physical wellbeing (Davis et al., 2008).
The article “Stress management techniques: Evidence-based procedures that
reduce stress and promote health” by Varvogli and Darviri (2011) talks about various
ways that helps in stress reduction. These stress managing techniques are useful
techniques that can help people to handle their stress and it is an effective tool for
health enhancement.
This article discussed about some evidence-based stress management
techniques including deep breathing exercise. Varvogli and Darviri (2011) state that,
these stress management techniques are commonly used for health related problems
such as cardiovascular disease, high blood pressure, diabetes, obesity, and headaches.
However, these stress management techniques not only applicable to people who
manifest a disease or disorder but also applicable to healthy people.
Varvogli and Darviri (2011) also argue that there is no any negative side
effect from deep breathing exercise. Besides, Varvogli and Darviri (2011) also note
down the details that people need to pay attention to when practicing the techniques.
25
CHAPTER 3
3 METHODOLOGY AND WORK PLAN
Introduction
In this chapter, the methodology of the project and project activities along a timeline
will be discussed.
System Development Methodology
The system development methodology that used for this project is prototyping.
Prototyping
Figure 3.1: Prototyping model
a) Requirement Gathering phase
Studies and analysis are performed at this phase. The fact finding about stress
and heart rate variability is done by doing research and collected through
questionnaires. Besides, the functional and non-functional requirements are
analysed. These requirements will be reviewed and signed-off by the supervisor.
b) Quick design phase
The design phase is performed after requirement gathering phase. Design of the
system should fulfilled the requirements gathered. A storyboard will be designed
during this phase to show the workflow and the design of user interface. This
phase is referred back when there are changes on the requirements or
functionalities of the system. Most of the time this phase is referred back after
each iteration of evaluation with the stakeholder had been done.
26
c) Building prototype phase
After the storyboard is signed-off, a prototype is built. The prototype is focused
on the user interface interaction and same basic core functionality. It shows how
the actual mobile application looks like and how it works.
d) Customer evaluation phase
After the prototype had been developed, it is tested and evaluated by the end user.
User’s satisfaction and feedback is observed and recorded. This phase helped the
developer to develop a better prototype in the next iteration or completed product.
e) Refining prototype phase
After analyse the feedback and evaluation of user on the prototype, the prototype
is refined and the functionalities were readjust to meet the user’s requirements.
The process moved on to the next phase after the prototype is granted and
approved by stakeholder.
f) Engineer product phase
This is the final phase of development. The enhanced version of prototype with
better user interface design and functionalities is developed. Before deployment,
testing was carried out. After all tests passed, the documentation for the project is
done for the reference of the future maintenance of the product and the product is
released to the customer.
27
Work Flow
Work Breakdown System
1.0 FYP
1.1 Planning
1.1.1 Confirm project title
1.1.2 Problem statements
1.1.3 Project Objectives
1.1.4 Project Scope
1.1.5 Technology Used
1.1.6 Project Plan
1.1.7 Requirement gathering
1.2 Questionnaire
1.2.1 Design questionnaires
1.2.2 Distribute questionnaires
1.2.3 Analyse result
1.3 Literature Review
1.3.1 Existing similar mobile application
1.3.2 Methodologies
1.3.3 Heart Rate Variabilities (HRV)
1.4 Interface Design
1.4.1 Quick Design
1.4.2 Supervisor Feedback
1.4.3 Refine design
1.5 Development Phase
1.5.1 Prototyping loop
1.5.1.1 Quick design
1.5.1.2 Build prototype
1.5.1.3 Get user feedback
1.5.1.4 Refine prototype
1.5.2 Implementation
1.5.2.1 Create Interface
1.5.2.2 Create Database
1.5.2.3 Implement Breathing Training
28
1.5.2.4 Connection of camera and flashlight
1.5.2.5 HRV Calculation with SDNN
1.5.2.6 Link all the modules
1.6 Testing Phase
1.6.1 Unit Testing
1.6.2 Integration Testing
1.6.3 System Testing
29
Gantt Chart
3.3.2.1 Planning
Figure 3.2: Gantt Chart Diagram for Planning
3.3.2.2 Fact Finding
Figure 3.3: Gantt Chart Diagram for Fact Finding
3.3.2.3 Literature Review
Figure 3.4: Gantt Chart Diagram for Literature Review
30
3.3.2.4 Interface Design
Figure 3.5: Gantt Chart Diagram for Interface Design
3.3.2.5 Development Phase
Figure 3.6: Gantt Chart Diagram for Development Phase
31
3.3.2.6 Testing Phase
Figure 3.7: Gantt Chart Diagram for Testing Phase
32
CHAPTER 4
4 REQUIREMENT GATHERING AND FACT FINDING
Introduction
This chapter will discuss about the method used for fact finding and the requirement
gathered.
Questionnaire
In this project, questionnaire is used for fact finding. The questionnaires were
distributed online using Google Form. A total amount of 200 respondents from
different age group have been collected to evaluate the source of stress of people
nowadays, and how people handle their stress. From this survey, it also can found
that quite a number of respondents are interested with a mobile application that can
help them to measure stress level and provide a way for them to release stress.
Respondents’ information
Figure 4.1: Respondents’ gender
Out of 200 respondents, 56% of the respondents (111 people) are female, while 44%
of the respondents (89 people) are male.
44%
56%
Gender
Male
Female
33
Figure 4.2: Age of respondents
The age of respondents is divided into categories. This survey is more focus on those
who are 18 to 59 years old. Out of 200 respondents, 10% of the respondents (20
people) are less than 18 years old. 42% of the respondents (85 people) are from 18-
25 years old. 21% of the respondents (42 people) are from 26-39 years old. 23% of
the respondents (46 people) are from 40-59 years old. The rest of 42% respondents (7
people) are larger than 60 years old.
Stress of respondents
Figure 4.3: Frequency of stress
Out of 200 respondents, 35% of the respondents (70 people) feel stress every day. 33%
of the respondents (66 people) feel stress at least once a week. 19% of the
respondents (38 people) feel stress at least once a month. 8% of the respondents (17
people) feel stress at least once a year. 5% of the respondents (9 people) claimed that
they will not stress. From the result concludes that most of the respondents are
experiencing huge stress from their daily life.
10%
42%21%
23%
4%
Age of respondents
<18
18-25
26-39
40-59
>60
35%
33%
19%
8%
5%
The frequency of respondents feel stress
Every day
At least once a week
At least once a month
At least once a year
I will not stress
34
Figure 4.4: Source of stress for different age group
The above chart is generated by analysing from the questions “Respondent’s age”
and “Source of stress”. Most of the respondents have more than one source of stress.
31% of the respondents (91 people) feel stress from working. 28% of the respondents
(82 people) stress is come from studies. 22% of the respondents (66 people) having
financial stress. 10% of the respondents (30 people) feel stress in theirs’ personal
relationship of family stress, while the rest of 9% of the respondents (27 people) feel
stress with their health problem.
It found that the main source of stress for respondents below 25 years old is
studies. This is because most of the respondents who are under 25 years old are
students and they are more focused on their academic studies. Besides stress from
studies, 39 respondents from the age group 18-25 years old have financial stress.
Most of them go for work due to their financial stress and at the same time they
experience stress from work. They also feel stress with their health condition as most
of them have no sufficient rest for a long time.
4
16
1
5
1
17
62
1
1
0
1
23
32
34
1
4
7
7
5
3
0
39
13
13
1
<18
18-25
26-39
40-59
>60
Source of stress for different age group
Financial
Relationship and Familyresponsibility
Working
Studies
Health problem
35
While for respondents who are 26 to 59 years old, the main source of stress is
stress from working. This portion of respondents already goes for work. Therefore,
out of 42 respondents, only one of them having stress from studies, while 76% of
them (32 people) having financial stress. This age group of respondents also has
family stress and health stress. Lastly, for respondents who are above 60 years old,
the main source of their stress is come from family. In conclusion, every age group
will have different source of stress.
36
Figure 4.5: Ways to handle stress for different age group
The above chart is generated by analysing the result from questions “Respondent’s
age” and “Ways to handle stress”. Most of the respondent used more than one way to
handle their stress. Entertainment is the most popular ways to release stress. Out of
200 respondents, 59.5% (119 people) feel that entertainments such as playing games,
watching movie, and listen to music can help them to release their tension.
From the results from respondents under 18 years old, 55% of the
respondents (11 people) were found will do exercise and entertain their self to release
stress. 7 out of 20 respondents will talk to someone when they feel stress.
11
30
20
17
3
11
65
27
19
0
3
5
2
7
4
7
36
8
25
2
1
5
4
0
0
2
20
5
0
0
0
16
4
0
1
0
4
0
0
0
<18
18-25
26-39
40-59
>60
Ways to handle stress for different age group
Others Think of something positive Eating
Reading Talk to someone Meditation
Entertainment Exercise
37
For the respondents who are between 18 to 25 years old, 76.5% of them (65
people) will find entertainment when they are stress. 36 of them (42.4%) claimed that
they will talk to someone to release stress and 30 of them (35.3%) will go for
exercise when they feel stress.
While for the age group “26-39”, 64.3% of respondents (27 people) claimed
that their way of handle stress is through entertainment while 47.6% of respondents
(20 people) states that they will exercise when they are stress.
Next, for those who are in between 40 years old to 59 years old, most of them
(54.3%) will choose to talk with someone when they are stress. 41% of them (19
people) will find some entertainment to release stress while 36.9% of them (17
people) will exercise.
Lastly, 4 out of 7 respondents who are above 60 years old states that they will
meditate when they are stress. Besides, 3 of them will go for exercise, while 1 will
think of something positive.
According to this finding, most of the people handle their stress through
entertainment while 10.2% of respondents (21 people) will meditate to release stress.
The mobile application that promotes healthy way to handle stress such as breathing
training will be a good choice that helps people handles their stress.
38
HRV application
Figure 4.6: Respondents who know what is HRV
Out of 200 respondents, only 40% of respondents (80 people) know what Heart Rate
Variability (HRV) is.
Figure 4.7: Respondents experience in using mobile application to measure HRV
Out of 200 respondents, only 22% of respondents (45 people) have experience using
mobile application to measure their HRV.
40%
60%
Respondent who know what is HRV
Yes
No
22%
78%
Have experience using mobile application to measure HRV
Yes
No
39
Figure 4.8: Respondents that are interested in the mobile application to be
developed
Out of 200 respondents, 39% of respondents (78 people) claimed that they will use
mobile application that can measure their stress level and help them to release stress.
Summary
Nowadays people are suffered by stress. Lots of them handle stress with unhealthy
ways such as eating. The mobile application that is going to be developed in this
project is able to provide them a healthier way of handling stress. From the result, it
was found that this mobile application would be a useful application for those who
hope to know their stress level and hope to learn healthy way of handling stress.
39%
17%
44%
Will use mobile application that can measure stress level and provide a way to help release
stress
Yes
No
Maybe
40
Project Requirement Specification
Functional requirements
Functional requirements will be denotes on the features, functions and also the usage
of the mobile application from the perspective of the product and also user. The
functional requirements for this mobile application are:-
1. Application shall allow user to login and register for an account.
2. Application shall allow user to reset password.
3. Application shall allow user to retrieve new password from email.
4. Application shall able to store the HRV data and breathing data of different
account on the same device.
5. Application shall able to determine the user’s HRV value.
6. Application shall able to provide deep breathing training.
7. Application shall able to provide a reward for the user when the user achieve
a better HRV value compare to his/her initial value.
8. Application shall able to record the user’s HRV data for history display.
9. Application shall able to record the user’s rewards collected in the rewards
display.
10. Application shall able to return user’s HRV data back to the server
automatically.
The functional requirements for the web application are:-
1. Application shall authorize the admin to view all users’ HRV data and
breathing data.
2. Application shall display the HRV data and breathing data in table and chart
form.
41
Non-functional Requirements
The non-functional requirements for this mobile application are:-
1. Application shall able to let first time user to register an account for the
mobile application.
2. Application shall able to calculate the HRV in around 2 minutes.
3. Application shall able to run on the Android platform version Kit-Kat 4.4 and
above.
4. Application shall able to connect with camera and flashlight.
5. Application shall able to connect to any internet connection for the breathing
data and HRV raw data to send back to the server.
6. Application shall be user friendly by providing instructions to guide the users.
The non-functional requirements for the web application are:-
1. The application shall be safe and secure to use.
42
CHAPTER 5
5 SYSTEM DESIGN
Behavioural UML Diagram
Use Case Diagram
Figure 5.1: Use Case Diagram
uc Use Case Model
HRV deep breathing game mobile application
UserAdmin
Measure HRV
Take Breathing Training
View Rewards View HRV history
Retrieve users' apps data
Register AccountLogin Account
Select Current Mood
Reset Password
Retrieve New Password
«include»
«include»
43
5.1.1.1 Use Case Description
Use Case ID 1
Use Case Name Register Account
Actors User
Description User needs to register an account to use the mobile
application.
Pre-condition User does not have an account.
Post-condition -
Flow of Events:
1. User chooses to register an account
2. User enters personal information.
3. System stores the new account information.
Table 5.1: Register Account Use Case
Use Case ID 2
Use Case Name Login Account
Actors User
Description User needs to login before using the mobile application.
Pre-condition User does not login to his/her account.
Post-condition -
Flow of Events:
1. User enters username and password.
2. System checks if the username and password are valid.
3. System navigates user to application home screen.
Alternative Flow of Events:
2.1 Username or password is invalid.
2.1.1 System displays message indicating username or password is invalid.
Table 5.2: Login Account Use Case
44
Use Case ID 3
Use Case Name Reset Password
Actors User
Description User can reset password using the mobile application.
Pre-condition User logged in to his/her account
Post-condition -
Flow of Events:
1. User enters old password, new password and reconfirm new password.
2. System checks if the old password is correct.
3. User is logged out and system ask user to login with new password.
Alternative Flow of Events:
2.2 Old password is wrong.
2.2.1 System displays message indicating password is wrong.
Table 5.3: Reset Password Use Case
Use Case ID 4
Use Case Name Retrieve new password
Actors User
Description User can retrieve new password from email.
Pre-condition User forgot password.
Post-condition -
Flow of Events:
1. User enters the registered email address.
2. System checks if the email is valid.
3. System sends an email with the auto-generated password to the user’s
email.
Alternative Flow of Events:
2.3 Email address is invalid.
2.3.1 System displays message indicating email is invalid.
Table 5.4: Retrieve New Password Use Case
45
Use Case ID 5
Use Case Name Select Current Mood
Actors User
Description User needs to select an emoji that represents his/her current
mood or feeling.
Pre-condition User login to the mobile application.
Post-condition -
Flow of Events:
1. System displays a lists of emoji.
2. User selects the emoji that represents his/her current feeling/mood.
Alternative Flow of Events:
2.1 User does not select an emoji.
2.1.1 Use case terminates.
Table 5.5: Select Current Mood Use Case
Use Case ID 6
Use Case Name Take Breathing Training
Actors User
Description User can practice deep breathing guided by the application
Pre-condition User login to the mobile application.
Post-condition -
Flow of Events:
1. User chooses to have a breathing training.
2. Perform use case Select Current Mood.
3. System guides the user to deep breathing.
4. Perform use case Select Current Mood.
Alternative Flow of Events:
2.1 User does not select an emoji.
2.1.1 Use case terminates.
4.1 User does not select an emoji.
4.1.1 Use case terminates.
Table 5.6: Take Breathing Training Use Case
46
Use Case ID 7
Use Case Name Measure HRV
Actors User
Description User can measure their heart rate by using the smartphone
camera.
Pre-condition User login to the mobile application.
Post-condition -
Flow of Events:
1. User chooses to measure HRV.
2. Perform use case Select Current Mood.
3. User puts fingertip on the mobile camera.
4. System records a 2 minutes video of user’s fingertips and calculates
HRV.
5. System calculates and displays user’s HRV value.
6. Perform use case Select Current Mood.
7. System compares the user’s HRV value with initial HRV value.
8. System rewards the user a puzzle when HRV value is higher than initial
HRV value.
Alternative Flow of Events:
7.1 User have no initial HRV
7.1.1 System rewards the user a puzzle.
7.1.2 Use case terminates.
8.1 HRV value is smaller than initial HRV
8.1.1 System displays a message indicates the user needs to go for
breathing training.
8.1.2 Perform use case Take Breathing Training.
8.1.3 Use case terminates.
Table 5.7: Measure HRV Use Case
47
Use Case ID 8
Use Case Name View HRV History
Actors User
Description User can view their previous measurement records that
have been done.
Pre-condition User login to the mobile application.
Post-condition -
Flow of Events:
1. User chooses to view history.
2. System displays all history of user’s HRV.
Table 5.8: View HRV History Use Case
Use Case ID 9
Use Case Name View Reward
Actors User
Description User can view the rewards collected
Pre-condition User login to the mobile application.
Post-condition -
Flow of Events:
1. User chooses to view rewards.
2. System displays all user’s rewards.
Table 5.9: View Reward Use Case
48
Use Case ID 10
Use Case Name Retrieve users’ apps data
Actors Admin
Description User’s apps data will be shared with the admin for data
analysis.
Pre-condition User done at least one HRV measurement or breathing
training.
Post-condition -
Flow of Events:
1. The user’s HRV records will be sent to server when user’s device is
connected to internet.
2. Admin retrieves users’ apps data (HRV records and breathing training
records) for data analysis.
Table 5.10: Retrieve Users’ Apps Data Use Case
49
act Activity diagram login
Enter username and password
ActivityInitial
Check if the username and password are valid
Allow user login Declide
ActivityFinal
[invalid][Valid]
act Activity diagram register
ActivityInitial
Enter personal informationStores new account information
ActivityFinal
Activity Diagram
5.1.2.1 Login
Figure 5.2: Activity Diagram for Login
5.1.2.2 Register
Figure 5.3: Activity Diagram for Register
System
User
System
User
50
act Take Breathing Training
ActivityInitial
Choose to take breathing training
Select Current Mood
Display a lists of emoji
Provide guidance to the user
Display a lists of emoji Select current mood
ActivityFinal
5.1.2.3 Take Breathing Training
Figure 5.4: Activity Diagram for Breathing Training
System
User
51
act Measure HRV
ActivityInitial
Choose to measure HRV
Select Current Mood
Display a lists of emoji
Put fingertips on cameraRecord a 2 minutes video
Calculate HRV and display HRV value
Compare HRV value with initial HRV value
Reward user a puzzleDisplay message indicates the user’s HRV does not better than initial HRV.
Display a lists of emoji Select Current Mood
ActivityFinal
[HRV is greaterthan initial HRV]
[HRV is smaller thaninitial HRV]
[Have initial HRV value]
[Have no initial HRV value]
5.1.2.4 Measure HRV
Figure 5.5: Activity Diagram for Measure HRV
System User
52
act View Rewards
ActivityInitial
Choose to view rewardsDisplay user's rewards
ActivityFinal
act View HRV history
ActivityInitial
Choose to view historyDisplay user's history
ActivityFinal
5.1.2.5 View History
Figure 5.6: Activity Diagram for View History
5.1.2.6 View Rewards
Figure 5.7: Activity Diagram for View Rewards
System
User
System
User
53
act Generate Users Apps Data
ActivityInitial
Retrieve users' breathing training records and HRV
recordsSend user's record to server
ActivityFinal
5.1.2.7 Generate Users Apps Data
Figure 5.8: Activity Diagram for Generate Users Apps Data
System
Admin
54
Structural UML Diagram
Design Class Diagram
Figure 5.9: Design Class Diagram
class Class Model
User profile
- age: int- country: string- email: string- gender: string- height: double- id: int- illness: string- password: string- race: string- username: string- weight: double
Breathing
- dateTime: Date- feelingAfter: string- feelingBefore: string- id: int
HRV
- dateTime: Date- feelingAfter: string- feelingBefore: string- hrv: double- id: int- reward: int
1
has
*
1
has
*
55
Database Diagram
Data Flow Diagram (DFD)
5.3.1.1 Context Diagram
Figure 5.10 Context Diagram
dfd Context Diagram
HRV DeepBreathing
Game MobileApplication
User AdminApps data
new password
History of measurement
Touch for breathing training
Email and password
Personal Information
email address
Heart Rate
new password
HRV value
User account
Collection of puzzle
Instruction forbreathing training
56
5.3.1.2 Data Flow Diagram (Level 1)
Figure 5.11: DFD Diagram (Level 1)
dfd Level 0
Admin
User
Registrationsection
Account
LoginsectionBreathing
trainingsection
HRV Gamesection
HRV data
Collection of puzzle
Generateusers'
apps dataBreathing training
data
Forgotpassword
section
Resetpassword
section
Touch forBrethingtraining
Breathingtrainingrecords
Userinformation
Retrievehistory of
measurement
Email andpassword
Collectionof puzzle
new password
Retrieve rewards collected
newpassword
puzzle
PersonalInformation
Email address
HRV data
HRVvalue
AppsData
new password
User account
email address
Instruction forbreathing training
new password
History ofmeasurement Breathing
trainingrecords
Heart rate
Account
email andpassword
HRV data
PersonalInformation
57
Entity Relationship Diagram (ERD)
Figure 5.12: Entity Relationship Diagram
class Logical View
user
«column»*PK id: INT username: VARCHAR(50) email: VARCHAR(50) password: VARCHAR(50) gender: VARCHAR(50) age: INTEGER height: DOUBLE weight: DOUBLE race: VARCHAR(50) country: VARCHAR(50) illness: VARCHAR(50)
«PK»+ PK_user(INT)
hrv
«column»*PK id: INTEGER userId: INT dateAndTime: DATETIME feelingBefore: VARCHAR(50) feelingAfter: VARCHAR(50) hrvValue: DOUBLE reward: INTEGER
«PK»+ id(INTEGER)
deepBreathing
«column»*PK id: INTEGER userId: INTEGER dateAndTime: DATETIME feelingBefore: VARCHAR(50) feelingAfter: VARCHAR(50)
«PK»+ id(INTEGER)
58
Mobile Application User Interface
Home Screen
This is the first screen the user will encounter when the application is launched. User
can choose to ‘Login’ by entering his/her email and password. If user does not have
account, he/she will need to register a new account. User will be navigated to the
register page if he/she presses the ‘Register’ button in login screen. User is required
to enter some personal information in order to create an account. After that, user will
be redirected back to the home screen to login to their profile.
Figure 5.13: Home Screen
Figure 5.14: Login Screen
Figure 5.15: Register Screen
If user forgot the password, he/she can press the ‘Forgot Password’ button in the
login screen to get an auto generated password from email.
Figure 5.16: Forgot Password Screen
59
Menu Screen
After login successfully, user will be navigated to the menu screen.
Figure 5.17: Menu Screen
Setting Screen
When user presses the wheel button on the menu screen, the user will be navigated to
the setting screen. User can view his/her username and email in this screen. User can
also choose to logout or change password in this screen.
Figure 5.18: Setting Screen
60
Change Password Screen
When user presses the change password button in the setting screen, the user will be
navigate to this screen.
Figure 5.19: Change Password Screen
Feeling Screen
User will be navigated to the Feeling Screen before and after he/she starts the deep
breathing training and measuring HRV.
Figure 5.20: Feeling Screen (Before)
Figure 5.21: Feeling Screen (After)
61
Breathing Training Screen
User will be navigated to the Breathing Training Screen after the user chooses an
emoji that represents his/her current feeling/mood.
The instruction will ask the user to press the centre button and breathe in. A
circle will slowly expand when user touch the centre button. When the circle reached
the maximum, the instruction will change and ask the user to release the button and
breathe out. Then, the circle will shrink until its original size, and the instruction will
change back to “Press and breathe in”.
This breathing training takes 2 minutes to complete.
Figure 5.22: Breathing Training Screen
62
HRV Game Screen
User will be navigated to the HRV Game Screen after the user chooses an emoji that
represents his/her current feeling/mood. A puzzle of clover will appear when the
user’s HRV value is better than initial HRV. After user collected all puzzles (4
puzzles), the puzzles will be cleared and the Reward Screen will be updated.
Figure 5.23: HRV Game Screen
(Initial)
Figure 5.24: HRV Game Screen
(After measured initial HRV)
Figure 5.25: HRV Game Screen
(After first measurement)
Figure 5.26: HRV Game Screen
(After third measurement)
63
Figure 5.27: Message popup when user
haven’t done any measurement
Figure 5.28: Message popup when user
done the initial measurement
Figure 5.29: Message popup when user’s
HRV is higher than initial HRV
Figure 5.30: Message popup when user’s
HRV is lower than initial HRV
When user’s HRV is lower than initial HRV, the user will be navigated to the
breathing training section.
64
Measure HRV Screen
After the user pressed Start button, user will be navigated to the Measure HRV
Screen. After done the measurement, user will be navigated to the Feeling Screen.
The measurement takes 2 minutes to complete.
Figure 5.31: Measure HRV Screen
Reward Screen
User will be navigated to the Reward Screen if the user pressed the Reward button in
HRV Game Screen. All the puzzles that user collected will display in this screen.
Figure 5.32: Reward Screen
65
History Screen
User will be navigated to the History Screen if the user pressed the History button in
HRV Game Screen. All the history of measuring HRV will display in this screen.
History Screen
66
Web Application User Interface
Main page
Figure 5.33: Main Page
Login page
Figure 5.34: Login page
67
Home page
Only admin is authorized to view the page content.
Figure 5.35: Home page when login as normal user
Figure 5.36: Home page when login as admin (Overall user data)
68
Figure 5.37: Home page when login as admin (Overall breathing training data)
Figure 5.38: Home page when login as admin (Overall HRV data)
69
CHAPTER 6
6 IMPLEMENTATION AND TESTING
Implementation of Mobile Application
The whole application is written in JavaScript except the HRV measurement part.
The HRV measurement part is written in Java. This is because of the limitation of
React Native. Therefore, the react-native-camera class is extended to allow it to be
used to measure user’s heartbeats and HRV.
Collection of Inter-beat Interval (IBI)
On every peak of the heartbeat, a milliseconds of time will be collected, and the next
peak milliseconds of time will be used to minus with the previous milliseconds time.
The difference between the peak and next peak will be the Inter-beat interval (IBI).
Then these results will be store in an array to calculate the HRV results.
Figure 6.1: IBI Calculation
70
HRV Calculation
When time reaches 2 minutes, the collection of IBI will be stopped and the
calculation of HRV starts. Before the calculation start, the first four IBI collected will
be ignore, as there might be some inaccurate result due to the movement of finger.
Moreover, there might be some Ectopic beats that might be collected during the IBI
calculation. Hence, the removals of Ectopic beats are essential in order to get a better
accurate of SDNN HRV result. The SDNN formula is then will be apply to calculate
the HRV result.
Figure 6.2: SDNN Calculation
71
Unit Testing
Unit testing is performed during the development phase to make sure that defects are
found and solve. Unit testing was carried out by testing on individual program units
or methods to ensure that they are functioning as intended.
Register Module
Test Case Test Execution Steps Expected Result Pass/Fail
Empty Field
Validation
1. Click Register with
empty fields
Register fail with warning
to fill out the empty fields
Pass
Check Email 1. Register using
existing email
Register fail with warning
email is registered
Pass
Validation
1. Register with
incorrect email
format
Register fail with warning
invalid email
Pass
Check
Password
1. Register with
different password in
both password and
confirm password
Register fail with warning
password not match
Pass
Password
Validation
1. Register with
password less than 6
characters or more
than 8 characters
Register fail with warning
length of password must
be 6-8 characters
Pass
Register 1. Register with all
correct format
Register successfully Pass
Table 6.1: Register Module Unit Test
72
Login Module
Test Case Test Execution Steps Expected Result Pass/Fail
Empty Field
Validation
1. Click Login with
empty fields
Login fail with warning to
fill out the empty fields
Pass
Login
validation
1. Login with incorrect
email address or
incorrect password
Login fail with incorrect
email and password
Pass
Login 1. Login with correct
email and password
Login successfully Pass
Table 6.2: Login Module Unit Test
Forgot Password Module
Test Case Test Execution Steps Expected Result Pass/Fail
Empty Field
Validation
1. Click Send Mail
button with empty
fields
Send mail fail with
warning to fill out the
email field
Pass
Validation
1. Click send mail button
with incorrect email
format
Send mail fail with
warning invalid email
Pass
Send mail 1. Fill in the email
address
2. Press the send mail
button
Send auto generate
password to mail
successfully
Pass
Table 6.3: Forgot Password Module Unit Test
Setting Module
Test Case Test Execution Steps Expected Result Pass/Fail
Logout 1. Click logout button
2. Click Yes when system
ask to double confirm the
logout action
Logout successfully Pass
Table 6.4: Setting Module Unit Test
73
Feeling Module
Test Case Test Execution Steps Expected Result Pass/Fail
Feeling button 1. Press the feeling
button
Show a popup message to
confirm
Pass
Table 6.5: Feeling Module Unit Test
Breathing Training Module
Test Case Test Execution Steps Expected Result Pass/Fail
Breathing
training
1. Press the button
when the circle is
in initial state
The circle expand and
system prompt a message
“Press and breathe in”
Pass
2. Hold the button
when the circle is
at maximum size
The circle maintain at the
maximum size and system
prompt a message “Release
and breathe out”
3. Release the
button when the
circle is at
maximum size
The circle starts to shrink
and system prompt a
message “Release and
breathe out”
Circle stop shrinking when
it reached its initial size,
and system prompt a
message “Press and breathe
in”
Table 6.6: Breathing Training Module Unit Test
74
HRV Game Module
Test Case Test Execution Steps Expected Result Pass/Fail
First
reward
1. Check on initial value, latest
value and the image shown
Initial value and latest
value should be the
same value, the image
shown is a stick
Pass
Second
reward
1. Check on initial value, latest
value and the image shown
Latest value is larger
than initial value, the
image shown is a stick
with a leaf
Pass
Third
reward
1. Check on initial value, latest
value and the image shown
Latest value is larger
than initial value, the
image shown is a stick
with two leaves
Pass
Forth
reward
1. Check on initial value, latest
value and the image shown
Latest value is larger
than initial value, the
image shown is a stick
with three leaves
Pass
Fifth
reward
1. Check on initial value, latest
value and the image shown
2. Press OK on the popup
message and check on initial
value, latest value and the
image shown
Latest value is larger
than initial value, the
image shown is a stick
with four leaves.
After press the OK on
the popup message,
the initial value and
latest value will
become empty and the
image is blank.
Pass
Table 6.7: HRV Game Module Unit Test
75
HRV Measurement Module
Test Case Test Execution Steps Expected Result Pass/Fail
Countdown
Time
1. Check on countdown time Count down start with
120 seconds (2
minutes) and a dialog
with HRV results is
popup after 2 minutes
Pass
Heartbeat
display
1. Check on heartbeat display Average heartbeat
should be shown
every 10 seconds
Pass
IBI
recording
1. Console check the IBI that are
recording in the background
0.2-2.5 milliseconds
of time recorded in an
array
Pass
SDNN
calculation
1. Measure heartbeat for 2
minutes
2. After 2 minutes, check on
console
3. Check IBI array and length of
the array after remove ectopic
beats
4. Check mean of IBI
5. Check the SDNN result
IBI collected should
be within 0.6 – 1.1
milliseconds, while
for SDNN result is 40
milliseconds to 170
milliseconds, depends
on the finger put on
the camera
Pass
Table 6.8: HRV Measurement Module Unit Test
History Module
Test Case Test Execution Steps Expected Result Pass/Fail
Show History 1. Check the history
screen
Show all HRV history of the
user
Pass
Table 6.9: History Module Unit Test
76
Reward Module
Test Case Test Execution Steps Expected Result Pass/Fail
Show Reward 1. Check the reward
screen
Show all rewards of the user Pass
Table 6.10: Reward Module Unit Test
Integration Testing
After unit testing is done, integration testing was proceed. Integration testing was
used to test is there any error when all the modules tested in the unit testing were
integrated.
Register and Login
Test Case Register account and successfully login
Test Procedure 1. Click Register button
2. Fill all the required fields
3. Submit the details
4. Login in with username and password that just register
Expected Results Login successfully with the newly registered account
Pass/Fail Pass
Table 6.11: Register and Login Integration Test
Breathing training with feeling before and after
Test Case Breathing training with feeling before and after
Test Procedure 1. Select a feeling on feeling screen.
2. Perform breathing training for 30 cycles.
3. Select a feeling on feeling screen.
4. Visit https://dbhrv2019.herokuapp.com (FOR Admin)
Expected Results Feeling before and after display on the web server (FOR
Admin)
Pass/Fail Pass
Table 6.12: Breathing training with feeling before and after Integration Test
77
Measure Initial HRV with feeling before and after
Test Case Measure Initial HRV with feeling before and after
Test Procedure 1. Select a feeling on feeling screen.
2. Measure heartbeat and HRV stress for 2 minutes
3. Select a feeling on feeling screen.
4. Check HRV Game Screen.
5. Check HRV result on History.
6. Visit https://dbhrv2019.herokuapp.com. (FOR Admin)
Expected Results The feeling before and after and HRV results should be
successfully display on the History screen
HRV results, feeling before and feeling after display on
the web server (FOR Admin)
The HRV Game Screen should have one stick.
Pass/Fail Pass
Table 6.13: Measure Initial HRV with feeling before and after Integration Test
Measure HRV with feeling before and after
Test Case Measure HRV with feeling before and after
Test Procedure 1. Select a feeling on feeling screen.
2. Measure heartbeat and HRV stress for 2 minutes
3. Select a feeling on feeling screen.
4. Check HRV Game Screen
5. Check HRV result on History
6. Visit https://dbhrv2019.herokuapp.com (FOR Admin)
Expected Results The feeling before and after and HRV results should be
successfully display on the History screen
HRV results, feeling before and feeling after display on
the web server (FOR Admin)
The number of leaves in HRV Game Screen will be
increased based on the number of collected puzzles, in the
condition when the HRV is larger than initial HRV.
Pass/Fail Pass
Table 6.14: Measure HRV with feeling before and after Integration Test
78
System Testing
System testing is essential after integration testing is done. System testing is to
ensure that the system function works perfectly when all the modules and integrated
parts were combined together. System testing was done with the device: Huawei
Honor 8x.
Perform Breathing Training
Test Case Full process with performing breathing training
Test
Procedure
1. Register and login
2. Press Deep Breathing Training button
3. Select a feeling on feeling screen.
4. Perform breathing training for 30 cycles.
5. Select a feeling on feeling screen.
6. Press setting button on menu screen.
7. Press logout.
Expected
Results
Register and successfully login
Breathing data (feeling before and after) submitted to the web
server (FOR Admin)
Logout successfully
Pass/Fail Pass
Table 6.15: Performing Breathing Training System Test
79
Measure HRV
Test Case Full process with Measure HRV
Test
Procedure
1. Register and login
2. Press HRV Game button
3. Press Start button
4. Select a feeling on feeling screen.
5. Measure heartbeat and HRV stress for 2 minutes
6. Select a feeling on feeling screen
7. Press history button and check history.
Expected
Results
Register and successfully login.
System shows the HRV results.
Feeling before and after and the HRV results will be send to
server.
If the HRV measured is the first measurement, it will update
the initial value and latest value, the system will show a stick
(the first puzzle collected)
If the HRV measured is higher than the initial measurement, it
will update the latest value and the puzzle collected will
increased by 1.
If the HRV measured is lower than the initial measurement, it
will update the latest value and ask the user to go for
breathing training.
HRV data (HRV results, feeling before and after) submitted to
the web server (FOR Admin)
HRV results and the date time are updated in history screen.
Pass/Fail Pass
Table 6.16: Measure HRV System Test
80
CHAPTER 7
7 CONCLUSIONS AND RECOMMENDATIONS
Contribution of Application
This application would have a great contribution to the community. This application
cares about people well-being-ness and provides a way to help people to achieve
mental wellness. People who use this mobile application could measure their HRV
anywhere, anytime. People could also practice deep breathing exercise provided in
the mobile application in order to achieve a healthy breathing rate.
Besides, this project collected the mobile application’s data and stores in the
server. These data are useful for studies on HRV, such as study on the relationship
between different age group and HRV, relationship between different gender and
HRV, and also the studies on how well deep breathing can helps in increasing HRV.
Limitations of Application
There are some limitations of this application. First, when the application starts to
measure the user’s HRV, there will have some noises that would affect the accuracy
of the measurement. These noises might come from the movement of the fingers and
phone with low sensitivity camera. Another limitation would be, during measuring
the HRV, the application could not stop the measurement when the user leaves
his/her finger from the camera.
Recommendations for Future Improvement
These are some recommendations for future improvement for this project:-
1. Develop iOS version for this project.
2. Allows the application to detect whether the user’s finger is moving when
measuring HRV and alert the user not to moving the finger.
3. Stops the measuring of HRV when user’s finger is not on the camera.
4. Improve the game idea for the application to attract more users.
5. Provide more information on health and mental wellness to users in the
application.
81
Conclusion
In conclusion, the project Mobile Healthcare Application for Breathing Training
Monitoring and Gamification in Heart Rate Variability for Well-being is a successful
project that has met all of the requirements. This project has been developed for 1
year and all of the processes were done according to the work plan and Gantt Chart.
To achieve the objectives of this project, a mobile application that can act as a
HRV measurement tools and encourage users to practice deep breathing has been
developed. Before development starts, prototyping is chosen to be the software
methodology for this project and all the whole project process was well planned.
After that, functional and non-functional requirements were gathered and the system
was designed using different types of diagram, such as use case diagram, class
diagram and also database design diagram.
Good planning and design of the system helped in the development phase.
During development phase, React Native was used to develop the mobile application
and a real mobile device was chose to become the emulator. Besides, Laravel was
used to develop the web application. The mobile application was written in
JavaScript and Java, while the web application is written in JavaScript and PHP. API
had been created to allow passing data from mobile application to web application.
After the development phase, unit testing, integration testing and system
testing were conducted to ensure that the system works well. Every test was passed
and this project had fulfilled all requirements and objectives.
82
REFERENCES
American Psychological Association, 2012. Stress by Generation. Stressinamer,
pp.19–21.
Chandrasekaran, V., 2010. Measuring Vital Signs Using Smart Phones. , p.130.
Cheng, K.S., Chang, Y.F., Han, R.P.S. and Lee, P.F., 2017. Enhanced conflict
monitoring via a short-duration, video-assisted deep breathing in healthy young
adults: an event-related potential approach through the Go/NoGo paradigm. PeerJ, 5,
p.e3857.
Cheng, K.S., Han, R.P.S. and Lee, P.F., 2018. Neurophysiological study on the effect
of various short durations of deep breathing: A randomized controlled trial.
Respiratory Physiology and Neurobiology, 249(August 2017), pp.23–31.
Chiesa, A. and Serretti, A., 2009. Mindfulness-Based Stress Reduction for Stress
Management in Healthy People: A Review and Meta-Analysis. The Journal of
Alternative and Complementary Medicine, 15(5), pp.593–600.
Cuijpers, P. et al., 2014. Psychological treatment of generalized anxiety disorder: A
meta-analysis. Clinical Psychology Review, 34(2), pp.130–140.
Damianou, D., 1995. The wavelength dependence of the photoplethysmogram and its
implication to pulse oximetry.
Davis, M., Eshelman, E.R. and McKay, M., 2008. The relaxation and stress
reduction workbook 6th ed., New Harbinger Publications, Oakland, CA, US.
Dusek, J.A. et al., 2008. Stress Management Versus Lifestyle Modification on
Systolic Hypertension and Medication Elimination: A Randomized Trial. The
Journal of Alternative and Complementary Medicine, 14(2), pp.129–138.
Facebook Inc, 2017. A framework for building native apps using React. React Native.
Gartner, 2017. Gartner Says Worldwide Sales of Smartphones Grew 7 Percent in the
Fourth Quarter of 2016. Gartner, p.1.
Geisler, F.C.M., Vennewald, N., Kubiak, T. and Weber, H., 2010. The impact of
heart rate variability on subjective well-being is mediated by emotion regulation.
Personality and Individual Differences, 49(7), pp.723–728. Available at:
https://linkinghub.elsevier.com/retrieve/pii/S0191886910003168 [Accessed: 29
March 2019].
83
Jarczok, M.N. et al., 2015. Investigating the Associations of Self-Rated Health: Heart
Rate Variability Is More Strongly Associated than Inflammatory and Other
Frequently Used Biomarkers in a Cross Sectional Occupational Sample Uchino, B.N.,
(ed.). PLOS ONE, 10(2), p.e0117196. Available at:
http://dx.plos.org/10.1371/journal.pone.0117196 [Accessed: 3 April 2019].
Kabat-Zinn, J. et al., 1992. Effectiveness of a Meditation-Based Stress Reduction
Program in the Treatment of Anxiety Disorders. AmJPsychiatry, 149(7), pp.936–943.
Kaur, B. et al., 2014. Heart rate variability (HRV): an indicator of stress. 22 May
2014 p. 91180V.
Khan, S. and Khan, R.A., 2017. Chronic Stress Leads to Anxiety and Depression.
Ann Psychiatry Ment Health, 5(1), pp.14–17.
Kim, H.-G. et al., 2018. Stress and Heart Rate Variability: A Meta-Analysis and
Review of the Literature. Psychiatry Investigation, 15(3), pp.235–245.
Kurylyak, Y., Lamonaca, F. and Grimaldi, D., 2012. RS. , (May 2014).
Marek Malik, J. Thomas Bigger, A. John Camm, Robert E. Kleiger, Alberto Malliani,
Arthur J. Moss, P.J.S., 1996. Guidelines Heart rate variability. European Heart
Journal, 17, pp.354–381.
Marley, S., 2017. The Importance and Effect of Sample Size - Select Statistical
Consultants. Select-Statistics.
Ohrnberger, J., Fichera, E. and Sutton, M., 2017. The relationship between physical
and mental health: A mediation analysis. Social Science & Medicine, 195, pp.42–49.
Available at: https://www.sciencedirect.com/science/article/pii/S0277953617306639
[Accessed: 4 April 2019].
Olsson, E., 2010. Heart Rate Variability in Stress-related Fatigue, Adolescent
Anxiety and Depression and its Connection to Lifestyle,
Peng, R.C., Zhou, X.L., Lin, W.H. and Zhang, Y.T., 2015. Extraction of heart rate
variability from smartphone photoplethysmograms. Computational and
Mathematical Methods in Medicine, 2015(1).
Reed, M.J., Robertson, C.E. and Addison, P.S., 2012. Heart rate variability
measurements and the prediction of ventricular arrhythmias. QJM - Monthly Journal
of the Association of Physicians, 2012(2), p.8.
Saravanan, C., Wilks, R., Saravanan, C. and Wilks, R., 2014. Medical Students’
Experience of and Reaction to Stress: The Role of Depression and Anxiety. The
Scientific World Journal, 2014, pp.1–8.
84
SQLite, About SQLite.
Varvogli, L. and Darviri, C., 2011. Stress management techniques: Evidence-based
procedures that reduce stress and promote health. Health Science Journal, 5(2),
pp.74–89.
Volchko, J., 2017. Prototyping Methodology: Steps on How to Use It Correctly.
Lumitex.
Wang, H. and Huang, S., 2012. SDNN / RMSSD as a Surrogate for LF / HF : A
Revised Investigation. Modeling and Simulation in Engineering, Article ID, p.8
pages.
Zhang, J.Y., Wilkiewicz, J. and Nahapetian, A., 2011. Mobile Computing,
Applications, and Services: Third International Conference.
85
APPENDICES
APPENDIX A: Questionnaires
86