DB Structure
Goal-Framework entities can be stored in the DB in 3 tables (see image):
Table navida_user_health_goal
Tracks individual user health goals and their progress.
- Key fields:
id: Database identifier (Primary key)health_goal_id: Identifier for the specific goal (CMS id)health_goal_session_id: ??? (seems to be not used anymore)source_health_goal_id: ??? (seems to be not used anymore)user_id: Foreign key linking to user id innavida_user.user_idtableis_active: Flag that indicates if the goal is currently active (enrolled and not expired yet)enrolled_date_time: Time when the goal was enrolled (after self-assessment)session_start_tp: Time when the goal was started (start of the first challenge)session_end_tp: Time when the goal was completed or failedcreated_tp: Time when the goal was enrolled (it should be the same asenrolled_date_time)changed_tp: Last time when the goal's bonus status was changed (has the same value asbonus_transmitted_tporpoint_earned_tp)is_deleted: Flag that indicates if the goal deleteddelete_tp: Time when the goal is reset (soft-deletion)points: Amount of bonus points for this goal (copied from CMS, usually it's 1500)point_earned_tp: Time when MC Bonus returned success for bonification status requestbonus_transmitted_tp: Time when the bonus request was sent to MC Bonusbonus_measure_uuid: UUID identifier generated when sendingbonus.MC_BONUS_MEASURES_ENDPOINTrequest. Saved along withbonus_transmitted_tptenant_id: Tenant id of the goal (AOK identifier). For instance,aokplus,aoknwetc.goal_status: Current goal status based on Crob Job evaluation (GoalStatusenum)goal_type: Type of the goal (Sports, Mental or Mixed)goal_uuidGoal's UUID identifier from CMSgoal_category_id: CMS integer identifier of goal type. Not usedgoal_number_of_days: Time duration in days for the started goal (copied from CMS)title: Title of the goal (copied from CMS, is used for easier data identification in database)level: Self-assessment level (High, Medium or Low)tags: Consolidated list of challenge tags for all assessment levels
Table navida_user_challenges
Manages user challenges linked to health goals.
- Key fields:
id: Database identifier (Primary key)challenge_id: Identifier for the specific challenge (CMS id)challenge_version: ?challenge_status: Current challenge status based on Crob Job evaluation (ChallengeStatusenum)is_active: ?started_date_time: Time when the challenge was startedend_date_time:session_health_goal_id: Foreign key linking to health goal idnavida_user_health_goal.idtitle: Title of the challenge (copied from CMS)challenge_session_id: ?source_challenge_id: ?challenge_uuid: ?is_health_gadget_supported: Boolean value that specifies if Fitness Tracker is required for this challengeis_mandatory: Not used, alwaystruechallenge_number_of_days: Number of days required to complete this challenge (copied from CMS)level: Challenge complexity level: High, Medium or Low (copied from CMS)min_time_needed: (deprecated) Minimum time required for the challenge, e.g. for "5-15 Minuten pro Lektion" it has value 5max_time_needed: (deprecated) Maximum time required for the challenge, e.g. for "5-15 Minuten pro Lektion" it has value 15validation_buffer_day: Buffering number of days to complete the challengeenrolled_date_time: ?
Table navida_user_activity
Records specific activities within challenges.
- Key fields:
id: Database identifier (Primary key)challenges_id: Foreign key linking tonavida_user_challenges.`idactivity_id: CMS activity idactivity_title: Title of the activity (copied from CMS)activity_status: Current activity status based on Crob Job evaluation (ActivityStatusenum)is_active: ?started_date_time: Time when activity was startedsession_exercise_id: ?source_activity_id: ?from_met: FromMET value from CMSto_met: ToMET value from CMSexecution_min_time_secs: Minimum execution time in seconds from CMSlevel: Self-assessment level (LOW, MEDIUM or HIGH)created_tp: Time when activity record was createdchanged_tp: Last time when activity record was changed
Table structure
