Abstract
With the advancement of living standards and healthcare systems, there have been significant improvements in life preservation worldwide over this century which are reflected in prolonged life expectancy and are enlarging the aging population. In the foreseeable future, the home care environment is recognized as the first line of defense for health and medical care via proper implementation of state-of-the-art information technologies. For instance, in the home care environment, the tracking of physiological information not only circumvents the high-cost medical manpower and resources, but the signs of abnormal health can also be detected further by long-term and sustaining health records.
In this paper the development of an intelligent home healthcare system based on Radio Frequency Identification (RFID) and the mobile agent technologies is described. The system enables the RFID home care service and physiological assessment based on the concept of Location-based Service (LBS). Additionally, by coupling the technologies of dynamic detection and motion detection, a home care system for real-time safety has been designed to prevent the elderly from accidental falling.
Keywords
1. Introduction
For the purpose of improving the quality of medical care, more and more health care systems are intensely embracing the Radio Frequency Identification (RFID) technology in recent years, combined with the use of assorted hospital information systems (HIS). With the use of hybrid RFID and HIS technologies, management can substantially improve in its task of tracing patients, medical materials and supplies, medications, and healthcare related inventory. Providing the elderly with high-quality healthcare and greatest resulting benefits has been the central issue and primary goal for many healthcare systems. By integrating RFID and mobile agent technologies, the healthcare system for the elderly has the potential of a revolutionary improvement in the future.
The primary objective of this research is to build a convenient, safe and long-term home care environment for the elderly, under the premise of not affecting their daily routines as well as providing a complete and continuous care environment for them after leaving the hospital. Specific research objectives are elaborated in the following sections:
Automatic alerting services for medication reminders: Being frail physically, many seniors are likely to be on medication for various long-term diseases, such as heart disease, hypertension and diabetes. Some may still be energetic of mind; nonetheless, for many, memory loss is often a part of aging. They usually forget to take their medicine at the right time, or even worse, they may take the wrong ones or the incorrect dose, which partly results from having trouble in remembering things. Some elders live alone without any family members nearby to watch out for their medication scheme. As a result, a medicine-reminding mechanism is indispensable for the elderly who have memory-associated problems.
In addressing this need, this research proposes to adopt the intelligent mobile agent system as part of the solution to build a healthcare environment that would render necessary the provision of medical care and urgent attention to elderly patients especially when they are at home alone. Using the mobile agent system, the patient need not physically go to the hospital for the daily information of his/her medicine intake. Aside from providing the right medication information, the system is also connected to a broadcaster or flat panel display for medication reminders. In other words, when it is time for the patient to take medicine, the agent will automatically retrieve the right information about the medicine from the hospital database and display the reminder information on the flat panel display or other terminal application programs. In this way, within the premise of limited public healthcare resources and under the condition of not interfering with and restricting the daily activities of the patients, the overall purpose of continuous and long-term care can be achieved.
The next vital step to the medication-reminding mechanism is to continuously keep track whether or not the patient is actually taking the medicine on time after being reminded by the system. Moreover, a possible scenario may be that the patient is taking the medicine on time but the wrong kind or wrong dose is consumed. If that is the case, an alert must be issued immediately by the mechanism to the nurses or other caretakers that they take necessary corrective actions. Based on the platform described previously, the RFID technology is embedded in the terminal application for developing an intelligent RFID medicine chest which will automatically record if the patient has taken the right kind and dose of medicine. When the reminding mechanism was started off, if the patient did not take medicine from the chest on time, the system would remind him/her again. Additionally, if the patient took the wrong medicine, the medicine chest would remind via the voice or flat-panel display.
The information on tracking medicine-intake status is also useful for physicians and clinic attendants. When an accident befalls the elderly patient, the doctor can acquire his/her medication history instantly and is able to take the right action on medical treatment.
As moving is usually difficult for seniors, the injury caused by accidental falling can be serious. Taking the United States as an example, more than one third of adults at the age of 65 and older fall each year; falls comprise the leading cause of injury deaths. They are also the most common cause of nonfatal injuries and hospital admissions for trauma among seniors. According to the statistics released by the Center of Disease Control and Prevention of the Department of Health and Human Services in the U.S., 15,800 people at the age of 65 and older died from injuries related to unintentional falls in 2005. In addition, approximately 1.8 million people in the same age bracket were treated in emergency departments for nonfatal injuries from falls, and more than 433,000 of these patients were hospitalized.
For the solitary senior, when an accident occurs, he/she may not be able to save his/herself and the urgent medical care may not be delivered on time. Addressing this issue, the third specific objective of this study is thus to detect the occurrence of falling among seniors. To achieve this objective, a special-designed home care mechanism for real-time safety, which is different from conventional safety monitoring systems in the current marketplace, is developed. Basically, the traditional monitoring system is composed of a surveillance camera, a monitor and a VCR. Due to its limited functions, the system is unable to inform people with a real-time alert about accidental occurrences within the monitoring scope. The only corrective action that caretakers can usually implement is to retrieve and review the video clips in an effort to search for relevant information after the accident has occurred. Unfortunately, at that time, the injury has already been caused. With conventional monitoring systems, safety personnel are usually employed to constantly monitor the screen. Due to physical and mental fatigue, they may be asleep at the wheel and could miss some important scenes. Additionally, in order to save a long picture shoot, significant amount of storage media is needed. Even if the videos are stored in digital media, it is still impossible to issue a real-time warning to immediately inform the home care staff of the accident.
In contrast to the traditional monitoring system, a home care mechanism with real-time safety features has been developed in this study. The especially designed home care system employs both camera and image processing technologies. In practice, the mechanism constantly monitors the location of the individual under care in a complex home environment, and then detects whether the elder is falling or fainting. If so, the system will then immediately inform the manager to carry out necessary emergency treatment procedures. Simultaneously, medical staff could be sent to provide relevant assistance at once. Injuries can thereby be significantly reduced. Without having to learn about the occurrences by watching the video tapes long after the accident has taken place, tremendous medical resources can efficiently be saved. In addition, the location of the accident can be further pinpointed by the mechanism with real-time geographical information transmission to the relevant units, which helps eliminate the physical risk factors in a home care environment.
In the traditional long-term care system for seniors, the patients need to walk on their own to the community care station or regional hospital to have their regular physiological examination, such as the measurement of blood pressure and blood sugar. Oftentimes, excessive time and extra costs are unavoidable in the registration waiting line, medical care delivery, and traffic. It is particularly inconvenient for those elders who live in the rural areas where the attending hospitals or clinics are often not nearby. Therefore, in order to improve the quality of public long-term care entirely, a viable solution to the disadvantages and drawbacks of the traditional systems is indispensable.
In this research a healthcare environment with a built-in physiological assessment system was designed based on the mobile agent technology. As an important task to lay the groundwork for effective implementation, a set of critical risk values of individual physiological information were first defined by the doctors aiming at the different physical conditions of patients. These pieces of information, along with the physiological information retrieved from the home physiological monitor, were utilized by the system developed in this research to automatically analyze whether the elder patients had abnormal physiological conditions. The diagnosis of the elder was used directly, paving the way for the most effective and efficient treatment to be administered. This is because the physiological status, as measured by its monitor, could be delivered to the physiological assessment mechanism for analysis through this environment, i.e., the elders can also enjoy a similar service at home as in the hospital.
Further, the system renders the early warning function through machine learning. When the system detects any possible aberration or abnormality in the person's physical conditions (e.g. having high blood sugar for several days without reaching the dangerous threshold yet) through the flat panel display, the system will remind the patient with information on countermeasures (e.g., diet control) for the purpose of preventing diseases from actually occurring or worsening.
In order to achieve correct transmission of the patient's physiological information, and not to be restricted by the type of hardware used, an RFID reader is integrated with all the relevant physiological monitors. The RFID-based system is capable of remotely retrieving necessary physiological measurement data via reading the RFID tags (or called transponders) embedded in the patient's wristbands or special badges with a tamper mechanism. Along the line, the system also interacts with hospital information systems for automating and streamlining medical administrative tasks such as automatic physiological information storage and management. With more streamlined healthcare processes, medical errors can thus be significantly reduced, thereby improving patient safety. In other words, implementing RFID technology will ensure the satisfaction of the underlying needs for medical safety via obtaining the right information for the right patient at the right time.
Essentially, mobility and transportation are usually linked to independence, well- being, and quality of life. With the growth of the senior population, how to improve the mobility of elders without compromising safety has become an important and challenging quest for many researchers, healthcare organizations and society as a whole. Addressing the issue of degenerating mobility and memory capacities of seniors, the concept of Location-Based Service (LBS) is made possible by using the RFID-based system in this study for provision of a more convenient set of home care services. In line with the three specific objectives of the study already discussed (namely, the service of medicine-reminding, protecting and preventing the elders from falling, and physiological assessment and early warning), by leveraging the LBS technology, continuous long-term services can be provided without interfering with care-receivers' everyday activities and without restricting their mobility
Regarding the medicine-reminding service, the reminding mechanisms can vary depending on the location of the senior, providing different ways to remind him/her. Hypothetically, if it is time for the patient to take medicine while watching TV in the living room, the medication information will be displayed on the digital TV reminding him/her of the right action. When he/she is walking outside their house (e.g., in the community park instead), a reminder message can be issued via the community broadcasting apparatus.
The same concept can be applied to long-range physiological assessment and early warning system. A sample scenario is where the system detects a trend of over-high blood glucose based on the patient's recent physiological assessment records. At a certain point in time, when the system senses that the patient is near the refrigerator, then a monitor (with the voice activation function) close to the refrigerator will display the reminding posters with attention points for the diet. (Essentially, it will display the food that the patient should not consume.)
Finally, with respect to the protection and prevention of the elders from falling, the home care system for real-time safety can provide video captures according to their current locations, without the need to analyze all the images of the locations. This setup can greatly reduce the risk of overloading the image analysis system.
Nursing staff to confirm whether the patients have timely inspections
When it comes to remote community care or home care, those patients with limited mobility often need assistance from paramedics, nurses or other caregivers in moving around. However, in recent years, many cases indicated that the state of the illness of many patients was worsened in part due to the negligence of nurses or other caregivers. At any rate, how to effectively avert possible accidents for those patients with limited mobility (even with the presence of nurses or other caregivers) and to properly verify the accountability for the accidents have become extremely important issues. The RFID technology is thus embraced in this research to confirm whether or not the paramedics or nurses come to the patient's location providing necessary care services or taking the right actions.
First, for the purpose of identification, the medical care personnel or caregivers should be given a reader and a label that is set at the patient's residence. When the caregiver came to the patient's home, the volume label will be detected by the caregiver's reader. Then the system records all the actions to check if the caregivers are performing regular inspections punctually and correctly. If the identification code is not read after a certain period of time, the central control room will issue some form of reminder (via PDA alerts, cellular phone calls, or text message) to the caregiver(s) in question. Under normal circumstances, if the caregivers indeed came to the patient's home as confirmed by the mobile agent and label identification code, they could access the hospital database to retrieve the medication instructions for the patient and then carry out necessary medical administration procedures.
2. Literature Review
The World Health Organization (WHO) (Wilkinson, R. & Marmot, M., 2003) defined a country which has 7% of its total population being over the age of 65 as an “aging society”. With the advancement of living standards and healthcare systems, the people's average life expectancy has been gradually prolonged, and the percentage of the aging population has been increasing continuously. In face of the aging society, the problems of various social welfare, medical and pharmaceutical technologies as well as the social security system appear incidentally. An increasing number of elders are not being cared for by family members properly and adequately. The aging of the population structure is a universal problem. Due to this rapid increase of aging boomers, more attention needs to be paid to all aspects indeed. This ranges from the science and technology aspect, to how to use each kind of technological assistance, to how to make the elders enjoy life healthily, comfortably and safely despite the gradual decline in their physiological functions. All of these comprise a very important and noteworthy subject. Lewis (Lewis, D., 1999) pointed out that, in the future, the developing direction of medicine would be to use all kinds of remote-sensing and monitoring technology, such as video, blood pressure monitoring and intelligent medication systems to gradually replace high-cost, time-consuming clinical diagnostic models. Based on long-term and continuous health monitoring data, the signs of abnormal health would be detected further. In the foreseeable future, the home environment would be the first line of defense for health and medical care.
2.1. Radio Frequency Identification (RFID)
In recent years the applications of RFID technology has become more and more prevalent, be it in the IT industry, the logistics industry or retail trade. RFID can also be employed in supply chain management for boosting the efficiency of inventory tracking and management. The first industry that used this technology in Taiwan was not the ones mentioned above, however. It was applied in the medical establishment. For example, Taipei Medical University Hospital, Show Chwan Memorial Hospital, Koo Foundation Sun Yet-Sen Cancer Center, Tri-Service General Hospital, Kaohsiung Veterans General Hospital and Ton Yen General Hospital have heavily invested in RFID-based technologies for the purposes of improving epidemic prevention and trace management systems as well as strengthening their medical defensive capabilities (Liao, P. et al., 2006).
Basically, RFID can be applied in two major functional areas: identification and targeting. For instance, RFID can be applied in access control, warning, logistics, tracking and surveillance, rear service and flow path optimization. When integrated with wireless communications or local area network, RFID is capable of performing powerful functions of information exchange. The spectrum of RFID applications is therefore relatively broad. It covers the management of persons (e.g., identification and location assistance of dementia patients for improved patient safety), events (e.g., monitoring of patients' body temperature or blood pressure of patients, transmission of medical records and waste), time-related information (such as patients' contact histories, hospital staff's attendance records), places (warning and isolation rooms, etc.) and materials (herbal medicine, medical supplies, etc.). As a prime example, The Show Chwan Hospital in Taipei used RFID technology to build an “intelligent digital health network”. In addition to controlling the targeting system of medical staff and infectious patients, the function of temperature monitoring was integrated further in the network. In practice, the data on of a feverish patient's body temperature is sent to the medical information system of the hospital, allowing doctors to effortlessly diagnose the disease based on the patient's medical records.
2.2. Mobile Agent
As part of the vigorous development of mobile e-commerce, the Agent technology is used to facilitate automated business environments. The Mobile agent technology, in turn, renders the autonomous moving capability to the agent program in the networks. The Mobile agent is a program which moves among various computer terminals and simultaneously performs autonomous processing for distributed computing. The users can give their work to the designated mobile agent in order to complete its work efficiently. This agent will enable customized search for necessary data or services. If needed, it will also visit other fixed points on the network. The mobile agent goes to the data location to deal with it personally and then returns to the user's location with the data after it has completed searching. Because the program of the mobile agent is small, its movement within the network will not consume network bandwidth. As a result, costs and overheads of networking can be significantly reduced. Additionally, it can improve the efficiency, effectiveness and convenience of data distribution and processing. At the same time, it will help diminish possible delays in transmission among the distributed systems and reduce transmission frequency among the computers.
Mobile agent development, an integral component in the mobile e-commerce environment, has now taken center stage for distributed systems processing. The mobile agent draws the attention in various fields, such as software engineering, knowledge engineering (Robertro, O. et al., 1996) and the Internet (Magedanz, T. et al., 1996). When Etzioni et al. studied the development of the mobile agent program in the Internet, they stated that the mobile agent program can move over the Internet such that, in the future, the mobile agent could lead us to find necessary data, or request matters in the high-speed information network (Etzioni, O. & Weld, D., 1995). While studying the actions of The Mobile Telescript Agents on the Web, Dömel thought that, if the mobile agent is given more intelligence, it would have more applicable value in its action on the Web (Dömel, P., 1996). Moreover, in their study on structure management of a distributed application system, Berghoff et al. used the mobile agent to find correct addresses of data transmission in the network in order to reduce the network traffic flow. The use of the mobile agent can thus enhance the performance of distributed application systems (Berghoff, J. et al., 1996).
Chang and Chen sorted out the definition and features of the mobile agent (Chang, C. & Chen, Y., 1997). They believed that the mobile agent is a special type of intelligent software programs, which is capable of self-learning and assisting in treating the complex routine work, so as to reduce the burden on users. Su developed a mobile multi-agent based information platform–MADIP to support the intensive and distributed nature of wide-area (e.g., national or metropolitan) monitoring environment (Su, C., 2008). By integrating the MADIP platform with light-weight, portable monitoring devices (e.g., portable vital sign monitor), continuous long-term health monitoring can be performed without interfering with the patients' everyday activities and without restricting their mobility. Zhao et al. used Multi-agent system (MAS) based structural health monitoring (SHM) technology for dealing with the diverse, heterogeneous and distributed information (Zhao, X., 2009). The research introduced an evaluation on a multi-agent system based structural health monitoring to validate the efficiency of the multi-agent technology.
In a nutshell, the features of a mobile agent are delineated as follows:
Intelligence: It is of its own thinking capacity and acting ability and thus can be taught to act through Artificial Intelligence (AI) technology.
Mobility: In a network environment, the mobile agent can effectively wander through various workstations for data transmission and capture as well as computing job execution.
Cooperation: The mobile agent can seamlessly cooperate with other agent programs for mutual information transferring and exchanges, as well as facilitating effective information communications.
Communication: The mobile agent is capable of retrieving the right information for the users in different systems.
Autonomy: The mobile agent can do the self-control of partial behaviors and inner state of action without human intervention or instructions from other software programs.
The range of field applications of the mobile agent is broad, but studies on its application to healthcare are relatively scarce. The use of communications technology in traditional electronic medical care systems is also relatively limited. For example, Dwyer et al. used the Public Service Telephone Network (PSTN) to carry out the data transmission for BP and ECG (Dwyer, S. et al., 1992). Because of the bandwidth limitation, data analysis employed the off-line mode, with a transmission speed of merely 33.6 kbps. However, simply sending physiological signals could not meet the requirements of diagnosis or consultation between the patients and health care providers. At the same time, in order to improve the bandwidth problem, Akselsen et al. and Chipman et al. replaced the Telephone network with the Integrated Service Digital Network (ISDN) (Akselsen, S. et al., 1993), (Chipman, K. et al. 1992). The transmission speed was then upgraded to 1.92 Mbps for physiological signal transmission and to carry out the two-way transmission of the video.
2.3 Home care for real-time safety
When solitary elders fall or become unconscious at home, they usually cannot receive immediate assistance or necessary medical treatments. Oftentimes, it's been too late when such assistance or medical attention arrives. As a result, a real-time safety care system is vital in that case. In practice, real-time safety care can be achieved in two parts. As a motion detection mechanism, a camera should be first installed at the care-receiver's home. With a camera in place, the location of the care-receiver will be automatically detected and captured in real-time. The next part of the job is to track the elder's behaviors by proper representation and identification of behavior patterns to detect and differentiate various scenarios of the elder's conditions: walking normally or falling. Therefore, when one has an accidental fall or passes out, relevant medical caretaker(s) will be informed immediately to provide necessary assistance.
There are two common methods that can be used for motion detection technology:
Background subtraction: This is the most commonly used method for motion detection at present, particularly in fixed backgrounds. It uses a background image shot ahead of time and then subtracts the image shot currently. When the difference between the pixels of the two images is greater than the default threshold value, then the pixel location is considered to be changed. However, this method does not apply to changing environments, such as the moving conditions of lighting and furniture (Haritaoglu, I. et al., 2000), (McKenna, S. et al., 2000), (Stauffer C. & Grimson, W., 1999).
Temporal differencing (Hu, W., 2004) (also known as Frame differencing): This does not use a pre-filming scene as a reference background, but uses the process of subtracting the two images, which are continuous or within a period on the time axis. The advantage of this method is it's not vulnerable to the influence of scene or light changes. Nevertheless, one of the disadvantages is when the people in the scene stop moving, the changes may not be identifiable. Thus, it must choose the images within a longer time interval, or detect static background subtraction.
After finding out the location and behaviors of the elder in succession, the motion detection of the second part follows. The main question here is how to define falling and walking through the representations of the elder's behaviors. Often, the elder's locations detected continuously will be represented through a trajectory image so as to judge his/her behavior patterns. If that individual falls or faints, a warning will automatically be issued to inform relevant staff to help the afflicted person. Using the statistics of behavior patterns of the individual, vulnerable or dangerous areas at the solitary elder's home can be located. Consequently, the living environment of the elders can be significantly improved, and thus their safety can be ensured.
In view of the foregoing discussion of RFID technology, mobile agent and real-time safety care, this study focuses on the applications of the RFID and the mobile agent in order to hopefully build a more efficient intelligent health care system.
3. System architecture
The agent server at the core of the system infrastructure performs the following functions: (1) allowing the elder's physiological information to be sent back by the Vital Sign Monitor; (2) recording the RFID information, such as the numbers of readers and their locations, the corresponding holder of the identification tag of the volume label, etc.; (3) enabling the image processing and analysis of the camera for home care with real-time safety; and (4) saving the elder's medical records and the relevant data of machine learning. Simultaneously, the system deploys mobile agents for messaging and data exchange, to design the agent server. The structure is depicted in Fig. 1.

The system architecture
Regarding the first function, the care-receivers are expected to use the physiological monitor routinely to measure vital signs (e.g., blood pressure, blood oxygen and pulse rate); the measured data will then be sent back and stored in the agent server. When an abnormality is registered, the agent server will at once issue a warning to a designated physician. Further, the trends, patterns and special characteristics of the elder's physiological information are analyzed by constantly tracking physiological conditions according to the historic physiological data stored by the agent server, and through machine learning methods. If there is an abnormal trend or pattern, the server will remind the elder of relevant contingency measures through the flat panel display or broadcasting mechanism.
With respect to the second function, RFID technology is employed to confirm the elder's identity and to subsequently remind him/her at the right time to take medicine. When the elder's label is read, the label identification code will be sent back to the agent server (that stores the information of the reader's location) allowing the elder's location to be identified. When it is time for taking medicine, the agent server will detect and release a proper reminder to the elder.
With regard to the third function, accidental falls can be greatly prevented through the process of analyzing and processing the images taken by the camera in home care in a real-time manner. Once falling is detected by the agent server, a warning is immediately issued to inform the administrator and the medical staff to assist the elder at once.
Finally, regarding the fourth function, the agent server uses the Mobile agent technology through the network to get the elder's medical treatment or medication records from the hospital. The medical personnel can thus know the elder's health status/conditions through this function. Or, when any accident happens, the medical personnel can confirm the identity through the RFID technology to obtain their medical records quickly, and administer most appropriate treatments as soon as possible.
3.1. RFID application mechanism
This study aims at applying the RFID technology in health care systems. The application mode and expected effects are discussed as follows:
Identification: As the identification code of a label is unique, when the label is delivered to an elder, the identification code and the elder's identity are stored in the database. In the future, the elder's identity can be recognized as long as the label is read.
RFID intelligent medicine chest. This is designed with a screen and a reader installed. At the time for taking medicine, the name and photo of the medicine will be sent and displayed on the screen by the agent server. When the elder follows the instructions taking the medicine, the reader scans the label on the bottle and compares it to the one on the screen. If it is consistent, and then it is confirmed that the elder has taken the right medicine and dose. On the contrary, when the name of the medicine is not displayed on the screen, it is then detected that the patient may have taken the wrong medicine and, immediately, a warning will be issued. If the data of medicine remain on the screen, it is likely to be a case that the medicine has not been taken and still a warning needs to be issued. As a result, with the use of the RFID intelligent medicine chest, the care receivers will be able to receive timely reminders for taking the right medicine with the right dose at the right time.
Regional judgment: First, all the readers have been coded as location regions (e.g., home, park and other places) which were recorded in the agent server. When the elder is at a particular place, the reader located in that region will read the elder's label. Thus, the agent server is able to identify the region that each elder resides In. The flow of the region recording and identification process is depicted in Fig. 2. Via the broadcast system or flat panel displays, at the time of taking medicine, the agent server obtains the elder's location and sends out the medicine-reminding message through the broadcast system.
Confirmation. The fourth step is to confirm if the medical staff has attended to the patients in a timely manner. To facilitate this task, RFID is used for effective asset management. When the health care provider visits the patients, the reader will check the volume label at the patient's home, and send the information back to the central control system. If the health care provider does arrive at the patient's site at the right time, the system will issue a warning message to report such an incident.

Schematic diagram for judgment mechanism of region
3.2. Mobile agent environment
The health care system described adopts the Mobile Agent technology for the release of relevant information and for data transmission.
The application aspect of message issuance is the function of medicine-reminding for the elders. The agent server has an application program for mobile agent's scheduling, used to monitor the time for medicine intake and initiate the action of the mobile agents, as shown in Fig. 3. When it is monitored that there are elders who need to take medicine at a certain point in time, the mobile agent immediately starts functioning, taking the medication content and informing the elder.

Flow diagram of mobile agent scheduling application
Data transmission is designed for medical information. The agent server sends mobile agents to medical institutions, such as hospitals, to obtain health-related messages of a designated elder or patient, including medical records, medication information, and patient's medical history. In addition, when the medical personnel carry out the emergency action for the injured patient, treatment information will also be transmitted through the mobile agent and sent to the hospital, as shown in Fig. 4.

Schematic diagram for data transmission of mobile agent
Among the methods available for message release and data transmission, the mobile agent technology is considered as one of the most viable for application in this study. The benefits derived from using this technology can be delineated in three aspects:
Offline treatment: The mobile agent travels back and forth among various systems through the Internet, thus avoiding network instability and reducing the likelihood of data transmission failure. The offline treatment function of the mobile agent technology is relatively smarter: when the network is paralyzed, the mobile agent assigned for a job will wait for the network's rehabilitation and afterwards, will continue to complete the work automatically.
Cross-platform: The mobile agent technology is programmed in Java that supports a cross-platform computing environment. Therefore, the mobile agent technology was also considered for adoption due to its ability to function on multiple operating systems.
Strong integration: the operating system and database used in each medical institution are different. However, since the mobile agent technology has the cross-platform feature as mentioned above, it mitigates the difficulties in data transmission of the heterogeneous systems.
3.3 Home care for real-time safety
To ensure real-time safety for home care, several cameras will be installed in the solitary elder's home for detecting his/her abnormity. If an accident occurs, a warning is then issued immediately. Employing the real-time safety system in the home environment, the reader located at the area that the elder resides in will read the label on the elder. The system then starts off the real-time care function detecting whether or not there is an accident of fall. If so, the central control system will issue a warning instantaneously to inform the managers. They then immediately examine the pictures of the accident on the monitoring screen to discern if any emergency assistance to be provided is needed.
Home care for real-time safety can be divided into two parts: dynamic detection and motion detection. First of all, with respect to the dynamic detection technology, in order to find the correct position of the elder, it is necessary to avoid the impact caused by the movement of surrounding environmental objects, such as lights, furniture, curtains and dishware. The time difference method can solve such problems. However, it cannot detect the stationary subjects on the screen. For example, when the elder on the screen is falling asleep, the elder's location might not be detected. Therefore, it is necessary to use the background subtraction strategy to find the elder's real location. As shown in Fig. 5, when he/she appears on the screen, his/her locations and actions can be extracted in order to carry out the next step of motion detection.

Detecting the results of falling behavior
Behaviors are classified in succession through data model identification and classification technology. The results of dynamic detection, which are in consecutive time series, are represented and then transformed into a two-dimensional image to express different behaviors (such as in time series). The image of action outline or the track made by the gravity centre points of the subject are shown in Fig. 6. It is clear here that there are significant differences between normal walking and falling tracks. Thus, a best combination of the characteristics for training and classification can be found through representations of various tracks and the selection of characteristic values to define the different patterns of behavior (e.g., walking, falling and fainting), along with the steps of design and selection of characteristic values. With these, the patterns of behavior are immediately discerned. In case there is an unusual or dangerous behavior, the real-time warning will be issued at once.

Representation of continuous behavior
4. Conclusions
The purpose of this study is to provide the elders with a safe and intelligent healthcare environment through the integrated use of RFID and mobile agent technologies. The details of home care are fused into life, providing delicate functions for the elders. These are coupled with the real-time safety mechanism; to detect the signal of elder's falling, enabling the medical staff to carry out the appropriate medical treatment in a timely manner. It not only lessens potential regrettable situations due to improper medical care, but also reduces the concomitant medical disputes. The bottom line: it guarantees the elder's safety. In addition to video detection, there is also information detected for machine learning, to discern the elder's possible falling situations and help achieve the goals of accident prevention and safety assurance. Moreover, in the traditional Chinese way of thinking, the implementation of this system will provide a friendly environment which is not similar to living in the rest home. It will allow an elder to enjoy a normal family life with continuous care. Meanwhile, it can reduce the costs of hiring 24/7 caregivers and avoid poor and improper care. Also, the system equipment components are discreetly allocated so as to reduce the complexity of using the system and to enable the patients and their families to maintain their normal life functions and living quality standards.
The RFID-driven and behavior-locating service-based system developed in this research has helped achieve a number of goals in healthcare safety. First, the functions of locating and dynamic detection enable the system to effectively detect the exact location of the elder in the room to ensure real-time safety. Practically, only the necessary lenses of the cameras are opened in different situations. As a result, it speeds up the computing process of large amounts of data at the back of the dynamic detector. In the meantime, it also increases the accuracy and effectiveness of machine learning. In the case when the elder walks or sits outdoors, the means of broadcasting can be employed to announce the medicine-reminding message. Other viable devices used to receive messages are mobile phones, PDAs and flat panel displays.
Another application of the RFID technology is the recording of the exact time for timely medicine-taking and providing proper medication safety precautions. When the elder takes the medicine, the reader, installed in the RFID medicine chest, will read the label identification code of the medicine to detect what medicine and when the elder consumed it. When the prescribed medication period lapses, the warning will be resent to remind again through the above-mentioned applications to prevent the elder from getting the wrong medicine, taking the wrong medicine, or forgetting to take medicine on time.
The system employs a combination of RFID and mobile agent technologies, allowing the mobile agent to carry a unique label identification code, and to store and retrieve individual medical information from the hospital databases via the Internet. The essential pieces of information include medicine intake time, diet, drug allergies, caretakers' scheduling, etc. As to the medicine-reminding service, the set of images of the prescribed medicines and drugs will enable the elder to correctly identify what medicine to take. With the use of the RFID technology, it is easy to confirm the amount and kind of medicine to remind, and in turn, to assure the safety of the elders.
Further, there are a number of practical applications of the system developed in this research besides medication-reminding and behavior-locating services. Assuming an elder is detected outside his/her residence (e.g., in a restaurant) within a certain range, the agent can retrieve relevant medical information through the Internet and send appropriate messages to the elder. For example, he/she may receive such messages as “An excessively greasy meal is not appropriate due to its high cholesterol content”, “Your blood glucose level is unstable at present, so sugar intake must be relaxed”, or “Suitable daily nutritious recipes must be provided and followed healthy eating”. Therefore, combining the three technologies mentioned above enables the elders to receive complete medical care services with attention to life's small details and help them maintain good body conditions and a healthy life.
Thus, for elders who need medical care and find it difficult to move around, the hybrid RFID-mobile agent technology will allow medical staff to obtain the elders' relevant medical information through this agent, carrying out the above-mentioned services, to achieve complete care. Moreover, the use of RFID reader to read the identification code of volume label, which has the function of recording the reading time, will confirm whether or not the medical staff have indeed visited the residence of the elders and cared for them. If after a certain amount of time, the label identification code has not been read yet, the central control room will remind the medical staff, so that the elders can obtain improved medical services.
Regarding the prevention of the elder from falling, this system uses the dynamic detection technology to observe whether the images changed or not in the time series, through the representation for different tracks of images captured. When the elder is detected to act abnormally as preset on the screen, it can make a judgment to determine if some abnormal behavior has occurred. For instance, if his/her image track of gravity center comes down immediately and is detected, and the image of the object (i.e., the elder) holds still for 5 seconds, then it is determined as falling. Another scenario is that if the same formed a fluctuating curve, it will then be determined as a stumble and probable falling. When a certain abnormal behavior occurs, the real-time safety aspect of home care issues a warning to inform the central control staff, and they can further confirm through the screen whether it is a falling accident and determine its seriousness. With RFID technology, the elder's identity and location can be easily specified. Along with the patient's relevant medical information (sent back by the agents), the central control office can then provide complete information to the medical staff and advise the latter to administer the initial medical treatment properly.
The incidents of omission of important images caused by fatigued staff can be substantially reduced. As a result, the elder who has an accident is able to receive timely, complete and proper care. At present, many commonly used cameras in the market permit the users to connect them to the Internet and to observe the images via cellular phones. Because the timing of on-line connection is quite random, unusual events cannot be observed when connection just recently takes place. Hence, it is difficult to determine whether the abnormal events have occurred; as a result, the function of real-time informing cannot be achieved. In this study, therefore, this mode of passive monitoring is adapted into an active one. When it detects an abnormal event, it will inform the relevant staff, and with the network cameras exhibiting the abnormal event on screen, the users can then view the actual situation.
The physiological information from the monitors, the dynamic detection technology and the machine learning, are studied and analyzed to simulate or realize the human learning behaviors in order to acquire new knowledge, reorganize the existing knowledge structure and improve performance continuously. With the elder using a physiological monitor to measure blood pressure, heart rate, body temperature and other vital signs, the machine learning is matched to carry out learning and training. The trend analysis for physiological information can be easily observed. For instance, if it is detected that the elder has a rising trend of blood pressure, or unstable blood glucose level, then the system will remind the elder of such abnormal conditions, making him/her always alert to his/her health conditions and seeking for overall disease prevention.
In the aspect of dynamic detection, employing the statistics of the occurrence of the elder's falling in individual regions and allowing the machine learning to analyze and compare data, this elder may be found to be more prone to have an accident in a particular region. All of his/her falling information can also be analyzed and classified, in order to determine the categories of the most frequent falling warning. Through the integration and learning of such vital information, it can strengthen his/her protection and safety. Because machine learning is achieved through learning and training as well as producing adaptable changes in response to various scenarios, the system becomes more effective when it completes the same or similar tasks the second time around. As learning is the expression of experience in construction or modification, and then in knowledge acquisition, the use of machine learning in this system can thus quickly update information and provide the most updated, accurate judgments on accidental falls or other incidents.
