<commit_before>\chapter{Research and Alternate Solutions}
The group had to do research on real-world problems and solutions to similar problems. The reports produced by the group will be reproduced in this chapter.
\section{Research reports}
This report collected information from several sources on the subject of falls among the elderly. Particular focus is given to risks and avoiddance strategies.
\subsection{Falling: Causes, Consequences and how to avoid it}

\subsubsection*{Risk factors}

There are several risk factors associated with falling. Typical risk factors are:
\begin{itemize}
\item 
\textbf{Biological risk factors (sorted by order of significance in  \cite{fallsRubenstein}):}
\begin{itemize}
\item Muscle weakness
\item Balance deficit
\item Gait deficit
\item Visual deficit
\item Mobility limitation
\item Cognitive impairment
\item Impaired functional status
\item Postural hypertension
\end{itemize}
\item 
\textbf{Behavioral risk factors(Not in sorted order):}
\begin{itemize}
\item Inactivity
\item Side effects from medication
\item Alcohol use
\item Living alone
\item Staying at home
\end{itemize}
\item 
\textbf{Home/environmental risk factors(not in sorted order)}
\begin{itemize}
\item Dangers in the house or in public places.
\item Unfamiliarity with walking aids such as canes, crutches, walking chairs.
\end{itemize}
\end{itemize}

A fall is normally caused by the interaction of two or more of these risk factors. Home or environmental risk factors are involved in less than half of all falls. What this means is that more than half of all falls happen without the influence of environmental factors. The second and third most common single causes of falling are gait/balance disorders and dizziness/vertigo, followed by drop attacks, sudden falls without loss of consciousness or dizziness.
	Many older adults are unaware of their risk factors, and therefore unable to take preventive actions. Even older adults with a history of falling have been given little education about the potential risk factors. Risk assessment, even self-administered, can be very beneficial, especially when the results are discussed with a healthcare provider.
	It has been showed that many of the biological risk factors can be reduced by effectively. Specifically strength, gait and balance has been shown to be improvable in a number of studies.
60 \% of falls happen in or around the house. While this sounds like a lot, older adults spend a lot of time at home, so one would expect this number to be higher.

\subsubsection{Avoiding falls}

One can easily reduce the risk of falling greatly by taking certain measures. A list of measures normally recommended by the authorities is given below:

\begin{itemize}
\item Begin a regular exercise program.
\begin{itemize}
\item Exercises that improve balance and coordination are the most helpful.
\item Is the only measure that by itself reduces the risk of falling independently of individual circumstances. 
\end{itemize}
\item Have your health care provider review your medicines, even over-the-counter ones.
\begin{itemize}
\item Avoid medicines that can make you dizzy or sleepy.
\end{itemize}
\item Have your vision checked.
\item Make your home safer.
\begin{itemize}
\item Remove or fasten small rugs and carpets.
\item Remove wires and cords away from commonly taken paths. Tape wires to the walls, and if necessary install an additional power outlet.
\item Keep items where you can reach them without having to climb. If you have to use a step stool, get a stable one with handrails.
\item Remove loose items that can make you trip (books, papers, clothes, etc.) from the floor and stairs.
\item Add grab bars and non-slip mats to the bathroom.
\item Make your home brighter.
\item Repair broken or uneven steps and handrails in the staircase.
\item Avoid using the staircase more than necessary, for instance by installing a light switch at the top as well as the bottom of the stairs. 
\end{itemize}
\item Miscellaneous:
\begin{itemize}
\item Wear shoes, even inside. Avoid walking barefoot or wearing slippers.
\item Get up slowly after you sit or lie down.
\item Keep yourself updated on your own medical conditions.
\item Learn how to properly use your walking aids.
\item Keep a healthy diet, drink enough water. Dehydration and malnutrition weaken your reflexes and attention.
\end{itemize}
\end{itemize}

Medical personnel are recommended by researchers to prevent falling by treating medical conditions that cause falls, as well as reducing the risk factors in the individual. When a fall happens, medical personnel is advised to spend time inquiring the details related to the accident in order to understand the causes of falling for the individual, and then try to counteract these risks.

\subsubsection{Physiological aspects}

The list below explains the physiological factors that contribute to stability. “A marked deficit in any one of these factors may be sufficient to increase the risk of falling; however, a combination of mild or moderate impairments in multiple physiological domains also may increase the risk of falling. By directly assessing an individual's physiological abilities, intervention strategies can be implemented to target areas of deficit.” \cite{LMTassessPrev}

\begin{itemize}
\item Reaction time
\begin{itemize}
\item Hand
\item Foot
\end{itemize}
\item Vision
\begin{itemize}
\item Contrast sensitivity
\item Visual acuity
\end{itemize}
\item Vestibular function
\begin{itemize}
\item Visual field dependence
\end{itemize}
\item 
Peripheral sensation
\begin{itemize}
\item Tactile sensitivity
\item Vibration sense
\item Proprioception
\end{itemize}
\item Muscle force
\begin{itemize}
\item Knee flexion
\item Knee extension
\item Ankle dorsiflection
\end{itemize}
\end{itemize}


There exists an array of tests that can measure the performance on these aspects. Lord et al. \cite{LMTassessPrev} provides one possible set of tests. Some of these are likely possible to implement as a part of our application, but none of them are based on hip movement.
	The test developed by Lord et al. \cite{LMTassessPrev} was used to classify older adults into fallers or non-fallers, and has an accuracy of 75 - 80 \% in different experiments. If a test which disregards hip movement patterns performs well, it indicates that hip movement is only a minor factor in detecting fall risk.

Walking behaviour seems to be generally associated with falling. Lord et al. \cite{LLKgaitPatterns} shows that there is a negative correlation between falling and steps per minute, stride length and stride velocity. A positive correlation was shown between falling and stance duration and stance percentage. However, these physiological traits are all associated with old age, and old age is associated with falling, so the relation might be quite indirect.

“In old age, the ‘strategy’ for maintaining balance after a slip shifts from the rapid correcting ‘hip strategy’ (fall avoidance through weight shifts at the hip) to the ‘step strategy’ (fall avoidance via a rapid step) to total loss of ability to correct in time to prevent a fall” \cite{fallsRubenstein}.
\section{Alternate solutions}
There were several other open source programs and commercial programs used to solve related problems. In some cases the team could import and make use of the open source programs, and in others the team could be inspired by design and well-made interfaces and functions. Here is that report, as written:

\subsection{Endomondo Sports Tracker}
This application is used to track routes, times and progress in training and activities. It uses GPS (and accelerometer) to find position on maps and track the location. Very easy to use, and automatically syncs up to endomondo.com. Has an inspiring design and sync-functionality.
The main part of endomondo is the inspirational part to get people to move; you can compare yourself to others, e.g. friends, and you have a really easy way to see what an excercise is worth in amount of calories and amount of burgers burned by an exercise.

A lot of aspects from this app can be used to design our own app in terms of labeling and representation of data.

\subsection{GPS Status}
This application is used to view detailed status about the GPS system on the phone. Has a very advanced interface with lots of numbers to show information, but for a rookie user the data rarely translates into information.

The app succeeds to use the sensors very heavily.

\subsection{Pedometer}\footnote{application can be found at https://code.google.com/p/pedometer/} 
An open source app that has a GPLv3 license that is compatible with our Apache 2.0 license. The app uses the same sensors that we should focus on and opens up the oppotunity for us to take advantage of it and skip leaps in the “how to do this on Android”-process. We can freely use code from this software that already works.

From this we can use very much.
\textbf{How does the step detection algorithm work?}
Basically, it aggregates the sensor values, finds the maximum and minimum, and if the difference is bigger than a value (which depends on the sensitivity setting) then it counts it as a step. There’s is some additional optimization, which I arrived to through experimentation.

\subsection{GPS Tracker}\footnote{application can be found at: https://code.google.com/p/open-gpstracker}
This program adds the capability to store and review where you and your Android device have been. Basically you press record at the start of your trip and your phone stores the route you take. This route is drawn real-time on the Maps functionality of Android or in the background with an idle device. The route is stored on your phone for review and further use. The applications tracks location by GPS, hence the name. An accurate description of the program type would be a GPS logger.

It cointains the ability to log location, something that could be useful for our application. Since it is open source and has a compatible license (GNU v3), we can use large part of it.

\section{Bibliography}
\begin{thebibliography}{99}


\bibitem{fallsRubenstein}
"Falls in older people: epidemiology, risk factors and strategies for prevention". <NAME>. Age and Ageing 2006; 35-S2:ii37-ii41.
\bibitem{LMTassessPrev}
"A phsycological Profile Approach to Falls Risk Assessment and Prevention", <NAME>,<NAME> and <NAME>, Journal of the American Physical Therapy Association. 
\bibitem{LLKgaitPatterns}
"Sensori-motor Function, Gait Patterns and Falls in Community-dwelling Women". <NAME>, <NAME>, <NAME>. Age and Ageing 1996:25:292-299.
\bibitem{cdcYouPrevent}
  "What you can do to prevent falls", Centers for Disease Control and Prevention
  
\end{thebibliography}<commit_msg>Added interwiev summary to research chapter<commit_after>\chapter{Research and Alternate Solutions}
The group had to do research on real-world problems and solutions to similar problems. The reports produced by the group will be reproduced in this chapter.
\section{Research reports}
The reports in this section represent research and information-gathering done by the group when it was thought necessary.
\subsection{Falling: Causes, Consequences and how to avoid it}
This report collected information from several sources on the subject of falls among the elderly. Particular focus is given to risks and avoidance strategies.
\subsubsection*{Risk factors}

There are several risk factors associated with falling. Typical risk factors are:
\begin{itemize}
\item 
\textbf{Biological risk factors (sorted by order of significance in  \cite{fallsRubenstein}):}
\begin{itemize}
\item Muscle weakness
\item Balance deficit
\item Gait deficit
\item Visual deficit
\item Mobility limitation
\item Cognitive impairment
\item Impaired functional status
\item Postural hypertension
\end{itemize}
\item 
\textbf{Behavioral risk factors(Not in sorted order):}
\begin{itemize}
\item Inactivity
\item Side effects from medication
\item Alcohol use
\item Living alone
\item Staying at home
\end{itemize}
\item 
\textbf{Home/environmental risk factors(not in sorted order)}
\begin{itemize}
\item Dangers in the house or in public places.
\item Unfamiliarity with walking aids such as canes, crutches, walking chairs.
\end{itemize}
\end{itemize}

A fall is normally caused by the interaction of two or more of these risk factors. Home or environmental risk factors are involved in less than half of all falls. What this means is that more than half of all falls happen without the influence of environmental factors. The second and third most common single causes of falling are gait/balance disorders and dizziness/vertigo, followed by drop attacks, sudden falls without loss of consciousness or dizziness.
	Many older adults are unaware of their risk factors, and therefore unable to take preventive actions. Even older adults with a history of falling have been given little education about the potential risk factors. Risk assessment, even self-administered, can be very beneficial, especially when the results are discussed with a healthcare provider.
	It has been showed that many of the biological risk factors can be reduced by effectively. Specifically strength, gait and balance has been shown to be improvable in a number of studies.
60 \% of falls happen in or around the house. While this sounds like a lot, older adults spend a lot of time at home, so one would expect this number to be higher.

\subsubsection{Avoiding falls}

One can easily reduce the risk of falling greatly by taking certain measures. A list of measures normally recommended by the authorities is given below:

\begin{itemize}
\item Begin a regular exercise program.
\begin{itemize}
\item Exercises that improve balance and coordination are the most helpful.
\item Is the only measure that by itself reduces the risk of falling independently of individual circumstances. 
\end{itemize}
\item Have your health care provider review your medicines, even over-the-counter ones.
\begin{itemize}
\item Avoid medicines that can make you dizzy or sleepy.
\end{itemize}
\item Have your vision checked.
\item Make your home safer.
\begin{itemize}
\item Remove or fasten small rugs and carpets.
\item Remove wires and cords away from commonly taken paths. Tape wires to the walls, and if necessary install an additional power outlet.
\item Keep items where you can reach them without having to climb. If you have to use a step stool, get a stable one with handrails.
\item Remove loose items that can make you trip (books, papers, clothes, etc.) from the floor and stairs.
\item Add grab bars and non-slip mats to the bathroom.
\item Make your home brighter.
\item Repair broken or uneven steps and handrails in the staircase.
\item Avoid using the staircase more than necessary, for instance by installing a light switch at the top as well as the bottom of the stairs. 
\end{itemize}
\item Miscellaneous:
\begin{itemize}
\item Wear shoes, even inside. Avoid walking barefoot or wearing slippers.
\item Get up slowly after you sit or lie down.
\item Keep yourself updated on your own medical conditions.
\item Learn how to properly use your walking aids.
\item Keep a healthy diet, drink enough water. Dehydration and malnutrition weaken your reflexes and attention.
\end{itemize}
\end{itemize}

Medical personnel are recommended by researchers to prevent falling by treating medical conditions that cause falls, as well as reducing the risk factors in the individual. When a fall happens, medical personnel is advised to spend time inquiring the details related to the accident in order to understand the causes of falling for the individual, and then try to counteract these risks.

\subsubsection{Physiological aspects}

The list below explains the physiological factors that contribute to stability. “A marked deficit in any one of these factors may be sufficient to increase the risk of falling; however, a combination of mild or moderate impairments in multiple physiological domains also may increase the risk of falling. By directly assessing an individual's physiological abilities, intervention strategies can be implemented to target areas of deficit.” \cite{LMTassessPrev}

\begin{itemize}
\item Reaction time
\begin{itemize}
\item Hand
\item Foot
\end{itemize}
\item Vision
\begin{itemize}
\item Contrast sensitivity
\item Visual acuity
\end{itemize}
\item Vestibular function
\begin{itemize}
\item Visual field dependence
\end{itemize}
\item 
Peripheral sensation
\begin{itemize}
\item Tactile sensitivity
\item Vibration sense
\item Proprioception
\end{itemize}
\item Muscle force
\begin{itemize}
\item Knee flexion
\item Knee extension
\item Ankle dorsiflection
\end{itemize}
\end{itemize}


There exists an array of tests that can measure the performance on these aspects. Lord et al. \cite{LMTassessPrev} provides one possible set of tests. Some of these are likely possible to implement as a part of our application, but none of them are based on hip movement.
	The test developed by Lord et al. \cite{LMTassessPrev} was used to classify older adults into fallers or non-fallers, and has an accuracy of 75 - 80 \% in different experiments. If a test which disregards hip movement patterns performs well, it indicates that hip movement is only a minor factor in detecting fall risk.

Walking behaviour seems to be generally associated with falling. Lord et al. \cite{LLKgaitPatterns} shows that there is a negative correlation between falling and steps per minute, stride length and stride velocity. A positive correlation was shown between falling and stance duration and stance percentage. However, these physiological traits are all associated with old age, and old age is associated with falling, so the relation might be quite indirect.

“In old age, the ‘strategy’ for maintaining balance after a slip shifts from the rapid correcting ‘hip strategy’ (fall avoidance through weight shifts at the hip) to the ‘step strategy’ (fall avoidance via a rapid step) to total loss of ability to correct in time to prevent a fall” \cite{fallsRubenstein}.

\subsection{Summary of interview with medical professionals}
This is a summary of the information gathered by a meeting with two medical professionals and the customer.
\textbf{Present:} All group members, <NAME>, <NAME>, <NAME> 
\textbf{Time:} 14.15-15.37
\textbf{Place:} St.Olavs Hospital
The plan was to have a short presentation, a short GUI demonstration, and then discuss and interview with the interviewees. \\
\subsubsection*{Feedback on Interface and Presentation of the program}
\begin{itemize}
\item Immediate and summarized feedback was desired, as it would be more helpful than feedback later.
\item A focus on falling is not a selling point, try health or lifestyle instead
\item Menu is not obvious to people without android experience
\item Interface seems too complex for target groups
\item Text might be too small
\item Graph needs more contrast 

\end{itemize}

\textbf{Feedback on program functionality}
\begin{itemize}
\item Feedback should be tailored to particular groups
\item Self-testing can be useful for reducing risk and keeping awareness,
\item Small tests to measure reaction time, for example reaction to light or sound
\item Researchers could also be interested in data gathering
\item Measuring transitions between sitting/lying and standing up
\item Compare behavior on a weekly basis will give an overview of whether things are good or not
\end{itemize}

\textbf{Feedback on medicinal stuff}
\begin{itemize}
\item Preventing inactivity over time is useful to reduce risk
\item People with stability problems increase risk when moving much
\item Variable gait pattern is useful for predicting risk
\item Step time is more robust (and hopefully easy to measure)
\item A common exercise is to take a step forwards, sideways, backwards, sideways (measuring a box)
\item People in risk group are those who cut out walking, taking the bus, want help from others around the house
\item Irregularity in speed and length is important to look for
\item Appropriate movement amount for gender and age group is usually known
\item Time needed to turn in place
\end{itemize}


\section{Alternate solutions}
There were several other open source programs and commercial programs used to solve related problems. In some cases the team could import and make use of the open source programs, and in others the team could be inspired by design and well-made interfaces and functions. Here is that report, as written:

\subsection{Endomondo Sports Tracker}
This application is used to track routes, times and progress in training and activities. It uses GPS (and accelerometer) to find position on maps and track the location. Very easy to use, and automatically syncs up to endomondo.com. Has an inspiring design and sync-functionality.
The main part of Endomondo is the inspirational part to get people to move; you can compare yourself to others, e.g. friends, and you have a really easy way to see what an exercise is worth in amount of calories and amount of burgers burned by an exercise.

A lot of aspects from this app can be used to design our own app in terms of labeling and representation of data.

\subsection{GPS Status}
This application is used to view detailed status about the GPS system on the phone. Has a very advanced interface with lots of numbers to show information, but for a rookie user the data rarely translates into information.

The app succeeds to use the sensors very heavily.

\subsection{Pedometer}\footnote{application can be found at https://code.google.com/p/pedometer/} 
An open source app that has a GPLv3 license that is compatible with our Apache 2.0 license. The app uses the same sensors that we should focus on and opens up the opportunity for us to take advantage of it and skip leaps in the “how to do this on Android”-process. We can freely use code from this software that already works.

From this we can use very much.
\textbf{How does the step detection algorithm work?}
Basically, it aggregates the sensor values, finds the maximum and minimum, and if the difference is bigger than a value (which depends on the sensitivity setting) then it counts it as a step. There's is some additional optimization, which I arrived to through experimentation.

\subsection{GPS Tracker}\footnote{application can be found at: https://code.google.com/p/open-gpstracker}
This program adds the capability to store and review where you and your Android device have been. Basically you press record at the start of your trip and your phone stores the route you take. This route is drawn real-time on the Maps functionality of Android or in the background with an idle device. The route is stored on your phone for review and further use. The applications tracks location by GPS, hence the name. An accurate description of the program type would be a GPS logger.

It contains the ability to log location, something that could be useful for our application. Since it is open source and has a compatible license (GNU v3), we can use large part of it.

\section{Bibliography}
\begin{thebibliography}{99}


\bibitem{fallsRubenstein}
"Falls in older people: epidemiology, risk factors and strategies for prevention". <NAME>. Age and Ageing 2006; 35-S2:ii37-ii41.
\bibitem{LMTassessPrev}
"A phsycological Profile Approach to Falls Risk Assessment and Prevention", <NAME>,<NAME> and <NAME>, Journal of the American Physical Therapy Association. 
\bibitem{LLKgaitPatterns}
"Sensori-motor Function, Gait Patterns and Falls in Community-dwelling Women". <NAME>, <NAME>, <NAME>. Age and Ageing 1996:25:292-299.
\bibitem{cdcYouPrevent}
  "What you can do to prevent falls", Centers for Disease Control and Prevention
  
\end{thebibliography}
{'fraction_non_alphanumeric': 0.04668097823799301, 'fraction_numerical': 0.0032832428336911227, 'mean_word_length': 4.681013868962219, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 20, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7288792', 'n_tokens_mistral': 5890, 'n_tokens_neox': 5648, 'n_words': 3541}