Introduction
Serious Gaming is MEDrecord's Gamification System. It encourages users to use the platform more frequently and engage in behaviors that are beneficial to them. It does this by awarding the user points based on the completion of certain defined events. When a user collects enough points, they move to the next level. There are a number of levels which the user can achieve, and certain events also award the user with a badge of achievement. All of the awards are purely cosmetic, but serve the purpose of motivating the user more by adding a fun reward system through gamified elements as a secondary goal.
Events
One of the ways that user can get points is by doing certain events in the system. Some of the events user needs to perform are:
Add new measurement
Add new medication
Answer mood questionnaire
As it can be seen, these events are normal behavior of the application. However, they don't award points directly, but are each split into more actions, and then those actions award points.
For example, when user adds new measurement, system checks if it's first measurement ever which user sets, or if it's first measurement of the day, or if user achieved a streak of 7 days setting up the measurement, and then for each of these actions user is awarded points.
With the plan to add more, here is the list of actions in relation to the events:
[event]
[action]
[action]
User adds new measurement (check Medical service Swagger api - POST methods under Observation section)
First measurement of the day for a user
First measurement set ever
Measurement set for 7 days straight
Any measurement set
User adds new medication (check Medical service Swagger api - POST medication method)
First medication set ever
User answers mood questionnaire (check Questionnaires)
One action for each happy answer provided in questions: energy, stress, sleep, movement, diet, happiness, and life
Weekly scheduled event in the system
For each mood questionnaire question, check for the past week:
if user provided at least 3 happy answers
if 5 happy answers were provided
Points
There is a defined number of points each of the actions award by default. However, these points are not fixed and number of points which each action awards can be set by administrator. To find the list of all actions and how many points they award, and as well on how to update the points, head over to the Medical service Swagger api - Points Actions section. The change made on the points by administrator does not affect users retroactively.
Levels
All users start from the first level, and then gradually move up. As soon as the amount of points have been earned which a level requires, user moves to that level. Reminding again that level is just a cosmetic. Similar like how points are defined, levels are as well. So, they have a default definition, but it is left for administrator to have full management rights on the levels and their thresholds. Administrator can set the upper and lower threshold of a level and the ordinal, add new levels, update and as well remove them. The change that Administrator makes on the levels, automatically affects all the users.
Head over to the Medical service Swagger api - Level Thresholds section to find about the endpoints.
Badges
Like it is the case with levels and points, badges have a default definition which can be updated by administrator. For badges, administrator can set if the badge is active (in use - should be awarded) or not.
Head over to the Medical service Swagger api - Badges section to find about the endpoints.
What level on is the user?
To get user's level, target GET endpoint, found in Medical service Swagger api - under User Level section. This endpoint provides information about user's level and the total points obtained.
What badges did the user obtain?
Target GET endpoint, found in Medical service Swagger api - under User Badges section. List endpoint returns list of all badges user obtained with the time they were granted to the user.
Points log
To find out how did the user earn points, or the list of all events which caused the points to be awarded to the user, or simply put, a log of user points, head over to the GET method in Medical service Swagger api - User Points section.