ScheduleTimelineRepo

class ScheduleTimelineRepo(adherenceRecordRepo: AdherenceRecordRepo, assessmentConfigRepo: AssessmentConfigRepo, httpClient: HttpClient, databaseHelper: ResourceDatabaseHelper, backgroundScope: CoroutineScope, var scheduleMutator: ParticipantScheduleMutator? = null) : AbstractResourceRepo

Constructors

Link copied to clipboard
constructor(adherenceRecordRepo: AdherenceRecordRepo, assessmentConfigRepo: AssessmentConfigRepo, httpClient: HttpClient, databaseHelper: ResourceDatabaseHelper, backgroundScope: CoroutineScope, scheduleMutator: ParticipantScheduleMutator? = null)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
fun getCachedPendingNotifications(studyId: String, nowInstant: Instant): List<ScheduledNotification>
Link copied to clipboard
fun getCachedPendingNotificationsCollapsed(studyId: String, nowInstant: Instant): Flow<List<ScheduledNotification>>
Link copied to clipboard

Get the date of the most recently finished ScheduledAssessmentAdherence

Link copied to clipboard
fun getSessionsForToday(studyId: String, alwaysIncludeNextDay: Boolean = true): Flow<ResourceResult<ScheduledSessionTimelineSlice>>

Get all the scheduled sessions for today that have not expired.

Link copied to clipboard
fun getStudyBurstSchedule(studyId: String, timezone: TimeZone = TimeZone.currentSystemDefault()): Flow<ResourceResult<StudyBurstSchedule>>

Get all the scheduled sessions for the study, organized by study burst.

Link copied to clipboard
Link copied to clipboard
suspend fun updateScheduleIfNeeded(studyId: String)