Embedding MyDataHelps in Custom Apps

With MyDataHelps Embeddables, you can leverage the power of the MyDataHelps platform in your custom web or mobile application without your participants ever creating a MyDataHelps account or using a MyDataHelps app directly.

Introduction to Embeddables

What makes Embeddables different from the other MyDataHelps experiences like Views or Web View steps is that they operate outside of MyDataHelps. They let you incorporate MyDataHelps features into your own custom app, including:

  • Surveys
  • Device Data
  • Electronic Health Record Integration

For some examples of how you can use MyDataHelps Embeddables, see the following case studies:

Getting Started

Before using MyDataHelps in a custom application, you will still need to have a MyDataHelps Designer account and project. See the Getting Started guide if you do not already have one. You will also need to set up a service account for your project to access the MyDataHelps REST API and generate access tokens for your participants.

Your custom application can be a web page or native app. To leverage MyDataHelps features, you will need to embed the MyDataHelps SDK within your application. The SDK is available on several platforms:

  • JavaScript SDK for web applications.
  • iOS SDK for native iOS mobile apps (including iPhone and iPad).
  • Android SDK for native Android mobile apps is planned for a future release.

Follow the platform-specific installation instructions to include the SDK within your application.

Managing Participants

Many projects will enroll participants directly in MyDataHelps using one of the built-in enrollment mechanisms. Custom applications using MyDataHelps Embeddables, on the other hand, will often have their own user accounts independent of MyDataHelps. For example, you might embed MyDataHelps within a web application that has a pre-existing account system.

To use the MyDataHelps SDK, you will need to create MyDataHelps participant entities to mirror the users in your application. The MyDataHelps participant entity will then be the surrogate for your application user for all activities related to EHR integration. Participant management is an application server integration. When your application client wants to initiate an EHR connection, it should communicate with your application server which then uses the MyDataHelps REST API to produce a MyDataHelps participant.

You are responsible for maintaining the mapping between the users in your application and the MyDataHelps participants you create for them. The recommended way to do this is to set the MyDataHelps participantIdentifier to a unique identifier from your system. (Internal identifiers like database IDs or your own synthetic participant ID are recommended over business identifiers like MRNs/SSNs to maximize participant privacy.) Another way is to store the MyDataHelps auto-generated participantID field with your user data in your application. This field uniquely identifies each participant. Either way, you’ll be able to determine whether a participant entity already exists for a given user, and create a new one when needed.

Managing Participant Access Tokens

To guard against unauthorized use, MyDataHelps requires an access token. When using MyDataHelps within your own application (outside of MyDataHelps), you will need to manage the participant’s access token yourself.

See Participant Access Tokens for details.

Using SDK Features

Once you have a participant access token, you can utilize MyDataHelps SDK features within your application. The specific features will vary by platform, so consult the platform-specific SDK documentation for details. Examples of things you can do include:

  • Get participant demographics and device data.
  • Launch surveys.
  • Connect external accounts, such as FitBit or Electronic Health Records.