The SDK allows you to obtain basic participant information. See Participants for general information about participant identifiers, custom fields, and other participant data.
MyDataHelps.getParticipantInfo()
Retrieve demographic information about the current participant, as well as project-specific custom fields.
Resolves to a result
object containing participant info fields.
Project-specific participant identifier.
Auto-generated internal ID for the participant.
The project identifier.
(DEPRECATED) An alias for a custom field named SecondaryIdentifier
, if one exists. See deprecation notice.
Date when the participant completed enrollment, in ISO8601 format.
Auto-generated identifier used to complete surveys via link, if that feature is enabled for the project.
Object containing properties for all demographic fields populated for the participant. Unpopulated values are not included.
Preferred language, automatically determined during enrollment. Used to determine language of notifications.
Gender code: M, F, O, or null.
Timezone represented as a UTC offset, e.g., -04:00:00.
Object whose properties represent key/value pairs as project-specific custom fields.
MyDataHelps.getParticipantInfo()
.then( function(result) {
console.log(result);
} );
MyDataHelps.getParticipantInfo()
.then( function(result) {
console.log(result);
} );
{
"participantIdentifier": "4c9d3554-7cb1-456e-89ca-5387bda4803c",
"linkIdentifier": "be0ec303-3abd-49ac-a5ce-78c6695d7d96",
"enrollmentDate": "2021-04-15T18:55:53.766+00:00",
"projectID": "0971fbcd-ec92-414c-bd49-41a3c8b6547b",
"demographics": {
"email": "somebody@example.com",
"firstName": "John",
"lastName": "Smith",
"dateOfBirth": "2000-06-16",
"preferredLanguage": "en",
"gender": "M",
"utcOffset": "-04:00:00"
},
"customFields": {
"Medication1": "Warfarin",
"Smoker": "0",
"SurgeryDate": null
}
}
{
"participantIdentifier": "4c9d3554-7cb1-456e-89ca-5387bda4803c",
"linkIdentifier": "be0ec303-3abd-49ac-a5ce-78c6695d7d96",
"enrollmentDate": "2021-04-15T18:55:53.766+00:00",
"projectID": "0971fbcd-ec92-414c-bd49-41a3c8b6547b",
"demographics": {
"email": "somebody@example.com",
"firstName": "John",
"lastName": "Smith",
"dateOfBirth": "2000-06-16",
"preferredLanguage": "en",
"gender": "M",
"utcOffset": "-04:00:00"
},
"customFields": {
"Medication1": "Warfarin",
"Smoker": "0",
"SurgeryDate": null
}
}