Design

An overview of the architecture implemented

System Architecture Diagram

Below is a system architecture diagram that highlights our solution to the problem

Core Components

Explaining the components in the System Architecture Diagram

User: User will be the one who will be interacting and using the services provided.
Mobile Application: The mobile application will provide the following services:
  • Measuring the number of steps the user walks and the number of calls the user makes
  • Prompts user to do an activity of their choice with someone in their care network if they haven't been walking and talking the recommended/expected amount
  • Calculates a well-being score every week
  • Asks the user to change this score if they don't agree
  • Displays the user's progress in the form of a graph
  • Other processes
API: This will be where the phone will send the users well-being score to. This will then send the score to a linode server. This API will also receive an updated model after machine learning techniques are applied on the data that was sent from the app. This model will then be sent back to the mobile application to update and improve the well-being score prediction score service.
Linode Server: This will be used to store all the data that the phone sends to the API such as the well-being score, error rate, outbound postcode, number of calls, number of steps and reference code
Machine Learning: This will use the data on the linode server to continuosly improve the model (carried out by ML team- 4th year students). The results will then be sent back to the API.
Web Application: This will receive data from the linode server and process this data to calculate the average well-being score of an area. The web-application will then also display this data calculated for each area (using the outbound postcode map) in a heat map

Functionality within the front-end mobile app:

The technical solution that we have come up with is shown in the diagram above.

The technical solution that we have put into place is that the app that we have made allows the app to track the number of phone calls and messages they make through the app and also measures the number of steps the user takes while they have the app.

The app also nudges the users to contact their care network if they do not contact their care network enough, or if they have not moved much in the past 2 days. A nudge is also sent if they have walked less than 1000 steps in a day.

This data is then displayed to them in the form of a graph, plotted against their well-being score. The user can then share this to their care network in the form of images or a JSON text file within a pre-composed/pre-filled message.

Every week the app will calculate a well-being score for the user and the user will then input what they believe their actual well-being score is. This data will then be sent along to a linode server where the data will then be placed on an out-bound postcode heatmap.

There will also be lots of really useful weblinks to ensure that the user knows where to get support, to find our more about their well-being …etc.

Core Packages

Key packages identified that will be used:

  • Swift - XCode
  • defaults Library: This will be used to store the users’ data. This can store their data locally and therefore will ensure that the speed of the process is quite quick. Since there isn’t too much data to be stored, this is the best choice.
  • UIKit: This is necessary for us to be able to access the users’ information as it provides us with the access to the certain parts of the users phone. As well as this, this allows us to make sure that the design is to the users taste.
  • HealthKit: This will be used to access the number of steps the user walks and to measure the distance that the user walks.

Key Functionalities Implementation

The key functionalities have been implemented through the use of Swift and the libraries mentioned above. We used the storyboard feature in Swift to be able to design UI-Views of each page and then link them together.

The steps we took to implement the functionality

We first designed the app and came up with the prototype
  • To implement the functionality of how the steps were being measured, we used the UIHealthKit library coupled with the key sensors within the iPhone.
  • The libraries within Swift allowed us to ask permission for the User to be tracked, also enables us to have access to their contacts and to be able to send messages through the app. With the help of these libraries we can then track the number of steps they take, and then display this information on a graph, send personalised messages to the users’ choice and to be able to export their personalised data into a pdf document which can also be sent over text.