StudyParticipant

@Serializable
data class StudyParticipant(val firstName: String? = null, val lastName: String? = null, val synapseUserId: String? = null, val id: String? = null, val notifyByEmail: Boolean = true, val attributes: Map<String, String>? = null, val sharingScope: SharingScope? = null, val createdOn: String? = null, val emailVerified: Boolean? = null, val phoneVerified: Boolean? = null, val status: AccountStatus? = null, val roles: List<Role>? = null, val dataGroups: List<String>? = null, val clientData: JsonElement? = null, val languages: List<String>? = null, val studyIds: List<String>? = null, val externalIds: Map<String, String>? = null, val orgMembership: String? = null, val clientTimeZone: String? = null, val healthCode: String? = null, val email: String? = null, val phone: Phone? = null, val consentHistories: Map<String, List<UserConsentHistory>>? = null, val enrollments: Map<String, EnrollmentInfo>? = null, val consented: Boolean? = null, val timeZone: String? = null, val type: String? = null)

StudyParticipant payload. The Participant API supports sparse updates, so most fields in this class are marked as EncodeDefault.Mode.NEVER.

Parameters

firstName

First name (given name) of the user.

lastName

Last name (family name) of the user.

synapseUserId

The numerical identifier for a Synapse account. For administrative accounts, this will allow the user to sign in using Synapse accounts, no further credentials are needed to access the system. This value can only be set when creating an account; otherwise the identifiers update API must be used to add the ID to an existing account.

id

An ID assigned to this account by Bridge system. This ID is exposed in the API and is different from the health code assigned to the user's anonymized data. Bridge never exports this ID along with the health code from Bridge.

notifyByEmail

True if the user has consented to be contacted via email outside the application, false otherwise.

attributes

A map of user profile attributes that have been set for this user (the attributes themselves must be specified in the app's configuration, and the values are stored encrypted in case they capture personally-identifying information).

sharingScope
createdOn

The date and time the account was created.

emailVerified

Has the user verified that they have control of this email address?

phoneVerified

Has the user verified that they have control of this phone number?

status
roles
dataGroups

The data groups set for this user. Data groups must be strings that are defined in the list of all valid data groups for the app, as part of the app object.

clientData

Client data for a user should be in a syntactically valid JSON format. It will be returned as is to the client (as JSON).

languages

Two letter language codes to assign to this user (these are initially retrieved from the user's Accept-Language header and then persisted as part of account configuration).

studyIds

The studies this participant is associated to. For administrative accounts, these are the studies associated to the account's organization. For study participants, these will be the studies that the person is enrolled in.

externalIds

The exernal IDs this participant is associated to, mapped to the study that issued the external ID. Typically a user signs up with the external ID, and is assigned to that study as a result.

orgMembership

The identifier of the organization this account is a member of (this will be an administrative account and not a study participant). Once set, it cannot be changed on an update (there are separate organization membership APIs to change organizational membership).

clientTimeZone

Participant's time zone. Can be updated or deleted. Must be an IANA time zone name.

healthCode

Only included in studies that have been configured to return the health code, and only to researchers through the researcher APIs.

email

The user's email.

phone
consentHistories

A complete historical record of all the user's consents and withdrawals of consent for all studies in the app.

enrollments

Records of every enrollment (whether withdrawn or not) in every study for this participant. The key of this mapping is the studyId, and the value is the record of the enrollment.

consented

True if the user has consented to all required consents, based on the user's most recent request info (client info, languages, data groups). May be null if this object was not constructed with consent histories, or if consent status is indeterminate.

timeZone

User's original time zone, as measured by the timezone used to request activities, as a string offset in ISO8601 format. Related to the v3 scheduling API, it is not always set or reliable.

type

StudyParticipant

Constructors

Link copied to clipboard
constructor(firstName: String? = null, lastName: String? = null, synapseUserId: String? = null, id: String? = null, notifyByEmail: Boolean = true, attributes: Map<String, String>? = null, sharingScope: SharingScope? = null, createdOn: String? = null, emailVerified: Boolean? = null, phoneVerified: Boolean? = null, status: AccountStatus? = null, roles: List<Role>? = null, dataGroups: List<String>? = null, clientData: JsonElement? = null, languages: List<String>? = null, studyIds: List<String>? = null, externalIds: Map<String, String>? = null, orgMembership: String? = null, clientTimeZone: String? = null, healthCode: String? = null, email: String? = null, phone: Phone? = null, consentHistories: Map<String, List<UserConsentHistory>>? = null, enrollments: Map<String, EnrollmentInfo>? = null, consented: Boolean? = null, timeZone: String? = null, type: String? = null)

Properties

Link copied to clipboard
@SerialName(value = "attributes")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val attributes: Map<String, String>? = null
Link copied to clipboard
@SerialName(value = "clientData")
val clientData: JsonElement? = null
Link copied to clipboard
@SerialName(value = "clientTimeZone")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val clientTimeZone: String? = null
Link copied to clipboard
@SerialName(value = "consented")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val consented: Boolean? = null
Link copied to clipboard
@SerialName(value = "consentHistories")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val consentHistories: Map<String, List<UserConsentHistory>>? = null
Link copied to clipboard
@SerialName(value = "createdOn")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val createdOn: String? = null
Link copied to clipboard
@SerialName(value = "dataGroups")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val dataGroups: List<String>? = null
Link copied to clipboard
@SerialName(value = "email")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val email: String? = null
Link copied to clipboard
@SerialName(value = "emailVerified")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val emailVerified: Boolean? = null
Link copied to clipboard
@SerialName(value = "enrollments")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val enrollments: Map<String, EnrollmentInfo>? = null
Link copied to clipboard
@SerialName(value = "externalIds")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val externalIds: Map<String, String>? = null
Link copied to clipboard
@SerialName(value = "firstName")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val firstName: String? = null
Link copied to clipboard
@SerialName(value = "healthCode")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val healthCode: String? = null
Link copied to clipboard
@SerialName(value = "id")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val id: String? = null
Link copied to clipboard
@SerialName(value = "languages")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val languages: List<String>? = null
Link copied to clipboard
@SerialName(value = "lastName")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val lastName: String? = null
Link copied to clipboard
@SerialName(value = "notifyByEmail")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val notifyByEmail: Boolean = true
Link copied to clipboard
@SerialName(value = "orgMembership")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val orgMembership: String? = null
Link copied to clipboard
@SerialName(value = "phone")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val phone: Phone? = null
Link copied to clipboard
@SerialName(value = "phoneVerified")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val phoneVerified: Boolean? = null
Link copied to clipboard
@SerialName(value = "roles")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val roles: List<Role>? = null
Link copied to clipboard
@SerialName(value = "sharingScope")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val sharingScope: SharingScope? = null
Link copied to clipboard
@SerialName(value = "status")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val status: AccountStatus? = null
Link copied to clipboard
@SerialName(value = "studyIds")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val studyIds: List<String>? = null
Link copied to clipboard
@SerialName(value = "synapseUserId")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val synapseUserId: String? = null
Link copied to clipboard
@SerialName(value = "timeZone")
@EncodeDefault(mode = EncodeDefault.Mode.NEVER)
val timeZone: String? = null
Link copied to clipboard
@SerialName(value = "type")
val type: String? = null