# **Kinexcs Notification logic**
## **IN-APP**
:::success
A documentation about the logic and conditions of KIMIA **IN-APP** notification messages.
:::
### 1. **Reminder**
#### 1.1. **Types of messages**
| Phase 1 |
|:-------------------------------------------------------------------------------------------------------------------------------------------:|
| Rest well and do not push too hard or over flex the knee. Remember to apply ice pack to your knee and rest your leg on a chair when seated. |
| Phase 2 |
|:------------------------------------------------------------------------------------------:|
| Remember to do your knee extension exercises and continue to apply ice pack to your knees. |
| Phase 3 |
|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Remember to do your knee extension and flexion exercises. Let's aim for {}° flexion angle and {}° extension angle by this week! Ensure you walk more than {} mins continuously for the day. All the best! |
| Phase 4 |
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Remember to do your knee extension and flexion exercises. Let's aim for {}° flexion angle by this week! Maintain your extension angle at {}° and achieve {} steps today. All the best! |
| Phase 5 |
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
| Remember to do your strengthening exercises. Let's aim for more than {}° flexion angle by this week! Maintain your extension angle at {}° and achieve {} steps today. All the best! |
#### 1.2. **Conditions to display messages**
- Checks if user logins for the first time of the day.
- Notification only shows once per day.
- Highest priority among all notification types.
#### 1.3. **Example of notification**

### 2. **Priority**
#### 2.1. **Types of messages**
| Extension target (Rank 1) |
|:----------------------------------------------------------------------------------------------------------:|
| Straighten your knee more when you stand or lie down. You are only {}° away from your knee extension goal. |
| Flexion target (Rank 2) |
|:-----------------------------------------------------------------------------------------:|
| Bend your knee more when you sit down. You are only {}° away from your knee flexion goal. |
| Walking Time (Rank 3) |
|:------------------------------------------------------------------------------------------------------------------------------:|
| Good effort trying to walk around but the longest duration you've walked is only {}. Ensure you walk continuously for {} mins. |
| Walking Steps (Rank 3) |
|:--------------------------------------------------------------------------:|
| You have {} more steps to your target for today. Get up and start walking! |
| All completed |
|:----------------------------------------------------------------------------------------------------:|
| You have completed all your targets for today! Maintain your progress and you'll recover in no time. |
#### 2.2. **Conditions to display messages**
- Displays everytime when new data are sync before 6pm.
- Message will only display if user never achieve today's target.
- **Only after Reminder messages are displayed.**
- Only a maximum of 2 messages will be displayed at any one time.
- Message displayed based on their ranks and the phase the user is currently in.
##### 2.2.1. **Message combination based on Phases**
| Phase 1 | Phase 2 | Phase 3 | Phase 4 | Phase 5 |
|:-------:|:-------:|:-------:|:-------:|:-------:|
| - | Extension | Extension, Flexion, Walking Time | Extension, Flexion, Walking Steps | Extension, Flexion, Walking Steps |
#### 2.3. **Example of notification**
### 3. **Trending**
#### 3.1. **Types of messages**
:::info
Extension Trend messages
:::
| Extension consistent at 0 |
|:----------------------------------------------------------------------------------------------------------:|
| Awesome! Keep maintaining your knee extension to {}° |
| Extension angle decrease |
|:-----------------------------------------------------------------------------------------:|
| Awesome! Your knee extension has improved by {}° |
| Extension angle increase |
|:------------------------------------------------------------------------------------------------------------------------------:|
| You can do better! Your knee extension increased by {}° |
| Extension angle stagnant |
|:--------------------------------------------------------------------------:|
| Consistency is great but try to achieve better knee extension progression by doing more extension exercises. |
:::info
Flexion Trend messages
:::
| Flexion target achieved (when trend is within target range) |
|:----------------------------------------------------------------------------------------------------------:|
| Great work in maintaining your flexion angle at the target range! |
| Flexion angle decrease |
|:-----------------------------------------------------------------------------------------:|
| Your knee flexion decreased in angle by {}°, try to bend your knees more. |
| Flexion angle increase |
|:------------------------------------------------------------------------------------------------------------------------------:|
| Well done! Your knee flexion have improved by {}°. |
| Flexion angle stagnant |
|:--------------------------------------------------------------------------:|
| Your knee flexion progression has stagnate, try to bend your knees more. |
:::info
Walking Time Target messages
:::
| Walking Time target achieved |
|:----------------------------------------------------------------------------------------------------------:|
| You have walked more than {} mins continuously, amazing! |
| Walking Time target not achieved |
|:-----------------------------------------------------------------------------------------:|
| You have walked less than {} mins continuously, please ensure you walk longer. |
:::info
Walking Steps Target messages
:::
| Walking Steps target achieved |
|:----------------------------------------------------------------------------------------------------------:|
| Excellent walking steps achieved, challenge yourself and aim for {} steps! |
| Walking Steps target not achieved |
|:-----------------------------------------------------------------------------------------:|
| Less than {} steps recorded for today, walk more for better recovery progress! |
:::info
Flexion Target messages
:::
| Flexion target achieved |
|:----------------------------------------------------------------------------------------------------------:|
| You achieved today's flexion target, keep it up! |
| Flexion target not achieved |
|:-----------------------------------------------------------------------------------------:|
| You have not achieved today's flexion target, do more flexion exercises. |
#### 3.2. **Conditions to display messages**
- Displays everytime when new data are sync after 6pm.
- **Only after Reminder messages are displayed.**
- Message displayed based on the phase the user is currently in.
##### 3.2.1. **Message combination based on Phases**
| Phase 1 | Phase 2 | Phase 3 | Phase 4 | Phase 5 |
|:-------:|:-------:|:-------:|:-------:|:-------:|
| - | Extension | Extension, Flexion, Walking Time, Flexion target | Flexion, Flexion target, Walking Steps | Flexion, Flexion target, Walking Steps |
#### 3.3. **Example of notification**
### 4. **Implementation of notification**
:::info
These are some of the considerations we came up with when showing the notifications.
:::
#### **4.1. Timings**
- First login of the day (once per day) ---> Reminder notification
- New data sync before 6pm (each time) ---> Priority notification
- New data sync after 6pm (each time) ---> Trend notification
#### **4.2. Data cleaning**
- Remove 5% data from user daily extension and flexion data to eliminate any unwanted outliers.
- If user daily dataset for extension and flexion is less than 50 sets, validate it as not enough data and show the **non-usage** notifications .
#### **4.3. Phase transistions**
- Each phase last 14 days.
- If within 14 days, user have not achieved 5 consecutive days of targets hit, extend number of days by 7.
- Checking of targets achieved on the 5 consecutive days, only when user has been in the phase for at least 7 days.
- After the first 7 days, if user can achieve all targets in the next 5 consecutive days, then user will be placed into the next phase.
## **PUSH**
:::success
A documentation about the logic and conditions of KIMIA **PUSH** notification messages.
:::
### 5. PUSH messages (morning)
| Phase 1-5 |
|:-------------------------------------------------------------------------------------------------------------------------------------------:|
| Good Morning! Remember to record your pain level for the day.|
#### 5.1. **Conditions to display messages**
- Displays everytime at 10am.
### 6. PUSH messages (evening)
| Phase 1 - 5 |
|:-------------------------------------------------------------------------------------------------------------------------------------------:|
| Time to sync your progress for the day. Log in to sync now. |
#### 6.1. **Conditions to display messages**
- Displays everytime at 6pm.
## **Non-usage notification**
:::success
A documentation about the logic and conditions of KIMIA **Non-usage** IN-APP notification messages.
:::
### 7. Types of messages
| If dataset less than {} hours |
|:-------------------------------------------------------------------------------------------------------------------------------------------:|
| Not enough data for today. Please use the device for at least {} hours. |
| If no new data sync when login |
|:------------------------------------------------------------------------------------------:|
| Please do remember to sync your device to get an update of your current progress. |
#### 3.2. **Conditions to display messages**
- Check if dataset less than 50 sets.
- Check if user logins without syncing device to app.