AdherenceRecordsSearch

@Serializable
data class AdherenceRecordsSearch(val instanceGuids: List<String>? = null, val assessmentIds: List<String>? = null, val sessionGuids: List<String>? = null, val timeWindowGuids: List<String>? = null, val adherenceRecordType: AdherenceRecordType? = null, val includeRepeats: Boolean? = null, val currentTimestampsOnly: Boolean? = null, val eventTimestamps: Map<String, String>? = null, val startTime: String? = null, val endTime: String? = null, val pageSize: Int? = null, val offsetBy: Int? = null, val sortOrder: SortOrder? = null, val type: String? = null)

Parameters

instanceGuids

Session or assessment instance GUIDs. Any records that exist with these GUIDs will be returned (scoped to a specific participant in a specific study). If the assessment is a persistent assessment, all adherence records for that assessment will be returned unless includeRepeats is false. This array cannot contain more than 500 items.

assessmentIds

Return adherence records for assessments with these IDs (the assessment ID is used to define a type of assessment). This array cannot contain more than 500 items.

sessionGuids

Return adherence records for sessions with these GUIDs (this is the session’s GUID in a schedule and not an instance GUID, and is used to define a type of session). This array cannot contain more than 500 items.

timeWindowGuids

Return adherence records for assessments in these time windows (using the time window’s GUID in a schedule to define a type of time window). This array cannot contain more than 500 items.

adherenceRecordType
includeRepeats

Where an assessment can be performed multiple times under an instance GUID, all records will be returned unless this flag is set to true. In this case, the first or last record only will be returned (depending on sort order).

currentTimestampsOnly

Where a time series can be performed multiple times because a session’s trigger event is mutable, all records will be returned, unless this flag is set to true. When true, only records with recent event timestamp values will be returned. This is equivalent to sending back the user’s entire map of current event ID timestamp values via the eventTimestamps map in this search object. If values are also provided in the eventTimestamps map, each of those event IDs will override its associated event ID timestamp value, as it is provided by setting this flag to true.

eventTimestamps

A mapping of event IDs to timestamp values to use when retrieving adherence records that are from sessions triggered by that ID. Only records with that exact timestamp value in their eventTimestamp field will be returned. In general, mobile clients will only want to retrieve records for current timestamp values when calculating schedules, so the currentTimestampsOnly flag provides an easy way to request that all current timestamps be used to limit search results. This map cannot contain more than 50 entries.

startTime

Limit search results to records with startedOn values that are equal to or later than this start time (no earlier than January 1st, 2020).

endTime

Limit search results to records with startedOn values that are equal to or earlier than this end time (no later than January 1st, 2120).

pageSize

The maximum number of records in each returned page. Range can be from 1-500 records.

offsetBy

The next page start offset for pagination.

sortOrder
type

AdherenceRecordsSearch

Constructors

Link copied to clipboard
constructor(instanceGuids: List<String>? = null, assessmentIds: List<String>? = null, sessionGuids: List<String>? = null, timeWindowGuids: List<String>? = null, adherenceRecordType: AdherenceRecordType? = null, includeRepeats: Boolean? = null, currentTimestampsOnly: Boolean? = null, eventTimestamps: Map<String, String>? = null, startTime: String? = null, endTime: String? = null, pageSize: Int? = null, offsetBy: Int? = null, sortOrder: SortOrder? = null, type: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "adherenceRecordType")
val adherenceRecordType: AdherenceRecordType? = null
Link copied to clipboard
@SerialName(value = "assessmentIds")
val assessmentIds: List<String>? = null
Link copied to clipboard
@SerialName(value = "currentTimestampsOnly")
val currentTimestampsOnly: Boolean? = null
Link copied to clipboard
@SerialName(value = "endTime")
val endTime: String? = null
Link copied to clipboard
@SerialName(value = "eventTimestamps")
val eventTimestamps: Map<String, String>? = null
Link copied to clipboard
@SerialName(value = "includeRepeats")
val includeRepeats: Boolean? = null
Link copied to clipboard
@SerialName(value = "instanceGuids")
val instanceGuids: List<String>? = null
Link copied to clipboard
@SerialName(value = "offsetBy")
val offsetBy: Int? = null
Link copied to clipboard
@SerialName(value = "pageSize")
val pageSize: Int? = null
Link copied to clipboard
@SerialName(value = "sessionGuids")
val sessionGuids: List<String>? = null
Link copied to clipboard
@SerialName(value = "sortOrder")
val sortOrder: SortOrder? = null
Link copied to clipboard
@SerialName(value = "startTime")
val startTime: String? = null
Link copied to clipboard
@SerialName(value = "timeWindowGuids")
val timeWindowGuids: List<String>? = null
Link copied to clipboard
@SerialName(value = "type")
val type: String? = null