# Design, Implementation, and Field Testing
## 4 System Implementation
### Alerts and Feedback  
The purpose of alerts is to remind a consented nursing assistant that she or he is doing or has just done something wrong that could increase the risk of lower back injuries. An alert is generated at the KinectServer when one or more correctness rules are violated, and certain conditions are met. An alert is delivered silently to the worker in the form of a vibration and a short message explaining the nature of the violation (such as back bending) via the WatchApp on the smartwatch. In addition to the alerts, a user is provided with cumulative feedback about her/his performance over time such as by day or by week. The system can also be configured to log raw activity data in terms of joint positions for each consented worker for institution administrators to review and verify the cumulative worker performance. The log could also be useful for system developers to refine the detection methods for non-compliant activities. To reduce the log space requirement, the system can be configured to log raw data only when a violation is detected. While our experiments show that a non-compliant activities can be reliably detected by our system, we must follow a carefully crafted method for alert generation and delivery. For example, it would not make any sense if we generate an alert for every frame received that contains a non-compliant posture. For the purpose of our system, we believe that an alert should be generated at the per activity level. As shown in Figure 7, our system generates two types of alerts: active and passive alerts. An active alert is generated on detection of a new non-compliant activity so that the user could terminate the activity as quickly as possible. Hence, an active alert could produce the most benefit to a user by reducing the amount of time the user is in the wrong postures. However, active alerts might not fit all workers and workplaces. First, some nursing assistants may perceive an active alert a distraction and prefer to get the current pulling or lifting job done even if she or he is doing it wrong. Second, the nature of a pulling/lifting job might not be safely terminated once started (such as when a lifting device is used), in this case, an active alert might actually increase safety risks. Hence, our system also offers passive alerts. A passive alert is generated and delivered to the worker as soon as the current non-compliant activity is completed. By delivering a passive alert in  
Figure 7: Two types of alerts in our system, and the finite state machine for non-compliant activity tracking. between two pulling/lifting jobs, the nursing assistant can take time to review the alert and hopefully remember to do the job correctly the next time. The types of alerts for each user can be configured by choosing the corresponding alert type via the Options menu in the WatchApp. By default, the active alert is used. Regardless of what alert type is chosen, our system generates a single alert for each non-compliant activity. Thus far, we have assumed that the starting and ending of a non-compliant activity can be detected reliably and immediately. This task is also critical to ensure that one and only one alert is generated for each non-compliant activity. We decide to use the finite state machine to track the life cycle of a non-compliant activity. A finite state machine for each tracked user has two states as shown on the right side of Figure 7:  
* Normal state, denoted as \(S1\). It is represented by a by a posture configuration that is within the boundary of the requirement. In our study, it refers to the range when the user is considered to have her/his back straight up. * Abnormal state, denoted as \(S2\). It is represented by a by a posture configuration that is outside the boundary of the requirement. In our study, it refers to the range when the user is considered to have her/his back bent too much.