-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
https://movember.atlassian.net/browse/TN-3252 - Frontend calls the trigger api, i.e. `/api/patient/[userId]/trigger` to retrieve the latest triggers and check if there is any that has `_sequential_hard_trigger_count` > 1 (meaning then that it has been asked previously) (see example triggers JSON): ``` { ... "timestamp": "2023-07-31T23:17:03+00:00", "triggers": { "domains": { "anxious": { "ironman_ss.11": "hard", "ironman_ss.12": "hard", "ironman_ss.13": "hard", "_sequential_hard_trigger_count": 3 }, "fatigue": { "ironman_ss.10": "hard", "ironman_ss.9": "hard", "_sequential_hard_trigger_count": 2 }, "general_pain": { "ironman_ss.1": "hard", "ironman_ss.2": "hard", "ironman_ss.3": "hard", "_sequential_hard_trigger_count": 3 }, "joint_pain": { "ironman_ss.4": "hard", "ironman_ss.5": "hard", "ironman_ss.6": "hard", "_sequential_hard_trigger_count": 2 }, "sad": { "ironman_ss.17": "hard", "ironman_ss.18": "hard", "ironman_ss.19": "hard", "_sequential_hard_trigger_count": 3 }, } } ... } ``` - If it finds any qualifying domains, it will present the OPT-OUT UI modal to the user, with the checkbox(es) that allow user to select which domain(s) to opt out: ![OptoutInputs](https://github.com/uwcirg/truenth-portal/assets/12942714/e4679692-1f3a-4e75-bed0-27a22376d55f) - frontend submits the domain(s) that user has chosen to opt out to the backend API, `/api/patient/<user_id>/triggers/opt_out`, to be saved on the database for later use (e.g. use in clinician email, adherence report) - One user submits the request, the EMPRO thank you modal that follows will display which(s) domains the user has chosen to opt out: ![OptoutChosen](https://github.com/uwcirg/truenth-portal/assets/12942714/5752b438-eb89-4e4c-a113-98d9a8497a40) --------- Co-authored-by: Amy Chen <[email protected]> Co-authored-by: Paul Bugni <[email protected]>
- Loading branch information
1 parent
6f06f4d
commit 88190e3
Showing
9 changed files
with
1,220 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.