Closed Abby-Wheelis closed 9 months ago
would a reminder scheme with no reminders work? The existing schedules seem to have a few options, and they are randomly assigned. My thought is that if there's one scheme with a blank schedule every participant will be assigned no reminders. I'm not as familiar with the reminder schemes, so I wanted to check in.
That was what I had in mind. We use something very close to that for Denver CASR. I checked the code and it certainly seems like that is what would happen. If we don't have any entries in scheme.schedule
then the for
loop will be skipped. Let's go ahead with it, and see what we get when we test.
// returns an array of moment objects, for all times that notifications should be sent
const calcNotifTimes = (scheme, dayZeroDate, timeOfDay) => {
const notifTimes = [];
for (const s of scheme.schedule) {
// the days to send notifications, as integers, relative to day zero
const notifDays = range(s.start, s.end, s.intervalInDays);
for (const d of notifDays) {
const date = moment(dayZeroDate).add(d, 'days').format('YYYY-MM-DD')
const notifTime = moment(date+' '+timeOfDay, 'YYYY-MM-DD HH:mm');
notifTimes.push(notifTime);
}
}
return notifTimes;
}
I tested these updates out in the emulator, and, confirming that the reminder scheme shows up in the config, I can confirm that the app does not crash :)
New survey from UUE, and confirmed they are keeping random tokens. I believe the last change for these updates is getting .json version of the survey.
Thanks to @JGreenlee, we have a json file now, and these updates should be ready
After initial testing, UUE would like to change a few things about their configuration:
I still need to have the survey converted to json in order to upload, which I plan to hold off on in case the collection of identifiers changes in the next day or so. Once we have the json file we can configure the path to the new survey.
@shankari would a reminder scheme with no reminders work? The existing schedules seem to have a few options, and they are randomly assigned. My thought is that if there's one scheme with a blank schedule every participant will be assigned no reminders. I'm not as familiar with the reminder schemes, so I wanted to check in.