+ All Categories
Home > Documents > Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2...

Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2...

Date post: 27-Jun-2018
Category:
Upload: lykhuong
View: 225 times
Download: 0 times
Share this document with a friend
123
7 th Framework Programme Miraculous-Life Grant Agreement No. 611421 Confidential Miraculous-Life i Project Identification Project number No. 611421 Duration 1 st Dec 2013 30 th Nov 2016 Coordinator Andreas Hochgatterer Coordinator Organisation AIT Austrian Institute of Technology GmbH, Austria Website www.miraculous-life.eu Miraculous-Life Miraculous-Life for Elderly Independent Living Document Identification Deliverable ID: D4.1b Release number/date V2.2 30.12.2015 Checked and released by Panayiotis Andreou Work Status Finished Review Status Accepted Key Information from "Description of Work" Deliverable Description Design and specification of ICT-based services and safety services Dissemination Level PU=Public Deliverable Type R = Report Original due date (a) 31 July 2014, (b) 30 December 2015 Authorship& Reviewer Information Editor Dimosthenis Georgiadis (DG) Partners contributing UCY: Panayiotis Andreou (PA), Andreas Konstantinidis (AK) Citard: Christophoros Christophorou (CC) AIT: Emanuel Sandner (ES), Sten Hanke (SH) UniGe: Cristiana Tsiourti (CT), Marios Aristogenis Fanourakis (MA), Maher Ben-Moussa (MB)
Transcript
Page 1: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

7

th Framework Programme

Miraculous-Life

Grant Agreement No. 611421

Confidential Miraculous-Life i

Project Identification

Project number No. 611421

Duration 1st Dec 2013 – 30

th Nov 2016

Coordinator Andreas Hochgatterer

Coordinator Organisation AIT Austrian Institute of Technology GmbH, Austria

Website www.miraculous-life.eu

Miraculous-Life Miraculous-Life for Elderly Independent Living

Document Identification

Deliverable ID: D4.1b

Release number/date V2.2 30.12.2015

Checked and released by Panayiotis Andreou

Work Status Finished

Review Status Accepted

Key Information from "Description of Work"

Deliverable Description Design and specification of ICT-based services and safety services

Dissemination Level PU=Public

Deliverable Type R = Report

Original due date (a) 31 July 2014, (b) 30 December 2015

Authorship& Reviewer Information

Editor Dimosthenis Georgiadis (DG)

Partners contributing UCY: Panayiotis Andreou (PA), Andreas Konstantinidis (AK)

Citard: Christophoros Christophorou (CC)

AIT: Emanuel Sandner (ES), Sten Hanke (SH)

UniGe: Cristiana Tsiourti (CT), Marios Aristogenis Fanourakis (MA), Maher Ben-Moussa (MB)

Page 2: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life ii

Fh-IGD: Matthias Mettel (MM)

Reviewed by Styliani Kleanthous (SK)

Page 3: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life iii

Release History

Release Number

Date Author(s) Release description /changes made

V0.1 03.04.2014 PA First version of Del Template

V0.2 10.04.2014 All Updated Table of Contents.

V0.3 11.04.2014 All Table of Contents Finalized.

V0.4 05.05.14 PA, CT Input from WP3.

V0.5 15.05.14 All Input from WP1.

V0.6 20.05.14 PA Input from ORBIS about residences.

V0.7 23.05.14 MA Input from D3.1.

V0.8 04.06.14 All Describe deliverables structure. Finalize list of services, assigned tasks.

V0.9 15.06.14 ES Input from WP5 regarding architecture.

V0.10 18.06.14 CT, MA Input about object assistance management

V0.11 25.06.14 ORBIS Input about pre-trial scenario.

V0.12 27.06.14 PA Incorporated input about physiotherapists.

V0.13 04.07.14 CT Input about Object Location Assistance Service

V0.14 07.07.14 PA Comments about Object Location Assistance Service.

V0.15 04.07.14 CT Further input about Object Location Assistance Service.

V0.16 11.07.14 MB Input from dialogue manager.

V0.17 17.07.14 CS Input about safety services.

V1.0 23.07.14 PA, AK Preparation of the first draft.

V2.0 09.10.15 DG Preparation of the first draft.

V2.1 16.11.15 SK Review of the deliverable

V2.2 30.12.15 PA Checked and released

Page 4: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life iv

Miraculous-Life Consortium

Miraculous-Life (Contract No. 611421) is a project within the 7th Framework Programme. The consortium members are:

Contact person: Andreas Hochgatterer

Email: [email protected]

Partner 1 AIT AUSTRIAN INSTITUTE OF TECHNOLOGY GMBH (AIT, Project Coordinator, AT)

Contact person: Maher Ben Moussa

Email: [email protected]

Partner 2: UNIVERSITY OF GENEVA (UniGe, CH)

Contact person: Prof. George Samaras

Email: [email protected]

Partner 3: UNIVERSITY OF CYPRUS (UCY, CY)

Contact person: Cindy Wings

Email: [email protected]

Partner 4 Zuyderland Medisch Centrum (ORBIS, NL)

Contact person: Matthias Mettel

Email: [email protected]

Partner 5 FRAUNHOFER IGD (Fh-IGD, DE)

Contact person: Ben Loke

Email: [email protected]

Partner 6 Noldus Information Technology BV (Noldus, NL)

Contact person: Eleni Christodoulou

Email: [email protected]

Partner 7 CITARD SERVICES LTD (Citard, CY)

Contact person: Sascha Fagel

Email: [email protected]

Partner 8 ZOOBE MESSAGE ENTERTAINMENT GMBH (Zoobe, DE)

Contact person: Donato Cereghetti

Email: [email protected]

Partner 9 MAISON DE RETRAITE DU PETIT-SACONNEX (MRPS, CH)

Page 5: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life v

Table of Contents

Release History III

Miraculous-Life Consortium IV

Table of Contents V

Table of Figures VII

List of Tables VIII

Abbreviations IX

Executive Summary 1

1 About this Document 2

1.1 Role of the deliverable 2

1.2 Relationship to other Miraculous-Life deliverables 2

1.3 Structure of this document 3

2 Home Daily ICT-based Services Design 4

2.1 Care and Wellness – Agenda Service 5

2.1.1 Use cases 6

2.1.2 Database Design 8

2.1.3 Methods Description 11

2.1.4 Recurrence Format 13

2.2 Care and Wellness – Medication Service 18

2.2.1 Use Cases 18

2.2.2 Database Design 19

2.2.3 Methods Description 21

2.3 Care and Wellness – Shopping List Assistance Service 22

2.3.1 Use Cases 22

2.3.2 Database Design 22

2.3.3 Methods Description 23

2.4 Guidance – Object Location Assistance 24

2.4.1 Use cases 24

2.4.2 Database Design 25

2.4.3 Methods Description 27

2.5 Guidance – Physical Activity 28

2.5.1 Use Cases 28

2.5.2 Database Design 29

2.5.3 Methods Description 31

Page 6: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life vi

2.6 Education/Leisure – Event Service 34

2.6.1 Use cases 34

2.6.2 Database Design 35

2.6.3 Methods Description 35

2.7 Education/Leisure – Meal Assistance Service 37

2.7.1 Use cases 37

2.7.2 Database Design 39

2.7.3 Methods Description 40

3 Safety services 42

3.1 Monitoring/Tracking Services 42

3.2 Monitoring/Tracking - Fall Detection Service 42

3.2.1 Component Interaction Diagram 42

3.2.2 Database Design 43

3.3 Monitoring/Tracking – Collision Detection Service 44

3.3.1 Component Interaction Diagram 44

4 Conclusions / Further Work 46

Appendix A Data Dictionary 47

A.1. Agenda Services 47

A.2. Medication Services 54

A.3. Shopping List Assistance Services 57

A.4. Object Location Assistance Services 58

A.5. Physical Activity Services 62

A.6. Event Services 65

A.7. Meal Assistance Services 67

Appendix B Service Description 71

B.1.1. Agenda 71

B.1.2. Medication 82

B.1.3. Shopping List Assistance 87

B.1.4. Object Location Assistance 89

B.1.5. Event Service 93

B.1.6. Meal Assistance 97

B.1.7. Physical Activity Service 107

Page 7: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life vii

Table of Figures

Figure 1 – High-level interaction diagram 5

Figure 2 - Caregiver and Elderly Manage Calendar Use Case 6

Figure 3 - Agenda Daemon Use Case 6

Figure 4 - Avatar Use Case 7

Figure 5 - Notification Service Use Case 7

Figure 6 – Agenda Service Insert Invitation based on existing calendar 7

Figure 7 - Agenda Service View Existing Invitations and Accept Invitation that is created based on existing calendar item 8

Figure 8 - Agenda Service ER Diagram 10

Figure 9 - Medication Service Manage Medication Scenario 18

Figure 10 - Medication Service Medication Notification Scenario 19

Figure 11 - Medication Service ER Diagram 19

Figure 12 – Shopping List Assistance Service Case Study 22

Figure 13 – Shopping List Assistance Service ER Diagram 22

Figure 14 – Object Location Assistance Service Interaction Diagram 24

Figure 15 - Elderly stores object typical location Use Case. 24

Figure 16 - Elderly manages object details Use Case 25

Figure 17 - Elderly queries for object details Use Case 25

Figure 18 – Object Location Assistance ER Diagram 26

Figure 19: Physical Activity Service Use Case – Caregiver features 28

Figure 20: Physical Activity Service Use Case – Elderly features 29

Figure 21: Guidance Services Database ER schema 30

Figure 22: Event Service Manage Events Use Case Diagram 34

Figure 23 – Event Service Elderly Decides to Participate to an Event Scenario 34

Figure 24: Education/Leisure Event Services Database ER schema 35

Figure 25 – Meal Assistance Service Elderly Manages Meal Scenario 37

Figure 26 – Meal Assistance Service Elderly Manages Recipes Scenario 37

Figure 27 - Meal Assistance Service Elderly Meal-Recipe Correlation Scenario 38

Figure 28 – Meal Assistance Service Elderly Manages Meal Scenario 38

Figure 29 - Education/Leisure Meal Assistance Services Database ER schema 39

Figure 30 – Component Interaction diagram for Fall Detection Service 43

Figure 31 - Monitoring/Tracking Services Database ER schema 44

Figure 32 - Component Interaction diagram for Collision Detection Service 45

Page 8: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life viii

List of Tables

Table 1 – Care and Wellness Agenda Database Tables 9

Table 2 – Care and Wellness Agenda Service Methods Description 13

Table 3 – Care and Wellness Medication Database Tables 20

Table 4 - Care and Wellness Agenda Service Methods Description 21

Table 5 – Care and Wellness Shopping List Assistance Database Tables 23

Table 6 - Care and Wellness Shopping List Assistance Methods Description 23

Table 7 – Guidance Object Location Assistance Database Tables 26

Table 8 – Guidance Object Location Assistance Methods Description 27

Table 9 – Guidance Database Tables 31

Table 10 - Physical Activity Motivation Methods Description 31

Table 11 - Physical Activity Guidance Methods Description 33

Table 12 – Education\Leisure Event Database Tables 35

Table 13 – Education\Leisure Event Methods Description 36

Table 14 - Education\Leisure Meal Assistance Database Tables 40

Table 15 – Education\Leisure Meal Assistance Methods Description 41

Page 9: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life ix

Abbreviations

Abbrev. Description

AAL Ambient Assisted Living

Page 10: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 1

Executive Summary

A major aim of the Miraculous-Life project is to design and develop a number of advanced technologies and technology enabled services to support elderly in their everyday activities.

The main objective of this deliverable is to realize the ICT services that support the daily home activities of end users based on the requirements and use case scenarios gathered during WP1. A number of services are designed and developed that can be categorized as follows:

i) Care & Wellness services that provide hygienic and basic household advising and personal support (like open the window when you wake up, wash your teeth) and enable the elderly to continue managing their daily activities in their home

ii) Guidance services that provide assistance in locating personal items as well as encourage the end users to build enduring habits for a healthy life

iii) Education/Leisure services that advice the elder by aiding its daily activities through education facilities such as communicating new meal preparation recipes and also by enhancing his social activities

iv) Safety services that aim to bestow the elder with the feeling of safety in carrying out his daily life

In the first version of the deliverable D4.1 (D4.1a), we provided the architectural design and functional specification of ICT services. This functionality was constantly evolving, throughout the lifetime of the project, according to the changing needs and requirements of the end users, the other related stakeholders (i.e., the elders, the caregivers, etc.) and also the requirements by other components of the MiraculousLife platform that required supporting functionality from the ICT-services. Thus, the overall architecture design and the functional specification of the ICT-services was adapted and enhanced in order to accommodate these new needs and requirements.

The aforementioned changes/enhancements are described in this second version of the deliverable (D4.1b). More specifically, this version includes the updated descriptions of all services as well as all enhancements required to support the trials but also to support other components of the system (e.g., multiple service calls automations to support the Dialogue Manager).

Finally, in this version of the deliverable, we also provide the description of the new services that supported the third pre-trial and enhancements to the existing ones according to the users’ feedback. The new services are:

Shopping List Assistance, Invitations to activities, Food alerts and Event Management in the Care and Wellness category

Physical Activity Guidance and Physical Activity Motivation in the Guidance category

Meal Assistance, Relaxing Activities, Periodic Advise and Educational Activities in the Education/Leisure category

Collision Detection, Detection of Immobility, Turn-off device reminders in the Safety category

All updated and new services are thoroughly described in the subsequent sections.

Page 11: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 2

1 About this Document

1.1 Role of the deliverable

The role of this deliverable is to develop a set of Home Daily ICT services considering the categories of: Care & Wellness, Guidance, and Education/Leisure aiding the elder in the execution of determined daily life activities at home making use of the Collaborative Care Network as well as a set of Safety services to maintain the elderly healthy lifestyle.

The deliverable provides the final design and implementation details of all Home Daily ICT services, including their methods and the interrelation\connection between them. In particular in this version, we provide technical details regarding the Agenda, Invitations, Medication and Shopping Assistance, Food Alerts, Event Management, Group Activities and Household Adviser services that are under the Care and Wellness category, the Object Location Assistance, guidance for physical activity and Motivation for physical activity services that are under the Guidance category as well as the Periodic Advises, Relaxing Activities, Educational Activities and Meal Assistance services, which are under the Education and Leisure category. Similarly, it also provides technical details regarding Safety services such as Fall detection and Collision detection and Notification.

The functional specification have been identified by taking into consideration the initial requirements and needs of the end users inferred from the first versions of D1.1a and D1.2a developed in WP1 and enhanced over the time thought the end-users’ feedback/new requests. Note that the Home Daily ICT services and Safety services were continuously evolved throughout the lifetime of the project, according to the changing needs and requirements of the end users and the other related stakeholders and also the supporting functionality (if any) which the other components of the Miraculous-Life system required that were identified throughout the pre-trials.

This deliverable was considered by the technical partners of WP4 for the development of Home Daily ICT-based activity services and Safety services. Moreover, this deliverable provided input to WP1, WP3 and WP5 for the development, integration and overall system validation.

1.2 Relationship to other Miraculous-Life deliverables

The deliverable is related to the following Miraculous-Life deliverables:

Deliv: Relation

D1.1

Specification of user needs analysis and design of VSP model: This document presents the needs and requirement of the end users from the Miraculous system.

In the current deliverable we translate the end user needs and requirements into the technical specification of the system.

D1.2 Specification of use case scenarios and User Interface: This document presents the use case scenarios that the Miraculous system supports.

In the current deliverable we translate the use case scenarios into the technical specification of the system.

D4.2 Specification of Co-Net: This document presents the design of the Collaborative care Network (Co-Net). D4.1 provide input to D4.2 for considering the needs of the Home Daily ICT (in terms of socialization and profile aspects) from Co-Net for the enhancement or creation of new tables as well as the development of new Application Program Interfaces

Page 12: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 3

(APIs) that Co-Net should support.

D4.3 Development of the Home Care Daily Services and safety services: This deliverable presents the implementation of the home daily ICT-based services and safety services which is used by the VSP to manage the user's live.

D4.1 is used as an input to this deliverable in order to present all implementations that were presented in D4.1.

D4.4 Development of Co-Net: This deliverable presents the implementation of the Co-Net, an elderly centric web-based Collaborative Care Network used to promote collaboration between the elder and formal/informal carers to support the execution of daily activities.

D4.1 provide input to D4.4 for considering the needs of the Co-Net development that should support in order to collaborate with other services.

D5.1 Specification of overall system architecture and security and privacy infrastructure: This deliverable presents the specification of overall system architecture and security and privacy infrastructure.

D5.1contains and describes the underlying system design and architecture of the Miraculous-Life system (including the security and privacy infrastructure) which integrates all components described in D4.1.

D5.2 Development of the Knowledge Base: This deliverable presents the design and implementation of the knowledge base that serves as data management server where all data (e.g., information models, monitoring data) are stored and communicated among the cooperating services and components.

D5.2 describes the implementation of the knowledge base that supports all components described in D4.1.

D5.3 Specification of Miraculous-Life system integration: The key goal of this deliverable is to design and specify the overall system architecture and to present how the different system prototype components developed in WP2-WP4 are integrated into a coherent system architecture.

In the current document we consider the technical infrastructure, standards, specifications and strategies to be followed throughout the building, testing, and implementation of the system and we adapt its design accordingly.

D5.4 System integration validation: The main task of this deliverable is the assembly and integration of the different components developed in WP2 and WP3 and WP4 into the complete prototype system.

The current document provides input to D5.4, for the integration and validation of Home Daily ICT-based Services into the coherent Miraculous system.

1.3 Structure of this document

This document is structured as follows. Chapter 2 presents the Home Daily ICT-based services including their design and service design specifications. Additionally, Chapter 2 provides the data dictionary for the database tables currently managed by the Co-Net’s components. Similarly, Chapter 3 provides in detail the design and implementation of the Safety services via use cases, database design and service design specifications. Finally, Chapter 4 concludes this report.

Page 13: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 4

2 Home Daily ICT-based Services Design

Home Daily ICT-based Services is an important component of the Miraculous-Life approach that focuses on the support of the daily home activities of an elderly user via the following:

1. Care and Wellness Services: This type of services contributes to the care and wellness of the elderly. More specifically, this category provides the following services:

Calendar/Agenda Service: is responsible to keep track certain activities related

to an elder. Additionally, this service integrates the functionality of Invitations,

Events, Periodic Advises, Household Advises, Relaxing Activities and

Educational Activities as all require close interaction with the elderly user’s

activity agenda.

Medication Service: provides medical information related to a specific elderly.

Shopping List Assistance: allows an elderly user to insert, update or delete a

shopping list and/or view all content of a shopping list associated to an elder.

2. Guidance Services: this category comprises of services dedicated to helping the elderly cope with daily life problems and household activities and guides their safe execution through the day. It provides for stimulation and support to maintain a healthy lifestyle via the following:

Object Location Assistance: serves as a “memory support” that helps the elderly to remember where certain objects are usually stored around the house.

Motivation for Physical Activity: stimulates and motivates the user to take physical activity. Also provides a set of videos with detailed instructions that guide the elderly while they preform physical exercise at home.

Physical Activity Guidance: provides the Physical Activity and Motivation Guidance Service in order to stimulates, motivates and guide the elderly to carry out physical activity either in the home.

3. Education & Leisure Services: This type of services advises the elder by aiding its daily activities through education facilities such as communicating new meal preparation recipes and also by enhancing its social activities providing the following:

Event Service: allows a user to invite other members to participate in group

leisure activities.

Meal Assistance Service: is responsible to provide information regarding meals,

their recipe, the ingredients of a meal, etc., associated to a person.

In the following sections, find detailed descriptions of the services along with technicalities regarding the databases, methods designed and implemented through use cases, ER diagrams and dictionaries.

Page 14: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 5

2.1 Care and Wellness – Agenda Service

The agenda service is responsible to keep track certain activities related to an elder. In particular, it provides details regarding agenda items that an elder should consider and/or attend. Those details may include a start-date, end-date and description, location, precaution of an agenda item, if it should be taken\attended during the day or night etc. This information is used to automatically create a personal calendar entry (named Calendar Item) for each elder. Since a Calendar Item may be repeated at periodic time intervals (e.g., play chess each week), it is supplemented by a number of recurrence rules. As a result, each calendar item generated a number of agenda items that define the individual occurrences of the calendar entry. The latter may then be queried by the notification service as well as be provided to the user via a graphical user interface.

Agenda Service

Users

Avatar

Caregiver

D3. Provides Agenda Information

Agenda Items

Calendar Items

Notification Service

B1. Queries for active Agenda Items

B2. Gets active Agenda Items

Agenda Daemon

D1. Queries for active Agenda Items

D2. Gets active Agenda Items

A1. Create Calendar Items

Figure 1 – High-level interaction diagram

Figure 1 details the agenda service main features. A caregiver is able to create calendar items and store them to the Calendar data structures. The agenda service utilizes a daemon process (named the agenda daemon), that periodically checks the calendar for active calendar items and generated new agenda items for each person. It also checks for any updates, insertions and/or deletions for updating the Agenda table accordingly. The new agenda items generated by the agenda daemon are inserted in the Agenda data structures. The agenda items are then used by the CoNet Notification Service described in deliverable D4.2 to generate notifications (i.e., reminders). Finally, the avatar periodically and consecutively checks the agenda data structures and provides agenda information to the elderly with respect to agenda items that should be performed and/ be attended via a graphical user interface.

Page 15: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 6

2.1.1 Use cases

In this section, the individual use cases of the agenda service are presented and described.

Agenda Service

Create Calendar Items for Elderly

Caregiver

Manage Calendar Entries

Elderly

Update Calendar Items for Elderly

Delete Calendar Items for Elderly

<<include>>

<<include>>

<<include>>

<<include>>

Agenda Daemon

Figure 2 - Caregiver and Elderly Manage Calendar Use Case

Figure 2 illustrates a use case scenario that demonstrates the management of calendar items by the care givers and elderly persons. A caregiver may create a calendar item for a particular elder or group of elders as part of his activities. An elder may decide to accept this calendar item and additionally create his own ones and update or delete existing ones. Each time a create or delete calendar item occurs, the agenda daemon is invoked in order to generate the corresponding agenda items and maintain consistency between calendar and agenda entries. Finally, when an update calendar entry event occurs, the Agenda service does not actually update the calendar entry but instead deletes the existing one (thus removing all related agenda entries) and then creates a new one (thus generating new agenda items).

AgendaDaemon

Agenda Service

Requests Active and unprocessed Calendar Items

Generated new Agenda Items

Figure 3 - Agenda Daemon Use Case

Figure 3 shows a use case regarding the responsibilities of the agenda daemon. The agenda daemon mainly generates agenda items and periodically requests for active and unprocessed calendar items.

Page 16: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 7

Agenda Service

Avatar

Query for Daily Agenda Items

of a Person

Query for Weekly Agenda Items

of a Person

Query for Monthly Agenda Items

of a Person

Query for Custom Date Range

Agenda Items of a Person

Figure 4 - Avatar Use Case

Figure 4 shows a use case regarding the activities of the avatar. In particular, the avatar is responsible to query the agenda data structures according to different time intervals (e.g., daily agenda items, weekly agenda items, monthly agenda items, etc.)for a particular person as well as agenda items for a specific date range.

Notification Service

Agenda Service

Gets Active Agenda Items

Figure 5 - Notification Service Use Case

Figure 5 shows a notification service use case where this particular service retrieves active agenda items from the agenda items database. Please refer to deliverable D4.2 for more details on the Notification Service.

Elderly

Insert Invitation

Insert Calendar

Agenda Service

Figure 6 – Agenda Service Insert Invitation based on existing calendar

Page 17: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 8

Figure 6 shows a use case scenario in which an elder invites other elderly to an existing calendar item.

Agenda Service

Elderly

Caregiver

By Receiver Accepted

By Receiver New

By Receiver

By Sender

View Invitations

By Receiver Rejected

Accept Invitation Insert Calendar

Figure 7 - Agenda Service View Existing Invitations and Accept Invitation that is created based on existing calendar item

In the use case scenario illustrated in Figure 7 an elder requests to view all existing invitations by the sender, receiver, pending invitations, accepted invitations and rejected invitations. If an elder accept an invitation then the agenda service is automatically invoked and a calendar item is created.

2.1.2 Database Design

In this section, we provide the current database design of the Agenda Database Design. The database schema shown in Figure 8, presents the Entity Relationship (ER) schema of the Agenda service included in the care and wellness schema and its interaction with KnowledgeBase and Monitoring. All the tables currently included in this database are described in Table 1.

However, for more details about the attributes included in each table as well as the type and the description of these attributes please refer to Appendix A.

Table Name Description

Agenda.PERSON_CALENDAR This table stores information about a Calendar Item of an elder. It contains the recurrence rules of this calendar item.

Agenda.PERSON_AGENDA This table stores the actual agenda items of an elder.

Page 18: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 9

Agenda.PERSON_FEEDBACK This table stores the user feedback regarding a specific agenda item.

Note: The available values are: 1. Requires Feedback (The agenda item requires to be accepted/rejected or put tentative), 2. Accepted (The agenda item has been accepted) 3. Rejected (The agenda item has been rejected. It will be maintained for archive purposes) 4. Tentative (The agenda item has been put as tentative and will be brought up again for acceptance or rejection.)

Agenda.PERSON_CALENDAR_TYPE

This table stores the type of each particular calendar item related to an elder.

Note: The available values are: 1. Calendar Item, 2. Task, 3. Medication Calendar Item, 4. Birthday/Anniversary Item.

Agenda.INVITATIONS This table stores information regarding the Invitations made from a particular person to another person.

Table 1 – Care and Wellness Agenda Database Tables

In order to protect the structure and data of the base tables, we have implemented the VIEW_AGENDA_ITEMS and VIEW_CALENDAR_ITEMS view structures that provide all data required by the Agenda Service methods.

Page 19: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 10

PERSON

PK PERSON_ID

FIRST_NAME FAMILY_NAMES GENDER_ID BIRTHDATE AGE PICTURE RESIDENCE_ID RESIDENCE_ROOM_ID EMAIL SKYPE_NAME SKYPE_USERNAME SKYPE_PASSWORD LANGUAGE_ID

INVITATIONS

PK INVITATION_ID

FK2 FROM_IDFK3 TO_IDFK1 CALENDAR_ID STATUS

PERSON_AGENDA

PK AGENDA_ID

PERSON_IDFK2 CALENDAR_IDFK1 FEEDBACK_ID START_DATE_TIME END_DATE_TIME DESCRIPTIONFK3 CALENDAR_TYPE_ID REMINDER_TIME LOCATION_ID ACTIVITY_ID

LOCATION

PK LOCATION_ID

NAME DESCRIPTION RESIDENCE_ID SEMANTIC_ID LOCATION_X LOCATION_Y LOCATION_Z GPS_LAT GPS_LON GPS_ALT ROOM_ID

PERSON_CALENDAR_TYPE

PK CALENDAR_TYPE_ID

NAME DESCRIPTION

PERSON_AGENDA_FEEDBACK

PK FEEDBACK_ID

NAME DESCRIPTION

ACTIVITY

PK ACTIVITY_ID

NAME DESCRIPTION PRECAUTIONS ACTIVITY_ASSISTANCE

PERSON_CALENDAR

PK CALENDAR_ID

FK3 PERSON_ID START_DATE_TIME END_DATE_TIMEFK2 ACTIVITY_ID DESCRIPTIONFK4 LOCATION_IDFK1 CALENDAR_TYPE_ID REMINDER_TIME WEEK_DAY_PATTERN DAY_FREQUENCY EXACT_DAY OCCURRENCE_NO OCCURRENCE_TYPE WEEK_FREQUENCY EXACT_WEEK MONTH_PATTERN MONTH_FREQUENCY YEAR_FREQUENCY OCCURRENCES RECURRENCE_END_DATE PERSON_MEDICATION_ID IS_EVENT EVENT_ID PRICE

Figure 8 - Agenda Service ER Diagram

Knowledge Base Monitoring Agenda

Page 20: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 11

2.1.3 Methods Description

In this section, we provide the description of the methods currently supported by the Agenda service. These methods allow the organization and management of the Calendar and Agenda Items of a specific elder as well as the integrated the functionality of Invitations, Events, Periodic Advises, Household Advises, Relaxing Activities and Educational Activities that require close interaction with the elderly user’s activity agenda.

All the methods currently supported by the Agenda service are described in Table 2. However, for more details about these methods (i.e., input parameters, functionality and output parameters) please refer to Appendix A.

Method Name Description

LIST_PERSON_AGENDA_FEEDBACK Retrieves a list of all AgendaItemFeedback objects from table PERSON_CALENDAR_FEEDBACK.

LIST_PERSON_CALENDAR_TYPE Retrieves a list of all PersonCalendarType objects from table PERSON_CALENDAR_TYPE.

DELETE_PERSON_AGENDA Deletes an existing record from table PERSON_AGENDA

DELETE_PERSON_CALENDAR Deletes an existing record from table PERSON_CALENDAR

DELETE_PERSON_AGENDA_FEEDBACK Deletes an existing record from table PERSON_AGENDA_FEEDBACK

DELETE_PERSON_CALENDAR_TYPE Deletes an existing record from table PERSON_CALENDAR_TYPE

GET_PERSON_AGENDA Retrieves a PersonAgenda object.

GET_PERSON_CALENDAR_ITEM Retrieves a PersonCalendarItem objects.

GET_PERSON_CALENDAR_ITEMS Retrieves a list with all PersonCalendarItem object.

GET_PERSON_AGENDA_FEEDBACK Retrieves an AgendaItemFeedback object.

GET_PERSON_CALENDAR_TYPE Retrieves a PersonCalendarType object.

GET_PERSON_AGENDA_START_END_DATE Retrieves an AgendaItem object.

GET_PERSON_DAILY_AGENDA Retrieves a list with AgendaItem objects for a specific day.

GET_PERSON_WEEKLY_AGENDA Retrieves a list with AgendaItem objects for a specific week.

GET_PERSON_MONTHLY_AGENDA Retrieves a list with AgendaItem objects for a specific month.

INSERT_PERSON_AGENDA Inserts a new record into table PERSON_AGENDA

INSERT_PERSON_CALENDAR Inserts a new record into table PERSON_CALENDAR. Additionally, it invokes the Agenda Daemon process to generate new agenda items based on the new calendar item.

INSERT_PERSON_CALENDAR_TYPE Inserts a new record into table PERSON_CALENDAR_TYPE

INSERT_PERSON_WEEKLY_CALENDAR Inserts a new record into table PERSON_WEEKLY_CALENDAR

INSERT_PERSON_MONTHLY_CALENDAR Inserts a new record into table PERSON_CALENDAR

INSERT_EVENT_AS_PERSON_CALENDAR Creates a single Calendar Item once into table PERSON_MONTHLY_CALENDAR

Page 21: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 12

UPDATE_PERSON_AGENDA Updates an existing record from table PERSON_AGENDA by deleting the existing record and creating a new one this invoking the Agenda Daemon.

UPDATE_PERSON_AGENDA_FEEDBACK Updates an existing record from table PERSON_AGENDA_FEEDBACK

UPDATE_PERSON_AGENDA_SET_FEEDBACK Updates an existing record from table PERSON_AGENDA_SET_FEEDBACK

UPDATE_PERSON_CALENDAR_TYPE Updates an existing record from table PERSON_CALENDAR_TYPE

UPDATE_PERSON_CALENDAR

Updates an existing record from table PERSON_CALENDAR. Since there are agenda items correlated with each calendar item, the process removes the previous agenda entries, then creates the new calendar item and then calls the daemon in order to generate the new agenda items.

DAEMON_AGENDA Periodically invoked by the agenda daemon thread to create agenda items from calendar items.

INSERT_INVITATIONS Insert new invitation to table INVITATION

DELETE_INVITATIONS Deletes a record from table INVITATION based on invitation id

UPDATE_INVITATIONS_STATUS Updates the status of record in table INVITATION based on invitation id

GET_INVITATION Retrieves an invitation object from table INVITATION based on invitation id

GET_INVITATIONS_BY_SENDER Retrieves a list of invitation objects from table INVITATION based on invitation id

GET_INVITATIONS_BY_RECEIVER Retrieves a list of invitation objects from table INVITATION based on invitation id

GET_INVITATIONS_BY_RECEIVER_NEW Gets a list of invitation objects from table INVITATION with status 0

GET_INVITATIONS_BY_RECEIVER_ACCEPTED

Gets a list of invitation objects from table INVITATION with status 1

GET_INVITATIONS_BY_RECEIVER_REJECTED Gets a list of invitation objects from table INVITATION with status 2

GET_PERSON_TODAY_AGENDA Retrieves today’s PersonAgenda object based on person id

GET_PERSON_TOMORROW_AGENDA Retrieves tomorrow’s PersonAgenda object based on person id

GET_PERSON_WEEKDAY_AGENDA Retrieves PersonAgenda object based on day_of_week

GET_AGENDA_ITEM_PARTICIPANTS Retrieves all participants of a particular agenda item

GET_PERSON_DAILY_AGENDA_TASKS Gets a list of Agenda Items based on user Tasks

GET_PERSON_DAILY_AGENDA Gets a list of Agenda Items given a list of calendar types

GET_PERSON_DAILY_AGENDA Gets a list of Agenda Items given a calendar type

GET_PERSON_YESTERDAY_AGENDA Gets a list of Agenda Items

GET_INVITATIONS_BY_RECEIVER_NEW_NO_NOTIFICATION

Gets a list of past Invitations

Page 22: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 13

INSERT_PERSON_CALENDAR_TASK Inserts a new task into table PERSON_CALENDAR_TASK

INSERT_PERIODIC_ADVICE Insert a new periodic advice

INSERT_PERSON_AGENDA_FEEDBACK Inserts person agenda feedback

INSERT_EVENT_AS_PERSON_CALENDAR Inserts an event as a new person calendar record

CHECK_CONFLICT_EVENT Checks whether an event conflicts with another event

CHECK_CONFLICT_PERSON_ACTIVITY Checks if an event conflicts with a person’s existing activity

Table 2 – Care and Wellness Agenda Service Methods Description

2.1.4 Recurrence Format

In this section we provide specifics regarding how to interact with one of the most important and commonly used methods, named INSERT_PERSON_CALENDAR and UPDATE_PERSON_CALENDAR that create a new calendar/agenda item for the elderly or update an existing one.

In order for the Agenda Service to handle recurrence events, we utilized the calendar component that stores the rules of recurrences. A periodically executed component, called the Agenda Daemon, translate those recurrences to agenda items. In other words, the insertion of new events are stored to the calendar table (PERSON_CALENDAR) and the retrieval from the agenda table (PERSON_AGENDA). Therefore, one calendar item can produce multiple agenda items depending on its recurrence. In more detail, for each calendar item, the daemon generates all occurrences for one year at the time until the number of occurrences or the recurrence date is reached. In the following table, is presented a more detailed description of the PERSON_CALENDAR table.

Field Name Type Nullable Default Value

Constraints

REMINDER_TIME int No 0 N/A

This represents the notification reminder time in minutes. Note that negative values represent that the notification will be triggered before the event while positive values (highly improbable) represent that the notification will be triggered after the event.

WEEK_DAY_PATTERN

int No 127 Between 1 and 127

This represents a coding scheme that has been devised for easily entering a week days pattern. More specifically, we have coded each day with a number (following a binary approach) as follows:

1=Monday

2=Tuesday

4=Wednesday

8=Thursday

16=Friday

Page 23: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 14

32=Saturday

64=Sunday

For example, if the calendar item should be repeated every Wednesday, Thursdays and Sunday then the field should be set to 76 (i.e., 4=Wednesday + 8=Thursday + 64=Sunday). All days are represented by the total sum of all days which is 127.

DAY_FREQUENCY int Yes Larger or equal to 1

This represents the daily frequency of the calendar item, i.e. 1 represents every day, 2 represents every second day, 3 represents every third day, etc.

EXACT_DAY int Yes NULL or between 1 and 31

This represents a calendar item that occurs a specific day of the month, e.g., 4th day of the month.

OCCURRENCE_NO int Yes NULL or >=0

This represents a specific occurrence. We have coded this as follows: 1 represents the first occurrence, 2 represents the second occurrence, 3 represents the third occurrence, etc. Additionally, we have coded the last occurrence as 0.

OCCURRENCE_TYPE

int Yes NULL or between 1 and 3

This represents how occurrences are grouped (e.g., by week, by month). We have coded this as follows: 1 represents weekly grouping, 2 represents monthly grouping, 3 represents yearly grouping. A NULL value represents no grouping.

WEEK_FREQUENCY int No 1 >=1

This represents the weekly frequency of the calendar item, i.e. 1 represents every week, 2 represents every second week, 3 represents every third week, etc.

EXACT_WEEK int Yes NULL or between 1 and 53

This represents a calendar item that occurs a specific ISO week of the year.

MONTH_PATTERN int No 4095

This represents a coding scheme that has been devised for easily entering a monthly

Page 24: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 15

recurrence pattern. More specifically, we have coded each month with a number (following a binary approach) as follows:

1=January

2=February

4=March

8=April

16=May

32=June

64=July

128=August

256=September

512=October

1024=November

2048=December

For example, if the calendar item should be repeated every January, April and August then the field should be set to 137 (i.e., 1= January + 8= April + 128=August). All months are represented by the total sum of all months which is 4095.

MONTH_FREQUENCY

int No 1 >=1

This represents the monthly frequency of the calendar item, i.e. 1 represents every month, 2 represents every second month, 3 represents every third month, etc.

YEAR_FREQUENCY int No 1 >=1

This represents the yearly frequency of the calendar item, i.e. 1 represents every year, 2 represents every second year, 3 represents every third year, etc.

OCCURRENCES int Yes NULL or >=1

This represents the maximum number of occurrences of the calendar item. For example, setting a value of 6 will limit the number of occurrences to 6 irrespectively if the recurrence rules generate a larger number of occurrences.

RECURRENCE_END_DATE

date Yes

This represents the maximum recurrence end date of the calendar item.

As mentioned above, the Agenda Daemon runs through the PERSON_CALENDAR and finds the active calendar items and stores them in the PERSON_AGENDA table. By active calendar items, we mean the items that (i) their dates are between the calendar start date (START_DATE_TIME) and end date (END_DATE_TIME, if exists) and (ii) there is no end time on the recurrence (RECURRENCE_END_DATE) (i.e., it is an infinite event. Note that we can also define the occurrences count for an event.

Page 25: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 16

The FEEDBACK_ID will be set with the value of 1 (Requires Feedback: The agenda item requires to be accepted/rejected or put tentative) and can be set to 2 (Accepted: The agenda item has been accepted), 3 (Rejected: The agenda item has been rejected. It will be maintained for archive purposes) or 4 (Tentative: The agenda item has been put as tentative and will be brought up again for acceptance or rejection) according to the user feedback.

Page 26: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 17

Execution Examples

Once event:

WEEK_DAY_PATERN=127 DAY_FREQUENCY=1 WEEK_FREQUENCY=1 MONTH_PATTERN=4095 MONTH_FREQUENCY=1 YEAR_FREQUENCY=1 OCCURANCES=1

A 10 times event:

WEEK_DAY_PATERN=127 DAY_FREQUENCY=1 WEEK_FREQUENCY=1 MONTH_PATTERN=4095 MONTH_FREQUENCY=1 YEAR_FREQUENCY=1 OCCURANCES=10

Every 15th of every month till the end of 2016:

WEEK_DAY_PATERN=127 DAY_FREQUENCY=1 EXACT_DAY=15 OCCURRENCE_NO=1 OCCURRENCE_TYPE=2 WEEK_FREQUENCY=1 MONTH_PATTERN=4095 MONTH_FREQUENCY=1 YEAR_FREQUENCY=1 RECCURRENCE_END_DATE=2016-12-31

Every Monday event:

WEEK_DAY_PATERN=1 DAY_FREQUENCY=1 WEEK_FREQUENCY=1 MONTH_PATTERN=4095 MONTH_FREQUENCY=1 YEAR_FREQUENCY=1

Every Year on the 26th of March:

WEEK_DAY_PATERN=1 DAY_FREQUENCY=1

EXACT_DAY=26 OCCURRENCE_NO=1 OCCURRENCE_TYPE=3 WEEK_FREQUENCY=1 MONTH_PATTERN=4 MONTH_FREQUENCY=1 YEAR_FREQUENCY=1

Page 27: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 18

2.2 Care and Wellness – Medication Service

The medication service provides medical information related to a specific elderly. In

particular, this service is responsible for providing personal details of medicine associated

with an elderly such as name, description and route of medicine; along with medication

details such as date that an elderly started and ended a particular medication as well as

frequency that a medication should be taken.

The caregiver is responsible to insert/delete/update medication information for a specific elderly in the medication service. The medication information includes details regarding the medicine associated to an elderly, frequency that the medication should be taken and the medication route. In cases where new medication information is added then the medication service automatically creates a new calendar item through the agenda daemon of the Agenda Service. This calendar item subsequently creates a new agenda item (for more details see Section 2.1). Then the avatar, which periodically checks the agenda and notifications, reminds the elderly to take his medication. The elderly can also view his/her medication list and details about each medication that s/he is associated to.

2.2.1 Use Cases

Medication Service

Create Medication for Elderly

Elderly

Manage Medication

Caregiver

Update Medication for

Elderly

Delete Medication for Elderly

<<include>>

<<include>><<include>>

<<include>>

Agenda Daemon

View Medication

Agenda Service

Figure 9 - Medication Service Manage Medication Scenario

The scenario of Figure 9 shows a caregiver that utilizes the medication service to manage medications. In particular a caregiver is able to create/update/delete medication details for a particular elder and views all medication information stored in the database. An elder is just able to do the latter action, i.e., view medication information. Each time a new medication is created, deleted or updated the agenda daemon is automatically invoked to update the agenda of the elder.

Page 28: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 19

Notification Service

Notification Daemon

Query for Active Medication

Medication Service

Figure 10 - Medication Service Medication Notification Scenario

In Figure 10, the medication notification daemon is periodically invoked to check for active medications assigned to particular elderly and sends notifications accordingly.

2.2.2 Database Design

Figure 11 presents the Entity Relationship (ER) schema of the Medication service that is included in the Care and Wellness database schema. All the tables currently included in this database are described in Table 3.

Similarly to the Agenda Service described earlier, in order to protect the structure and data of the base tables, we have implemented the VIEW_PERSON_MEDICATION and VIEW_MEDICINE view structures that provide all data required by the Care and Wellness methods.

MEDICINE

PK MEDICINE_ID

NAME DESCRIPTIONFK1 ROUTE_ID

MEDICINE_FREQUENCY

PK FREQUENCY_ID

NAME DESCRIPTION

MEDICINE_ROUTE

PK MEDICINE_ROUTE_ID

NAME DESCRIPTION

PERSON_MEDICATION

PK PERSON_MEDICATION_ID

FK1 MEDICINE_IDFK3 PERSON_ID DATE_START DATE_ENDFK2 FREQUENCY_ID DOSE COMMENTS

PERSON

PK PERSON_ID

FIRST_NAME FAMILY_NAMES GENDER_ID BIRTHDATE AGE PICTURE RESIDENCE_ID RESIDENCE_ROOM_ID EMAIL SKYPE_NAME SKYPE_USERNAME SKYPE_PASSWORD LANGUAGE_ID

Figure 11 - Medication Service ER Diagram

Table Name Description

CareWellness.MEDICINE This table stores information about a MEDICINE that can be assigned to an edler such as the name, route that should be followed and description.

CareWellness.PERSON_MEDICATI This table stores information regarding the association between a medicine and an elder. In particular, it provides information of what medicine is

KnowledgeBase

Care and

Wellness

Page 29: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 20

ON assigned to a specific elder, date medication started, dose, frequency and date to end.

CareWellness.MEDICINE_FREQUENCY

This table stores the different frequencies regarding medications in general (e.g., once a day, once a week, etc.) Each frequency is assigned to a specific medicine.

CareWellness.MEDICINE_ROUTE This table stores the different routes regarding medications in general (e.g., injecting, oral, etc.) Each route is assigned to a specific medicine.

Table 3 – Care and Wellness Medication Database Tables

Page 30: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 21

2.2.3 Methods Description

The Care and Wellness Medication service in order to achieve the functionality referred above provides the following methods:

Method Name Description

LIST_MEDICINE Retrieves a list of all Medicine objects from table MEDICINE.

LIST_MEDICINE_FREQUENCY Retrieves a list of all MedicineFrequency objects from table MEDICINE_FREQUENCY.

LIST_MEDICINE_ROUTE Retrieves a list of all MedicineRoute objects from table MEDICINE_ROUTE.

DELETE_MEDICINE Deletes an existing record from table MEDICINE

DELETE_MEDICINE_FREQUENCY Deletes an existing record from table MEDICINE_FREQUENCY

DELETE_MEDICINE_ROUTE Deletes an existing record from table MEDICINE_ROUTE

DELETE_PERSON_MEDICATION Deletes an existing record from table PERSON_MEDICATION

GET_MEDICINE Retrieves a Medicine object.

GET_MEDICINE_FREQUENCY Retrieves a MedicineFrequency object.

GET_MEDICINE_ROUTE Retrieves a MedicineRoute object.

GET_PERSON_MEDICATION Retrieves a PersonMedication object.

GET_PERSON_MEDICATIONS Retrieves a list of PersonMedication objects.

GET_PERSON_ACTIVE_MEDICATIONS Retrieves a list of PersonMedication objects that are active for an elder.

INSERT_MEDICINE Inserts a new record into table MEDICINE

INSERT_MEDICINE_FREQUENCY Inserts a new record into table MEDICINE_FREQUENCY

INSERT_MEDICINE_ROUTE Inserts a new record into table MEDICINE_ROUTE

INSERT_PERSON_MEDICATION Inserts a new record into table PERSON_MEDICATION

INSERT_PERSON_MEDICATION Inserts a new record into table PERSON_MEDICATION (with REMINDER TIME)

UPDATE_MEDICINE Updates an existing record from table MEDICINE

UPDATE_MEDICINE_FREQUENCY Updates an existing record from table MEDICINE_FREQUENCY

UPDATE_MEDICINE_ROUTE Updates an existing record from table MEDICINE_ROUTE

Table 4 - Care and Wellness Agenda Service Methods Description

Page 31: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 22

2.3 Care and Wellness – Shopping List Assistance Service

This service is allows an elderly user to insert a new shipping list, update or delete an existing shopping list and/or view all content of a shopping list associated to an elder.

2.3.1 Use Cases

Figure 12 illustrates a use case scenario where the elderly views and manages information regarding its shopping lists.

Shopping List Assistance Service

Caregiver

Elderly

Manage Shopping

List

View Shopping List

Delete Shopping List

Update Shopping List

Create Shopping List

Figure 12 – Shopping List Assistance Service Case Study

2.3.2 Database Design

Figure 13 illustrates the current database design of the Shopping List Assistance Service. The database schema shown in Figure 13 presents the Entity Relationship (ER) schema of the Shopping List Assistance service included in the Care and Wellness schema and its interaction with KnowledgeBase. Moreover, the table PRODUCTS indicates the names of possible items with their units of measurements that can be included in the shopping list. This is mainly for supporting the avatar. All the tables currently included in this database are described in Table 5.

However, for more details about the attributes included in each table as well as the type and the description of these attributes please refer to Appendix A.

PERSON_SHOPPING_LIST

PK,FK1 PERSON_IDPK SHOPPING_ITEM

PRODUCTS

PK PRODUCT_ID

PRODUCT_NAME UOM

PERSON

PK PERSON_ID

FIRST_NAME FAMILY_NAMES GENDER_ID BIRTHDATE AGE PICTURE RESIDENCE_ID RESIDENCE_ROOM_ID EMAIL SKYPE_NAME SKYPE_USERNAME SKYPE_PASSWORD LANGUAGE_ID

Figure 13 – Shopping List Assistance Service ER Diagram

KnowledgeBase

Care and Wellness

Page 32: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 23

Table Name Description

CareWellness.PERSON_SHOPPING_LIST

This table stores information about a Shopping List associated to an elder, that is the shopping list items.

CareWellness, PRODUCTS This table stores information about products that can be added in the shopping list along with their unit of measurement.

Table 5 – Care and Wellness Shopping List Assistance Database Tables

2.3.3 Methods Description

The Care and Wellness Shopping List Assistance service in order to achieve the functionality referred above provides the following services:

Method Name Description

INSERT_PERSON_SHOPPING_LIST Inserts a new shopping list for a particular person (i.e., elderly user)

DELETE_PERSON_SHOPPING_LIST Update an existing shopping list of a particular person (i.e., elderly user)

GET_PERSON_SHOPPING_LIST Retrieves a list of all shopping list items of a particular person (i.e., elderly user)

SEND_SHOPPING_LIST Sends the complete shopping list to a particular person

DELETE_PERSON_SHOPPING_LIST_ALL Update all existing shopping lists of a particular person (i.e., elderly user)

INSERT_PRODUCT Insert a new record to table PRODUCT

UPDATE_PRODUCT Update an existing record to table PRODUCT

DELETE_PRODUCT Delete an existing record from table PRODUCT

LIST_PRODUCT Get a list with all available products of table PRODUCT

GET_PRODUCT Returns a product from table PRODUCT

GET_PRODUCT_UOM Gets the Unit of Measurement of a particular product

Table 6 - Care and Wellness Shopping List Assistance Methods Description

Method Name: SEND_SHOPPING_LIST

Description: Sends the complete shopping list to a particular person

Input Data: Name Type

PERSON_ID RECEIVER_ID

int int

Output Type: Boolean

Page 33: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 24

2.4 Guidance – Object Location Assistance

This service helps the elderly to locate where certain objects (e.g., wallet, keys) are located around the house (e.g., in the kitchen drawer). Two options are available for this, as shown in the high-level component interaction diagram illustrated in Figure 14:

The runtime object tracking, provides information about the last known location of this object in the home, based on real time vision-based localization.

The typical object location assistance, provides information about the typical storage location of this object, based on static information from the database.

Guidance – Object Location Assistance

KnowledgeBase Service

Context Analysis (WP2)

«uses»Runtime Object

Tracking

Object Recognition

Typical Object

Locations

ObjectElderly

Search for Object location Monitors

Typical Object Location

Assistance

«uses»

«uses»

Elderly

Save object typical location

Figure 14 – Object Location Assistance Service Interaction Diagram

2.4.1 Use cases

Figure 15 illustrates a use case scenario where the elderly stores the typical location of an already saved object in the knowledgebase. The user defines the object name, the typical storage location and keywords for searching for this object in the future. The inputs can be verbally expressed or manually entered via the touch user interface. This also creates a correlation between a person and his personal items.

Object Location Assistance Service KnowledgeBase Service

Store ObjectTypical Location <<extend>>

Elderly

Store Object

Figure 15 - Elderly stores object typical location Use Case.

Figure 16 illustrates a use case scenario where the elderly manages the details of an object. More specifically, the user updates the details of an object (i.e., selects a previously stored object and modifies its details (i.e., name, storage location, search keywords), deletes an object (i.e., selects a previously stored object and removes it from the system). Additionally, the user can view a list of all its personal Objects (i.e., name, storage location,

Page 34: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 25

search keywords). All functionality is provided with collaboration with the KnowledgeBase Service, which stores information about all objects in the system.

Object Location Assistance Service

KnowledgeBase Service

List Personal Object <<include>>

Elderly

Update Personal Object Details

Update Personal Object Location

Delete Personal Object Details

<<extend>> Manage Objects

Views Objects

Delete Object

Update object

Create Object

<<include>>

<<inclu

de>>

Figure 16 - Elderly manages object details Use Case

Figure 17 illustrates a use case scenario where the elderly queries for the location of an object. The user can select from a list or use a keyword to search for the previously stored object. If the object is found in the system then provides the object details and its typical location. The system will first search using real-time Object tracking as certain objects in the user’s environment may be tracked in real time with the use of cameras (e.g., Microsoft’s Kinect or other sensors). If the system tracks the object then it will query the KnowledgeBase service for its typical location stored.

Object Location Assistance Service

KnowledgeBase Service

Query specific Object from list

<<include>>

Elderly

Query for Person Objects

Query specific Object by keyword

<<extend>>

Query for object location

<<extend>>

Runtime Detection

Query for Person Objects

<<include>>

Figure 17 - Elderly queries for object details Use Case

2.4.2 Database Design

Figure 18 illustrates the current database design of the Object Location Assistance Service. The database schema presents the Entity Relationship (ER) schema of the Object Location Assistance service included in the Guidance schema and its interaction with KnowledgeBase and Monitoring. All the tables currently included in this database are described in Table 7.

However, for more details about the attributes included in each table as well as the type and the description of these attributes please refer to Appendix A.

Table Name Description

KnowledgeBase.OBJECT This table stores information about an object.

Page 35: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 26

KnowledgeBase.OBJECT_TYPE This table stores information about the object type that an object belongs to object. Note, for the ObjectLocationAssistance the predominant object type utilized is the Personal Items/Accessories.

Guidance.OBJECT_KEYWORDS This table stores information about the keywords that are linked with an object.

KnowledgeBase.PERSON This table stores information about a person (refer to D4.2 for more details)

KnowledgeBase.PERSON_OBJECTS This table correlates an object with a person.

Table 7 – Guidance Object Location Assistance Database Tables

In order to protect the structure and data of the base tables, we have implemented the VIEW_OBJECTS view structure that provides all data required by the Object Location Assistance methods.

Figure 18 – Object Location Assistance ER Diagram

Page 36: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 27

2.4.3 Methods Description

The Care and Wellness Medication service in order to achieve the functionality referred above provides the following services:

Method Name Description

INSERT_PERSON_OBJECTS Correlates an existing object with a person and stores its typical location for this specific person.

UPDATE_PERSON_OBJECTS Updates the typical location of a specific object and person.

DELETE_PERSON_OBJECTS Dissociates an existing object with a person.

GET_PERSON_OBJECTS Retrieves a list of Objects with their typical storage locations after a specific person has inserted the information in the system.

GET_PERSON_OBJECT Retrieves on object that a specific person possesses with its typical location.

GET_PERSON_OBJECT_BY_KEYWORD Retrieves a list of Objects that a specific person posses with their typical locations filtered by a specific keyword.

INSERT_PERSON_OBJECT_WITH_MONITORING

Correlates an existing object with a person and stores its typical location for this specific person.

UPDATE_PERSON_OBJECT_WITH_MONITORING

Updates correlation between an existing object with a person.

LIST_KB_OBJECTS Retrieves array of objects from OBJECT table of type Personal Items/Accessories only.

INSERT_KB_OBJECT Inserts new object that the person can have.

DELETE_KB_OBJECT Deletes an object that the person can have.

LIST_KB_OBJECTS_FOR_PERSON Lists all existing objects from table KB_OBJECT that the person didn’t store yet.

LIST_LOCATIONS_IN_ROOM Lists all possible locations where an object can be stored for a particular residence room, belonging to residence where person lives.

LIST_LOCATION_SEMANTICS Lists all possible semantic positions where an object can be stored for a particular residence room, belonging to residence where person lives.

GET_OBJECT_LATEST_LOCATION Retrieve the last know location, comprised of room and place including semantic information, of a person’s specific object – based either on real time camera information or information previously inserted by the person.

GET_OBJECT_TYPICAL_LOCATION Retrieve the typical location, comprised of room and place including semantic information, where a person stores a specific object – based on information previously inserted by the person.

Table 8 – Guidance Object Location Assistance Methods Description

Page 37: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 28

2.5 Guidance – Physical Activity

The Physical Activities Service is divided in two sub-services with distinct functionality as described below:

Physical Activity Guidance Service: provides a set of videos showing different types of physical exercises and giving detailed instructions on how to perform them. The caregiver is responsible to insert/update the videos that each elderly can view, and to insert/update the physical activity profile of each elderly, including their physical condition and capabilities. The elderly can browse these videos and watch them in order to preform guided physical exercise at home.

Physical Activity Motivation Service: stimulates and motivates the elderly to carry out physical activity either in the home (e.g., watch a physical exercise video) or outside (e.g., go for a walk in the park with a friend). This service detects the most appropriate time to offer suggestions to the elderly, based on a set of criteria such as the user’s physical status (i.e., prolonged inactivity detected) and the user’s behavior (i.e. user did not perform physical activities recently). The suggestions offered are customized to the user’s physical capabilities and preferences, stored in their physical activity profile.

2.5.1 Use Cases

The scenario of Figure 19 shows a caregiver that utilizes the physical activity service to manage the physical activity profiles of the elderly. In particular a caregiver is able to create/view/update profile details for a particular elder and assigns physical activity videos to them. Furthermore, caregivers can view statistics about the use of the physical activity service by the elderly, such as number of videos watched overall/weekly etc.

Figure 19: Physical Activity Service Use Case – Caregiver features

Page 38: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 29

Figure 20 shows two possible scenarios of how an elderly user utilizes the physical activity service. In the 1st scenario, the Physical Activity Motivation service is automatically triggered by the system to motivate the elderly to carry out physical activity. The elderly views several suggestions (e.g., watch a physical exercise video, go for a walk in the park with a friend etc.) and can accept or reject them. If a suggestion is accepted another service might be triggered to continue the interaction.

In the 2nd scenario, the user activates the Physical Activity Guidance service in order to view the physical activity videos. First the user selects one category (e.g., back exercises, leg exercises etc.) and then selects and views one of the videos of this category. An elder is just able to do view the videos that have been assigned to them by caregivers, to make sure that they are not in danger of performing harmful exercises.

2.5.2 Database Design

Figure 21 presents the Entity Relationship (ER) schema of the Physical Activity Motivation and the Physical Activity Guidance Services. This is included in the Guidance database schema is interacting with the KnowledgeBase. All the tables included in this schema are described in Table 7. For more details about the attributes included in each table as well as the type and the description of these attributes please refer to Appendix A.

Figure 20: Physical Activity Service Use Case – Elderly features

Page 39: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 30

Figure 21: Guidance Services Database ER schema

Table Name Description

Guidance.PHYSICAL_ACTIVITY_CATEGORY

This table stores the different categories of physical activity according to the type of exercise they include (e.g., sitting, standing, back exercise etc.)

Guidance.PHYSICAL_ACTIVITY_CATEGORY_PROFILE

This table stores the different physical activity profiles of the users (e.g., active, disabled, only back exercises etc.)

Guidance.PHYSICAL_ACTIVITY_PROFILE

This table stores information about the different types of physical activity profiles (e.g., active, disabled, only back exercises etc.)

Guidance.PHYSICAL_ACTIVITY_STATS This table stores statistical information about the use of the physical activity service by its users, including how many times the service is triggered automatically by the system or initiated by the user etc.

Guidance.PHYSICAL_ACTIVITY_VIDEO This table stores information about the physical activity videos, including the video’s name, short description, duration (in minutes), where this video is stored in the system’s server etc.

Guidance.VIDEO_FRAME For each video, a frame is selected to be displayed as a preview to the

Page 40: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 31

users. This table stores information about these frames (where it is stored in the system’s server etc.) and the corresponding videos (name, description, length etc.)

Guidance.WEEKLY_VIDEO_STATS This table stores statistical information about the physical activity videos, including how many times each video is watched per user overall and weekly etc.

Guidance.PERSON_PHYSICAL_ACTIVITY_PROFILE

This table stores the mapping of persons and physical activity profiles. Each user can have one or multiple physical activity profiles.

PERSON_PHYSICAL_ACTIVITY_VIDEO This table stores the mapping of persons and physical activity videos. Each user can have access to one or multiple physical activity videos, as long as the category of those videos is appropriate for the user’s physical activity profile.

Table 9 – Guidance Database Tables

2.5.3 Methods Description 2.5.3.1 Physical Activity Motivation Service

The Physical Activity Motivation service in order to achieve the functionality referred above provides the following methods:

Method Name Description

GET_SUGGESTED_PHYSICAL_ACTIVITY Retrieves a list of suggested physical activities taking place during the current week. The suggestion is based on the person’s past behaviour.

IS_PERSON_PRESENT Detects if the person is present in a room where avatar is located.

LIST_FRIENDS Lists the friends of the person often invited to the specific activity.

TRIGGER_FOR_MOTIVATION Combines cumulative criteria to decide when to trigger the service to motivate the user to perform Physical Activity.

Table 10 - Physical Activity Motivation Methods Description

2.5.3.2 Physical Activity Guidance

The Physical Activity Guidance service in order to achieve the functionality referred above provides the following methods:

Method Name Description

DELETE_PERSON_PHYSICAL_ACTIVITY_PROFILE

Dissociates an existing Physical Activity Profile with an existing Person in the table PERSON_PHYSICAL_ACTIVITY_PROFILE. One Person should have at least one Physical Activity Profile.

DELETE_PERSON_PHYSICAL_ACTIVITY_VIDEO

Dissociates an existing Physical Activity Video with an existing Person in table PERSON_PHYSICAL_ACTIVITY_VIDEO.

DELETE_PHYSICAL_ACTIVITY_STATS Delete an existing entry in PHYSICAL_ACTIVITY_STATS table for specific Person, Service and Week.

GET_CURRENT_WEEKLY_COUNTER Retrieves the value of the counter which indicates the number of times the service is used during the current week.

GET_PERSON_PHYSICAL_ACTIVITY_P Retrieves the Physical Activity Profile of a specific Person, from tables

Page 41: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 32

ROFILE PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

GET_PERSON_PHYSICAL_ACTIVITY_PROFILE_BY_PERSONID

Retrieves the Physical Activity Profile of a specific Person, from tables PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

GET_PERSON_PHYSICAL_ACTIVITY_VIDEO

Returns the Person Physical Activity Video with specific ID for a specific Person from table PERSON_PHYSICAL_ACTIVITY_VIDEO.

GET_PHYSICAL_ACTIVITY_VIDEO Returns the Physical Activity Video with a specific ID from table PHYSICAL_ACTIVITY_VIDEO.

GET_TIMES_WATCHED Retrieves the value of the counter that indicates how many times (overall) a Person has watched an existing Video from table PERSON_PHYSICAL_ACTIVITY_VIDEO.

GET_WEEKLY_TIMES_WATCHED Retrieves the value of the counter that indicates how many times a Person has watched an existing Video during the specific week from table WEEKLY_VIDEO_STATS. Returns -1 if the entry doesn't exist.

INCREASE_WEEKLY_COUNTER Updates the weekly counter that indicates the number of times the service is used in the current week in table PHYSICAL_ACTIVITY_STATS. It is assumed, that only current week’s counter is increased.

INSERT_PERSON_PHYSICAL_ACTIVITY_PROFILE

Correlate an existing Physical Activity Profile with an existing Person in the table PERSON_PHYSICAL_ACTIVITY_PROFILE. One Person can have multiple Physical Activity Profiles.

INSERT_PERSON_PHYSICAL_ACTIVITY_VIDEO

Correlates an existing Physical Activity Video with an existing Person and the person who makes the assignment in table PERSON_PHYSICAL_ACTIVITY_VIDEO. In addition, it stores the date (auto date) and sets timesWatched counter to 0.

INSERT_PHYSICAL_ACTIVITY_CATEGORY

Creates a new Physical Activity Category in table PHYSICAL_ACTIVITY_CATEGORY. Returns -1 if insert was not successful.

INSERT_PHYSICAL_ACTIVITY_CATEGORY_PROFILE

Correlates an existing Physical Activity Category with an existing Physical Activity Profile in table PHYSICAL_ACTIVITY_CATEGORY_PROFILE.

INSERT_PHYSICAL_ACTIVITY_PROFILE

Creates a new Physical Activity Profile in table PHYSICAL_ACTIVITY_PROFILE.

INSERT_PHYSICAL_ACTIVITY_STATS Inserts new entry in PHYSICAL_ACTIVITY_STATS table for specific Person, Service and Week. One Person can have multiple Physical Activity Stats. Returns -1 if insert was not successful.

INSERT_PHYSICAL_ACTIVITY_VIDEO Creates a new Physical Activity Video entry and correlates it with an existing Physical Activity Category in table PHYSICAL_ACTIVITY_VIDEO. Returns -1 if insert was not successful.

INSERT_VIDEO_FRAME Creates a new Video Frame and correlates it to a specific video in table VIDEO_FRAME. Returns -1 if insert was not successful.

INSERT_WEEKLY_VIDEO_STATS Inserts new entry in WEEKLY_VIDEO_STATS table for specific Person, Video and Week with auto value for TIMES_WATCHED set to 1. One Person and each Person Physical Activity Video can have multiple Weekly Video Stats. Returns -1 if insert was not successful.

LIST_PERSON_PHYSICAL_ACTIVITY_C Retrieves a list of all the Physical Activity Categories which are correlated with all Physical Activity profiles of a particular person based

Page 42: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 33

ATEGORY_BY_CATEGORY on category name, from tables PHYSICAL_ACTIVITY_CATEGORY_PROFILE, PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

LIST_PERSON_PHYSICAL_ACTIVITY_VIDEO

Retrieves a list of all the Person Physical Activity Video that correspond to a specific Person, from table PERSON_PHYSICAL_ACTIVITY_VIDEO.

LIST_PERSON_PHYSICAL_ACTIVITY_VIDEOS_PER_CATEGORY

Retrieves a list of the Physical Activity Videos correlated with a specific Physical Activity Category and a specific Person, from tables PERSON_PHYSICAL_ACTIVITY_VIDEO, PHYSICAL_ACTIVITY_VIDEO.

LIST_PHYSICAL_ACTIVITY_CATEGORY Retrieves a list of all the Physical Activity Categories, from table PHYSICAL_ACTIVITY_CATEGORY.

LIST_PHYSICAL_ACTIVITY_CATEGORY_BY_PERSON_ID

Retrieves a list of all the Physical Activity Categories which are correlated with all Physical Activity profiles of a particular person, from tables PHYSICAL_ACTIVITY_CATEGORY_PROFILE, PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

LIST_PHYSICAL_ACTIVITY_CATEGORY_PER_PROFILE

Retrieves a list of all the Physical Activity Categories which are correlated with all Physical Activity profiles of person, from table PHYSICAL_ACTIVITY_CATEGORY_PROFILE.

LIST_PHYSICAL_ACTIVITY_VIDEOS_PER_CATEGORY

Retrieves a list of the Physical Activity Videos correlated with a specific Physical Activity Category from table PHYSICAL_ACTIVITY_VIDEO, PHYSICAL_ACTIVITY_CATEGORY.

LIST_PHYSICAL_ACTIVITY_VIDEOS_PER_PERSON

Retrieves a list of the Physical Activity Videos correlated with a specific Person from table PHYSICAL_ACTIVITY_VIDEO and PERSON_PHYSICAL_ACTIVITY_VIDEO.

LIST_VIDEO_FRAMES Retrieves a list of all the Video Frames related to a specific video from the table PHYSICAL_ACTIVITY_VIDEO_FRAME.

LIST_WEEKLY_COUNTER Retrieves the list of PhysicalActivityStats which indicates how many times a Person has used a physical activity service by week from the table PHYSICAL_ACTIVITY_STATS.

LIST_WEEKLY_TIMES_WATCHED Retrieves the list of WeeklyVideoStats which indicates how many times a Person has watched an existing Video by week from the table WEEKLY_VIDEO_STATS.

MODIFY_PERSON_PHYSICAL_ACTIVITY_PROFILE

Modifies an existing Physical Activity Profile of a Person in the table PERSON_PHYSICAL_ACTIVITY_PROFILE. One Person can have multiple Physical Activity Profiles. Implements the logic of safe update.

UPDATE_PERSON_PHYSICAL_ACTIVITY_VIDEO_ TIMES_WATCHED

Updates the counter that indicates how many times (per week and overall) a Person has watched an existing Video in tables PERSON_PHYSICAL_ACTIVITY_VIDEO and WEEKLY_VIDEO_STATS.

UPDATE_PHYSICAL_ACTIVITY_STATS Updates existing entry in PHYSICAL_ACTIVITY_STATS table for specific Person, Service and Week.

UPDATE_WEEKLY_VIDEO_STATS Update existing entry in WEEKLY_VIDEO_STATS table for specific Person, Video and Week. One Person and each Person Physical Activity Video can have multiple Weekly Video Stats.

Table 11 - Physical Activity Guidance Methods Description

Page 43: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 34

2.6 Education/Leisure – Event Service

This section details the Event Service of the Education/Leisure Service. This service is mainly responsible to provide information about events so that the elderly can participate. This service starts with the caregivers adding and managing possible events and then the elderly view these events and decide if they want to participate. Immediately after this, the accepted event creates a new calendar event in the elderly’s agenda.

2.6.1 Use cases

In this section, two use case diagrams regarding the event service are presented and described.

Event Service

Caregiver

Elderly

Manage Events

Views Events

Delete Event Update Event

Create Event

Figure 22: Event Service Manage Events Use Case Diagram

Figure 22 shows a use case scenario of caregiver that utilizes the event service to manage - create/update/delete an event or that views all existing events. An elder on the other hand is able to just view all existing events.

Event Service

Elderly

Views Events

Participate in Event

Insert Calendar

<<extend>>

Agenda Service

Figure 23 – Event Service Elderly Decides to Participate to an Event Scenario

In the use case scenario illustrated in Figure 23 an elder requests to view all existing events in order to decide whether to participate or not. If an elder decides to participate in an event then the agenda service is automatically invoked and a calendar item is created.

Page 44: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 35

2.6.2 Database Design

Figure 24 presents the Entity Relationship (ER) schema of the Event service that is included in the Education\Leisure database schema. All the tables currently included in this database are described in Table 12.

EVENTS

PK EVENT_ID

FK1 ACTIVITY_ID START_DATE_TIME END_DATE_TIME DESCRIPTIONFK3 LOCATION_IDFK2 CREATOR_ID TYPE MAX_PERSONS PRICE

LOCATION

PK LOCATION_ID

NAME DESCRIPTION RESIDENCE_ID SEMANTIC_ID LOCATION_X LOCATION_Y LOCATION_Z GPS_LAT GPS_LON GPS_ALT ROOM_ID

ACTIVITY

PK ACTIVITY_ID

NAME DESCRIPTION PRECAUTIONS ACTIVITY_ASSISTANCE

PERSON

PK PERSON_ID

FIRST_NAME FAMILY_NAMES GENDER_ID BIRTHDATE AGE PICTURE RESIDENCE_ID RESIDENCE_ROOM_ID EMAIL SKYPE_NAME SKYPE_USERNAME SKYPE_PASSWORD LANGUAGE_ID

Figure 24: Education/Leisure Event Services Database ER schema

Table Name Description

EducationLeisure.EVENT This table stores information about the Events of an elder that decided to participate. It contains information regarding the start and end, the duration and the location of an event

Table 12 – Education\Leisure Event Database Tables

2.6.3 Methods Description

The Education/Leisure Event services in order to achieve the functionality referred above provides the services shown in Table 13.

KnowledgeBase

Education/Leisure Monitoring

Page 45: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 36

Method Name Description

LIST_EVENTS Retrieves a list of all Event objects from table EVENTS.

INSERT_EVENT_WITH_LOCATION Inserts a new event record with location details into table EVENTS.

INSERT_EVENT Inserts a new event record into table EVENTS.

DELETE_EVENT Deletes an existing record from table EVENTS.

GET_EVENT Retrieves an Event object.

GET_DAILY_EVENTS Retrieves a list with Event objects for the current day.

GET_WEEKLY_EVENTS Retrieves a list with Event objects for the current week.

GET_MONTHLY_EVENTS Retrieves a list with Event objects for the current month.

GET_EVENTS_BY_START_END_DATE Retrieves a list with Event objects for a particular date range.

UPDATE_EVENT_WITH_LOCATION Updates an existing record from table EVENTS by deleting the existing record and creating a new updating at the same time the location information associated to it

UPDATE_EVENT Updates an existing record from table EVENTS by deleting the existing record and creating a new

GET_EVENTS_BY_START_END_DATE Retrieves a list with Event objects for a particular date range and activity type.

GET_EVENTS_TOMORROW Retrieves a list with Event objects for tomorrow.

GET_EVENTS_YESTERDAY Retrieves a list with Event objects for yesterday.

GET_EVENTS_TODAY Retrieves a list with Event objects for today.

Table 13 – Education\Leisure Event Methods Description

Page 46: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 37

2.7 Education/Leisure – Meal Assistance Service

This section details the meal assistance service of the Education/Leisure Service. This service is mainly responsible to provide information regarding meals, their recipe, the ingredients of a meal, etc., associated to a person. The user is able to retrieve such information by querying the meal assistance service by meal type, recipe type, cooking type, amount of time needed to prepare a particular meal and many more that are described in details below.

2.7.1 Use cases

Meal Assistance

Caregiver

Elderly

Manage Meals

Views Meal

Delete Meal

Update Meal

Create Meal

Figure 25 – Meal Assistance Service Elderly Manages Meal Scenario

In Figure 25, either the elderly or the caregiver utilize the meal assistance service to manage meals including creating, updating, deleting a meal or requesting to view all meals that reside in the Meal database.

Meal Assistance

Caregiver

Elderly

Manage Recipes

View by Meal

Delete Recipe

Update Recipe

Create Recipe

View Recipes

View by Cooking Type

View by Cooking Time

View by Recipe Type

View by name filter

View by Ingredient

Figure 26 – Meal Assistance Service Elderly Manages Recipes Scenario

In Figure 26, similarly as in the previous scenario, the elderly or the caregiver can utilize the meal assistance service to manage recipes, i.e., create, update and/or delete a recipe. Moreover, both users are able to view all recipes or filtered subset of the whole set of recipes. In particular, the user can view recipes by meal, cooking type, cooking time, recipe type, name and ingredients that compose a recipe.

Page 47: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 38

Meal Assistance

Views Meals

Caregiver

Elderly

Correlate Recipe with Meal

Views Recipes

<<extend>>

<<extend>>

Figure 27 - Meal Assistance Service Elderly Meal-Recipe Correlation Scenario

In the scenario of Figure 27 a user, either an elder or a caregiver, is able to view a specific recipe for a particular meal by correlating information from both the Recipe and Meal tables.

Meal Assistance

Views Allergies

Elderly

View Recipes<<includes>>

KnowledgeBase

Figure 28 – Meal Assistance Service Elderly Manages Meal Scenario

Figure 28 shows a special scenario where an elder can view all recipes filtered by specific ingredients which is allergic to.

Page 48: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 39

2.7.2 Database Design

Figure 29 presents the Entity Relationship (ER) schema of the Meal Assistance service that is included in the Education\Leisure database schema. All the tables currently included in this database are described in Table 14.

PERSON_PREF_MEALS

PK,FK2 PERSON_IDPK,FK1 MEAL_ID

RECIPE_COOKING_TYPE

PK COOKING_TYPE_ID

NAME DESCRIPTION

PERSON_PREF_RECIPES

PK,FK2 PERSON_IDPK,FK1 RECIPE_ID

GRADE COMMENTS

RECIPE_INGREDIENTS

PK,FK1 RECIPE_IDPK INGREDIENT_ID

AMOUNT DETAILS UOM

MEAL

PK MEAL_ID

NAME DESCRIPTION

RECIPE_STEPS

PK,FK1 RECIPE_IDPK STEP_NUMBER

DESCRIPTION

MEAL_RECIPES

PK,FK1 MEAL_IDPK,FK2 RECIPE_ID

RECIPE

PK RECIPE_ID

NAME DESCRIPTIONFK2 RECIPE_TYPE_ID DIFFICULTY TIME_IN_MINUTESFK1 COOKING_TYPE_ID IS_LOW_CARB IS_HIGH_FIBER IS_LOW_FAT IS_KOSHER IS_VEGETARIAN IS_LOW_CAL IS_NO_SUGAR IS_GLUTEN_FREE VIDEO_LINK

RECIPE_TYPE

PK RECIPE_TYPE_ID

NAME DESCRIPTION

PERSON

PK PERSON_ID

FIRST_NAME FAMILY_NAMES GENDER_ID BIRTHDATE AGE PICTURE RESIDENCE_ID RESIDENCE_ROOM_ID EMAIL SKYPE_NAME SKYPE_USERNAME SKYPE_PASSWORD

Figure 29 - Education/Leisure Meal Assistance Services Database ER schema

Table Name Description

EducationLeisure.MEAL This table stores information about a particular meal of an elder.

EducationLeisure.MEAL_RECIPES This table stores information regarding the recipe of a particular meal.

EducationLeisure.RECIPE This table stores information regarding recipe.

EducationLeisure.RECIPE_COOKI This table stores information regarding the cooking type of a particular

KnowledgeBase

Education/Leisure

Page 49: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 40

NG_TYPE recipe.

EducationLeisure.RECIPE_INGREDIENTS

This table stores information regarding the ingredients of a particular recipe.

EducationLeisure.RECIPE_STEPS This table stores information regarding the step need to be followed for a particular recipe.

EducationLeisure.RECIPE_TYPE This table stores information regarding the type of a particular recipe.

Table 14 - Education\Leisure Meal Assistance Database Tables

2.7.3 Methods Description

The Education/Leisure Meal Assistance in order to achieve the functionality referred above provides the services shown in Table 14.

Method Name Description

LIST_MEAL Retrieves a list of all Meal objects from table MEAL.

LIST_RECIPE Retrieves a list of all Recipe objects from table RECIPE.

LIST_RECIPE_COOKING_TYPE Retrieves a list of all RecipeCookingType objects from table RECIPE_COOKING_TYPE.

LIST_RECIPE_TYPE Retrieves a list of all RecipeType objects from table RECIPE_TYPE.

INSERT_MEAL Inserts a new event record into table MEAL.

INSERT_RECIPE_COOKING_TYPE Inserts a new event record into table RECIPE_COOKING_TYPE.

INSERT_RECIPE_TYPE Inserts a new event record into table RECIPE_TYPE.

INSERT_RECIPE Inserts a new event record into table RECIPE.

INSERT_RECIPE_INGREDIENTS Inserts a new event record into table RECIPE_INGREDIENTS.

INSERT_RECIPE_STEPS Inserts a new event record into table RECIPE_STEPS.

INSERT_MEAL_RECIPES Inserts a new event record into table MEAL_RECIPES.

DELETE_MEAL Deletes an existing record from table MEAL.

DELETE_RECIPE Deletes an existing record from table RECIPE.

DELETE_RECIPE_COOKING_TYPE Deletes an existing record from table RECIPE_COOKING_TYPE.

DELETE_RECIPE_TYPE Deletes an existing record from table RECIPE_TYPE.

DELETE_RECIPE_INGREDIENTS Deletes an existing record from table RECIPE_INGREDIENTS.

DELETE_RECIPE_STEPS Deletes an existing record from table RECIPE_STEPS.

DELETE_MEAL_RECIPES Deletes an existing record from table MEAL_RECIPES.

GET_MEAL Retrieves a MEAL object.

GET_RECIPE Retrieves a RECIPE object.

GET_RECIPE_COOKING_TYPE Retrieves a RECIPE_COOKING_TYPE object.

Page 50: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 41

GET_RECIPE_TYPE Retrieves a RECIPE_TYPE object.

GET_RECIPE_INGREDIENTS Retrieves a list of Recipe objects from table RECIPE_INGREDIENTS.

GET_RECIPE_STEPS Retrieves a list of RecipeStep objects from table RECIPE_STEPS.

GET_RECIPES_BY_INGREDIENT Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by ingredient.

GET_RECIPES_REMOVE_ALLERGIES Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by the ingredients that the person is allergic to.

GET_RECIPES_BY_TIME Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by time.

GET_RECIPES_BY_FLAGS Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by flags.

GET_RECIPES_BY_COOKING_TYPE Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by cooking type.

GET_RECIPES_BY_RECIPE_TYPE Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by recipe type.

GET_RECIPES_BY_NAME Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by name.

GET_RECIPES_PERSON_SPECIFIC Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by specific person ID.

UPDATE_MEAL Updates an existing record from table EVENTS by deleting the existing record and creating a new updating at the same time the location information associated to it.

UPDATE_RECIPE Updates an existing record from table RECIPE.

UPDATE_RECIPE_COOKING_TYPE Updates an existing record from table RECIPE_COOKING_TYPE.

UPDATE_RECIPE_TYPE Updates an existing record from table RECIPE_TYPE.

UPDATE_RECIPE_INGREDIENTS Updates an existing record from table RECIPE_INGREDIENTS.

UPDATE_RECIPE_STEPS Updates an existing record from table RECIPE_STEPS.

Table 15 – Education\Leisure Meal Assistance Methods Description

Page 51: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 42

3 Safety services

The development of safety services fulfils safety needs of the elder in carrying out his/her daily life activities at home. These services can roughly be grouped in the two categories of (1) the Monitoring/Tracking services to detect a situation to which the system should react to, and (2) the Alert/Notification/Warning services to attend to the user to communicate and fulfil the safety needs.

3.1 Monitoring/Tracking Services

The groups of monitoring and tracking services are meant to continuously monitor the user and the surrounding to detect a situation in which a safety concern arises. Some services have been mentioned in the Description of Work (DoW) and others have been identified in the end-user needs analysis questionnaire of WP1, i.e.:

Establish a video or telephone conversation

Danger situations adviser

Dangerous objects adviser

Fall Detection

Continuous user location tracking

Turn off devices reminders

Entry points monitoring (theft awareness)

Mistaken fire alarm trigger

Some of these services – although their usefulness is not questioned – have been identified as out of scope of this project, i.e., the last two services: “Entry points monitoring” and “Mistaken fire alarm trigger”. Others are only used as part of another service to be marked as safety service, i.e., the service to establish a video or telephone conversation can be used by the fall detection service to alert a caregiver; therefore it is part of the safety service “fall detection”.

3.2 Monitoring/Tracking - Fall Detection Service

Fall detection is probably one of the most famous and prominent services in the AAL domain. According to the Centers for Disease Control and Prevention, one out of three older adults, with an age of 65 or older, falls each year. For this focus group, falls are the leading cause of both fatal and nonfatal injuries. Therefore, systems that detect falls have been of increasing interest in the research community.

The typical scenario is as follows: if the system detects a fall, a telephone or video conversation with a caregiver is established to verify that a fall has occurred and that help is needed. In that case, either the caregiver can provide help directly, e.g., a by a near-by living relative, or an emergency number can be called.

3.2.1 Component Interaction Diagram

The fall detection service continuously monitors the user. If a fall is detected, the list of Emergency Contacts (as well as their telephone numbers or Skype information) is queried from Co-Net (though the use of Co-Net’s Virtual Care Team Management Service) and a

Page 52: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 43

telephone or video conference is started with the first entry in the contact list. If a contact cannot help, a call with the next contact in the list is initiated.

The list of Emergency contacts is managed by an administrator, through the use of Co-Net’s Virtual Care Team Management service, who allows him to perform queries (i.e., retrieve the members), or even add and remove contacts (members) from the user’s Virtual Care Teams. Note that currently, Co-Net supports five types of Virtual Care Teams. These are the Care Professionals, Friends, Family, Neighbors, and Emergency Contacts. Throughout the lifetime of the trials new custom virtual care team types may be allowed to be created if needed.

More information regarding the Virtual Care Team Management service, describing in more details all the tables and methods currently supported by this service can be found in Deliverable D4.2 “Specification of Co-Net”.

Safety Services

Co-Net

«uses»«uses»

Context Analysis (WP2)

«uses»Fall Detection Object

Detection

VCT Service

Telephone Component

Elderly

Caregiver, Friends,

Family, etc.

CreateCall

Figure 30 – Component Interaction diagram for Fall Detection Service

3.2.2 Database Design

In this section, we provide the current database design of the Fall Detection services. Figure 31 presents the Entity Relationship (ER) schema of the Fall Detection service included in the safety service schema and its interaction with the Co-Net’s Virtual Care Team Management service database. However, for more details about the attributes included in each table as well as the type and the description of these attributes please refer to Appendix A.

Page 53: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 44

PERSON_PHONES

PK,FK1 PERSON_IDPK PHONE_TYPE_ID

COUNTRY_ID PHONE_NUMBER

VIRTUAL_CARE_TEAM

PK VCT_ID

FK2 PERSON_IDFK1 VCT_TYPE_ID

VIRTUAL_CARE_TEAM_MEMBERS

PK,FK1,FK2 VCT_IDPK,FK3 PERSON_IDPK VCT_ROLE_IDPK ENTRY_DATE

EXIT_DATE

VIRTUAL_CARE_TEAM_TYPES

PK VCT_TYPE_ID

NAME DESCRIPTION

PERSON

PK PERSON_ID

FIRST_NAME FAMILY_NAMES GENDER_ID BIRTHDATE AGE PICTURE RESIDENCE_ID RESIDENCE_ROOM_ID EMAIL SKYPE_NAME SKYPE_USERNAME SKYPE_PASSWORD EMERGENCY_CONTACTS (view)

VCT_TYPE_ID=5

Figure 31 - Monitoring/Tracking Services Database ER schema

3.3 Monitoring/Tracking – Collision Detection Service

To avoid that a person is stumble over an object lying on the floor, the collision detection service detects possible obstacles on the floor. It uses the output of the surrounding analysis and the skeleton data from the Microsoft Kinect. The service determines from the skeleton data the motion direction of the user and searches for objects in the determined direction. The service generates an event for every detected obstacle. The service stores the position of the obstacle and generates an event when the obstacle is removed.

The typical scenario as follows: if the system detects an object in the way of the user, the avatar is notifies the user about the object. After this the user can evade the object or can remove the object.

3.3.1 Component Interaction Diagram

The collision detection service continuously monitors the user using the output of the surrounding analysis and the skeletal data from the Kinect2Java service. If a dangerous object is detected, the collision detection service generates an event and informs the Dialogmanager which informs the user about the dangerous object.

The user can now decide to remove or evade the object. The Dialogmanager can inform him about the position of the object.

The collision detection service remembers the detected object and checks in every surrounding analysis frame whether the object is removed or still there. If the object is removed it generates another event about the object removal.

Safety Service

DB Schema

Page 54: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 45

The Dialogmanager can now inform the user about the removal of the object.

Figure 32 - Component Interaction diagram for Collision Detection Service

Page 55: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 46

4 Conclusions / Further Work

In the first version of deliverable D4.1 (D4.1a) we provide technical details regarding the design and implementation of a set of Home ICT-based services and safety services. In particular, we have designed and implemented the Care and Wellness - Agenda service that is responsible to keep track certain activities related to an elder, the Care and Wellness - Medication Service that provides medical information related to a specific elderly and the Education & Leisure - Event service that allows a user to invite other members to participate in group leisure activities.

The functionality of these services has been identified by taking into consideration the initial requirements and needs of the end users inferred from the first versions of D1.1a and D1.2a developed in WP1. Note that both the Home ICT-based services and the Safety services were continuously evolved, thought out the lifetime of the project, according to the changing needs and requirements of the end users and the other related stakeholders and also the supporting functionality that the other components of the Miraculous-Life system demanded from the ICT-based and safety services.

In this second and final version of the D4.1 we include new ICT-based and safety services that greatly enhance the functionality provided by the Miraculous-Life system. In more detail, the new services that were introduced are the Shopping List Assistance service under the Care and Wellness, the Physical Activity service under the Guidance, the Meal Assistance service under the Education and Leisure and the Collision Detection service under the Safety.

Page 56: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 47

Appendix A Data Dictionary

Below the tables included in the Agenda, Care and Wellness and EducationLeisure Service and supporting tables are presented.

A.1. Agenda Services

Schema Table Field Data Type

Max Length

Precision Scale Primary Key

Identity Nullable Computed Description

Agenda INVITATIONS INVITATION_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

Agenda INVITATIONS CALENDAR_ID udt_id 4 10 0 0 0 0 0

FK - PERSON_CALENDAR

Agenda INVITATIONS FROM_ID udt_id 4 10 0 0 0 0 0 FK - PERSON

Agenda INVITATIONS STATUS int 4 10 0 0 0 0 0

0: Not Answered, 1: Accepted, 2: Rejected

Agenda INVITATIONS TO_ID udt_id 4 10 0 0 0 0 0 FK - PERSON

Agenda PERSON_AGEN

DA AGENDA_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

Agenda PERSON_AGEN

DA ACTIVITY_ID udt_id 4 10 0 0 0 1 0 FK - ACTIVITY

Agenda PERSON_AGEN

DA CALENDAR_ID udt_id 4 10 0 0 0 0 0

FK - PERSON_CALENDAR

Agenda PERSON_AGEN

DA CALENDAR_TYP

E_ID udt_id 4 10 0 0 0 0 0

FK - PERSON_CALENDAR_TYPE

Page 57: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 48

Agenda PERSON_AGEN

DA DESCRIPTION udt_desc

ription MAX 0 0 0 0 0 0 Description of the Record

Agenda PERSON_AGEN

DA END_DATE_TIM

E datetime 8 23 3 0 0 0 0 The end datetime of the Record

Agenda PERSON_AGEN

DA FEEDBACK_ID udt_id 4 10 0 0 0 0 0

FK - PERSON_AGENDA_ACTION

Agenda PERSON_AGEN

DA LOCATION_ID udt_id 4 10 0 0 0 1 0 FK - LOCATION

Agenda PERSON_AGEN

DA PERSON_ID udt_id 4 10 0 0 0 0 0 FK - PERSON

Agenda PERSON_AGEN

DA REMINDER_TIM

E int 4 10 0 0 0 0 0

Reminder time in minutes (negative values: notification before event)

Agenda PERSON_AGEN

DA START_DATE_TI

ME datetime 8 23 3 0 0 0 0 The start datetime of the Record

Agenda PERSON_AGENDA_FEEDBACK FEEDBACK_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

Agenda PERSON_AGENDA_FEEDBACK DESCRIPTION

udt_description MAX 0 0 0 0 0 0

Description of the Record

Agenda PERSON_AGENDA_FEEDBACK NAME

udt_name 400 0 0 0 0 0 0

Display name of the Record

Page 58: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 49

Agenda PERSON_CALE

NDAR CALENDAR_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

Agenda PERSON_CALE

NDAR ACTIVITY_ID udt_id 4 10 0 0 0 1 0 FK - ACTIVITY

Agenda PERSON_CALE

NDAR CALENDAR_TYP

E_ID udt_id 4 10 0 0 0 0 0

FK - PERSON_CALENDAR_TYPE

Agenda PERSON_CALE

NDAR DAY_FREQUENC

Y int 4 10 0 0 0 0 0

An integer value for the frequency, i.e. 1 means “every occurrence”, 2 means “every second”, 3 “every third”, etc.

Agenda PERSON_CALE

NDAR DESCRIPTION udt_desc

ription MAX 0 0 0 0 0 0 Description of the Record

Agenda PERSON_CALE

NDAR END_DATE_TIM

E datetime 8 23 3 0 0 1 0 The end datetime of the Calendar

Agenda PERSON_CALE

NDAR EVENT_ID udt_id 4 10 0 0 0 1 0 NULL

Page 59: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 50

Agenda PERSON_CALE

NDAR EXACT_DAY int 4 10 0 0 0 1 0 A specific day of the month.

Agenda PERSON_CALE

NDAR EXACT_WEEK int 4 10 0 0 0 1 0 A specific ISO week of the year

Agenda PERSON_CALE

NDAR IS_EVENT bit 1 1 0 0 0 0 0 NULL

Agenda PERSON_CALE

NDAR LOCATION_ID udt_id 4 10 0 0 0 1 0 FK - LOCATION

Agenda PERSON_CALE

NDAR MONTH_FREQU

ENCY int 4 10 0 0 0 0 0 Month frequency

Agenda PERSON_CALE

NDAR MONTH_PATTE

RN int 4 10 0 0 0 0 0

Works like the weekday pattern, a binary, additive pattern that defines which months to include: 1 January, 2 Frebruary, 4 March, 8 April, 16 May, 32 June, 64 July, 128 August, 256 September, 512

Page 60: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 51

October, 1024 November, 2048 December

Agenda PERSON_CALE

NDAR OCCURRENCES int 4 10 0 0 0 1 0

The maximum number of occurrences. This parameter can be used with or instead of the END_DATE_TIME.

Agenda PERSON_CALE

NDAR OCCURRENCE_

NO int 4 10 0 0 0 1 0

A specific occurrence. 0 The last occurrence..., 1 The first occurrence..., 2 The second occurence..., ... etc

Agenda PERSON_CALE

NDAR OCCURRENCE_T

YPE int 4 10 0 0 0 1 0

How occurrences are grouped (partitioned) 1 ... of the week, 2 ... of the month, 3 ... of the year

Agenda PERSON_CALE

NDAR PERSON_ID udt_id 4 10 0 0 0 0 0 FK - PERSON

Agenda PERSON_CALE

NDAR PERSON_MEDIC

ATION_ID udt_id 4 10 0 0 0 1 0 NULL

Page 61: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 52

Agenda PERSON_CALE

NDAR PRICE smallmo

ney 4 10 4 0 0 1 0 NULL

Agenda PERSON_CALE

NDAR RECURRENCE_E

ND_DATE date 3 10 0 0 0 1 0 The end datetime of the Recurrence

Agenda PERSON_CALE

NDAR REMINDER_TIM

E int 4 10 0 0 0 0 0

Reminder time in minutes (negative values: notification before event)

Agenda PERSON_CALE

NDAR START_DATE_TI

ME datetime 8 23 3 0 0 0 0 The start datetime of the Calendar

Agenda PERSON_CALE

NDAR WEEK_DAY_PAT

TERN int 4 10 0 0 0 0 0

A bitwise pattern for which weekdays to return. You can add these together, so 1+8+32=41 means mondays, thursdays and saturdays. (1 Mondays, 2 Tuesdays, 4 Wednesdays, 8 Thursdays, 16 Fridays, 32 Saturdays, 64 Sundays)

Agenda PERSON_CALE

NDAR WEEK_FREQUE

NCY int 4 10 0 0 0 0 0 Week frequency

Agenda PERSON_CALE

NDAR YEAR_FREQUEN

CY int 4 10 0 0 0 0 0 Year frequency

Agenda PERSON_CALE

NDAR_TYPE CALENDAR_TYP

E_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

Agenda PERSON_CALE

NDAR_TYPE DESCRIPTION udt_desc

ription MAX 0 0 0 0 0 0 Description of the Record

Page 62: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 53

Agenda PERSON_CALE

NDAR_TYPE NAME udt_nam

e 400 0 0 0 0 0 0 Display name of the Record

Page 63: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 54

A.2. Medication Services

Schema Table Field Data Type Max Length

Precision Scale Primary Key

Identity Nullable Computed Description

CareWellness MEDICINE MEDICINE_ID udt_id 4 10 0 1 1 0 0 PK

(Autonumber)

CareWellness MEDICINE DESCRIPTION udt_description MAX 0 0 0 0 0 0 Description of the Medicine

CareWellness MEDICINE NAME udt_name 400 0 0 0 0 1 0

Display name of the

Medicine

CareWellness MEDICINE ROUTE_ID udt_id 4 10 0 0 0 1 0

FK - MEDICINE_RO

UTE

CareWellness MEDICINE_FREQ

UENCY FREQUENCY_ID udt_id 4 10 0 1 1 0 0 PK

(Autonumber)

CareWellness MEDICINE_FREQ

UENCY DESCRIPTION udt_description MAX 0 0 0 0 0 0

Description of the the

Frequency

CareWellness MEDICINE_FREQ

UENCY NAME udt_name 400 0 0 0 0 0 0

Display name of the

Frequency

Page 64: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 55

CareWellness MEDICINE_ROUT

E MEDICINE_ROU

TE_ID udt_id 4 10 0 1 1 0 0 PK

(Autonumber)

CareWellness MEDICINE_ROUT

E DESCRIPTION udt_description MAX 0 0 0 0 0 0

Description of the Medicine

Route

CareWellness MEDICINE_ROUT

E NAME udt_name 400 0 0 0 0 0 0

Display name of the

Medicine Route

CareWellness PERSON_MEDICA

TION PERSON_MEDIC

ATION_ID udt_id 4 10 0 1 1 0 0 NULL

CareWellness PERSON_MEDICA

TION COMMENTS udt_description MAX 0 0 0 0 1 0

Any comments for

this medications

CareWellness PERSON_MEDICA

TION DATE_END datetime 8 23 3 0 0 1 0 Medication

end date

CareWellness PERSON_MEDICA

TION DATE_START datetime 8 23 3 0 0 0 0 PK

CareWellness PERSON_MEDICA

TION DOSE udt_description MAX 0 0 0 0 1 0 The dose

instructions

Page 65: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 56

CareWellness PERSON_MEDICA

TION FREQUENCY_ID udt_id 4 10 0 0 0 1 0

FK - MEDICINE_FR

EQUENCY

CareWellness PERSON_MEDICA

TION MEDICINE_ID udt_id 4 10 0 0 0 0 0 PK - FK -

MEDICINE

CareWellness PERSON_MEDICA

TION PERSON_ID udt_id 4 10 0 0 0 0 0 PK - FK - PERSON

Page 66: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 57

A.3. Shopping List Assistance Services

Schema Table Field Data Type Max Length

Precision Scale Primary Key

Identity Nullable Computed Description

CareWellness

PERSON_SHOPPING_LIST PERSON_ID udt_id 4 10 0 1 0 0 0

PK- FK - PERSON

CareWellness

PERSON_SHOPPING_LIST

SHOPPING_ITEM udt_name 400 0 0 1 0 0 0

PK - The item description in the shopping list

CareWellness PRODUCTS PRODUCT_ID udt_id 4 10 0 1 0 0 0 NULL

CareWellness PRODUCTS

PRODUCT_NAME udt_name 400 0 0 0 0 0 0 NULL

CareWellness PRODUCTS UOM udt_name 400 0 0 0 0 0 0 NULL

Page 67: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 58

A.4. Object Location Assistance Services

Schema Table Field Data Type

Max Length

Precision Scale Primary Key

Identity Nullable Computed Description

KnowledgeBase

OBJECT_KEYWORDS KEYWORD

udt_name 400 0 0 1 0 0 0

PK - A registered keyword for the object

KnowledgeBase

OBJECT_KEYWORDS OBJECT_ID udt_id 4 10 0 1 0 0 0

PK - FK - OBJECT (KnowledgeBase)

KnowledgeBase OBJECT OBJECT_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

KnowledgeBase OBJECT DESCRIPTION

udt_description MAX 0 0 0 0 0 0

Description of the Record

KnowledgeBase OBJECT HEIGHT int 4 10 0 0 0 1 0 Object height in mm

KnowledgeBase OBJECT LENGTH int 4 10 0 0 0 1 0 Object length in mm

KnowledgeBase OBJECT NAME udt_name 400 0 0 0 0 0 0

Display name of the Record

KnowledgeBase OBJECT OBJECT_TYPE_ID udt_id 4 10 0 0 0 0 0

FK - OBJECT_TYPE

Page 68: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 59

KnowledgeBase OBJECT WIDTH int 4 10 0 0 0 1 0 Object width in mm

KnowledgeBase PERSON_OBJECTS OBJECT_ID udt_id 4 10 0 1 0 0 0

PK - FK - OBJECT (KnowledgeBase)

KnowledgeBase PERSON_OBJECTS PERSON_ID udt_id 4 10 0 1 0 0 0

PK - FK - PERSON

KnowledgeBase PERSON_OBJECTS

TYPICAL_LOCATION

udt_description MAX 0 0 0 0 0 0

The typical location of the Object

KnowledgeBase RESIDENCE

RESIDENCE_ID

udt_id 4 10 0 1 1 0 0 PK (Autonumber)

KnowledgeBase RESIDENCE

APARTMENT_NUMBER

udt_name

400 0 0 0 0 1 0 The apartment number of the Residence

KnowledgeBase RESIDENCE

CITY udt_name

400 0 0 0 0 1 0 The city of the Residence

KnowledgeBase RESIDENCE

COUNTRY_ID

udt_id 4 10 0 0 0 1 0 FK - COUNTRY

Page 69: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 60

KnowledgeBase RESIDENCE

HOUSE_NUMBER

udt_name

400 0 0 0 0 1 0 The house number of the Residence

KnowledgeBase RESIDENCE

RESIDENCE_TYPE_ID

udt_id 4 10 0 0 0 1 0 FK - RESIDENCE_TYPE

KnowledgeBase RESIDENCE

STREET_NAME

udt_name

400 0 0 0 0 1 0 The street name of the Residence

KnowledgeBase RESIDENCE

ZIP_CODE int 4 10 0 0 0 1 0 The zip code of the Residence

KnowledgeBase RESIDENCE_ROOM

RESIDENCE_ROOM_ID

udt_id 4 10 0 1 1 0 0 PK (Autonumber)

KnowledgeBase RESIDENCE_ROOM

DEPARTMENT

udt_name

400 0 0 0 0 1 0 The department of the Room

KnowledgeBase RESIDENCE_ROOM

FLOOR udt_name

400 0 0 0 0 1 0 The floor of the Room

KnowledgeBase RESIDENCE_ROOM

NAME udt_name

400 0 0 0 0 0 0 Display name of the Record

KnowledgeBase RESIDENCE_ROOM

RESIDENCE_ID

udt_id 4 10 0 0 0 0 0 FK - RESIDENCE

Page 70: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 61

KnowledgeBase RESIDENCE_ROOM

ROOM_NUMBER

udt_name

400 0 0 0 0 1 0 The Room number

KnowledgeBase RESIDENCE_ROOM

ROOM_TYPE_ID

udt_id 4 10 0 0 0 0 0 FK - RESIDENCE_ROOM_TYPE

KnowledgeBase RESIDENCE_ROOM_TYPE

ROOM_TYPE_ID

udt_id 4 10 0 1 1 0 0 PK (Autonumber)

KnowledgeBase RESIDENCE_ROOM_TYPE

DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

KnowledgeBase RESIDENCE_ROOM_TYPE

NAME udt_name

400 0 0 0 0 0 0 Display name of the Record

KnowledgeBase RESIDENCE_TYPE

RESIDENCE_TYPE_ID

udt_id 4 10 0 1 1 0 0 PK (Autonumber)

KnowledgeBase RESIDENCE_TYPE

DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

KnowledgeBase RESIDENCE_TYPE

NAME udt_name

400 0 0 0 0 0 0 Display name of the Record

Page 71: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 62

A.5. Physical Activity Services

Schema Table Field Data Type

Max Length

Precision

Scale Primary Key

Identity

Nullable

Computed

Description

Guidance PERSON_PHYSICAL_ACTIVITY_PROFILE

PERSON_ID udt_id 4 10 0 1 0 0 0 NULL

Guidance PERSON_PHYSICAL_ACTIVITY_PROFILE

PROFILE_ID udt_id 4 10 0 1 0 0 0 NULL

Guidance PERSON_PHYSICAL_ACTIVITY_VIDEO

PERSON_ID udt_id 4 10 0 1 0 0 0 NULL

Guidance PERSON_PHYSICAL_ACTIVITY_VIDEO

VIDEO_ID udt_id 4 10 0 1 0 0 0 NULL

Guidance PERSON_PHYSICAL_ACTIVITY_VIDEO

ASSIGNED_BY_PERSON_ID

udt_id 4 10 0 0 0 1 0 NULL

Guidance PERSON_PHYSICAL_ACTIVITY_VIDEO

DATE_ASSIGNED datetime

8 23 3 0 0 1 0 NULL

Guidance PERSON_PHYSICAL_ACTIVITY_VIDEO

TIMES_WATCHED int 4 10 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_CATEGORY

CATEGORY_ID udt_id 4 10 0 1 1 0 0 NULL

Guidance PHYSICAL_ACTIVITY_CATEGORY

CATEGORY_NAME udt_name

400 0 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_CATEGORY_PROFILE

CATEGORY_ID udt_id 4 10 0 1 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_CATEGORY_PROFILE

PROFILE_ID udt_id 4 10 0 1 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_PROFILE

PROFILE_ID udt_id 4 10 0 1 1 0 0 NULL

Guidance PHYSICAL_ACTIVITY_PROFILE

PROFILE_DESCRIPTION

nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_PROFILE

PROFILE_NAME nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_STAT PHYSICAL_ACTIVITY_ udt_id 4 10 0 1 1 0 0 NULL

Page 72: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 63

S STATS_ID

Guidance PHYSICAL_ACTIVITY_STATS

PERSON_ID udt_id 4 10 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_STATS

SERVICE_ID udt_id 4 10 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_STATS

WEEK datetime

8 23 3 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_STATS

WEEKLY_COUNTER int 4 10 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

VIDEO_ID udt_id 4 10 0 1 1 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

CATEGORY_ID udt_id 4 10 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

FRAME_PATH nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

VIDEO_DESCRIPTION nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

VIDEO_LENGTH int 4 10 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

VIDEO_NAME nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance PHYSICAL_ACTIVITY_VIDEO

VIDEO_PATH nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance VIDEO_FRAME VIDEO_FRAME_ID udt_id 4 10 0 1 1 0 0 NULL

Guidance VIDEO_FRAME FRAME_DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 NULL

Guidance VIDEO_FRAME FRAME_NAME udt_name

400 0 0 0 0 0 0 NULL

Guidance VIDEO_FRAME FRAME_PATH nvarchar

MAX 0 0 0 0 0 0 NULL

Guidance VIDEO_FRAME VIDEO_ID udt_id 4 10 0 0 0 0 0 NULL

Guidance WEEKLY_VIDEO_STATS WEEKLY_VIDEO_STA udt_id 4 10 0 1 1 0 0 NULL

Page 73: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 64

TS_ID

Guidance WEEKLY_VIDEO_STATS PERSON_ID udt_id 4 10 0 0 0 0 0 NULL

Guidance WEEKLY_VIDEO_STATS TIMES_WATCHED int 4 10 0 0 0 0 0 NULL

Guidance WEEKLY_VIDEO_STATS VIDEO_ID udt_id 4 10 0 0 0 0 0 NULL

Guidance WEEKLY_VIDEO_STATS WEEK datetime

8 23 3 0 0 0 0 NULL

Page 74: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 65

A.6. Event Services

Schema Table Field Data Type

Max Length

Precision Scale Primary Key

Identity Nullable Computed Description

EducationLeisure EVENTS EVENT_ID udt_id 4 10 0 1 1 0 0 (Autonumber)

EducationLeisure EVENTS

ACTIVITY_ID udt_id 4 10 0 0 0 0 0 FK - ACTIVITY

EducationLeisure EVENTS

CREATOR_ID udt_id 4 10 0 0 0 0 0 FK - PERSON

EducationLeisure EVENTS

DESCRIPTION

udt_description MAX 0 0 0 0 0 0

The description of the Event

EducationLeisure EVENTS

END_DATE_TIME datetime 8 23 3 0 0 0 0

The end datetime of the Event

EducationLeisure EVENTS

LOCATION_ID udt_id 4 10 0 0 0 1 0 FK - LOCATION

EducationLeisure EVENTS

MAX_PERSONS int 4 10 0 0 0 0 0 0: Unlimited

EducationLeisure EVENTS PRICE float 8 53 0 0 0 1 0 NULL

Page 75: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 66

EducationLeisure EVENTS

START_DATE_TIME datetime 8 23 3 0 0 0 0

The start datetime of the Event

EducationLeisure EVENTS TYPE int 4 10 0 0 0 0 0

1: Open, 2: Closed

Page 76: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 67

A.7. Meal Assistance Services

Schema Table Field Data Type

Max Length

Precision Scale Primary Key

Identity Nullable Computed Description

EducationLeisure

MEAL MEAL_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

EducationLeisure

MEAL DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

EducationLeisure

MEAL NAME udt_name

400 0 0 0 0 0 0 Display name of the Record

EducationLeisure

MEAL_RECIPES

MEAL_ID udt_id 4 10 0 1 0 0 0 PK - FK - MEAL

EducationLeisure

MEAL_RECIPES

RECIPE_ID udt_id 4 10 0 1 0 0 0 PK - FK - RECIPE

EducationLeisure

RECIPE RECIPE_ID udt_id 4 10 0 1 1 0 0 PK (Autonumber)

EducationLeisure

RECIPE COOKING_TYPE_ID

udt_id 4 10 0 0 0 0 0 FK - RECIPE_COOKING_TYPE

EducationLeisure

RECIPE DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

EducationLeisure

RECIPE DIFFICULTY

udt_grade

8 53 0 0 0 0 0 The difficulty level of the recipe

Page 77: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 68

EducationLeisure

RECIPE IS_GLUTEN_FREE

bit 1 1 0 0 0 0 0 Flag the recipe as Gluten Free

EducationLeisure

RECIPE IS_HIGH_FIBER

bit 1 1 0 0 0 0 0 Flag the recipe as High Fiber

EducationLeisure

RECIPE IS_KOSHER

bit 1 1 0 0 0 0 0 Flag the recipe as Kosher

EducationLeisure

RECIPE IS_LOW_CAL

bit 1 1 0 0 0 0 0 Flag the recipe as Low Cal

EducationLeisure

RECIPE IS_LOW_CARB

bit 1 1 0 0 0 0 0 Flag the recipe as Low Carb

EducationLeisure

RECIPE IS_LOW_FAT

bit 1 1 0 0 0 0 0 Flag the recipe as Low Fat

EducationLeisure

RECIPE IS_NO_SUGAR

bit 1 1 0 0 0 0 0 Flag the recipe as No Sugar

EducationLeisure

RECIPE IS_VEGETARIAN

bit 1 1 0 0 0 0 0 Flag the recipe as Vegetarian

EducationLeisure

RECIPE NAME udt_name

400 0 0 0 0 0 0 Display name

EducationLeisure

RECIPE RECIPE_TYPE_ID

udt_id 4 10 0 0 0 0 0 FK - RECIPE_TYPE

Page 78: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 69

EducationLeisure

RECIPE TIME_IN_MINUTES

int 4 10 0 0 0 0 0 Preparation of the recipe in minutes

EducationLeisure

RECIPE VIDEO_LINK

udt_description

MAX 0 0 0 0 1 0 NULL

EducationLeisure

RECIPE_COOKING_TYPE

COOKING_TYPE_ID

udt_id 4 10 0 1 1 0 0 PK (Autonumber)

EducationLeisure

RECIPE_COOKING_TYPE

DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

EducationLeisure

RECIPE_COOKING_TYPE

NAME udt_name

400 0 0 0 0 0 0 Display name of the Record

EducationLeisure

RECIPE_INGREDIENTS

INGREDIENT_ID

udt_id 4 10 0 1 0 0 0 PK - FK - INGREDIENT

EducationLeisure

RECIPE_INGREDIENTS

RECIPE_ID udt_id 4 10 0 1 0 0 0 PK - FK - RECIPE

EducationLeisure

RECIPE_INGREDIENTS

AMOUNT float 8 53 0 0 0 0 0 Amount of the Ingredient in the Recipe

EducationLeisure

RECIPE_INGREDIENTS

DETAILS udt_description

MAX 0 0 0 0 0 0 Details of the Record

EducationLeisure

RECIPE_INGREDIENTS

UOM udt_name

400 0 0 0 0 0 0 Unit of Measurement

Page 79: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 70

EducationLeisure

RECIPE_STEPS

RECIPE_ID udt_id 4 10 0 1 0 0 0 PK - FK - RECIPE

EducationLeisure

RECIPE_STEPS

STEP_NUMBER

int 4 10 0 1 0 0 0 PK - Step number

EducationLeisure

RECIPE_STEPS

DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

EducationLeisure

RECIPE_TYPE

RECIPE_TYPE_ID

udt_id 4 10 0 1 1 0 0 PK (Autonumber)

EducationLeisure

RECIPE_TYPE

DESCRIPTION

udt_description

MAX 0 0 0 0 0 0 Description of the Record

EducationLeisure

RECIPE_TYPE

NAME udt_name

400 0 0 0 0 0 0 Display name of the Record

Page 80: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 71

Appendix B Service Description

B.1.1. Agenda

Method Name: LIST_PERSON_AGENDA_FEEDBACK

Description: Retrieves a list of all PersonAgendaFeedback objects from table PERSON_AGENDA_FEEDBACK

Input Data: Name Type

NULL NULL

Output Type: AgendaItemFeedback[]

Method Name: LIST_PERSON_CALENDAR_TYPE

Description: Retrieves a list of all PersonCalendarType objects from table PERSON_CALENDAR_TYPE.

Input Data: Name Type

NULL NULL

Output Type: PersonCalendarType[]

Method Name: DELETE_PERSON_AGENDA

Description: Deletes an existing record from table PERSON_AGENDA

Input Data: Name Type

AGENDA_ID int

Output Type: Boolean

Method Name: DELETE_PERSON_AGENDA_FEEDBACK

Description: Deletes an existing record from table AGENDA_FEEDBACK

Input Data: Name Type

FEEDBACK_ID int

Output Type: Boolean

Method Name: DELETE_PERSON_CALENDAR

Description: Deletes an existing record from table PERSON_CALENDAR

Input Data: Name Type

CALENDAR_ID int

Output Type: Boolean

Method Name: DELETE_PERSON_CALENDAR_TYPE

Description: Deletes an existing record from table PERSON_CALENDAR_TYPE

Page 81: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 72

Input Data: Name Type

CALENDAR_TYPE_ID int

Output Type: Boolean

Method Name: GET_PERSON_AGENDA

Description: Retrieves a PersonAgenda object.

Input Data: Name Type

AGENDA_ID int

Output Type: PersonAgenda

Method Name: GET_PERSON_CALENDAR_TYPE

Description: Retrieves a PersonCalendarType object.

Input Data: Name Type

CALENDAR_TYPE_ID int

Output Type: PersonCalendarType

Method Name: GET_PERSON_CALENDAR_ITEM

Description: Retrieves a Calendar_Item object.

Input Data: Name Type

CALENDAR_ID int

Output Type: CalendarItem

Method Name: GET_PERSON_CALENDAR_ITEMS

Description: Retrieves a list with CalendarItem objects.

Input Data: Name Type

PERSON_ID int

Output Type: CalendarItem[]

Method Name: GET_PERSON_AGENDA_FEEDBACK

Description: Retrieves a AgendaItemFeedback object.

Input Data: Name Type

FEEDBACK_ID int

Output Type: AgendaItemFeedback

Page 82: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 73

Method Name: GET_PERSON_AGENDA_START_END_DATE

Description: Retrieves a list with AgendaItem objects for a custom range of days

Input Data: Name Type

PERSON_ID START_DATE END_DATE

int Timestamp Timestamp

Output Type: AgendaItem[]

Method Name: GET_PERSON_DAILY_AGENDA

Description: Retrieves a list with AgendaItem objects for the current day

Input Data: Name Type

PERSON_ID START_DATE

int Timestamp

Output Type: AgendaItem[]

Method Name: GET_PERSON_WEEKLY_AGENDA

Description: Retrieves a list with AgendaItem objects for the current week

Input Data: Name Type

PERSON_ID START_DATE

int Timestamp

Output Type: AgendaItem[]

Method Name: GET_PERSON_MONTHLY_AGENDA

Description: Retrieves a list with AgendaItem objects for the current month

Input Data: Name Type

PERSON_ID START_DATE

int Timestamp

Output Type: AgendaItem[]

Method Name: INSERT_PERSON_AGENDA

Description: Inserts a new record into table PERSON_AGENDA

Input Data: Name Type

CALENDAR_ID int ACTION_ID int START_DATE_TIME Date END_DATE_TIME Date DESCRIPTION String CALENDAR_TYPE_ID int

Page 83: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 74

Output Type: Boolean

Method Name: INSERT_PERSON_AGENDA_FEEDBACK

Description: Inserts a new record into table PERSON_AGENDA_FEEDBACK

Input Data: Name Type

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_PERSON_CALENDAR

Description: Inserts a new record into table PERSON_CALENDAR

Input Data: Name Type

PERSON_ID int START_DATE_TIME Date END_DATE_TIME Date ACTIVITY_ID int DESCRIPTION String CALENDAR_TYPE_ID int

Output Type: Boolean

Method Name: INSERT_PERSON_CALENDAR_TYPE

Description: Inserts a new record into table PERSON_CALENDAR_TYPE

Input Data: Name Type

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_PERSON_WEEKLY_CALENDAR

Description: Inserts a new weekly record for a person into table CALENDAR

Input Data: Name Type

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_PERSON_MONTHLY_CALENDAR

Description: Inserts a new monthly record for a person into table CALENDAR

Input Data: Name Type

Page 84: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 75

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_PERSON_EVENT_AS_CALENDAR

Description: Creates a single Calendar Item once into table PERSON_MONTHLY_CALENDAR

Input Data: Name Type

PERSON_ID int Event event

Output Type: boolean

Method Name: UPDATE_PERSON_AGENDA

Description: Updates an existing record from table PERSON_AGENDA

Input Data: Name Type

AGENDA_ID int CALENDAR_ID int ACTION_ID int START_DATE_TIME Date END_DATE_TIME Date DESCRIPTION String CALENDAR_TYPE_ID int

Output Type: Boolean

Method Name: UPDATE_PERSON_AGENDA_FEEDBACK

Description: Updates an existing record from table PERSON_AGENDA_feedback

Input Data: Name Type

FEEDBACK_ID NAME DESCRIPTION

Int String String

Output Type: boolean

Method Name: UPDATE_PERSON_AGENDA_SET_FEEDBACK

Description: Sets the feedback of table PERSON_AGENDA

Input Data: Name Type

AGENDA_ID int FEEDBACK_ID int

Output Type: boolean

Page 85: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 76

Method Name: UPDATE_PERSON_CALENDAR

Description: Updates an existing record from table PERSON_CALENDAR

Input Data: Name Type

CALENDAR_ID int PERSON_ID int START_DATE_TIME Date END_DATE_TIME Date ACTIVITY_ID int DESCRIPTION String CALENDAR_TYPE_ID int

Output Type: Boolean

Method Name: UPDATE_PERSON_CALENDAR_TYPE

Description: Updates an existing record from table PERSON_CALENDAR_TYPE

Input Data: Name Type

CALENDAR_TYPE_ID int NAME String DESCRIPTION String

Output Type: Boolean

Method Name: DAEMON_AGENDA

Description: Periodically invoked by the agenda daemon thread to create agenda items from calendar items.

Input Data: Name Type

NULL NULL

Output Type: VOID

Method Name: INSERT_INVITATIONS

Description: Insert new invitation to table INVITATION

Input Data: Name Type

FROM_ID int TO_ID int CALENDAR_ID int

Output Type: Boolean

Page 86: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 77

Method Name: DELETE_INVITATIONS

Description: Deletes a record from table INVITATION based on invitation id

Input Data: Name Type

INVITATION_ID int

Output Type: Boolean

Method Name: UPDATE_INVITATIONS_STATUS

Description: Updates the status of record in table INVITATION based on invitation id

Input Data: Name Type

INVITATION_ID int STATUS int

Output Type: Boolean

Method Name: GET_INVITATION

Description: Retrieves an invitation object from table INVITATION based on invitation id

Input Data: Name Type

INVITATION_ID int

Output Type: Invitation

Method Name: GET_INVITATIONS_BY_SENDER

Description: Retrieves a list of invitation objects from table INVITATION based on invitation id

Input Data: Name Type

FROM_ID int

Output Type: Invitation[]

Method Name: GET_INVITATIONS_BY_RECEIVER

Description: Retrieves a list of invitation objects from table INVITATION based on invitation id

Input Data: Name Type

TO_ID int

Page 87: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 78

Output Type: Invitation[]

Method Name: GET_INVITATIONS_BY_RECEIVER_NEW

Description: Gets a list of invitation objects from table INVITATION with status 0

Input Data: Name Type

TO_ID int

Output Type: Invitation[]

Method Name: GET_INVITATIONS_BY_RECEIVER_ACCEPTED

Description: Gets a list of invitation objects from table INVITATION with status 1

Input Data: Name Type

TO_ID int

Output Type: Invitation[]

Method Name: GET_INVITATIONS_BY_RECEIVER_REJECTED

Description: Gets a list of invitation objects from table INVITATION with status 2

Input Data: Name Type

TO_ID int

Output Type: Invitation[]

Method Name: GET_PERSON_TODAY_AGENDA

Description: Retrieves today’s PersonAgenda object based on person id

Input Data: Name Type

PERSON_ID int

Output Type: AgendaItem[]

Method Name: GET_PERSON_TOMORROW_AGENDA

Description: Retrieves tomorrow’s PersonAgenda object based

Page 88: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 79

on person id

Input Data: Name Type

PERSON_ID int

Output Type: AgendaItem[]

Method Name: GET_PERSON_WEEKDAY_AGENDA

Description: Retrieves object based on day_of_week

Input Data: Name Type

PERSON_ID int day_of_week int

Output Type: AgendaItem[]

Method Name: GET_AGENDA_ITEM_PARTICIPANTS

Description: Retrieves all participants of a particular agenda item

Input Data: Name Input Data:

AGENDA_ID int

Output Type: Boolean

Method Name: GET_PERSON_DAILY_AGENDA_TASKS

Description: Gets a list of Agenda Items based on user Tasks

Input Data: Name Input Data:

PERSON_ID START_DATE_TIME

int Timestamp

Output Type: AgendaItem[]

Method Name: GET_PERSON_DAILY_AGENDA

Description: Gets a list of Agenda Items given a list of calendar types

Input Data: Name Input Data:

PERSON_ID START_DATE_TIME CALENDAR_TYPES[]

int Timestamp int

Output Type: AgendaItem[]

Page 89: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 80

Method Name: GET_PERSON_DAILY_AGENDA

Description: Gets a list of Agenda Items given a calendar type

Input Data: Name Input Data:

PERSON_ID START_DATE_TIME CALENDAR_TYPE

int Timestamp int

Output Type: AgendaItem[]

Method Name: GET_PERSON_ YESTERDAY_AGENDA

Description: Gets a list of Agenda Items

Input Data: Name Input Data:

PERSON_ID int

Output Type: AgendaItem[]

Method Name: GET_INVITATIONS_BY_RECEIVER_NEW_NO_NOTIFICATION

Description: Gets a list of past Invitations

Input Data: Name Input Data:

TO_ID int

Output Type: Invitation[]

Method Name: INSERT_PERSON_CALENDAR_TASK

Description: Gets a list of past Invitations

Input Data: Name Input Data:

PERSON_ID START_DATE_TIME DESCRIPTION LOCATION_ID

int Timestamp String int

Output Type: int

Method Name: INSERT_PERSON_AGENDA_FEEDBACK

Description: Inserts person agenda feedback

Input Data: Name Input Data:

NAME DESCRIPTION

String String

Output Type: boolean

Page 90: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 81

Method Name: INSERT_EVENT_AS_PERSON_CALENDAR

Description: Inserts an event as a new person calendar record

Input Data: Name Input Data:

PERSON_ID EVENT_ID REMINDER_TIME

int int int

Output Type: boolean

Method Name: CHECK_CONFLICT_EVENT

Description: Checks whether an event conflicts with another event

Input Data: Name Input Data:

START_DATE_TIME END_DATE_TIME

Timestamp Timestamp

Output Type: boolean

Method Name: CHECK_CONFLICT_PERSON_ACTIVITY

Description: Checks if an event conflicts with a person’s existing activity

Input Data: Name Input Data:

START_DATE_TIME END_DATE_TIME PERSON_ID

Timestamp Timestamp int

Output Type: boolean

Method Name: INSERT_PERIODIC_ADVICE

Description: Insert a new periodic advice

Input Data: Name Input Data:

PERSON_ID START_DATE_TIME END_DATE_TIME ACTIVITY_ID DESCRIPTION LOCATION_ID CALENDAR_TYPE_ID REMINDER_TIME WEEK_DAY_PATTERN DAY_FREQUENCY EXACT_DAY OCCURRENCE_NO OCCURRENCE_TYPE WEEK_FREQUENCY EXACT_WEEK MONTH_PATTERN MONTH_FREQUENCY

int Timestamp Timestamp int String int int int int int int int int int int int int

Page 91: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 82

YEAR_FREQUENCY OCCURRENCES RECURRENCE_END_DATE MEDICINE_ID IS_EVENT EVENT_ID PRICE

int int java.sql.Date int int int double

Output Type: boolean

B.1.2. Medication

Method Name: DELETE_MEDICINE

Description: Deletes an existing record from table MEDICINE

Input Data: Name Type

MEDICINE_ID int

Output Type: Boolean

Method Name: DELETE_MEDICINE_FREQUENCY

Description: Deletes an existing record from table MEDICINE_FREQUENCY

Input Data: Name Type

FREQUENCY_ID int

Output Type: Boolean

Method Name: DELETE_MEDICINE_ROUTE

Description: Deletes an existing record from table MEDICINE_ROUTE

Input Data: Name Type

MEDICINE_ROUTE_ID int

Output Type: Boolean

Method Name: DELETE_PERSON_MEDICATION

Description: Deletes an existing record from table PERSON_MEDICATION

Input Data: Name Type

MEDICINE_ID int PERSON_ID int

Output Type: Boolean

Method Name: GET_MEDICINE

Description: Retrieves a Medicine object.

Input Data: Name Type

Page 92: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 83

MEDICINE_ID int

Output Type: Medicine

Method Name: GET_MEDICINE_FREQUENCY

Description: Retrieves a MedicineFrequency object.

Input Data: Name Type

FREQUENCY_ID int

Output Type: MedicineFrequency

Method Name: GET_MEDICINE_ROUTE

Description: Retrieves a MedicineRoute object.

Input Data: Name Type

MEDICINE_ROUTE_ID int

Output Type: MedicineRoute

Method Name: GET_PERSON_MEDICATION

Description: Retrieves a PersonMedication object.

Input Data: Name Type

MEDICINE_ID int PERSON_ID int DATE_START Date MEDICINE_ID int PERSON_ID int DATE_START Date

Output Type: PersonMedication

Method Name: GET_PERSON_MEDICATIONS

Description: Retrieves a list of PersonMedication objects.

Input Data: Name Type

PERSON_ID int

Output Type: PersonMedication[]

Method Name: GET_PERSON_ACTIVE_MEDICATIONS

Description: Retrieves a list of PersonMedication objects that are active for an elder.

Input Data: Name Type

Page 93: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 84

PERSON_ID int

Output Type: PersonMedication[]

Method Name: INSERT_MEDICINE

Description: Inserts a new record into table MEDICINE

Input Data: Name Type

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_MEDICINE_FREQUENCY

Description: Inserts a new record into table MEDICINE_FREQUENCY

Input Data: Name Type

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_MEDICINE_ROUTE

Description: Inserts a new record into table MEDICINE_ROUTE

Input Data: Name Type

NAME String DESCRIPTION String

Output Type: Boolean

Method Name: INSERT_PERSON_MEDICATION

Description: Inserts a new record into table PERSON_MEDICATION

Input Data: Name Type

MEDICINE_ID int PERSON_ID int DATE_START Timestamp DATE_END Timestamp FREQUENCY_ID int DOSE String COMMENTS String

Output Type: Boolean

Page 94: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 85

Method Name: INSERT_PERSON_MEDICATION

Description: Inserts a new record into table PERSON_MEDICATION

Input Data: Name Type

MEDICINE_ID int PERSON_ID int DATE_START Timestamp DATE_END Timestamp FREQUENCY_ID int DOSE String COMMENTS

REMINDER_TIME INT

Output Type: Boolean

Method Name: LIST_MEDICINE

Description: Retrieves a list of all Medicine objects from table MEDICINE.

Input Data: Name Type

NULL NULL

Output Type: Medicine[]

Method Name: LIST_MEDICINE_FREQUENCY

Description: Retrieves a list of all MedicineFrequency objects from table MEDICINE_FREQUENCY.

Input Data: Name Type

NULL NULL

Output Type: MedicineFrequency[]

Method Name: LIST_MEDICINE_ROUTE

Description: Retrieves a list of all MedicineRoute objects from table MEDICINE_ROUTE.

Input Data: Name Type

NULL NULL

Output Type: MedicineRoute[]

Method Name: UPDATE_MEDICINE

Description: Updates an existing record from table MEDICINE

Input Data: Name Type

MEDICINE_ID int NAME String DESCRIPTION String ROUTE_ID int

Output Type: Boolean

Page 95: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 86

Method Name: UPDATE_MEDICINE_FREQUENCY

Description: Updates an existing record from table MEDICINE_FREQUENCY

Input Data: Name Type

FREQUENCY_ID int NAME String DESCRIPTION String

Output Type: Boolean

Method Name: UPDATE_MEDICINE_ROUTE

Description: Updates an existing record from table MEDICINE_ROUTE

Input Data: Name Type

MEDICINE_ROUTE_ID int NAME String DESCRIPTION String

Output Type: Boolean

Method Name: UPDATE_PERSON_MEDICATION

Description: Updates an existing record from table PERSON_MEDICATION

Input Data: Name Type

MEDICINE_ID int PERSON_ID int DATE_START Timestamp DATE_END Timestamp FREQUENCY_ID int DOSE String COMMENTS String

Output Type: Boolean

Page 96: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 87

B.1.3. Shopping List Assistance

Method Name: INSERT_PERSON_SHOPPING_LIST

Description: Inserts a record to table PERSON_SHOPPING_LIST

Input Data: Name Type

PERSON_ID SHOPPING_ITEM

int String

Output Type: Boolean

Method Name: DELETE_PERSON_SHOPPING_LIST

Description: Deletes an existing record from table PERSON_SHOPPING_LIST

Input Data: Name Type

PERSON_ID SHOPPING_ITEM

int String

Output Type: Boolean

Method Name: GET_PERSON_SHOPPING_LIST

Description: Retrieves a list of all shopping list items from table PERSON_SHOPPING_LIST

Input Data: Name Type

PERSON_ID int

Output Type: PersonShoppingList[]

Method Name: SEND_SHOPPING_LIST

Description: Sends the complete shopping list to a particular person

Input Data: Name Type

PERSON_ID RECEIVER_ID

int int

Output Type: Boolean

Method Name: DELETE_PERSON_SHOPPING_LIST_ALL

Description: Update all existing shopping lists of a particular person (i.e., elderly user

Input Data: Name Type

PERSON_ID int

Output Type: Boolean

Method Name: INSERT_PRODUCT

Description: Insert a new record to table PRODUCT

Input Data: Name Type

PRODUCT_ID PRODUCT_NAME

int String

Page 97: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 88

UOM String

Output Type: Boolean

Method Name: UPDATE_PRODUCT

Description: Update an existing record to table PRODUCT

Input Data: Name Type

PRODUCT_ID PRODUCT_NAME UOM

int String String

Output Type: Boolean

Method Name: DELETE_PRODUCT

Description: Delete an existing record from table PRODUCT

Input Data: Name Type

PRODUCT_ID int

Output Type: Boolean

Method Name: LIST_PRODUCT

Description: Get a list with all available products of table PRODUCT

Input Data: Name Type

Output Type: Products[]

Method Name: GET_PRODUCT

Description: Returns a product from table PRODUCT

Input Data: Name Type

PRODUCT_ID int

Output Type: Products

Method Name: GET_PRODUCT_UOM

Description: Gets the Unit of Measurement of a particular product

Input Data: Name Type

PRODUCT_NAME String

Output Type: String

Page 98: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 89

B.1.4. Object Location Assistance

Method Name: INSERT_PERSON_OBJECTS

Description: Correlates an existing object with a person and stores its typical location for this specific person.

Input Data: Name Type

PERSON_ID int OBJECT_ID int OBJECT_TYPICAL_LOCATION String

Output Type: Boolean

Method Name: UPDATE_PERSON_OBJECTS

Description: Updates the typical location of a specific object and person.

Input Data: Name Type

PERSON_ID int OBJECT_ID int OBJECT_TYPICAL_LOCATION String

Output Type: Boolean

Method Name: DELETE_PERSON_OBJECTS

Description: Dissociates an existing object with a person.

Input Data: Name Type

PERSON_ID int OBJECT_ID int

Output Type: Boolean

Method Name: GET_PERSON_OBJECTS

Description: Retrieves a list of Objects with their typical storage locations after a specific person has inserted the information in the system.

Input Data: Name Type

PERSON_ID int

Output Type: PersonObject[]

Method Name: GET_PERSON_OBJECT

Description: Retrieves on object that a specific person possesses with its typical location.

Input Data: Name Type

PERSON_ID int OBJECT_ID int

Output Type: PersonObject

Page 99: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 90

Method Name: GET_PERSON_OBJECT_BY_KEYWORD

Description: Retrieves a list of Objects that a specific person posses with their typical locations filtered by a specific keyword.

Input Data: Name Type

PERSON_ID int KEYWORD String

Output Type: PersonObject[]

Method Name: INSERT_PERSON_OBJECT_WITH_MONITORING

Description: Correlates an existing object with a person and stores its typical location for this specific person.

Input Data: Name Type

PERSON_ID int OBJECT_ID int TYPICAL_OBJECT_LOCATION_ID int TYPICAL_LOCATION_SEMANTICS_ID int

Output Type: Boolean

Method Name: UPDATE_PERSON_OBJECT_WITH_MONITORING

Description: Updates correlation between an existing object with a person.

Input Data: Name Type

PERSON_ID int OBJECT_ID int TYPICAL_OBJECT_LOCATION_ID int TYPICAL_LOCATION_SEMANTICS_ID int

Output Type: Boolean

Method Name: LIST_KB_OBJECTS

Description: Retrieves array of objects from OBJECT table of type Personal Items/Accessories only.

Input Data: Name Type

Output Type: KB_Object[]

Method Name: INSERT_KB_OBJECT

Description: Inserts new object that the person can have.

Input Data: Name Type

NAME String DESCRIPTION String

Page 100: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 91

OBJECT_TYPE_ID int LENGTH int

WIDTH int

HEIGHT int

Output Type: int

Method Name: DELETE_KB_OBJECT

Description: Deletes an object that the person can have.

Input Data: Name Type

OBJECT_ID int

Output Type: boolean

Method Name: LIST_KB_OBJECTS_FOR_PERSON

Description: Lists all existing objects from table KB_OBJECT that the person didn’t store yet.

Input Data: Name Type

PERSON_ID int

Output Type: KB_Object[]

Method Name: LIST_LOCATIONS_IN_ROOM

Description: Lists all possible locations where an object can be stored for a particular residence room, belonging to residence where person lives.

Input Data: Name Type

RESIDENCE_ROOM_ID int

Output Type: ObjectLocation[]

Method Name: LIST_LOCATION_SEMANTICS

Description: Lists all possible semantic positions where an object can be stored for a particular residence room, belonging to residence where person lives.

Input Data: Name Type

Output Type: LocationSemantic[]

Method Name: GET_OBJECT_LATEST_LOCATION

Description: Retrieve the last know location, comprised of room and place including semantic information, of a person’s specific object – based either on real time camera information or information previously inserted by the person.

Page 101: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 92

Input Data: Name Type

PERSON_ID int OBJECT_ID int

Output Type: ObjectLocation

Method Name: GET_OBJECT_TYPICAL_LOCATION

Description: Retrieve the typical location, comprised of room and place including semantic information, where a person stores a specific object – based on information previously inserted by the person.

Input Data: Name Type

PERSON_ID int OBJECT_ID int

Output Type: ObjectLocation

Page 102: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 93

B.1.5. Event Service

Method Name: LIST_EVENTS

Description: Retrieves a list of all Event objects from table EVENTS.

Input Data: Name Type

NULL NULL

Output Type: Event[]

Method Name: INSERT_EVENT_WITH_LOCATION

Description: Inserts a new event record with location details into table EVENTS.

Input Data: Name Type

ACTIVITY_ID START_DATE_TIME END_DATE_TIME DESCRIPTION LOCATION_ID

int Timestamp Timestamp String int

Output Type: boolean

Method Name: INSERT_EVENT

Description: Inserts a new event record into table EVENTS.

Input Data: Name Type

ACTIVITY_ID START_DATE_TIME END_DATE_TIME DESCRIPTION

int Timestamp Timestamp String

Output Type:

Method Name: DELETE_EVENT

Description: Deletes an existing record from table EVENTS.

Input Data: Name Type

EVENT_ID int

Page 103: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 94

Output Type: boolean

Method Name: GET_EVENT

Description: Retrieves an Event object.

Input Data: Name Type

EVENT_ID int

Output Type: Event

Method Name: GET_DAILY_EVENTS

Description: Retrieves a list with Event objects for the current day.

Input Data: Name Type

START_DATE_TIME Timestamp

Output Type: Event[]

Method Name: GET_WEEKLY_EVENTS

Description: Retrieves a list with Event objects for the current week.

Input Data: Name Type

START_DATE_TIME Timestamp

Output Type: Event[]

Method Name: GET_MONTHLY_EVENTS

Description: Retrieves a list with Event objects for the current month.

Input Data: Name Type

START_DATE_TIME Timestamp

Output Type: Event[]

Page 104: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 95

Method Name: GET_EVENTS_BY_START_END_DATE

Description: Retrieves a list with Event objects for a particular date range.

Input Data: Name Type

START_DATE_TIME Timestamp END_DATE_TIME); Timestamp

Output Type: Event[]

Method Name: UPDATE_EVENT_WITH_LOCATION

Description: Updates an existing record from table EVENTS by deleting the existing record and creating a new updating at the same time the location information associated to it

Input Data: Name Type

EVENT_ID ACTIVITY_ID START_DATE_TIME END_DATE_TIME DESCRIPTION LOCATION_ID

int int Timestamp Timestamp String int

Output Type: boolean

Method Name: UPDATE_EVENT

Description: Updates an existing record from table EVENTS by deleting the existing record and creating a new

Input Data: Name Type

EVENT_ID ACTIVITY_ID START_DATE_TIME END_DATE_TIME DESCRIPTIO

int int Timestamp Timestamp String

Output Type: boolean

Page 105: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 96

Method Name: GET_EVENTS_BY_START_END_DATE

Description: Retrieves a list with Event objects for a particular date range and activity type.

Input Data: Name Type

START_DATE_TIME Timestamp END_DATE_TIME

ACTIVITY_TYPE_ID Timestamp int

Output Type: Event[]

Method Name: GET_EVENTS_TOMORROW

Description: Retrieves a list with Event objects for tomorrow.

Input Data: Name Type

Output Type: Event[]

Method Name: GET_EVENTS_YESTERDAY

Description: Retrieves a list with Event objects for yesterday.

Input Data: Name Type

Output Type: Event[]

Method Name: GET_EVENTS_TODAY

Description: Retrieves a list with Event objects for today.

Input Data: Name Type

Output Type: Event[]

Page 106: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 97

B.1.6. Meal Assistance

Method Name: LIST_MEAL

Description: Retrieves a list of all Meal objects from table MEAL.

Input Data: Name Type

NULL NULL

Output Type: Meal[]

Method Name: LIST_RECIPE

Description: Retrieves a list of all Recipe objects from table RECIPE.

Input Data: Name Type

NULL NULL

Output Type: Recipe[]

Method Name: LIST_RECIPE_COOKING_TYPE

Description: Retrieves a list of all RecipeCookingType objects from table RECIPE_COOKING_TYPE.

Input Data: Name Type

NULL NULL

Output Type: RecipeCookingType[]

Method Name: LIST_RECIPE_TYPE

Description: Retrieves a list of all RecipeType objects from table RECIPE_TYPE.

Input Data: Name Type

NULL NULL

Output Type: RecipeType[]

Page 107: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 98

Method Name: INSERT_MEAL

Description: Inserts a new event record into table MEAL.

Input Data: Name Type

NAME DESCRIPTION

String String

Output Type:

Method Name: INSERT_RECIPE_COOKING_TYPE

Description: Inserts a new event record into table RECIPE_COOKING_TYPE.

Input Data: Name Type

NAME DESCRIPTION

String String

Output Type: boolean

Method Name: INSERT_RECIPE_TYPE

Description: Inserts a new event record into table RECIPE_TYPE.

Input Data: Name Type

NAME DESCRIPTION

String String

Output Type: boolean

Method Name: INSERT_RECIPE

Description: Inserts a new event record into table RECIPE.

Input Data: Name Type

NAME, DESCRIPTION RECIPE_TYPE_ID DIFFICULTY TIME_IN_MINUTES COOKING_TYPE_ID IS_LOW_CARB IS_HIGH_FIBER IS_LOW_FAT IS_KOSHER IS_VEGETARIAN IS_LOW_CAL IS_NO_SUGAR IS_GLUTEN_FREE VIDEO_LINK

String String int int int int boolean boolean boolean boolean Boolean String

Output Type: boolean

Page 108: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 99

Method Name: INSERT_RECIPE_INGREDIENTS

Description: Inserts a new event record into table RECIPE_INGREDIENTS.

Input Data: Name Type

RECIPE_ID INGREDIENT_ID AMOUNT DETAILS UOM

int int int String int

Output Type: boolean

Method Name: INSERT_RECIPE_STEPS

Description: Inserts a new event record into table RECIPE_STEPS.

Input Data: Name Type

RECIPE_ID STEP_NUMBER DESCRIPTION

int int String

Output Type: boolean

Method Name: INSERT_MEAL_RECIPES

Description: Inserts a new event record into table MEAL_RECIPES.

Input Data: Name Type

MEAL_ID

int

RECIPE_ID int

Output Type: boolean

Method Name: DELETE_MEAL

Description: Deletes an existing record from table MEAL.

Input Data: Name Type

MEAL_ID int

Output Type: boolean

Page 109: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 100

Method Name: DELETE_RECIPE

Description: Deletes an existing record from table RECIPE.

Input Data: Name Type

RECIPE_ID int

Output Type: boolean

Method Name: DELETE_RECIPE_COOKING_TYPE

Description: Deletes an existing record from table RECIPE_COOKING_TYPE.

Input Data: Name Type

COOKING_TYPE_ID int

Output Type: boolean

Method Name: DELETE_RECIPE_TYPE

Description: Deletes an existing record from table RECIPE_TYPE.

Input Data: Name Type

COOKING_TYPE_ID int

Output Type: boolean

Method Name: DELETE_RECIPE_INGREDIENTS

Description: Deletes an existing record from table RECIPE_INGREDIENTS.

Input Data: Name Type

RECIPE_ID INGREDIENT_ID

int int

Output Type: boolean

Method Name: DELETE_RECIPE_STEPS

Description: Deletes an existing record from table RECIPE_STEPS.

Page 110: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 101

Input Data: Name Type

RECIPE_ID int STEP_NUMBER int

Output Type: boolean

Method Name: DELETE_MEAL_RECIPES

Description: Deletes an existing record from table MEAL_RECIPES.

Input Data: Name Type

MEAL_ID int RECIPE_ID int

Output Type: boolean

Method Name: GET_MEAL

Description: Retrieves a MEAL object.

Input Data: Name Type

MEAL_ID int

Output Type: Meal

Method Name: GET_RECIPE

Description: Retrieves a RECIPE object.

Input Data: Name Type

RECIPE_ID int

Output Type: Recipe

Method Name: GET_RECIPE_COOKING_TYPE

Description: Retrieves a RECIPE_COOKING_TYPE object.

Input Data: Name Type

COOKING_TYPE_ID int

Page 111: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 102

Output Type: RecipeCookingType

Method Name: GET_RECIPE_TYPE

Description: Retrieves a RECIPE_TYPE object.

Input Data: Name Type

COOKING_TYPE_ID int

Output Type: RecipeType

Method Name: GET_RECIPE_INGREDIENTS

Description: Retrieves a list of Recipe objects from table RECIPE_INGREDIENTS.

Input Data: Name Type

RECIPE_ID int

Output Type: RecipeIngredient[]

Method Name: GET_RECIPE_STEPS

Description: Retrieves a list of RecipeStep objects from table RECIPE_STEPS.

Input Data: Name Type

RECIPE_ID int

Output Type: RecipeStep[]

Method Name: GET_RECIPES_BY_INGREDIENT

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by ingredient.

Input Data: Name Type

INGREDIENT_ID int

Output Type: Recipe[]

Page 112: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 103

Method Name: GET_RECIPES_REMOVE_ALLERGIES

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by the ingredients that the person is allergic to.

Input Data: Name Type

RECIPE_ID int

Output Type: Recipe[]

Method Name: GET_RECIPES_BY_TIME

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by time.

Input Data: Name Type

RECIPE_ID int

Output Type: Recipe[]

Method Name: GET_RECIPES_BY_FLAGS

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by flags.

Input Data: Name Type

RECIPE_ID int

Output Type: Recipe[]

Method Name: GET_RECIPES_BY_COOKING_TYPE

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by cooking type.

Input Data: Name Type

RECIPE_ID int

Output Type: Recipe[]

Method Name: GET_RECIPES_BY_RECIPE_TYPE

Page 113: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 104

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by recipe type.

Input Data: Name Type

RECIPE_ID int

Output Type: Recipe[]

Method Name: GET_RECIPES_BY_NAME

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by name.

Input Data: Name Type

FILTER String

Output Type: Recipe[]

Method Name: UPDATE_MEAL

Description: Updates an existing record from table EVENTS by deleting the existing record and creating a new updating at the same time the location information associated to it.

Input Data: Name Type

MEAL_ID NAME DESCRIPTION

int String String

Output Type: boolean

Method Name: UPDATE_RECIPE

Description: Updates an existing record from table RECIPE.

Input Data: Name Type

RECIPE_ID, NAME DESCRIPTION RECIPE_TYPE_ID DIFFICULTY TIME_IN_MINUTES COOKING_TYPE_ID

int String String int int int

Page 114: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 105

IS_LOW_CARB IS_HIGH_FIBER IS_LOW_FAT IS_KOSHER IS_VEGETARIAN IS_LOW_CAL IS_NO_SUGAR IS_GLUTEN_FREE VIDEO_LINK

boolean boolean boolean boolean boolean boolean boolean boolean String

Output Type: boolean

Method Name: UPDATE_ RECIPE_COOKING_TYPE

Description: Updates an existing record from table RECIPE_COOKING_TYPE.

Input Data: Name Type

COOKING_TYPE_ID NAME DESCRIPTION

int String String

Output Type: boolean

Method Name: UPDATE_RECIPE_TYPE

Description: Updates an existing record from table RECIPE_TYPE.

Input Data: Name Type

COOKING_TYPE_ID NAME DESCRIPTION

int String String

Output Type: boolean

Method Name: UPDATE_RECIPE_INGREDIENTS

Description: Updates an existing record from table RECIPE_INGREDIENTS.

Input Data: Name Type

RECIPE_ID INGREDIENT_ID AMOUNT DETAILS UOM

int int int String int

Page 115: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 106

Output Type: boolean

Method Name: UPDATE_RECIPE_STEPS

Description: Updates an existing record from table RECIPE_STEPS.

Input Data: Name Type

RECIPE_ID STEP_NUMBER DESCRIPTION

int int String

Output Type: boolean

Method Name: GET_RECIPES_PERSON_SPECIFIC

Description: Retrieves a list of Recipe objects from View VIEW_RECIPES filtered by specific person ID.

Input Data: Name Type

PERSON_ID int

Output Type: Recipe[]

Page 116: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 107

B.1.7. Physical Activity Service

Physical Activity Motivation Service

Method Name INSERT_PHYSICAL_ACTIVITY_CATEGORY

Description Creates a new Physical Activity Category in table PHYSICAL_ACTIVITY_CATEGORY. Returns -1 if insert was not successful.

Input Data Name Type

CATEGORY_NAME String

Output Type: Integer (CATEGORY_ID)

Method Name INSERT_PHYSICAL_ACTIVITY_CATEGORY_PROFILE

Description Correlates an existing Physical Activity Category with an existing Physical Activity Profile in table PHYSICAL_ACTIVITY_CATEGORY_PROFILE.

Input Data Name Type

CATEGORY_ID Integer

PERSON_ID Integer

Output Type: Boolean

Method Name INSERT_WEEKLY_VIDEO_STATS

Description Inserts new entry in WEEKLY_VIDEO_STATS table for specific Person, Video and Week with auto value for TIMES_WATCHED set to 1. One Person and each Person Physical Activity Video can have multiple Weekly Video Stats. Returns -1 if insert was not successful.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

WEEK Date

Output Type: Integer (WEEKLY_VIDEO_STATS_ID)

Method Name INSERT_PHYSICAL_ACTIVITY_PROFILE

Description Creates a new Physical Activity Profile in table PHYSICAL_ACTIVITY_PROFILE.

Input Data Name Type

Page 117: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 108

PROFILE_NAME String

PROFILE_DESCRIPTION String

Output Type: Integer (PROFILE_ID)

Method Name INSERT_PHYSICAL_ACTIVITY_STATS

Description Inserts new entry in PHYSICAL_ACTIVITY_STATS table for specific Person, Service and Week. One Person can have multiple Physical Activity Stats. Returns -1 if insert was not successful.

Input Data Name Type

PERSON_ID Integer

SERVICE_ID Integer

WEEKLY _COUNTER Integer

WEEK Date

Output Type: Integer (PHYSICAL_ACTIVITY_STATS_ID)

Method Name INSERT_PERSON_PHYSICAL_ACTIVITY_PROFILE

Description Correlate an existing Physical Activity Profile with an existing Person in the table PERSON_PHYSICAL_ACTIVITY_PROFILE. One Person can have multiple Physical Activity Profiles.

Input Data Name Type

PERSON_ID Integer

PROFILE_ID Integer

Output Type: Boolean

Method Name LIST_PHYSICAL_ACTIVITY_CATEGORY

Description Retrieves a list of all the Physical Activity Categories, from table PHYSICAL_ACTIVITY_CATEGORY.

Input Data Name Type

Output Type: PhysicalActivityCategory[]

Method Name LIST_PHYSICAL_ACTIVITY_CATEGORY_PER_PROFILE

Description Retrieves a list of all the Physical Activity Categories which are correlated with all Physical Activity profiles of person, from table PHYSICAL_ACTIVITY_CATEGORY_PROFILE.

Input Data Name Type

Page 118: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 109

PROFILE_IDS Integer []

Output Type: PhysicalActivityCategory[]

Method Name LIST_PHYSICAL_ACTIVITY_CATEGORY_BY_PERSON_ID

Description Retrieves a list of all the Physical Activity Categories which are correlated with all Physical Activity profiles of a particular person, from tables PHYSICAL_ACTIVITY_CATEGORY_PROFILE, PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

Input Data Name Type

PERSON_ID Integer

Output Type: PhysicalActivityCategory[]

Method Name LIST_PERSON_PHYSICAL_ACTIVITY_CATEGORY_BY_CATEGORY

Description Retrieves a list of all the Physical Activity Categories which are correlated with all Physical Activity profiles of a particular person based on category name, from tables PHYSICAL_ACTIVITY_CATEGORY_PROFILE, PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

Input Data Name Type

PERSON_ID Integer

CATEGORY_KEYWORD String

Output Type: PhysicalActivityCategory[]

Method Name LIST_WEEKLY_COUNTER

Description Retrieves the list of PhysicalActivityStats which indicates how many times a Person has used a physical activity service by week from the table PHYSICAL_ACTIVITY_STATS.

Input Data Name Type

PERSON_ID Integer

SERVICE_ID Integer

Output Type: PhysicalActivityStats[]

Method Name LIST_WEEKLY_TIMES_WATCHED

Page 119: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 110

Description Retrieves the list of WeeklyVideoStats which indicates how many times a Person has watched an existing Video by week from the table WEEKLY_VIDEO_STATS.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

Output Type: WeeklyVideoStats[]

Method Name DELETE_PERSON_PHYSICAL_ACTIVITY_VIDEO

Description Dissociates an existing Physical Activity Video with an existing Person in table PERSON_PHYSICAL_ACTIVITY_VIDEO.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

Output Type: Boolean

Method Name DELETE_PERSON_PHYSICAL_ACTIVITY_PROFILE

Description Dissociates an existing Physical Activity Profile with an existing Person in the table PERSON_PHYSICAL_ACTIVITY_PROFILE. One Person should have at least one Physical Activity Profile.

Input Data Name Type

PERSON_ID Integer

PROFILE_ID Integer

Output Type: Boolean

Method Name GET_TIMES_WATCHED

Description Retrieves the value of the counter that indicates how many times (overall) a Person has watched an existing Video from table PERSON_PHYSICAL_ACTIVITY_VIDEO.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

Output Type: Integer

Page 120: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 111

Method Name GET_PERSON_PHYSICAL_ACTIVITY_PROFILE_BY_PERSONID

Description Retrieves the Physical Activity Profile of a specific Person, from tables PERSON_PHYSICAL_ACTIVITY_PROFILE, PHYSICAL_ACTIVITY_PROFILE.

Input Data Name Type

PERSON_ID Integer

Output Type: PhysicalActivityProfile[]

Method Name GET_PERSON_PHYSICAL_ACTIVITY_PROFILE

Description Retrieves the Person Physical Activity Profile from table PERSON_PHYSICAL_ACTIVITY_PROFILE.

Input Data Name Type

PERSON_ID Integer

PROFILE_ID Integer

Output Type: PersonPhysicalActivityProfile

Method Name GET_WEEKLY_TIMES_WATCHED

Description Retrieves the value of the counter that indicates how many times a Person has watched an existing Video during the specific week from table WEEKLY_VIDEO_STATS. Returns -1 if the entry doesn't exist.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

WEEK Date

Output Type: Integer

Method Name GET_CURRENT_WEEKLY_COUNTER

Description Retrieves the value of the counter which indicates the number of times the service is used during the current week.

Input Data Name Type

PERSON_ID Integer

SERVICE_ID Integer

Output Type: Integer (WEEKLY_COUNTER)

Page 121: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 112

Method Name UPDATE_PERSON_PHYSICAL_ACTIVITY_VIDEO_ TIMES_WATCHED

Description Updates the counter that indicates how many times (per week and overall) a Person has watched an existing Video in tables PERSON_PHYSICAL_ACTIVITY_VIDEO and WEEKLY_VIDEO_STATS.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

Output Type: Boolean

Method Name UPDATE_WEEKLY_VIDEO_STATS

Description Update existing entry in WEEKLY_VIDEO_STATS table for specific Person, Video and Week. One Person and each Person Physical Activity Video can have multiple Weekly Video Stats.

Input Data Name Type

PERSON_ID Integer

VIDEO_ID Integer

WEEK Date

TIMES_WATCHED Integer

Output Type: Boolean

Method Name UPDATE_PHYSICAL_ACTIVITY_STATS

Description Updates existing entry in PHYSICAL_ACTIVITY_STATS table for specific Person, Service and Week.

Input Data Name Type

PERSON_ID Integer

SERVICE_ID Integer

WEEKLY _COUNTER Integer

WEEK Date

Output Type: Boolean

Method Name DELETE_PHYSICAL_ACTIVITY_STATS

Description Delete an existing entry in PHYSICAL_ACTIVITY_STATS table for specific Person, Service and Week.

Page 122: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 113

Input Data Name Type

PERSON_ID Integer

SERVICE_ID Integer

WEEK Date

Output Type: Boolean

Method Name MODIFY_PERSON_PHYSICAL_ACTIVITY_PROFILE

Description Modifies an existing Physical Activity Profile of a Person in the table PERSON_PHYSICAL_ACTIVITY_PROFILE. One Person can have multiple Physical Activity Profiles. Implements the logic of safe update.

Input Data Name Type

PERSON_ID Integer

PROFILE_ID Integer

Output Type: Boolean

Method Name INCREASE_WEEKLY_COUNTER

Description Updates the weekly counter that indicates the number of times the service is used in the current week in table PHYSICAL_ACTIVITY_STATS. It is assumed, that only current week’s counter is increased.

Input Data Name Type

PERSON_ID Integer

SERVICE_ID Integer

Output Type: Boolean

Physical Activity Guidance Service

Method Name TRIGGER_FOR_MOTIVATION

Description Combines cumulative criteria to decide when to trigger the service to motivate the user to perform Physical Activity.

Input Data Name Type

PERSON_ID Integer

POSITIVE_MOOD Boolean

Output Type: Boolean (true for start)

Method Name IS_PERSON_PRESENT

Page 123: Miraculous-Life - cordis.europa.eu · Miraculous-Life for Elderly Independent Living ... 3.2 Monitoring/Tracking - Fall Detection Service 42 ... other components of the system ...

D4.1.b - Design and specification of ICT-based services and safety services

Confidential Miraculous-Life 114

Description Detects if the person is present in a room where avatar is located.

Input Data Name Type

PERSON_ID Integer

Output Type: Boolean (true for start)

Method Name GET_SUGGESTED_PHYSICAL_ACTIVITY

Description Retrieves a list of suggested physical activities taking place during the current week. The suggestion is based on the person’s past behaviour.

Input Data Name Type

PERSON_ID Integer

Output Type: Boolean (true for start)

Method Name LIST_FRIENDS

Description Lists the friends of the person often invited to the specific activity.

Input Data Name Type

PERSON_ID Integer

ACTIVITY_ID Integer

Output Type: Boolean (true for start)


Recommended