simple sleep calculator!!.doc

80
SIMPLE SLEEP CALCULATOR PHONE APP SYSTEM BY REG NO. A PROJECT REPORT SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE FACULTY OF SCIENCE IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR AWARD OF A BACHELOR OF INFORMATION TECHNOLOGY OF THE ISLAMIC UNIVERSITY IN UGANDA i

Transcript of simple sleep calculator!!.doc

Page 1: simple sleep calculator!!.doc

SIMPLE SLEEP CALCULATOR PHONE APP SYSTEM

BY

REG NO.

A PROJECT REPORT SUBMITTED TO THE DEPARTMENT OF COMPUTER SCIENCE

FACULTY OF SCIENCE IN PARTIAL FULFILMENT OF THE

REQUIREMENT FOR AWARD OF A BACHELOR

OF INFORMATION TECHNOLOGY OF

THE ISLAMIC UNIVERSITY

IN UGANDA

APRIL, 2015

i

Page 2: simple sleep calculator!!.doc

DECLARATION

I ………………… Reg.no – ……………, hereby declare that the contents of this report are a

true account and reflection of my experience during my project development “Simple Sleep

Calculator Phone App System”.

i

Page 3: simple sleep calculator!!.doc

APPROVAL

This Project report has been written and compiled under my supervision and is now ready for

submission to the faculty of Science in the department of Computer Science with approval.

.......................................................

Mr.

SUPERVISOR

Date …………………………..

ii

Page 4: simple sleep calculator!!.doc

DEDICATION

I dedicate this report to my Parents, and my family at large plus all relatives and friends without

their Patience, understanding, support, and most of all their love and prayers, the completion of

this work would not have been possible.

iii

Page 5: simple sleep calculator!!.doc

ACKNOWLEDGEMENT

Great deals appreciations go to the contribution of my faculty - Faculty of Science (Islamic

university in Uganda) spear headed by Mr. Kassaga Umar the faculty coordinator, I would also

like to thank all the staff at large (my university’s) patience in helping us complete this program.

Not to forget Mr. ………… (My supervisor) for the smoothness, advices, motivations and co-

operation during the Supervision.

Last but not least I would like to thank my friends especially those who helped me out where I

was weak, Mr. Walusimbi Hakim, Mr farouk to mention but a few, for the wise ideas throughout

the Project.

Special thanks also goes to Mr. ……….. my sweet father for all he has done with the start since I

started to crawl in education perspective and everything He has really done just because of Me,

Mrs………… – my mother and the only inspiration I have, for the great job and encouragement

always in my studies , Mr……………,…………… – my big brothers, for the guidance, financial

assistance and motivation they always and gave me through the project, .my brothers

…………….,plus sisters ……………….. for all they have done am really appreciative.

May Allah Bestow His Blessings on All of Us

iv

Page 6: simple sleep calculator!!.doc

ABSTRACT

Ever since the days of vibrating exercise belts in the 1950s, we've hoped that electric gizmos

might work health miracles (witness the return of exercise belts today). But almost always, these

turn out to work as well as battery-powered snake oil.

But it turns out that some gadgets can, in fact, improve our health. The difference is that these

tools don't promise to do all the work. They just promise to make it easier to track what we

already know works – diet and exercise – which in turn makes us eat better and exercise more

thus the researchers’ interest in developing a simple sleep calculator as sleep is likely that it

evolved to fulfill some primeval function and took on multiple functions over time analogous to

the larynx, which controls the passage of food and air, but descended over time to develop

speech capabilities hence my interest in the development of such a project.

With simple sleep calculator. This simple system works with a device you may already own: lets

say for example an iPhone. Using the iPhone's accelerometer, this little app that monitors how

much you're sleeping or how much you are supposed to sleep and waking you up when you are

supposed to be woken up. When it detects you're in a light sleep phase around your wake-up

time, it starts to play a tune to gently ease you awake. And all your movements are retained as

data that you can examine in your iPhone., it's a great way to sample the sleep tracking concept.

v

Page 7: simple sleep calculator!!.doc

TABLE OF CONTENTS

DECLARATION I

APPROVAL II

DEDICATION III

ACKNOWLEDGEMENT IV

ABSTRACT V

CHAPTER ONE 1

1.0 Introduction 1

1.1 Back Ground 1

1.2 Statement of the Problem 4

1.3 Objective of the Study 4

1.3.1 Specific Objectives of the Study 4

1.4 Scope of the Study 4

1.5 Significances 5

CHAPTER TWO 6

LITERATURE REVIEW 6

2.0 Introduction 6

2.1 Terminologies: 6

2.1.1 Physiology 7

2.1.2 How Much Is Enough? 7

2.1.3 Calculating the Sleep Cycle 8

2.2 Web based Information Systems 9

2.3 Databases 9

2.4 Information Management 112.4.1 Mysql..............................................................................................................................................................11

vi

Page 8: simple sleep calculator!!.doc

CHAPTER THREE 12

METHODOLOGY 12

3.0.1 Interviews 12

3.0.2 Document Review 12

3.1.0 Requirement Specifications 13

3.1.1 User Requirements 13

3.1.2 Functional Requirements 13

3.2.0 System Requirements 13

3.2.1 Software requirements 13

3.2.2 Hardware Specifications 14

3.3.0 System Design 14

3.3.1 Conceptual Design 14

3.3.2 Logical Design 16Physical Design........................................................................................................................................................19

CHAPTER FOUR 26

IMPLEMENTATION, TESTING AND EVALUATION 26

4.0 Implementation 26

4.0.1 Direct Implementation 26

4.0.2 Parallel Implementation 26

4.1.0 Coding and Debugging the System 26

4.2.0 System Testing 27

4.3.0 Getting Started with Simple Sleep Calculator28

4.3.1 The Start Up Of the System 28

4.3.2 System Interfaces 29

WITH THIS FORM, THE SYSTEM CAN ADD USERS, EDIT AND DELETE ANY USER BUT THIS WAS CUSTOMIZED FOR THE ADMINISTRATOR WITH SUCH

PRIVILEGES. 39

CHAPTER FIVE 42

vii

Page 9: simple sleep calculator!!.doc

DISCUSSION, CONCLUSION AND RECOMMENDATION 42

5.0 Introduction 42

5.1 Discussion 42

5.2 Limitations 42

5.3 Problems Encountered 43

5.4 Recommendations 44

5.4 Conclusion 45

REFERENCES 46

viii

Page 10: simple sleep calculator!!.doc

LIST OF FIGURES

FIGURE 1: LOGIN FORM SCREEN 25FIGURE 2: MAIN FORM 25FIGURE 3:MAIN FORM SCREEN 26FIGURE 4 :PROGRESS FORM 26FIGURE 5: ANTENATAL CARD FORM 27FIGURE 6: ISSUING DRUG 27FIGURE 7: PREVIOUS OBSTERIC 28FIGURE 8: DRUGS 28Figure 9: User Management 29

LIST OF TABLES

TABLE 1.......................................................................................................................................................................11TABLE 2: SHOWING SYMBOLS AND MEANINGS USED IN THE DATA FLOW DIAGRAM;.......................13TABLE 3: SHOWING USERS TABLE;.....................................................................................................................16TABLE 4: SHOWING ANTENATAL CARD TABLE;.............................................................................................17TABLE 5: SHOWING ANTENATAL PROGRESS;..................................................................................................17TABLE 6: SHOWING WARD;...................................................................................................................................18TABLE 7: SHOWING BED ASSIGNMENT;.............................................................................................................18TABLE 8: SHOWING PREVIOUS ILLNESS TABLE;.............................................................................................19TABLE 9: SHOWING PRESENT PREGNANCY;.....................................................................................................19TABLE 10: DRUGS TABLE.......................................................................................................................................19TABLE 11: SHOWING PHYSICAL EXAMINATION;............................................................................................20TABLE 12: SHOWING OBSTERIC TABLE;............................................................................................................20TABLE 13:DRUG _ STOCK.......................................................................................................................................21TABLE 14: ISSUED_DRUGS.....................................................................................................................................21TABLE 15: PRESENT PREGNANCY........................................................................................................................21Table 16:Physical_ Exam.............................................................................................................................................22

iii

Page 11: simple sleep calculator!!.doc

CHAPTER ONE

1.0 Introduction

This chapter consists of background for the study, problem statement, the purpose of the

Study, objectives of the study, scope of the study plus significances of the study.

1.1 Back Ground

Sleep is a naturally recurring state of animals characterized by altered consciousness,

relatively inhibited sensory activity, and inhibition of nearly all voluntary muscles. It is

distinguished from wakefulness by a decreased ability to react to stimuli, but is more easily

reversed than the state of hibernation or of being comatose. Mammalian sleep occurs in

repeating periods, in which the body alternates between two highly distinct modes known

as non-REM and REM sleep. REM stands for “rapid eye movement” but involves many

other aspects including virtual paralysis of the body.

During sleep, most systems in an animal are in a heightened anabolic state, accentuating the

growth and rejuvenation of the immune, nervous, skeletal, and muscular systems. Sleep in

non-human animals is observed in mammals, birds, reptiles, amphibians, and fish, and in

some form in insects and even in simpler animals such as nematodes. The internal circadian

clock tends to promote sleep during a regular time of day or night. However, sleep patterns

vary widely among animals and within the human species. Industrialization and artificial

light have substantially altered human sleep habits.

The diverse purposes and mechanisms of sleep are the subject of substantial ongoing

research. Sleep seems to assist animals with improvements in the body and mind. A well-

known feature of sleep in humans is the dream, an experience typically recounted in narrative

form, which resembles waking life while in progress, but which usually can later be

distinguished as fantasy. Humans may suffer from a number of sleep disorders. These

include dyssomnias (such as insomnia,hypersomnia, and sleep apnea), parasomnias (such

as sleepwalking and REM behavior disorder), and the circadian rhythm sleep disorders.

Ever since the days of vibrating exercise belts in the 1950s, we've hoped that electric gizmos

might work health miracles (witness the return of exercise belts today). But almost always,

these turn out to work as well as battery-powered snake oil.

1

Page 12: simple sleep calculator!!.doc

But it turns out that some gadgets can, in fact, improve our health. The difference is that

these tools don't promise to do all the work. They just promise to make it easier to track what

we already know works – diet and exercise – which in turn makes us eat better and exercise

more.

There's good research to support the idea of self-tracking and health (one study found that

simple monitoring by email improved concentration & productivity by 50%; made people

twice as likely to change their diets; and significantly improved physical and mental quality

of life.) But are there good gadgets to match the research? Let's consider just one category:

Sleep.

In the past year or so, a handful of devices have come on the market that promise to help you

measure your sleep quality, learn when your good night goes bad, and even wake you up at

the optimal time. They're the result of two trends: sleep research that has given scientists a

new understanding of what constitutes a good night's sleep; and cheaper, better sensors that

make these tools affordable and easy to use.

Before I drill down into the device, a bit of context on the benefits and science of tracking

our sleep. The premise of monitoring our sleep is a bit tricky, since we're, uh, supposed to be

asleep. So we need to use sensors and proxies to measure things that we hope correspond to

sleep quality through the night. Most of this boils down to measuring how long we spend in

the five phases of sleep, from light sleep to REM to deep sleep.

The traditional approach to sleep research is called polysomnography, an intensive high-

fidelity approach that typically requires more than 20 wires to be hooked up to the test

subject. This noodle soup of nodes and cables measure everything from eye movement to leg

movement to breathing and heart rate. This is the stuff of sleep labs, and though the

measurements are highly detailed and thorough, they come with a catch: By requiring

somebody to go to a sleep lab to be measured, you're inherently messing up the experiment

because the conditions have changed.

Here's why: Collecting the data requires the person with sleep troubles to leave their home

environment — their own bedroom, their own bed, their own sheets. That's not restful. Plus

2

Page 13: simple sleep calculator!!.doc

with all those wires and nodes, the sleep subject is bound to be disturbed by being literally

tied down. So while the measurements may be precise and exacting, the experiment may not

be replicating the same kind of sleep.

The alternative approach in sleep research is called actigraphy, and it pretty much takes the

opposite direction. Rather than try to measure every last variable, actigraphy looks to

measure just one metric — movement — with one sensor (called an accelerometer). What

you lose in the details, the theory goes, you more than make up for in the setting. The sleep

subject only needs to wear one sensor, usually on their wrist, and they can sleep in their own

home, in their own bed.

Research has found that, while polysomnography data corresponds more closely to what

actually happens during the night, actigraphy is surprisingly accurate, too. And that the

environmental and other factors may more than make up for actigraphy's lack of detailed

metrics.

The tradeoff between polysomnography and actigraphy has been well known among sleep

researchers for several years. What's changed in the past couple years is that accelerometers

have gotten really, really cheap. Following the familiar trajectory of Moore's Law, the price

of accelerometers has dropped from thousands of dollars to hundreds to — today — close to

$10 a piece. This is why accelerometers are turning up in our shoes, in our cellphones, and in

our videogames like Nintendo's Wii. They're powerful, cheap and flexible.

Which brings us to the devices? There are lots of sleep trackers out there, but what differs

from the “The Simple Sleep Calculator” is how easy is the device to use and engage with the

data it provides? In the end, if you want to start tracking your sleep, you should decide how

much information you're willing to grapple with (or pore over), and how much you're willing

to spend on the experiment.

1.2 Statement of the Problem

Sleep is an essential biological function that provides important restorative psycho-

physiological processes. For example with patients in the Intensive Care Unit are highly

vulnerable to sleep disturbance which can protract their recovery. Despite sleep disturbance

3

Page 14: simple sleep calculator!!.doc

being widely acknowledged amongst this patient cohort, the ability to make significant

changes to minimize the burden of sleep deprivation remains a challenge. This is further

compounded by the difficulties faced by clinicians to identify and implement accurate and

feasible sleep monitoring techniques in the intensive care. Whilst objective, behavioral and

subjective methods of sleep assessment exist, all have specific limitations when applied to

critically ill patients. In an attempt to illuminate these issues, current sleep calculator

techniques are appraised thus my interest to come up with the project “Simple Sleep

Calculator”.

1.3 Objective of the Study

To develop a functioning simple sleep calculator Phone Application system

1.3.1 Specific Objectives of the Study

i) Identify the requirements to develop a simple sleep calculator Phone Application system.

ii) To design a phone application technologies for smart phones with such facilities.

iii) Implementing and testing the computerized solution.

1.4 Scope of the Study

The project focused mainly on the main operations that take place in some ones sleeping time

in line with and operations like Alerting someone the time of going to sleep and also waking

him/her up man, Setting up different remainders, and also setting up the Alarm to wake the

individual up.

1.5 Significances

With the success of the research, it will be of significance to the individuals using smart

phones, medical organizations, the Researcher and the University in the following ways;

i. The individuals to use the Application shall be able to boost and analyze their sleeping

habits performance in line with preparation of sleep time and waking time plus other

operation and the application will cater for all problems in that line.

4

Page 15: simple sleep calculator!!.doc

ii. The study will help the researcher to fulfill the requirement for the award of bachelor’s in

information technology, plus mastering the theory basics attained in all the persuasion of the

bachelor’s degree in the university.

iii.The project can also be referred to by other scholars for academic reference and even for

further research.

CHAPTER TWO

LITERATURE REVIEW

2.0 Introduction

This chapter hints on what different authors have written about Sleep Calculator, its

limitations and effects to users in comparison with the benefits associated with its

implementation as a solution. And it also involves a review of previous studies in relation to

the research topic of analyzing, developing and implementing Simple Sleep Calculator phone

App.

2.1 Terminologies:

Sleep

5

Page 16: simple sleep calculator!!.doc

Sleep is considered to be an essential biological function required by all species. In humans,

sleep was originally hypothesized to have been an adaptive process in promoting survival

and avoiding predation. Webb WB (1974) Sleep as an adaptive response. Percept Mot Skills

More contemporary perspectives on sleep focus on its importance in regards to physical

restoration and mental functioning Kavanau JL (2005) Evolutionary approaches to

understanding sleep. Sleep. Although total sleep function is yet to be fully elucidated,

physiological quiescence provides important restorative processes to aid cognitive

functioning, along with metabolic conservation and produces an anabolic state McCarley RW

(2007) Neurobiology of REM and NREM sleep. Sleep Med. Over the past three decades,

there has been an inordinate amount of published research regarding sleep disturbance in

highly vulnerable patients, such as those cared for in the Intensive Care (ICU) setting.

Although the etiological causes of sleep disturbance are thought to be multi-factorial and the

impact of sleep disturbance on patient recovery is widely recognized, sleep monitoring has

not been implemented as standard component of clinical care. This has been attributed to the

complexities confronting clinician’s in identifying a method that is both accurate and feasible

for widespread implementation.

2.1.1 Physiology

Hypnogram showing sleep cycles from midnight to 6.30 am, with deep sleep early on. There

is more REM (marked red) before waking. (Current hypnograms reflect the recent decision to

combine NREM stages 3 & 4 into a single stage 3.)

In mammals and birds, sleep is divided into two broad types: rapid eye movement (REM

sleep) and non-rapid eye movement (NREM or non-REM sleep). Each type has a distinct set

of physiological and neurological features associated with it. REM sleep is associated with

dreaming, desynchronized and faster brain waves, loss of muscle tone, and suspension of

homeostasis. REM and non-REM sleep are so different that physiologists classify them as

distinct behavioral states. In this view, REM, non-REM, and waking represent the three

6

Page 17: simple sleep calculator!!.doc

major modes of consciousness, neural activity, and physiological regulation J. Alan Hobson,

Edward F. Pace-Scott, & Robert Stickgold (2000), “Dreaming and the brain. According to

the Hobson & McCarley activation-synthesis hypothesis, proposed in 1975–1977, the

alternation between REM and non-REM can be explained in terms of cycling, reciprocally

influential neurotransmitter systems.

Especially during non-REM sleep, the brain uses significantly less energy during sleep than it

does in waking. In areas with reduced activity, the brain restores its supply of adenosine

triphosphate (ATP), the molecule used for short-term storage and transport of energy.

Key physiological indicators in sleep include EEG of brain electrooculography (EOG) of eye

movements, and electromyography (EMG) of skeletal muscle activity. Simultaneous

collection of these measurements is called polysomnography and can be performed in a

specialized sleep laboratory.

2.1.2 How Much Is Enough?

The amount of sleep that a healthy individual needs is largely determined by two factors:

genetics and age. Genetics plays a role in both the amount of sleep a person needs, as well as

his or her preference for waking up early (these are the so-called "larks," or morning-type

individuals) or staying up late (these are the "owls," or evening-type people). Our internal

biological clock, which regulates the cycling of many functions including the sleep/wake

cycle, can vary slightly from individual to individual. Although our internal clock is set to

approximately 24 hours, if your clock runs faster than 24 hours, you tend to be a "lark" and

wake up early; if your clock runs more slowly, you tend to be an "owl" and go to bed later.

The majority of healthy adults require between 7.5 to 8.5 hours per 24-hour period. This is

true from young adulthood through late in life, though many older people have difficulty

sleeping in a single block of time each night. Generally, sleep needs during a 24-hour period

follow this pattern:

Newborns (1 to 2 months) – 10.5 to 18 hours

Infants (3 to 11 months) – 10 to 14 hours

Toddlers (1 to 3 years) – 12 to 14 hours

Preschoolers (3 to 5 years) – 11 to 13 hours

School-aged children (5 to 12 years) – 10 to 11 hours

Adolescents (12 to 18 years) – 8.5 to 9.5 hours

7

Page 18: simple sleep calculator!!.doc

Adults (18 years to the end of life) – 7.5 to 8.5 hours 

Even without considering genetics and age, the National Sleep Foundation's 2008 Sleep in

America poll found that many adults are apparently not meeting their sleep needs, sleeping

an average of only 6 hours and 40 minutes during the week, and about 7.5 hours on the

weekends. How can you tell if your sleep is adequate and meets your needs? Sleep scientists

and physicians have a variety of methods to help determine if you are getting enough sleep.

2.1.3 Calculating the Sleep Cycle

And the premise that sleep apps and other sleep cycle calculator tools use to provide those

who believe in them with information on what time they should go to bed, when to wake up

and how much they should be sleeping in general, usually going by the average for their age

and lifestyle, or extracting this information from data given by the user, such as how long

they sleep on average or how many hours of sleep they got the night before, how long does it

usually take for them to fall asleep and what time they need to be up and running the next

day.

Now, like sleep cycles, not all these tools are exactly the same, and some should be more

accurate than others, as they rely less on statistics or information provided by users – which,

as it has been mentioned before, is not reliable due to the imperfect notions humans have of

their own sleep patterns – and more on actual information given by your movement, for

instance.

Of course, the premise behind the most basic sleep cycle calculator is quite simple, and can

be reproduced with first-grade math. Taking into consideration the fact that the average sleep

cycle is 90 minutes and that most adults have about 5 of them every night, indicates that an

average adult should sleep about 7.5 hours a night, so to find their ideal bedtime, they would

count backwards and go to sleep 7.5 hours before the time they need to be up, allowing for at

least 15 minutes to fall asleep – although it might take longer on some days.

When the individual naturally wakes up right around the time that their alarm is supposed to

go off, that means that the calculations have worked. If on the other hand, they wake much

later or earlier, that means they should adjust their sleep patterns accordingly to get the best

out of their time spent in bed.

If you want to adopt a new sleep pattern or simply live a more structured life, but still can’t

quite figure out the math explained above, then a sleep cycle calculator or a sleep tracking

app are definitely something to try, as they will give you an indication of where to begin, or

rather when to go to bed, so you can start adjusting, and hopefully feeling healthier and more 8

Page 19: simple sleep calculator!!.doc

rested, as well as benefit from higher levels of energy and productivity, whether for work,

school, family, exercising or your favorite hobbies.

And remember, like with most things in life, quality is much better than quantity when it

comes to having a good night’s sleep.

2.2 Web based Information Systems

Larry, 2003 Asserts that web based information systems provide up-to-date product and

support information to existing and emerging channels. A prerequisite of this is to support

the process of creating all these types of information once only, managing and making them

available on a timely and cost effective way for all people in the information chain.

2.3 Databases

According to Lane and William (2004), a database is part of data management system. They

define a database as a container of data files, such as product catalogs, inventories and

item/customer records. They say that every business would be a failure without a secure and

reliable data management system. They further say that information systems are the hearts of

most businesses worldwide. According to them, it is not easy to have a secure system, but a

system developer must ensure that this is achieved. They advise system developers to have

clear subject areas, requirements and plans before they start designing the systems.

Braker and Hellerstein (1998), say that database has experienced a rapid increase in growth

since the development of a rational data base. The progress in database systems and

applications has produced a large scope of specialized technology areas that have often

become the exclusive domain of research specialists. Examples include active database,

object oriented, temporary database, and deductive database areas. Advanced database

systems were written by leading specialists who have made significant contributions to the

development of technology areas.

Siau (2003) asserts that many databases that we find on the web today are derived from other

databases. New databases are often created because there is a need for customized data and

often, the databases are created with new data added in the process. In this situation, a

9

Page 20: simple sleep calculator!!.doc

system that is able to carry along superimposed information or annotation about the data is

useful in many aspects. Siau (2003) envisions an annotation management system that is not

only capable of carrying forward annotation of data being transformed, but that is also

capable of attaching new comments on derived data, back to the source data.

With French (1992), it’s also a single collection of structured data stored with a minimum

duplication of data item so as to provide a consistent and controlled pool of data. This is

common to all user systems, but is independent of the programs that use data. The

independence database and programs using it means that one can be changed without

changing the other. The user of database may find it convenient to imagine that they are

using integrated system.

According to Thierry (2006), the term database design can be used to describe many

different parts of design of an overall system. Principally, and most correctly, it can be

thought as the logical design of the database of database structure used to store data in are

rational model these are the tables and views. However the database design could be sued to

apply overall process of designing, and not just base data structures, but also forms and

queries are used apart overall database application within database management system

(DBMS).

2.4 Information Management

Data can be defined as individual facts or raw about something that can be organized to

generate useful information for decision-making. Information is stimuli that have meaning in

some context for its receiver. When data is entered into and stored in a computer, it is

generally referred to as information.

Graham (2001) said, with the move from local application to a web based ones, also the ata

we created and access will need to undergo some profound changes. Data and information

undergoes a management process to maintain its consistence and quality. Physical and

logical security, quality assurance is emphasized to ensure rational utilization and reliability

of data/information.

2.4.1 Mysql

10

Page 21: simple sleep calculator!!.doc

MySQL is a full-featured database and uses open standards, such as the ANSI SQL 99

standard, for communicating with databases with Structured Query Language (SQL). This

standard provides a means to insert, update, and query information in the database by using

an industry standard language. This standard language is used across database products, and

like other products, MySQL supports a number of additional SQL statements. As well as

being a standardized database, MySQL is also multi-platform. This means that in addition to

Linux, MySQL also runs on other operating systems, such as Windows, Mac OS X, or BSD

and UNIX variants.

11

Page 22: simple sleep calculator!!.doc

CHAPTER THREE

METHODOLOGY

3.0 System Study and Investigation

The chapter involved a critical study of the existing Sleep Calculators on which was mostly

web base system. This chapter introduces the methodology and techniques that were used in

acquiring and analyzing information and to achieve the objectives of the project. It therefore

includes the methods, technique, design tools, approaches and procedures which were

adopted to collect and analyze information. The methods that were used include interviews,

document analysis, and observation.

3.0.1 Interviews

This method was used to collect information from the market administrators as the researcher

was asking questions about the current system. Interviews were conducted different doctors

for example Dr. Umaru from pearl medical center plus other individuals with access to

internet and had ever had of sleep calculator, issues concerning individuals sleeping habits

and patients habits were discussed during the interviews, these individuals described the

process they involved and problems faced in administering their sleep time plus patients

sleep time per the Health care side and from the interviews with other staff members plus

some stake holders in , the researcher was able to identify the problems faced and the user

requirements for the proposed system.

Reasons for using such a method;

To obtain detailed information Personal perception opinions.

To spell out ambiguities and a fall up of incomplete answers.

3.0.2 Document Review

With this method, the researcher reviewed market documents which included procedures of

timing sleeping and waking up time on website application like “sleep time.me”. This

method helped the researcher to obtain various information captured for different events

and it was a supplement to the information from the interviews made.

12

Page 23: simple sleep calculator!!.doc

3.1.0 Requirement Specifications

Requirements specifications involve what the system should do. Therefore it provides

detailed documentations of requirements and these are categorized into collection and

analysis of user requirements, functional requirements and systems requirements.

3.1.1 User Requirements

In this line it comprised of the preferred features by the user in the system on which from

the interviews and comments from the users to be using the system it was revealed that the

system should be able to;

Provide user friendly interfaces for easy interactions.

Allow users to enter data easily from the interface and is saved to the database.

Print the necessary reports with the most accurate information.

Restrict unauthorized login attempts to the system.

3.1.2 Functional Requirements

This outlines how the system serves the users by ensuring efficient and effective

functionality. The system therefore is able to:

i) Allow registration of user

ii) To enable the administrators to effectively track sleep time and waking time

iii) To allow the user set sleeping and waking up time.

iv) To provide adequate reports

3.2.0 System Requirements

These are requirements that were needed to incorporate the desired functionalities in the

system. This therefore called for the description of the properties of the system and this had

to address both the software and hardware requirements.

3.2.1 Software requirements

For the success of the system’s objectives, it was a combination several software’s on

which worked hand in hand to execute per the expectation of the study on which they

included the following;

i) Android phone operating software was used for efficient running of the system.

ii) Microsoft Visual studio using C# language was selected and used for code

generation and interface designs.

13

Page 24: simple sleep calculator!!.doc

iii) MySQL database software was used for database designs to store the data entries

from the interface.

3.2.2 Hardware Specifications

Due to the need of reach to the expected efficiency of the system per the study the

following Hardware specification were considered;

A pnone with dual core processor with 2GHZ processor speed and 1GB of RAM was used

A flash disk of 4GB will be required for data backup in case of any unexpected data loss.

- The system can run efficiently on a computer with at least 2.00 Ghz Processor Speed, free

space of 500Mb, with at least 1Gb of RAM and an external memory of over 2 Gb for

backup.

3.3.0 System Design

It refers to the art of defining the architecture, components, modules, interfaces, and data

for the system to fulfill the project main objective.

The main goal of the design phase is to find the best possible design, within the limitations

imposed by the requirement and the physical as well as social environment in which the

system will operate.

14

Page 25: simple sleep calculator!!.doc

3.3.1 Conceptual Design

Conceptual design refers to the explicit construction of the idea or concepts that a user

needs to learn about what a product is, what it can do, and how it is intended to be used.

This involved various entities and attributes identification on which can be seen as follows;

Table 1

Entity Attributes

Users - Full Name

- User Name (pk)

- Password

- Role

Antenatal card - RegNo - LCI

- HealthUnit - Occupation

- Name - Religion

- Age - Education

- Tribe - Status

- Next_of_kin - Relashinship

- N_occupation - Address

- Gravida - Para

- Abortion -

Antenatal Progress - ID - RelationPP_Brim

- Reg_no - FoetalHeart

- Amenorrhea - Weight

- FundaHeight - BP

- Presentation - varicose

- Position - urine

Ward - Bed_id

- Location

- Status

- Description

Drugs - Drug_No

- Name

- Description

- Rate

15

Page 26: simple sleep calculator!!.doc

DrugStock - Stockid

- StockDate

- Drugid

- Quantity

- Rate

- Amount

- StockBy

Physical examination - Id

- Reg_no

- Height

- Weight

- BP

- Pulse

- Temp

- Pelvic examination

3.3.2 Logical Design

The logical design of the system consisted description of the conceptual presentation of

data flow, inputs and out puts of the system, this was conducted via modeling, involving

theoretical and graphical representation of an actual system’s design. On which the

modeling undertook the following;

Data flow diagrams

This refers to diagrammatic representation of information flow in the system between the

different entities and processes. Data flow Diagram shows how data moves through the

system but does not show program processing steps however, it provides a logical model

that shows what the system does. This diagram was used to exhibit the business processes,

inputs and outputs of each process, and the flow of data between the processes plus the data

stores.

16

Page 27: simple sleep calculator!!.doc

Table 2: Showing symbols and meanings used in the data flow diagram;

Symbol Meaning

Entity e.g. user, branch, suspects.

A data store.

Process

A data flow.

PEARL MEDICAL CENTER ANTENATAL CARE MANAGEMENT SYSTEM

17

Patient

1 1

Record PatientProcessPatient

InfoPayments

2 2

3 3

4 4

5 5

Patient Records

Payment Records

CheckupProcess

Patient

Progress Details

Beds RecordAssign

Bed Process

Checkup

Patient D

etails

Pharmacy

Pharmacy Details

Drug Info

Treatment

Discharge Payments

Checkup

Drug payments

Page 28: simple sleep calculator!!.doc

Entity Relationship Diagrams

Entity relationship Diagram was the tools on which were used to show the relationship between

different entities that were involved in the system information flow. This tool helped the

researcher to identify the attributes of each entity and the cardinalities between the relationships.

18

Discharge Details

Discharge ProcessDischarge Form

Page 29: simple sleep calculator!!.doc

PEARL MEDICAL CENTER ANTENATAL CARE MANAGEMENT SYSTEM ENTITY

RELATIONSHIP DIAGRAM

Physical Design

The physical design of a system is concerned the actual physical implementation of the logical

design as already discussed earlier. This section describes the actual processes of inputting,

verifying and storing the in Antenatal Care Management System, physical layout of the data

stores, report formats and relation database management system used. During the physical design

process, the researcher had to translate the expected schemas into actual database structures

19

Receptionist

Patient

Midwife

DoctorBed

Records

Treats

Monitors

Assigned

Pharmacy

Drug

Issues

Receives

Page 30: simple sleep calculator!!.doc

mapping the, entities to tables, relationships to foreign key, attributes to columns, primary unique

identifiers to primary key constraints and unique identifiers to unique key constraints with the

help of Mysql Database Software on which was used for the Data storage for the system.

The following were the different physical design;

Table 3: Showing Users table;

Table 4: Showing Antenatal Card table;

20

Page 31: simple sleep calculator!!.doc

Table 5: showing Antenatal Progress;

Table 6: showing ward;

21

Page 32: simple sleep calculator!!.doc

Table 7: showing bed assignment;

Table 8: Showing previous Illness Table;

22

Page 33: simple sleep calculator!!.doc

Table 9: Showing Present Pregnancy;

Table 10: Drugs table

Table 11: showing Physical Examination;

Table 12: Showing Obsteric table;

23

Page 34: simple sleep calculator!!.doc

Table 13:Drug _ stock

Table 14: Issued_drugs

24

Page 35: simple sleep calculator!!.doc

Table 15: Present pregnancy

Table 16:Physical_ exam

25

Page 36: simple sleep calculator!!.doc

CHAPTER FOUR

IMPLEMENTATION, TESTING AND EVALUATION

4.0 Implementation

There are mainly two forms of new systems implementation on which comprises of the direct

form of implementation and the parallel one.

26

Page 37: simple sleep calculator!!.doc

4.0.1 Direct Implementation

Under this form of implementation there is a direct cut over of the old system while the

new system takes its course. In direct implementation, the users stop using the manual

system and start using the computer system there and then. The lead of this method is that

it doesn’t need more man power hence making it less costly, however on its depressing

point of view if the new system fails to operate effectively either due to an expected error

this can lead to loss of data since it was implemented. I therefore don’t recommend serious

organization that deals with serious information to use this method of system

implementation.

4.0.2 Parallel Implementation

In this line, a new system is implemented alongside an old system, this implies both the

new and the old system will be running simultaneously until when the new system proves

its integrity over the old one. Due to advantages the parallel implementation method has

over the direct cut over the parallel implementation method is recommended.

4.1.0 Coding and Debugging the System

Coding and debugging the system may be in straightforward stipulations referred to as

programming. In this line concerning the study at hand Antenatal Care Management

System For Simple sleep Calculator, the researcher used (eclipse) and Mysql database

systems.

4.2.0 System Testing

System testing is a critical aspect of Software Quality Assurance and represents the

ultimate review of specification, design and coding. Testing is a process of executing a

program with the intent of finding an error. A good test is one that has a probability of

finding an as yet undiscovered error. The purpose of testing is to identify and correct bugs

in the developed system. Nothing is complete without testing. Testing is the vital to the

success of the system.

In the code testing the logic of the developed system is tested. For this every module of the

program is executed to find an error. To perform specification test, the examination of the

27

Page 38: simple sleep calculator!!.doc

specifications stating what the program should do and how it should perform under various

conditions.

Unit testing focuses first on the modules in the proposed system to locate errors. This

enables to detect errors in the coding and logic that are contained within that module alone.

Those resulting from the interaction between modules are initially avoided. In unit testing

step each module has to be checked separately.

System testing does not test the software as a whole, but rather than integration of each

module in the system. The primary concern is the compatibility of individual modules. One

has to find areas where modules have been designed with different specifications of data

lengths, type and data element name.

Testing and validation are the most important steps after the implementation of the

developed system. The system testing is performed to ensure that there are no errors in the

implemented system. The software must be executed several times in order to find out the

errors in the different modules of the system.

Validation refers to the process of using the new software for the developed system in a

live environment i.e., new software inside the organization, in order to find out the errors.

The validation phase reveals the failures and the bugs in the developed system. It will be

come to know about the practical difficulties the system faces when operated in the true

environment. By testing the code of the implemented software, the logic of the program

can be examined. A specification test is conducted to check whether the specifications

stating the program are performing under various conditions. Apart from these tests, there

are some special tests conducted which are given below:

Peak Load Tests: This determines whether the new system will handle the volume of

activities when the system is at the peak of its processing demand. The test has revealed

that the new software for the agency is capable of handling the demands at the peak time.

Storage Testing: This determines the capacity of the new system to store transaction data

on a disk or on other files. The proposed software has the required storage space available,

because of the use of a number of hard disks.

28

Page 39: simple sleep calculator!!.doc

Performance Time Testing: This test determines the length of the time used by the system

to process transaction data.

4.3.0 Getting Started with Simple Sleep Calculator

After the systems final coding for the perfection of what is expected from it, it was turned

into an executable file which can enable it be installed on any phone gadget running

Android systems. So as to help make the system perform its functionalities’ with just its

installation on any phone with the requirement per mentioned in Chapter III of the Report,

all the installation files are copied into one directory, that is to say the application in future

might be found on Google market or specifically Google play where different application

software’s of android phones are downloaded.

4.3.1 The Start Up Of the System

The startup is simple as normal programs on which with just a single click on the short cut

“Simple sleep calculator”, a screen will show up indicating the log on form on which

requires credentials to continue using the system.

Security of information is the first thing each manager will put into consideration, in any

system to be used by more than one person for example in an organization like a hospital,

companies and others that contain lots of important information. There for the researcher

came up with a login form that permits use of the system, on which none authorized users

can access the system. Only valid users with correct user name and password can log into

the system.

4.3.2 System Interfaces

Figure 1: Login Form Screen

29

Page 40: simple sleep calculator!!.doc

The login form is presented with two text boxes and two command buttons as shown in the

figure above. Enter the correct user name and password in their respective text boxes and then

click the “OK” command button or else click “Cancel” command button on which will cancel

the login form and you cannot access the system.

Login Codes;

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Antinetal_Care_MS.AntenatalDataTableAdapters;

namespace Antinetal_Care_MS{ public partial class Login : Form { public Login() { InitializeComponent(); } QueriesTableAdapter sd = new QueriesTableAdapter(); private void Form1_Load(object sender, EventArgs e) { Passwd.UseSystemPasswordChar = true; Usernm.Focus(); }

private void panel1_Paint(object sender, PaintEventArgs e) {

}

private void Log_Click(object sender, EventArgs e) { LoginClass lc = new LoginClass(); if (lc.security(Usernm.Text, Passwd.Text) == "Ok") { string role = ""; role= sd.getUserRole(Usernm.Text,Passwd.Text); if (role =="Admin") { Main_Form mnFm = new Main_Form(); mnFm.ShowDialog(); } else if (role == "Doctor") { Main_Form mnFm = new Main_Form();

30

Page 41: simple sleep calculator!!.doc

mnFm.ShowDialog(); } else if (role == "Nurse") { Main_Form mnFm = new Main_Form(); mnFm.ShowDialog(); } else if(role=="Midwife") { Main_Form mnFm = new Main_Form(); mnFm.ShowDialog(); } else if(role=="Warden") { Main_Form mnFm = new Main_Form(); mnFm.ShowDialog(); } else if(role=="Pharmacist") { Main_Form mnFm = new Main_Form(); mnFm.ShowDialog(); } else {

} this.Hide(); } else if (lc.security(Usernm.Text, Passwd.Text) == "No") { MessageBox.Show("Invalid Username Or and Password"); Usernm.Focus(); } else { MessageBox.Show((lc.security(Usernm.Text, Passwd.Text))); } }

private void Can_Click(object sender, EventArgs e) { Application.Exit(); } }}

Figure 2: Main Form

The main form acts as a navigation point of all pages of the system, through the main form, you

can access any part of system depending on your level of authentication. Some legal users will

not access some forms that are not in their area of concern. Only the administrator will be

allowed to access everything in the system.

Figure 3: Main Form Screen

31

Page 42: simple sleep calculator!!.doc

With the above figure it’s the main page on which every user goes to after the login, it contains

most of the features in the system for example different privileges per the user for example

editing users and other functionalities.

Main form Codes;

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;

namespace Antinetal_Care_MS{ public partial class Main_Form : Form { public Main_Form() { InitializeComponent(); }

private void Main_Form_Load(object sender, EventArgs e)

32

Page 43: simple sleep calculator!!.doc

{

} private void treeView1_MouseClick(object sender, MouseEventArgs e) { /*TreeNode node = treeView1.SelectedNode; if (treeView1.SelectedNode.Text == "Register Patient") { UsersFm at = new UsersFm(); at.MdiParent = this; at.Show(); } else { MessageBox.Show(string.Format("You Seleceted {0}", node.Text)); }*/ }

private void treeView1_AfterSelect(object sender, TreeViewEventArgs e) { /* if (treeView1.SelectedNode.Level == 1) { AntanantalCard at = new AntanantalCard(); at.MdiParent = this; at.Show(); } else if(treeView1.SelectedNode.Level==2) { Ant_progress ap = new Ant_progress(); ap.MdiParent = this; ap.Show(); }*/ }

private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { foreach (Form childForm in MdiChildren) { childForm.Close(); } if(e.Node.Name=="regPatient") { AntanantalCard pr = new AntanantalCard(); pr.MdiParent = this; pr.Show(); } else if (e.Node.Name == "recProg") { Ant_progress pr = new Ant_progress(); pr.MdiParent = this; pr.Show(); } }

private void timer1_Tick(object sender, EventArgs e) { label2.Text = DateTime.Now.ToLongDateString(); label4.Text = DateTime.Now.ToLongTimeString(); } }

33

Page 44: simple sleep calculator!!.doc

}

Figure 4: Progress Form

This is the form on which on which follows up the progress of the expectant mother in

accordance to the last visits on which if a patient has been performing checkups one can such for

the progress result depending on the patient number.

Figure 5: Antenatal Card Form

34

Page 45: simple sleep calculator!!.doc

The above form is mainly used to enter the information of the expectant mother in different

perspectives, for example, the expectant mother’s biography, taking of their social history,

preveous illness, and physical examination

Antenatal Card Form;

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Antinetal_Care_MS.AntenatalDataTableAdapters;

namespace Antinetal_Care_MS{ public partial class AntanantalCard : Form { public AntanantalCard() { InitializeComponent(); } previousillnessTableAdapter pr = new previousillnessTableAdapter(); antenatacardTableAdapter an = new antenatacardTableAdapter(); presentpreganacyTableAdapter pp = new presentpreganacyTableAdapter(); physcal_examTableAdapter phy = new physcal_examTableAdapter(); QueriesTableAdapter qr = new QueriesTableAdapter(); string regNo, medical, sug, obs, soc, family, comp, gest_prd, sympt; string hu, name, lc1, occup, reli, educ, tribe, status, nextKin, r_ship, n_occup, add; uint age, gra, para, abort; DateTime lnmp, edd; public string patno() { string pt_no = ""; int pNo = 0; //pt_no = "P/" + (qr.MaxRegno() + 1); Random ra=new Random (); pNo=ra.Next(1,9999999); for (int i = 1; i <pNo; i++) { if (i < 6) { pt_no = "p/" + pNo + i.ToString(); } } return pt_no; } private void Form4_Load(object sender, EventArgs e) { Menstral.Enabled = false; textBox17.Text = DateTime.Now.ToShortDateString(); textBox18.Text = DateTime.Now.ToShortDateString(); //textBox2.Text = patno(); } string height, wei, bp, pulse, tp, pel_exm; private void RecPat_Click(object sender, EventArgs e) {

35

Page 46: simple sleep calculator!!.doc

regNo = textBox2.Text; hu = textBox1.Text; name = textBox3.Text; age = uint.Parse(textBox4.Text); lc1 = textBox5.Text; occup = textBox9.Text; tribe = textBox8.Text; educ = textBox10.Text; status = comboBox1.Text; reli = comboBox2.Text; nextKin = textBox11.Text; n_occup = textBox12.Text; r_ship = comboBox3.Text; add = textBox13.Text; gra = uint.Parse(textBox14.Text); abort = uint.Parse(textBox15.Text); para = uint.Parse(textBox16.Text); an.Insert(regNo, hu, name, age, lc1, occup, reli, educ, tribe, status, nextKin, r_ship, n_occup, add, gra, para, abort);

if (medicalcheckedList.CheckedItems.Count != 0) { string med = ""; for (int i = 0; i <= medicalcheckedList.CheckedItems.Count - 1; i++) { med = med + (i + 1 + ")").ToString() + " " + medicalcheckedList.CheckedItems[i].ToString() + ", "; //medical = medicalcheckedList.CheckedItems[i].ToString()+","; medical = med; } } if (surgcalcheckedList.CheckedItems.Count != 0) { string s = ""; for (int i = 0; i <= surgcalcheckedList.CheckedItems.Count - 1; i++) { s = s + (i + 1 + ")").ToString() + surgcalcheckedList.CheckedItems[i].ToString() + ", "; sug = s; } } if (obscheckedList.CheckedItems.Count != 0) { string ob = ""; for (int a = 0; a <= obscheckedList.CheckedItems.Count - 1; a++) { ob = ob + (a + 1 + ")").ToString() + obscheckedList.CheckedItems[a].ToString() + ", "; obs = ob; } } if (socialCheckeList.CheckedItems.Count != 0) { string so = ""; for (int i = 0; i <= socialCheckeList.CheckedItems.Count - 1; i++) {

36

Page 47: simple sleep calculator!!.doc

so = so + (i + 1 + ")").ToString() + socialCheckeList.CheckedItems[i].ToString() + ", "; soc = so; } } if (familycheckedList.CheckedItems.Count != 0) { string fa = ""; for (int i = 0; i <= familycheckedList.CheckedItems.Count - 1; i++) { fa = fa + (i + 1 + ")").ToString() + familycheckedList.CheckedItems[i].ToString() + ", "; family = fa; } } pr.Insert(regNo, medical, sug, obs, soc, family);

// Present Pregnancy if (complicationcheckedList.CheckedItems.Count != 0) { string com = ""; for (int x = 0; x <= complicationcheckedList.CheckedItems.Count - 1; x++) { com = com + (x + 1).ToString() + complicationcheckedList.CheckedItems[x].ToString() + ", "; comp = com; } } if (SynmptomsList.CheckedItems.Count != 0) { string sym = ""; for (int y = 0; y <= SynmptomsList.CheckedItems.Count - 1; y++) { sym = sym + (y + 1 + ")").ToString() + SynmptomsList.CheckedItems[y].ToString() + ", "; sympt = sym; } } lnmp = DateTime.Parse(textBox17.Text); edd = DateTime.Parse(textBox18.Text); gest_prd = textBox19.Text; pp.Insert(regNo, lnmp, edd, gest_prd, comp, sympt);

//Physical Examination height = textBox20.Text; wei = textBox21.Text; bp = textBox22.Text; pulse = textBox23.Text; tp = textBox24.Text; if (pelviccheckedList.CheckedItems.Count != 0) { string pel = ""; for (int p = 0; p <= pelviccheckedList.CheckedItems.Count - 1; p++) { pel = pel + (p + 1).ToString() + pelviccheckedList.CheckedItems[p].ToString() + ", "; pel_exm = pel; }

37

Page 48: simple sleep calculator!!.doc

} phy.Insert(regNo, height, wei, bp, pulse, tp, pel_exm); MessageBox.Show("Information Successfully Recorded"); Menstral.Enabled = true; }

private void Menstral_Click(object sender, EventArgs e) { Menstral_Contraceptive me = new Menstral_Contraceptive(); me.textBox1.Text = textBox2.Text; me.Show(); }

private void timer1_Tick(object sender, EventArgs e) { label6.Text = DateTime.Today.ToShortDateString(); label8.Text = DateTime.Now.ToLongTimeString(); }

private void CloseFm_Click(object sender, EventArgs e) { this.Close(); } }}

Figure 6: Issuing Drug

With this form it’s useful in a manner of tracking the issuing of drugs with information like the

type of drug, the staff that has sold the drug, the date issued plus their cost.

Figure 7: Previous Obsteric

38

Page 49: simple sleep calculator!!.doc

The above figure indicates the ways on which the expectant mother had been affected during

delivery processes.

Figure 8: Drugs

With the above figure the system has the capability to register the drugs on which are to be

issued to the patients so, edit, provide description and keep track on the drugs availability.

Figure 9: User management

39

Page 50: simple sleep calculator!!.doc

With this form, the system can add users, edit and delete any user but this was customized for

the administrator with such privileges.

ing System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Antinetal_Care_MS.AntenatalDataTableAdapters;

namespace Antinetal_Care_MS{ public partial class UsersFm : Form { public UsersFm() { InitializeComponent(); } usersTableAdapter us = new usersTableAdapter(); QueriesTableAdapter qr = new QueriesTableAdapter(); private void adduser_Click(object sender, EventArgs e) { us.Insert(textBox1.Text, textBox2.Text, textBox3.Text, comboBox1.Text); MessageBox.Show("User Added Succesfully", "Hope Clinic Antenantal Care"); textBox3.Clear(); textBox2.Clear(); textBox1.Clear(); comboBox1.Text = ""; textBox1.Focus();

}

private void editUserToolStripMenuItem_Click(object sender, EventArgs e) { groupBox2.Visible = true; groupBox2.BringToFront(); edituser.Enabled = true; adduser.Enabled = false; Deluser.Enabled = false; textBox6.Focus(); }

private void deleteUserToolStripMenuItem_Click(object sender, EventArgs e)

40

Page 51: simple sleep calculator!!.doc

{ groupBox3.Visible = true; groupBox3.BringToFront(); Deluser.Enabled = true; edituser.Enabled = false; adduser.Enabled = false; textBox7.Focus(); }

private void addUserToolStripMenuItem_Click(object sender, EventArgs e) { groupBox1.BringToFront(); edituser.Enabled = false; Deluser.Enabled = false; adduser.Enabled = true; }

private void UsersFm_Load(object sender, EventArgs e) { groupBox2.Visible = false; groupBox3.Visible = false; }

private void Deluser_Click(object sender, EventArgs e) { if (textBox7.Text == "") { MessageBox.Show("Please Enter username", "Hope Clinic Antenantal Care"); } else if (textBox7.Text != qr.GetUsername(textBox7.Text).ToString()) { MessageBox.Show("Username Doesnot Corresponds To any User in the Database,\nPlease enter a correct username", "Hope Clinic Antenantal Care"); textBox7.Clear(); textBox7.Focus(); } else { qr.DeleteUser(textBox7.Text); MessageBox.Show("User Deleted", "Pearl Medical Center Antenantal Care"); } }

private void edituser_Click(object sender, EventArgs e) { if (textBox5.Text == "") { MessageBox.Show("Please Enter username", "Pearl Medical Center Antenantal Care"); } else if (textBox5.Text != qr.GetUsername(textBox5.Text).ToString()) { MessageBox.Show("Username Doesnot Corresponds To any User in the Database,\nPlease enter a correct username", "Hope Clinic Antenantal Care"); textBox7.Focus(); } else { us.Updateuser(textBox6.Text, textBox5.Text, textBox4.Text, comboBox2.Text, textBox5.Text);

41

Page 52: simple sleep calculator!!.doc

MessageBox.Show("User Info Updated", "Pearl Medical Center"); } }

private void closeusFm_Click(object sender, EventArgs e) { this.Close(); } }}

CHAPTER FIVE

DISCUSSION, CONCLUSION AND RECOMMENDATION

5.0 Introduction

This chapter gives a summary of the entire system with emphases on its achievements and

limitations. There are also suggestions on possible areas of enhancement.

5.1 Discussion

The system was designed to fulfill the basic aim and specific objectives that were proposed at

the earlier stage of the system development. A system comprises of people, equipment, space

and procedures. The researcher was mindful of the input, processing, storing and retrieving

requirements necessary for an effective Application. The main users to interact with the

system are the administrator “phone user” or minor user pf the phone application

In any software development, security is always a very important issue for consideration. The

administrators should therefore make use of authorized persons to take charge of the system.

It is thus management obligation to ensure internal controls and security about the system,

the system cannot be accessed by any user except the authorized user with the login ID and

password.

42

Page 53: simple sleep calculator!!.doc

5.2 Limitations

It is not usually possible to design a system that meets the needs of every user, therefore the

system has the following limitations;

There are fixed queries that have been designed by the researcher. This means that the users

cannot run queries of their choice unless the system is upgraded.

Project was quite limited since the project entails some components that required to be

delivered on time with full functionality

Biased responses from some of the interviewees.

Lack of interest from some of the would-be users of the new system.

5.3 Problems Encountered

There are as many problems encountered as a system is one of the tasks on which needs

much of attention, thus the following problems were encountered during the development

process of coming up with the System;

- One of the biggest problem encountered on which it’s more so a general problem per

all students that were carrying out project at Islamic University Kampala Campus was

limitation in time to enable development of a program with better features. On which

we were first given some desirable deadline at fast that was handing in over early

September and on which was abruptly changed to a nearby date thus leading to

compression of functionalities that would be included in the system due to limited

time.

- The researcher also encountered a problem of getting a case study as most issues

concerning health are confidential, and had to move to different hospitals after being

let down by the last medical hospital I had gone for information.

- In accessibility to the most current literature on soft ware development Despite the

normal programming procedures followed, some segments could not run normally

especially in the viewing forms, may be due to computer memory problem since the

developing software takes allot of memory.

43

Page 54: simple sleep calculator!!.doc

- Another encountered problem was limited access to better resources that were used in

developing the system, specifically designing software’s like Edrawer, Ud on which

internet access was always on and off thus even though they were downloaded the

best that could be got were trial versions on which worked for 15 – 30 days hence

disorganizing the researchers plans to come up with more unique and high

performance system.

- The other encountered problem was on research or requirements engineering on

which needed a lot of information from the medical center on which the research

place was always Busy thus limited attention was given to the researcher since it was

a big medical center they worked 24 hrs a day leading to getting most requirements

from observation and the least through one on one interviews.

- Lack of proper documentation about the existing system was another problem

encountered on which was a big bottleneck for System development.

5.4 Recommendations

The users need to be trained on how best they can use the phone application. Users with basic

computer skills will be required in order for them to appreciate the functionality of the

program.

The system has a lot of room for further improvement though as it stands it can be used as a

prototype to develop sleep calculator and more features could be added, since less time was

available for the researcher.

Lastly on the recommendation as hinted before in supplements of the recommendations about

the limited time, the report is not containing all that is in the Project system as it was still

under construction and the due to need of beating the deadline of Report handing in most of

the Parts needed were included in the Report Living out little bits on which were under

construction and changes will be made after the completion of the system.

44

Page 55: simple sleep calculator!!.doc

5.4 Conclusion

One big part of waking up refreshed and comfortable, instead of aggravated is getting to bed

at the right time. Sleep calculator phone application based on our sleep cycles that calculates

when you should fall asleep or, alternately, set your alarm.

Technological progress makes it possible for health monitoring systems like Simple Sleep

Calculator systems to provide total, cost-effective access to more complete, accurate patient

care, individual data and to offer improved performance and enhanced functions that can be

used to meet those information management challenges. Simple Sleep calculator can play an

important role in improving the health of human as a healthy sleep constitute of good health

of an individual they can also contribute to the management and moderation of health care

costs through prevention of bad sleep technicalities like neck pains to mention but a few.

45

Page 56: simple sleep calculator!!.doc

REFERENCES

Braker, Stone M & J.M Hellerstein (eds.) (1998). ”Reading in databases”. Kaufmann

Sanfrancisco

Webb WB (1974) Sleep as an adaptive response. Percept Mot Skills 38:

1023-1027.

Kavanau JL (2005) Evolutionary approaches to understanding sleep. Sleep

Med Rev 9: 141-152.

Forest G, Godbout R (2000) Effects of sleep deprivation on performance and EEG spectral

analysis in young adults. Brain Cogn 43: 195-200.

Binks PG, Waters WF, Hurry M (1999) Short-term total sleep deprivations does not selectively

impair higher cortical functioning. Sleep 22: 328-334.

Gosselin A, De Koninck J, Campbell KB (2005) Total sleep deprivation and novelty processing:

implications for frontal lobe functioning. Clin Neurophysiol 116: 211-222.

Spiegel K, Leproult R, Van Cauter E (1999) Impact of sleep debt on metabolic and endocrine

function. Lancet 354: 1435-1439.

Van Cauter E, Spiegel K, Tasali E, Leproult R (2008) Metabolic consequences of sleep

and sleep loss. Sleep Med 9 Suppl 1: S23-28.

Copinschi G (2005) Metabolic and endocrine effects of sleep deprivation.

Essent Psychopharmaco l6: 341-347.

McCarley RW (2007) Neurobiology of REM and NREM sleep. Sleep Med

8: 302-330.

Geyer JD, Dillard S, Carney PR, Thai Y, Talathi S (2012) Sleep and Normal Human Physiology.

In: Careny PR, Berry RB, Geyer, D (Ed) Clinical sleep disorders, LWW-Wolters Kluwer,

Philadelphia.46

Page 57: simple sleep calculator!!.doc

Carskadon M, Dement W (2005) Normal human Sleep. In: Kryger MR (Ed) Principles and

practice of sleep medicine. Elsevier Saunders, Philadelphia, 13-23.

Hallmark, J; Garcia, C (1992). System migration experiences from the field. Information

Technology & libraries, 11 (4), 345-358

Hudgins, J; and Macklin, L. (2000). New materials, new processes: implementing digital

imaging projects into existing work flow. Library collections, Acquisitions, &Technical

services, 24(2), 189-204.

Lane & William E. (eds.) (2004). Web database application with PHP

Laudon. Kand Laudon J (2002) management information systems, 7th Edition, Pearson

Education Asia

Lewis. C. and Griffin M. (1997),, Human factors consideration in clinical applications of

virtual reality.

Riva. G., (1999), Virtual Reality as a communication tool: a socio-cognitive analysis

Teleoperators, and Virtual Environments

Siau, Keng (2003). Advanced topics in database research, volume 5

Whitten, Jeffrey. L. & Lonnis.D Bantly, 1992

Yaspan, Arthur (1961). Operation Research. Vol 9, pp. 371-38

Shortell SM, Gillies RR, Anderson DA, Erickson KM, Mitchell JB. Remaking health care in

America. San Francisco:

Jossey-Bass; 1996.

47

Page 58: simple sleep calculator!!.doc

Provan KG, Milward HB. A preliminary theory of interorganizational network effectiveness: a

comparative study of four community mental health systems. Administrative Science Quarterly

1995;40:1–33.

Rosenblatt A, Woodbridge MW. Deconstructing research on systems of care for youth with

EBD: framework for policy research. Journal of Emotional and Behavioural Disorders

2003;11(1):25–35.

48