Skip to content

Gamification module needs a workflow trigger event contract #150

@Jayant-kernel

Description

@Jayant-kernel

Description

The gamification module needs a clear trigger-event contract so existing ASHA workflows can send meaningful completion, sync, or validation events to the reward layer.

This keeps issue #132 modular: health workflows produce events, and gamification decides points, streaks, badges, or progress separately.

Why this matters

Gamification should not be tightly coupled with registration, pregnancy tracking, child health, NCD screening, immunization, or visit forms.

A common event contract keeps reward logic separate, supports offline-first behavior, and helps avoid rewarding only raw data entry.

Suggested approach

Define a common gamification event model with fields such as:

  • Workflow type: registration, ANC/PNC visit, immunization, NCD screening, child health follow-up
  • Event action: created, completed, synced, validated
  • Local timestamp and sync status
  • Beneficiary/record reference
  • ASHA/user reference
  • Optional supervisor/CHO validation status

The gamification module can consume these events and apply reward rules independently.

Expected outcome

  • Health workflows remain focused on data entry
  • Gamification stays modular and testable
  • Offline events can sync and reconcile later
  • Rewards can use accepted or validated work signals
  • Points, streaks, badges, and progress can share the same event contract

Related to #132.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions