Project Settings
The project methods return information about the project and its settings.
Get Project Info
MyDataHelps.getProjectInfo()
Retrieve general project information.
Returns
Promise<ProjectInfo>
Resolves to a result
object containing project data.
Element Fields
result.id
guid
Unique project identifier.
result.name
string
Project’s display name, localized based on participant’s language settings.
result.description
string
Projects display description, localized based on participant’s language settings.
result.type
string
Project type, displayed to participants and used to filter search results. May be one of: Research Study
, Wellness Program
, or Clinical Program
.
result.code
string
Code used by participants to enroll in this project, if code enrollment is allowed.
result.supportEmail
string
Contact email for project support displayed to participants.
result.supportPhone
string
Contact number for project support displayed to participants.
result.learnMoreLink
string
A URL where participants can learn more about the project.
result.learnMoreTitle
string
Site name or title for the learnMoreLink URL, localized based on participant’s language settings.
result.organization
object
Element Fields
result.organization[n].id
guid
Unique organization identifier.
result.organization[n].name
string
result.organization[n].description
string
Organization description.
result.organization[n].logoUrl
string
A URL to the organization’s logo.
result.organization[n].color
string
The organization’s brand color.
result.platforms
collection
A list of platforms that participants may use. Options include: iOS
, Android
, and Web
.
Availability
MyDataHelps.getProjectInfo()
.then( function(result) {
console.log(result);
} );
{
"id": "1d878704-64e6-e811-816b-9e01d28da2ca",
"name": "General Hospital Sleep Study",
"type": "Research Study",
"description": "Cutting-edge sleep study.",
"code": "AAAAA",
"supportEmail": "testproject@example.com",
"supportPhone": "888-555-1234",
"learnMoreLink": "https://example.com",
"learnMoreTitle": "Learn More At Test Project HQ",
"organization": {
"color": "#000000",
"description": "General Hospital of AnyTown USA",
"id": "063c0905-446b-4cd5-aa9f-3da958fec94a",
"logoUrl": "https://mydatahelps.org/api/researchkit/organizationbrandingimage/063c0905-446b-4cd5-aa9f-3da958fec94a",
"name": "General Hospital Research"
},
"platforms": [
"Web",
"Android",
"iOS"
]
}
Get Data Collection Settings
MyDataHelps.getDataCollectionSettings()
Retrieve settings related to data collection for the participant and their project.
Returns
Promise<DataCollectionSettings>
Resolves to a result
object containing data collection settings fields.
Element Fields
result.fitbitEnabled
bool
Indicates whether Fitbit data collection is enabled for this project.
result.ehrEnabled
bool
Indicates whether Electronic Health Record data collection is enabled for this project.
result.garminEnabled
bool
Indicates whether Garmin data collection is enabled for this project.
result.dexcomEnabled
bool
Indicates whether Dexcom data collection is enabled for this project.
result.airQualityEnabled
bool
Indicates whether Air Quality data collection is enabled for this project.
result.weatherEnabled
bool
Indicates whether Weather data collection is enabled for this project.
result.queryableDeviceDataTypes
collection
A collection of device data types that are supported by the current project configuration and can be queried using the Device Data API. A participant may not have data available for all data types. Note: Although data from the project
namespace can be queried using the Device Data API, it is not included in this list. SDK developers manage which data types exist within their project’s namespace.
Element Fields
result.queryableDeviceDataTypes[n].namespace
string
The namespace to use when querying the Device Data API.
result.queryableDeviceDataTypes[n].type
string
result.sensorDataCollectionEndDate
date
Availability
MyDataHelps.getDataCollectionSettings()
.then( function(result) {
console.log(result);
} );
{
"fitbitEnabled": false,
"ehrEnabled": false,
"airQualityEnabled": false,
"garminEnabled": false,
"dexcomEnabled": false,
"weatherEnabled": false,
"queryableDeviceDataTypes": [
{
"namespace": "AppleHealth",
"type": "RestingHeartRate"
},
{
"namespace": "AppleHealth",
"type": "Steps"
},
...
],
"sensorDataCollectionEndDate": "2022-04-20T00:00:00-04:00"
}