...
We can calculate a compliance percentage from these values at the session level, for the week, in the next reportacross a participant’s entire participation in the study. In the weekly report below, we can calculate adherence for that week alone.
Weekly Adherence Report
This report always returns seven days of adherence records for a given user. The report calculates this information by finding the “week since event N” for every event and every session, that is the week that has the day that falls on “today” (this timestamp won’t be adjustable since every timestamp would require a recalculation of all these reports—so it’ll have to be a date on the server). This means that the individual sessions listed in this report are not lined up by calendar date. The structure of this report would be as follows:
Code Block | ||
---|---|---|
| ||
{ "participant": { "firstName": "A-chan", "email": "alx.dark+achan@sagebase.org", "externalId": "asdfasdf", "identifier": "GqYpNUWolebxS2eQudF1hc-a", "type": "AccountRef" }, "timestamp": "2021-11-22T2223T00:1239:5543.769Z922Z", "weeklyAdherencePercent": 016, "dailyReports": [ { "day": 0, "sessions": [ { "sessionGuid": "LcWpQFKaGY5FSQ0LT4tnvdO7", "label": "Session #1 / Week 1 / Study Burst 1", "symbol": "1", "startDay": 0, "startDate": "2021-11-21", "timeWindows": [ { "sessionInstanceGuid": "1aCbUaFYkixIsIJBf9WGpg", "timeWindowGuid": "GNp94CnfTTtR-s0OzrFeftrh", "state": "expired", "endDay": 0, "endDate": "2021-11-21", "type": "EventStreamWindow" }, { "sessionInstanceGuid": "yQnubrShfYMY9ZzOE3zw3Q", "timeWindowGuid": "aRaHNKIY0yKgOl5CLuA3ZDHJ", "state": "expired", "endDay": 0, "endDate": "2021-11-21", "type": "EventStreamWindow" } ], "type": "EventStreamDay" }, { "sessionGuid": "eRLgI5gfe1kef_XRZDfdFU9I", "label": "Session #2 / Week 1", "symbol": "2", "startDay": 0, "startDate": "2021-11-21", "timeWindows": [ { "sessionInstanceGuid": "bDBVV02XrjrOG8NgBYSYFg", "timeWindowGuid": "KZ1piANVdeD-r8PCHL2bviLh", "state": "expiredcompleted", "endDay": 0, "endDate": "2021-11-21", "type": "EventStreamWindow" } ], "type": "EventStreamDay" } ], "type": "DailyAdherenceReport" }, { { "sessionGuidday": 1, "z_jb4p2Lr9Q56z8AwiYNieqw", "sessions": [ { "label": "Session #3 "sessionGuid": "LcWpQFKaGY5FSQ0LT4tnvdO7", "label": "Session #1 / Week 1 / Study Burst 1", "symbol": "1", "startDay": 1, "startDate": "2021-11-22", "timeWindows": [ { "sessionInstanceGuid": "7HaIdOehYJrJk3VZcGeNxg", "timeWindowGuid": "GNp94CnfTTtR-s0OzrFeftrh", "state": "unstarted", "endDay": 1, "endDate": "2021-11-22", "type": "EventStreamWindow" }, { "sessionInstanceGuid": "R0I7n1fEeIR88fYv6iVPTg", "timeWindowGuid": "aRaHNKIY0yKgOl5CLuA3ZDHJ", "state": "unstarted", "endDay": 1, "endDate": "2021-11-22", "type": "EventStreamWindow" } ], "type": "EventStreamDay" }, { "sessionGuid": "eRLgI5gfe1kef_XRZDfdFU9I", "label": "Session #2 / Week 21", "symbol": "32", "startDay": 91, "startDate": "2021-11-2422", "timeWindows": [ { "sessionInstanceGuid": "WHE_gHE71tk8qFERatcruAu-cc8Ou4xqUPVnht4oh-bw", "timeWindowGuid": "gF6hy-UiipJLXqe7F_yK-wQcKZ1piANVdeD-r8PCHL2bviLh", "state": "startedunstarted", "endDay": 91, "endDate": "2021-11-2422", "type": "EventStreamWindow" } ], "type": "EventStreamDay" } ], "type": "DailyAdherenceReport" }, { "day": 15, "sessions": [ { "sessionGuid": "LcWpQFKaGY5FSQ0LT4tnvdO7", "label": "Session #1 / Week 1 / Study Burst 1", "symbol": "1", "startDay": 15, "startDate": "2021-11-2226", "timeWindows": [ { "sessionInstanceGuid": "7HaIdOehYJrJk3VZcGeNxgJfyiAbHZ-nlmTZui_N19Tg", "timeWindowGuid": "GNp94CnfTTtR-s0OzrFeftrh", "state": "unstartednot_yet_available", "endDay": 15, "endDate": "2021-11-2226", "type": "EventStreamWindow" }, { "sessionInstanceGuid": "R0I7n1fEeIR88fYv6iVPTgg6kRO-JZgt0lGghDT8v37A", "timeWindowGuid": "aRaHNKIY0yKgOl5CLuA3ZDHJ", "state": "unstartednot_yet_available", "endDay": 15, "endDate": "2021-11-2226", "type": "EventStreamWindow" } ], "type": "EventStreamDay" }, { "sessionGuid": "eRLgI5gfe1kef_XRZDfdFU9I", "label": "Session #2 / Week 1", "symbol": "2", "startDay": 15, "startDate": "2021-11-2226", "timeWindows": [ { "sessionInstanceGuid": "u-cc8Ou4xqUPVnht4oh-bwOoNi3vhifRUqN6X9WTMCg", "timeWindowGuid": "KZ1piANVdeD-r8PCHL2bviLh", "state": "unstartednot_yet_available", "endDay": 15, "endDate": "2021-11-2226", "type": "EventStreamWindow" } ], "type": "EventStreamDay" }, { "sessionGuid": "z_jb4p2Lr9Q56z8AwiYNieqw", "label": "Session #3 / Week 2", "symbol": "3", "startDay": 12, "startDate": "2021-11-27", "timeWindows": [ { "sessionInstanceGuid": "2O-jPnpWOYZLx0VjBvvO8g", "timeWindowGuid": "gF6hy-UiipJLXqe7F_yK-wQc", "state": "not_yet_available", "endDay": 12, "endDate": "2021-11-27", "type": "EventStreamWindow" } ], "type": "EventStreamDay" } ], "type": "DailyAdherenceReport" }, ... { "day": 6, "sessions": [ { "sessionGuid": "LcWpQFKaGY5FSQ0LT4tnvdO7", "label": "Session #1 / Week 1 / Study Burst 1", "symbol": "1", "startDay": 6, "startDate": "2021-11-27", "timeWindows": [ { "sessionInstanceGuid": "IUBXsO4ioFgJfi8GA9NSxw", "timeWindowGuid": "GNp94CnfTTtR-s0OzrFeftrh", "state": "not_yet_available", "endDay": 6, "endDate": "2021-11-27", "type": "EventStreamWindow" }, { "sessionInstanceGuid": "WdRjHkDWoqmQx4vxRuCVeg", "timeWindowGuid": "aRaHNKIY0yKgOl5CLuA3ZDHJ", "state": "not_yet_available", "endDay": 6, "endDate": "2021-11-27", "type": "EventStreamWindow" } ], "type": "EventStreamDay" }, { "sessionGuid": "eRLgI5gfe1kef_XRZDfdFU9I", "label": "Session #2 / Week 1", "symbol": "2", "startDay": 6, "startDate": "2021-11-27", "timeWindows": [ { "sessionInstanceGuid": "_-1AlFrrN9IfA5tK-OYvag", "timeWindowGuid": "KZ1piANVdeD-r8PCHL2bviLh", "state": "not_yet_available", "endDay": 6, "endDate": "2021-11-27", "type": "EventStreamWindow" } ], "type": "EventStreamDay" } ], "type": "DailyAdherenceReport" } ], "type": "WeeklyAdherenceReport" } |
...