BIDMCDigitalPsychiatry / LAMP-platform

The LAMP Platform (issues and documentation).
https://docs.lamp.digital/
Other
13 stars 10 forks source link

Survey streak count only working for one type of survey activity #105

Open avaidyam opened 3 years ago

avaidyam commented 3 years ago

Collaborator: Patient reported that their streaks do not work. It only appears after they take a weekly summary survey (and they only see it for 1 day since they only do that survey once a week). they do all the other surveys regularly.

The Participant ID (on the BIDMC server) is U6359278990. The streak behavior is supposed to align with the schedule that was set for the specific survey; if it was set to once a week then the streak counting should happen if the survey was taken at least once a week.

sarithapillai8 commented 3 years ago

@avaidyam I don't quite understand the issue. The steak was implemented like consecutive number of days, the patient attend the survey. It is not implemented with schedule type. If you want to add that, please consider this as a new feature request, not a bug. Please confirm.

sarithapillai8 commented 3 years ago

@avaidyam Thank you for changing this to feature, So for each type of schedule, we need to check the steak correspondingly, right? I mean biweekly/monthly/.. etc will have different kind of calculation. Please confirm.

avaidyam commented 3 years ago

@sarithapillai8 Yes, this feature request is to make it so the streaks feature engages based on the schedule of the activity:

S M T W R F S
Activity.schedule ☑️ ☑️ ☑️
ActivityEvent[] ☑️ ☑️ ☑️ ☑️
Streak 0 1 1 0 0 1 1

This example is based only on calendar days, but the same principle applies to hourly/etc. schedules.