1 Introduction

Human aging is a process characterized by a progressive decrease in resistance and physiological reserves in older people, producing a cumulative wear in their physiological systems which causes an increased risk of suffering from adverse health effects. This process leads to frailty in the elderly. Frailty includes individuals who are dependent on other people to perform their basic needs [1]. However, frailty is a difficult term to conceptualize, and a standardized definition has not yet been established. In most cases, the frailty is related to aging, disability, and comorbidity. Footnote 1

In a general way, detection and diagnosis of frailty depends on the following domains:

  • Medical. Presence of chronic diseases, gait disturbance, sensory deficit, recurrent falls and hospitalization, polypharmacy.

  • Functional. Dependence in basic activities of daily living (BADL) and instrumental activities of daily living (IADL).

  • Socio-economic. Living alone, recent widowhood, aged over 80 years, low income.

  • Cognitive and affective criteria. Depression, cognitive impairment.

  • Need for institutionalization. Live in retirement homes and nursing homes.

Focusing on more specific factors, the most common clinical manifestations of frailty include the following:

  • Involuntary reduction in body weight

  • Decreased endurance and muscle strength

  • Balance and gait disorders

  • Decline in physical mobility

  • Changes in a set of biological markers [2].

The frailty concept has been studied for the last 20 years. For its detection, it is commonly valued as the performance of activities of daily living (ADL) and instrumental activities of daily living (IADL), which measure the independence level of a person. Some examples of these are shown in Table 1. An adult may have the first symptoms of pre-frailty after 65 years old. However, elderly people are not a homogeneous population, and there are people who achieve advanced ages of their life with good health. Fried et al. [3] defines frailty as a clinical syndrome in which three or more of the following criteria are present:

  • Weight loss

  • Weakness and fatigue

  • Decreased grip strength

  • Slow gait speed

  • Low physical activity.

Table 1 Examples of ADL and IADL

This syndrome results in the phenotype of frailty proposed by Fried et al. [3], and the above criteria are widely used today.

According to this phenotype, there are many tests and scales designed to assess several aspects of elderly frailty. For instance, the Barthel Index [4] is used to measure dependence level on the performance of ADL and IADL. Most of these scales are related to the physical state. In fact, the study of physical activity in elderly people is very important because it offers plenty of information about that person. Specifically, gait analysis is a clear indicator to determine the frailty. In this sense, authors such as Tinetti [5] propose a test to assess gait and balance. However, the result of this and other scales is quite subjective, and the score obtained, which determines the elderly physical condition, depends on the geriatricians viewpoint. In this sense, Searle et al. [6] propose defining a set of variables related to health status of elderly patient. Depending on the values of these variables, a rating score is given, which determines the frailty index. However, this result is also subjective. Moreover, a physician must also consider the results of other tests included in the elderly patient record (e.g., cognitive and laboratory tests). Therefore, we propose a system based on the gait and balance analysis, through the use of accelerometer-enabled mobile phones, combined with clinical parameters, to support the decision and diagnosis of the geriatrician.

This paper is organized into eight sections. Section 2 presents related work about accelerometer integration to analyze elderly activities and risks for frailty. In Sect. 3, we detail our motivation and the use of mobile devices in this work. Then, in Sect. 4, we present two standard tests to assess gait and balance. Section 5 describes clinical indicators to consider for frailty detection. In Sect. 6, we present our system in detail. Section 7 corresponds to the system evaluation. Finally, Sect. 8 analyzes the conclusions of this work.

2 Related work

Nowadays, the advent of new embedded technologies and the need for their use in healthcare encourage the development of mobile systems to perform different tasks in these heterogeneous environments. In fact, there is a wide range of systems that use sensors and mobile phones to support the daily tasks of physicians. For example, diagnosis and monitoring of elderly patients in healthcare by using mobile devices has been developed in recent years. Within this context, Villarreal et al. [7] proposes a mobile monitoring system based on mobile devices for monitoring diabetic patients. Meanwhile, Fontecha [8] have developed a mobile system using NFC Footnote 2 (near-field communication) technology to deploy nursing care services in healthcare environments. Also, Ramon [9] proposes new forms of interaction between users and elements of the environment and a general context model for information visualization [10], which is applied in health environments among others. These are some examples of technology inclusion in the healthcare domain. However, in this section, we are focusing our efforts on current systems to study the health of elderly people based on the analysis of movement and physical activity by using accelerometer data, and also relevant clinical parameters. Finally, a general comparison with our system will be presented.

The integration of accelerometer sensors for movement recognition opens a new research field. In terms of studies focused on elderly people, Lester [11] has developed a system for the recognition of 8 different physical activities, evaluated in 12 elderly people with an accuracy rate of 90 %. This system is based on independent accelerometers, but a solution of an integrated system in a mobile phone is being developed. In [12], the use of smartphones is proposed to monitor physical activity levels and gait of the elderly in their homes or at retirement homes.

On the other hand, fall detection in elderly through accelerometer sensors is a widely used mechanism to prevent future bony fractures and other injuries. In this case, Zhang et al. [13] proposes a mobile system for the detection of falls by using a tri-axial accelerometer embedded into a mobile phone. Accelerometer data are sent to a server through the Internet. Then, three algorithms are used: 1-Class SVM algorithm for the pre-processing and KFD and k-NN algorithms for the data classification. Similarly, the VitaliSHOE project [14] uses multiple accelerometers to detect the risk of falls in older people with signs of frailty. In this case, sensors are inside the shoes and they obtain accelerometer data that are sent to a base station by wireless communication. At the same time, there is a software analyzing the user’s movement. Fall detection methods are used after the falls happen. However, we consider that a proper frailty diagnosis can prevent future falls.

Gait analysis can provide relevant information about diseases. In this sense, Lord et al. [15] discusses the Vitaport Activity Monitor (VAM) system and GAIT Rite system. These systems use accelerometers to study gait in people with Parkinson’s disease. Gait information is the key to assess the physical condition of the elderly.

Activity recognition for rehabilitation or injury prevention is another research line in which mobile systems based on accelerometers are used. However, the previous systems do not take into account clinical parameters such as patient records despite being used in medical environments. We believe the study of patient records is essential in most cases, and for that reason, it is included in our system. Also, information gathered by accelerometers is analyzed a posteriori in computers, and this is not always available to the physician in the appropriate form. But, not only movement data are needed.

In [16], Tehou et al. perform a study related to the measurement of frailty level from a physical viewpoint by using the following devices: an accelerometer, a heart rate monitor, a portable electromyography unit, and a GPS Footnote 3 (Global Positioning System), as well as different questionnaires. Although the use of different devices at the same time can provide a more accurate diagnosis, in most cases, this is unaffordable in daily work of health environments and is only performed in small groups of patients. However, results provided by the previous devices could anticipate more objective results.

Next-generation mobile phones provide a group of features such as processing and storage capacity, embedded sensors, and visualization and interaction mechanisms that can be exploited in healthcare environments, as we discuss in the next section.

3 Using mobile devices

Inclusion of mobile and ubiquitous computing in healthcare environments is enhanced by the integration of mobile devices. In this case, we propose a system for assisting physicians in frailty detection by using mobile devices, taking into account scores and results of current clinical tests and scales, as well as measures provided by accelerometer mechanisms. Thus, we try to achieve a more accurate and centralized method for frailty diagnosis. Only objective evaluation methods may ensure homogeneous rating criteria [17]. The purpose of our work implies the prevention of falls and injuries, the prediction of future pathologies, and other consequences of frailty. Besides, we believe the integration of accelerometer-enabled smartphones in healthcare environments to support geriatricians in frailty detection tasks is essential with the following advantages:

  • Embedded sensors. The next generation of mobile phones integrates many sensors. In our case, a tri-axial accelerometer is necessary for obtaining movement data of elderly people. Nowadays, the accelerometer sensors of universal devices such as mobile phones and smartphones have the same accuracy features as specific purpose accelerometers.

  • Processing capacity. Algorithms and other computational tasks are run thanks to a high processing capacity that exists in smartphones.

  • Communication mechanisms. Mobile phones can transfer data to other computing devices through wireless technologies such as Bluetooth or WiFi.

  • Touch interaction. The smartphone screen allows for a more intuitive and natural interaction. We believe that the integration of accessible and minimum methods of interaction facilitates the use of these devices in health environments because extra-knowledge is not required.

However, there are some drawbacks of using a mobile phone against a special purpose device. In Table 2, a comparison of relevant features for us between universal and special purpose devices is shown. A small true tick indicates which one offers the best option for each feature.

Table 2 Comparison of relevant features for accelerometer-enabled devices

Finally, the use of a single accelerometer-enabled smartphone is an acceptable and sufficient option to collect movement data from the selected activities (see Sect. 4) as described by Foerster and Fahrenberg [18].

4 Assessment of gait and balance

According to the studies in this area, the analysis of gait and balance is one of the most important factors to determine elderly state. From a preliminary observation, a physician makes a first diagnosis. Actually, geriatricians and doctors use the tests described in this section to assess the physical condition of elderly people. We propose that the elderly carry an accelerometer-enabled mobile phone attached to the waist while performing these tests.

4.1 Tinetti scale

The Tinetti test [5] is a widespread test to assess the posture control and the motor abilities of elderly people. Although it was proposed for its application in geriatrics, it can also be used in other situations where a similar evaluation is required. This test is divided into two parts, as follows:

  • In the first part, the person walks for a few meters, and thus, the geriatrician can apply the Tinetti scale evaluating gait parameters such as symmetry, flow, path, or speed.

  • In the second part, a chair without an armrest is used and several maneuvers are performed by the patient. Also, stability is measured with different exercises. From this, an assessment of balance is determined.

4.2 ‘Get-Up and Go’ test

Initially, this test [19] is done to assess the risk of falls. From a sitting position, the elderly person must stand up and walk approximately 3 m, turn, and return to the chair. Meanwhile, the geriatrician observes the exercise and provides a rating based on parameters such as turning and supports used to sit down and stand up, among others. This test evaluates gait and balance based on direct observation. Moreover, its application is simpler and shorter than the Tinetti test, so it is most often used by physicians. Also, there is a variation in this test called “timed get-up and go,” which includes a chronometer to measure the time it takes to perform each part of the exercise.

5 Patient record assessment

For frailty detection, we need to do a further study, not only focused on the physical condition from the previous tests. Also, it is necessary to make a correct assessment of the clinical record. In this sense, geriatricians establish a set of clinical parameters from the laboratory report belonging to the patient record. Seven groups of clinical factors have been identified (see Fig. 1).

Fig. 1
figure 1

Clinical factors group

Most of these groups consist of a set of relevant indicators to determine the state of frailty [20]. These must be quantified before being used by our system. So far, these variables have been taken into account by geriatricians to make a decision or diagnosis. However, social factors (home condition, care provided, incomes, geographic region, relationships, religion, and ideology) were not considered at first because these are not studied in most medical assessments. The rest of the indicators are detailed in Table 3.

Table 3 Relevant clinical factors

6 Architecture for frailty detection

We have developed a system for frailty detection and diagnosis formed by different modules and processes. In this section, we present the main parts of this system.

6.1 Data acquisition and analysis

In the first part, we use an Android application that has been developed for collecting data from an accelerometer embedded into the mobile phone. This mobile application allows us to create and select the physical activity to be performed by the elderly (gait or get-up and go), the need for help or support during the activity (through a checkbox item), the user ID, and the availability of the accelerometer sensor. In Fig. 2, a screen capture of this application is shown.

Fig. 2
figure 2

Android mobile application

It is necessary that the elderly carry the mobile device attached to the waist, as shown in Fig. 3, during the exercise. At the same time, the geriatrician makes an assessment of gait and balance applying Tinetti and Get-Up and Go traditional tests. When an elderly person performs a physical activity, the mobile phone stores in a text file the movement data obtained by the tri-axial accelerometer, and this includes the value of XY, and Z coordinates and time, with a sampling frequency of 20 Hz. We have decided to apply a data analysis in the time domain because it is sufficient to calculate the necessary results, requiring fewer resources than frequency domain [21]. This is important if the data processing is studied by the mobile phone. Finally, once the activity ends, a processing stage for studying the data stored in each file is needed.

Fig. 3
figure 3

Device position in the elderly

6.1.1 Segmentation and filtering

First of all, we have to do a signal segmentation process because only a range of accelerometer data is correct. In this case, values related to the beginning and end of movement must be removed. Thus, it is necessary to establish a segmentation criterion. It depends on the type of activity, as well as on external factors. Considering the time domain as mentioned above, we propose an algorithm based on the effective sample time (T EM) to remove all invalid values from gait activity. We define effective sample time as a valid time range in which the accelerometer has obtained sufficient valid data of a particular movement, generating a valid data sample. We have established an estimated sample time of 12 s based on results of a field study, including the principles of the Tinetti test and the minimum recommended distance. For obtaining data contained in this period, we have considered the following assumptions:

  • Elimination of accelerometer values during the first and the last seconds (T seg). In gait activity, T seg = 8 s estimated. This time corresponds to placement and removal of the device from the waits of the elderly.

  • Elimination of accelerometer values related to the turn that elderly perform when they reach the end of the distance (T int). In gait exercise, T int = 2 s estimated.

  • Elderly need a certain time to do the exercise (T Min). To reach, at least, the effective sample time and taking into account the above, in the case of gait, this time must always be greater than 30 s.

In Algorithm 1 is presented the pseudo-code of our segmentation algorithm for extracting a valid gait sample from the accelerometer data stored in the file.

For Get-Up and Go activity, the segmentation method is simpler because T int does not exist and T Min is not taken into account. In this case, T EM is the period between getting up from the chair and sitting down again.

The next step is signal filtering. It is necessary to remove the noise or jittering on accelerometer data and signal smoothing. For that, we have applied a low-pass filter, commonly used in accelerometry, because it is effective and simple. This filter is characterized by the base case defined in the first part of Eq. 1 and the general case in the second part. In this equation, f is defined as the result function, x is the initial function, and α is a filter factor with a value of 0, 1.

$$ f(x_i)= \left[ \begin{array}{lll} { x_i}& \quad {\rm if}& i=0\\ x_i*\alpha+[f(x_{i-1})*(1-\alpha)] &\quad {\rm if}& 0<i\leq n \end{array} \right] $$
(1)

6.1.2 Dispersion measures calculation

In view of the fact that we work in the time domain, we have chosen an approach based on statistical methods, obtaining several characteristics of accelerometer data. Thus, we have calculated a set of relevant dispersion measures from the values given by the accelerometer for every activity. The most significant features and whose calculation requires few computing resources are presented in Table 4 with the corresponding equation. All measures are calculated for the three coordinate axes. Also, these measures can be used for data classification and data mining, in order to improve the accuracy of our frailty detection system in the future.

Algorithm 1 Gait segmentation algorithm
Table 4 Dispersion measures

The analysis procedure of accelerometer data explained in this section is shown in Fig. 4. The values calculated from the dispersion measures are necessary in the next step.

Fig. 4
figure 4

Procedure for dispersion measures extraction

6.2 Instantiation model

We propose a combination between the previous statistical variables and clinical parameters (see Table 3) by means of an instantiation model. All of these variables are known as influential variables for frailty detection. Therefore, an instance is defined as a set of influential variables associated with a patient and a specific exercise (in our case: gait and get-up and go) at a given moment.

Firstly, we need an initial stack of instances. The ideal instance is one that has the highest score in every test, and their clinical parameters are in normal bounds, taking into account other features. From this, the specialist can establish a group of reference instances to be stored in a stack of instances, so that when a new elderly person is studied, a new instance is created, and this can be compared with other instances of the stack. Furthermore, this new instance will also be stored in the stack. The selection of the initial group of instances depends on specific criteria. In our case, we have chosen the “ask-the-expert” strategy [22]. In this sense, the human factor can affect the quality of the initial group. However, the subjectivity level is going to be reduced.

Instantiation is the creation of new instances. The arrival of new instances increases the stack, and this improves the accuracy of the detection system. Figure 5 shows the instances creation procedure and how a new instance becomes part of the stack.

Fig. 5
figure 5

Procedure of creation and integration of new patient instances

Moreover, in Fig. 6, the structure of an instance is shown in detail. Each instance is characterized by user ID, instance ID, physical activity (gait or get-up and go), date-time value, and influential variables. These ones are divided into accelerometer data and clinical factors as mentioned above.

Fig. 6
figure 6

Structure of an instance

6.2.1 Instance comparison method

After the instances are created, these ones are analyzed through comparison and classification methods to establish similarities and differences between instances of the stack, including new ones. This process can also be useful for the prediction of future pathologies, among others.

First, we have created the concept of affinity degrees. Apart from the influential variables, each instance may have an affinity degree in connection with one or more instances, in such a way that our system, knowing the state of these instances, also knows the state of the instance when this one is compared.

The affinity degree is a level indicator calculated depending on the importance given to the influential variables by the physician. Thus, the user selects the most important influential variables to consider for an elderly patient at the moment, and these are compared with the same variables of the other instances searching for similarity coincidences. In this case, influential variables are compared based on a similarity value given by Eq. 2. A lower value of S x indicates a greater level of similarity, contributing to a higher-affinity degree. A x and B x represent the same variable of two different instances.

$$ S_{x}=\left| A_{x}-B_{x}\right| $$
(2)

From the results of the previous comparison method application, the system implements an affinity tree.

6.2.2 Result affinity tree

We propose the creation of a tree formed from the most relevant instances according to the affinity degrees (see Fig. 7). The root node of the tree represents the current instance or the instance to be compared. The rest of the instances are obtained through the comparison method.

Fig. 7
figure 7

Result affinity tree with the maximum number of considered children

On the other hand, two depth levels are adequate, and these have been established to make the system run in a mobile phone faster and easier. The first one (1) determines a high-affinity level, and the second one (2) a medium level.

For the root node and all nodes of the first depth level, a maximum of three children instances are taken into account, while the second depth level has a maximum of 9 instances (3 from each parent node). Finally, the system uses all of these instances to create an aim set of indications, recommendations, and charts related to the patient, which are used by the physician to make a more effective diagnosis of frailty.

7 Evaluation

In this section, we detail the first evaluation of our frailty detection architecture that took place in a Retirement Home from Ciudad Real, Spain. Twenty elderly patients, ten men and ten women, were selected in collaboration with geriatricians according to the following criteria:

  • Elderly people who do not have permanent or serious health problems, with an average age between 75 and 90 years old.

  • There were the same number of women as men.

  • They preserve their social abilities.

  • They are independent in their everyday activities (ADL and IADL).

  • They do not present cognitive impairment.

General information of men and women is shown in Table 5. In this case, two women needed help to perform physical activities related to Tinetti and Get-Up and Go, and also the average of geriatric syndromes and age in women are higher than men.

Table 5 General averages from selected patients

The main goal of this selection is to obtain a first set of reference instances. All elders participated in the experiment over a period of one and a half months. This process was divided into the following four stages:

  1. 1.

    Gathering of accelerometer data and test application. Firstly, the geriatrician conducted an assessment of gait and balance applying Tinetti and Get-Up and Go tests while the elderly had the smartphone attached to the waist. This process was repeated 3 times, once every fifteen days, to ensure the integrity of collected data by mobile phone. Then, the set of the dispersion measures was calculated from each patient. In Table 6, we present an example of subjectivity when the traditional test of Tinetti was applied 3 times for each patient by the physician (see the rows in boldface).

  2. 2.

    Selection of variables from patient record data. In this stage, all relevant indicators related to frailty from each elderly person (see Table 3) were obtained from their records.

  3. 3.

    Instances creation and storage. With all the above information, our architecture creates the instances related to the patients studied and stores them in a stack of instances.

  4. 4.

    Analysis of results through instance comparison. In the last stage, the procedure of instance comparison is deployed to generate the first final results. Figure 8 presents four charts with the average results of men and women related to an excerpt of calculated variables for frailty diagnosis. In this sense, (a) shows the results of several nutritional factors. The nutritional analysis concludes that the women studied have a higher rate of cardiovascular diseases. When the Tinetti and Barthel Index tests were applied to each patient 3 times according to the classical method, different scores were given. However, according to an average score of these methods—see chart (b)—both results are more satisfactory in men than in women. Then, (c) presents some dispersion measures calculated on the three coordinate axes from the accelerometer. In this case, Pearson’s coefficient of variation (CV) represents the number of times the arithmetic mean is contained into the standard deviation. The higher the CV, the greater the dispersion in the variable and the lower the representation of the arithmetic mean. Also, the amplitude variable in the three axes represents the difference between maximum and minimum values for each axis. In this sense, all of these differences between men’s and women’s values are due to motion asymmetry, technical assistance that affects the rhythm of the exercise, and flow and gait trends. Finally, chart (d) shows the acceleration mean values (speed variation), taking into account the three coordinate axes. It is important to mention that the y axis is the only one related to the direction of movement.

Table 6 Final Tinetti scores for three iterations
Fig. 8
figure 8

a Nutritional. b Functional. c Dispersion measures. d Acceleration mean

In Fig. 9, we present a flow diagram of the architecture from the previous evaluation procedure.

Fig. 9
figure 9

Flow diagram of frailty detection architecture

Thus, when a new elderly patient appears, he will be studied individually, taking into account the elders from the instance stack as reference items. Currently, we are testing different kinds of patients by using the developed method, and the evaluation continues today.

8 Conclusions and future work

This work presents a mobile system to support physicians in frailty detection and diagnosis in healthcare environments. We propose the use of an accelerometer-enabled smartphone to obtain elderly movement data related to two basic tests of gait and balance. From accelerometer data, a set of dispersion measures is calculated and combined with frailty risk factors from the patient record, creating specific objects called instances. When a new elder comes, a new instance is created. All instances are stored in an instance stack. Initially, this stack of instances is formed by a set of reference items. From the comparison between instances, the system establishes different affinity degrees to create an affinity tree with a subset of them, taking into account several parameters. Finally, the interpretation of this affinity tree is used to provide a frailty diagnosis in a more accurate and practical way. In our case, frailty assessment is based on objective comparison methods because today it is not an absolute measure.

Next steps in our research include the formalization of final results on the mobile screen to facilitate its interpretation by the specialist. Also, we are studying the behavior of the system with a larger group of elderly patients. And the level of objectivity is provided in relation to other systems.