Purpose & Scope

Here is described the goal of Emergency Quest project.

Emergency Quest is a system that integrates sensors with a powerful server application, making all processed informations available to a mobile app in which users can log-in and see their data.

The goal of the project is to improve dementia/Alzheimer affected people's life, making them able to continue living at home by themselves and helping them manage some of the potential risks around the home. They will wear a bracelet with "agitation" sensors (and their position will also be detected), which data will be processed by the server and will be available to person's caregivers by logging-in from the mobile application.

All around the house (in dangerous positions, i.e. doors or windows) motion sensors will be placed, so when the person gets close to something dangerous, the system can play pre-recorded messages to avoid unpleasant situations. And if the patient succeeds to run away from the house, the server will notice it by processing GPS data and send a notification in the mobile app to the caregivers.

Furthermore, "agitation" is a common state for people affected by dementia/Alzheimer, so the system can recognize this particular state and change the environment to relax the person, by controlling lights and playing music. If these actions don't succeed, the system will understand that is a case of extreme conditions, so will automatically lock doors and windows, sending a notification to the mobile app, trying to avoid accidents.

AmI

Here are listed the principal AmI features.

AmI Main Steps

AmI Step Description
Sensing Motion and agitation will be detected. We will also detect patient's GPS location from smartphone.
Reasoning Ability of switching decisions between cases of motion problems, agitation problems (even detecting extreme conditions) or escaping from house problems.
Acting The system will try to guide people affected by dementia by playing useful messages. Otherwise, in case of agitation, the system will try to change environment to make it more comfortable (lights and music). In case of extreme conditions, it will proceed locking doors and windows and sending notifications to caregivers.
Interacting The system will communicate with patient, family and environment. An app accessible by both users will be available for relatives to track patient movements and to access previously stored sensor data. Furthermore, the mobile app will receive all types of notifications.

AmI Features

AmI Feature Description
Sensitive The system will process motion and agitation sensor data, and it will also process GPS tracking data.
Responsive The system will respond to elderly dementia/Alzheimer affected user needs, adapting also the environment in case of agitation or extreme conditions.
Adaptive The system is able to adapt to the context (motion, agitation or escaping problems), detecting it by what it senses.
Transparent The end user will not need any further knowledge to use the system.
Ubiquitous Both patients and family components will always have access to motion data communicating with the server, within an application.
Intelligent The system can estimate the difference between a critical situation and a situation of mild symptoms.

Informations

Here you can find more info about words used in documentation and actors involved.

Glossary

  • Bracelet: system to monitor patient health state and his GPS position, its function is to improve interaction between environment and end user.

  • Caregiver: user that takes care of the person affected by dementia/Alzheimer.

  • Default: default settings when the system is configured for the first time [SETUP].

  • Doctor: patient's physician, whose work can be simplified from the interaction with the system.

  • Extreme condition: condition in which base actions of the system can't satisfy patient needs, it is a dangerous condition.

  • History: all data about the person collected by the application, accessible by mobile app.

  • Map: geographic map on which there is current position of the patient, with different colored placeholders to indicate previous positions of the patient himself.

  • Notification: sent by the server to the users, with two different types of it: normal notices and warning notices.

  • Patient: user affected by dementia/Alzheimer.

  • Perimeter: area set from patient caregivers, from which patient can't go out.

  • Preferences: personalized settings for patient caregivers or patient himself, to improve default settings, like the registration of messages with their own voice, setting lights and music.

  • Room: environment where the system is installed and where this one interacts with the user, i.e. where sensor data are collected.

  • Setup: set of parameters chosen by caregivers or patients which personalizes the behavior of the app.

  • System: all parts that shape Emergency Quest, divided in:
    1. APP: tool for interaction between system and users;
    2. SERVER: users data storage and set of funtions to interact with system;
    3. ROOM: the whole set of sensors, including bracelet recognizing agitation and detecting position, and motion sensor all around the house, connected to a room central station that manages sensor data and controls actuators.


Actors

  • User affected by dementia
  • User affected by Alzheimer
  • Caregiver of a patient affected by above deseases
  • Dementia/Alzheimer user's doctor

System Requirements

Here are listed functional and non-functional requirements of the system.

Functional Requirements

Area Code Functional Area
SETUP Configuration and first usage of the system.
APP How the application is made and how should be used by caregivers/patient.
SERVER How the main server is configured and how it works.
ROOM How the room station senses and interacts with the user.

  • FR SETUP.1: Room station setting
    • The room station must be set up with code linked to the bracelet, to give the user the possibility to activate the system.
    • Priority 1

  • FR SETUP.2: User subscription
    • The user must subscribe using the mobile application, by inserting the code linked to the bracelet, to start using the system.
    • Priority 1

  • FR SETUP.3: Perimeter setting
    • The caregiver user must set a no-trespassing perimeter for the dementia affected user. If the patient goes beyond this perimeter, the system create an alert in the mobile app.
    • Priority 1

  • FR SETUP.4: Preferences setting
    • The user can setup a default configuration of message, lights, color and types of music to relax the patient.
    • Priority 2

  • FR SETUP.5: Doctor's contact
    • The user has the possibility to insert doctor's e-mail to send him informations and monitor the patient.
    • Priority 3

  • FR SETUP.6: Messages recording
    • The caregiver user may have the possibility to register vocal messages in settings that would be played when the patient goes close to a danger situation.
    • Priority 5


  • FR APP.1: Log-in required
    • The user (patient and/or caregiver) must log-in everytime for using the features of the system.
    • Priority 1

  • FR APP.2: Position tracking
    • The position of the patient is shown with a placeholder in a map, which should be accessible anytime the user needs it.
    • Priority 1

  • FR APP.3: Emergency notifications
    • The caregiver user will be notified if the system detects that the patient is in an extreme condition.
    • Priority 1

  • FR APP.4: To-do remembering
    • The caregiver user may set particular messages that should be played at predefined times to remind the patient to do something (like taking the medicines, etc..).
    • Priority 2

  • FR APP.5: Preferences changing
    • Users may have the possibility to change the preferences set for lights, type of music and songs.
    • Priority 2

  • FR APP.6: Take-off alert
    • The caregiver user will be notified if the patient takes off the bracelet.
    • Priority 2

  • FR APP.7: History access
    • The users may have access to the history of the information previously stored about the patient.
    • Priority 2

  • FR APP.8: Cleaning history
    • Users may have the possibility to delete previous history of the patient.
    • Priority 3

  • FR APP.9: No logging out
    • Patient user must not have the possibility to logout from mobile app, because it has to always trace position.
    • Priority 3

  • FR APP.9: Automatic cleaning
    • The caregiver user may set, among preferences, a period after which stored history would be automatically deleted from the system.
    • Priority 4

  • FR APP.10: Doctor communication
    • The caregiver user should be able to send stored data to the doctor, to grant him better monitoring of the patient.
    • Priority 4

  • FR APP.11: Emergency unlocking
    • The caregiver user may have the possibility to unlock doors from the app in case of extreme condition of the patient.
    • Priority 5

  • FR APP.12: To-do vocal remembering
    • The caregiver user may have the possibility to register vocal messages for calendar appointments.
    • Priority 5

  • FR APP.13: Past positions access
    • The user may have access to the previously recorded (during a time set in preferences) positions of the patient, shown in the map with a grey placeholder to differentiate them from current position.
    • Priority 5


  • FR SERVER.1: Data storage
    • The main server stores everything about all users, like preferences, history, calendar.
    • Priority 1

  • FR SERVER.2: Notification
    • The main server must send a push notification to the correct devices when it receives a notification request from a specific user room station.
    • Priority 1

  • FR SERVER.3: Provide APIs
    • The main server must provide a set of functions (APIs) that mobile applications can call to interact with the system.
    • Priority 1

  • FR SERVER.4: Automatic cleaning
    • The main server cleans automatically every patient's history and done appointments for whom "auto_clean" is set to yes in preferences.
    • Priority 2


  • FR ROOM.1: Data sensing
    • The room registers data (motion, agitation, position) using sensors placed inside it.
    • Priority 1

  • FR ROOM.2: Environment changing
    • The room station, in order to relax the patient during an "agitation" condition, may play the correct instructions and music to relax by the speakers in the room, may control lights, following user's preferences previously set-up.
    • Priority 1

  • FR ROOM.3: Position processing
    • The room station should be able to process GPS data and send data to main server.
    • Priority 1

  • FR ROOM.4: Data reasoning
    • The room station selects the right action to do, distinguishing when it's necessary to relax the patient or to lock doors and windows in a dangerous condition (processing sensor data).
    • Priority 1

  • FR ROOM.5: Internet connection
    • The room station automatically connects to the main server, using the home internet connection.
    • Priority 2

  • FR ROOM.6: Take-off notifying
    • The room station sends a notification to the main server if it detects that the patient takes off the bracelet.
    • Priority 3

  • FR ROOM.7: Instant processing
    • Sensors may process partial information without interacting with the room station board for a quicker and faster response.
    • Priority 4

  • FR ROOM.8: Positions storing
    • The room station traces previous GPS positions of the patient and makes them accessible from the mobile app.
    • Priority 5

  • FR ROOM.9: Emergency locking
    • The room station locks doors and windows in case of extreme conditions, if it detects unusual behavior by processing "agitation" data.
    • Priority 5



Non-Functional Requirements

  • NFR 1: compatibility of the application with the last Android and iOS releases and responsiveness on every device.
    • PORTABILITY
  • NFR 2: in the user home, some sort of controllable lights, speakers and internet connection with Wi-Fi must be available.
    • INTEROPERABILITY
  • NFR 3: localization language in English.
    • USABILITY
  • NFR 4: always running main server and always running room station, able to notify 24/7 the user in case of dangerous conditions.
    • SYSTEM READINESS (PERFORMANCE)

System Architecture

Here is described the architecture of the entire system, in detail.

System Architecture

1.1 - Hardware Architecture

  • ROOM: the whole set of sensors and actuators of the house connected to a board.
    • Single board computer connected to the Internet via Wi-Fi
    • Motion sensor
    • Bracelet: heart rate and respiration sensor
    • Patient's smartphone to track his position
    • Active speaker
    • Controllable lights

  • SERVER: computer connected to the Internet via LAN.

  • USER'S SMARTPHONE: device used to access to the system front-end from the mobile application.


1.2 - Software Architecture

APP

  • Functions:
    • necessary to create a new user in the system to start using it
    • show patient's current position
    • set preferences for calming down process (lights color, type of music and messages to play)
    • receive notification messages when the system detects problems with patient
    • access to patient history and past problems
    • set appointments to a defined date with message to play

  • Runs on:
    • natively on smartphones

  • Interacts: with the server by HTTP

SERVER

  • Functions:
    • store previous user data in the database
    • send notifications in particular situations to the app
    • receive and store appointments
    • process notifications coming from the room
    • provide a map within the mobile app with specific patient's position

  • Runs on: a computer connected to the Internet via LAN

  • Interacts:
    • with the room by APIs
    • with app by HTTP
    • with Google Maps by Google Maps APIs

ROOM (station, sensors and actuators)

  • Functions:
    • process sensed data
    • process GPS patient's position and give it to the main server
    • change the environment by controlling actuators

  • Runs on: house sensors - a single board computer to control the whole set

  • Interacts: with main server by HTTP


2.1 - Hardware Components

2.1.1 - Off-the-Shelf

  • Server: A powerful computer that can manage requests from all users

  • Room:
    • Raspberry Pi + Wi-Fi module (for controlling station)
    • Active speakers (for playing messages and music)
    • Alyt Hub and motion sensors (for Z-Wave motion sensing)
    • 2 Hue bulbs (controllable lights)
    • FitBit (for agitation detection)

  • App: Users' smartphones, natively


2.2 - Software Components

  • Server:
    • Flask v0.10.1
    • SQLite3 (for database)

  • Mobile application:
    • HTML5, CSS3, JavaScript 1.8
    • jQuery v1.11.3
    • AJAX
    • Google Maps API v3
    • PhoneGap CLI v6.2.0

  • Room:
    • Flask v0.10.1
    • SQLite3 (for database)
    • Alyt Hub API
    • Hue bulb API
    • FitBit API
    • Custom software for agitation detection