Wearables Health and Activity Data Collection (Apple Health, Google Health Connect, and Fitbit)

Prev Next

Configuring Wearables Data to Collect

TrialKit can be used to automatically collect health and activity data from participant users within TrialKit ePRO studies where the Participants are using an Android or Apple phones with their Health App enabled to collect data from any supported wearable device.   If the study is already set up to use ePRO, adding health data collection is very simple and must be done via the Mobile App. Access the configuration option highlighted below.

The next screen is where you define which type of device will be used in the study. If this is blank or set to iOS device, only iOS will default to use Apple HealthKit data. Android will always use Fitbit data. To force Fitbit data on both iOS and Android, set the device to Fitbit.

If at least one of the activities is enabled, Participant users will see this below when signed in:

When tapped by the Participant, the app will collect the corresponding activity data for the last two weeks or since the last time the data was captured, up to the last 28 days for Fitbit or the last 14 days for Apple Health. Study Managers can then filter for specific dates needed from the wearables data exports.

Read more here on how Participants interact with the app to send activity data.

Exporting Wearables Data From the Study

Wearable data can be exported from the web or mobile app.

Prerequisites:

  • The study is configured to collect wearables data

  • The study is an ePRO study

  • User role as access to the Study Events Report

  • Data exists in the metrics being exported

Web Browser:

Mobile App:

Next, select the time range of data to export data for. The files will be exported based on the structures detailed below.

No Data Exported?

If the data file is empty, there was no data stored for the period of time selected.

Wearables Data Structure

When exported, the following variables are provided under the respective data sets outlined below.

Aggregate Wearable Data

Wearables data is collected as aggregates automatically. It does not collect data at specific points in time like forms do. In other words, the data expected in these exports will contain time points that don’t all match the points of interest. It is up to the user to filter down to what is needed.

Resting Heart Rate

rhrexport.csv - Resting heart rate:

  • start_date

  • user_id

  • rhr_value - average heart rate value for the time period

  • end_date

  • sub_id - system subject ID

  • sub_profile_id - Subject profile ID

Activity

ringsexport.csv - Activity data:

  • ring_id

  • collected_date

  • start_date

  • end_date

  • ring_stand

    • Healthkit - hours standing for the day

    • Fitbit - Steps taken for the day. Total minutes the user was lightly active

  • ring_move

    • Healthkit - movement calories for the day

    • Fitbit - Total steps taken for the day

  • ring_exercise

    • Healthkit - exercise calories

    • Fitbit - Total calories burned for the day (daily timeseries total).

  • dev_type

    • 1=Collected by Apple Health

    • 2=Collected by Fitbit

  • ev_int_id

    • The interval sequence for the event which the record was collected in

  • int_id

    • The interval

  • trig_trans_id

  • ed_id

  • ed_name

  • sub_id

  • sub_profile_id

  • study_id

  • user_id

  • ring_floors - Fitbit only - The equivalent floors climbed for the day displayed in the units defined by the Accept-Language header

  • active_very - Fitbit only - Total minutes the user was very active

  • active_fairly - Fitbit only - Total minutes the user was fairly/moderately active

  • active_calories - Fitbit only - The number of calories burned for the day during periods the user was active above sedentary level. This includes both activity burned calories and BMR.

Heart Rate Variability

hrvexport.csv - Heart rate variability:

  • start_date

  • hrv_value

  • user_id

  • end_date

  • sub_id

  • sub_profile_id

Sleep

sleepexport.csv - Sleep

  • sl_id

  • collected_date

  • start_date

  • end_date

  • sl_type - Indicates sleep level

    • Healthkit

      • awake - The user is awake.

      • asleepCore - The user is in light or intermediate sleep.

      • asleepDeep - The user is in deep sleep.

      • asleepREM - The user is in REM sleep.

      • asleepUnspecified -The user is asleep, but the specific stage isn’t known.

    • Fitbit -

      • The total number of minutes the user was awake or wake. This is stored as its own row with sl_type = 2

      • The total sum of minutes the user was in Deep sleep or Asleep. It does not include before falling asleep or after waking up. This is stored as its own row with sl_type = 4

      • Total number of minutes the user was in light sleep. This is stored as its own row with sl_type = 3

      • Total number of minutes the user was in  restless sleep. This is stored as its own row with sl_type = 1

      • Total number of minutes the user was in rem sleep. This is stored as its own row with sl_type = 5

  • sl_type_txt - Fitbit only

  • sl_hours - Fitbit only

  • sl_seconds - Fitbit only

  • sl_rawvalue - Fitbit only - Total number of times the user entered the sleep level.

    Example: 4 means 4 events of the corresponding sleep type in the current sleep period

  • sl_value

    • HealthKit - minutes spent in the corresponding sleep type

    • Fitbit - See sl_type above. This value is shown on each row.

  • dev_type

    • 1=Collected by Apple Health

    • 2=Collected by Fitbit

  • ev_int_id

  • int_id

  • trig_trans_id

  • ed_id

  • ed_name

  • sub_id

  • sub_profile_id

  • study_id

  • user_id

Blood Oxygen

oxexport.csv

  • os_value - spo2 value

  • user_id

  • start_date

  • end_date

  • sub_id

  • sub_profile_id

Respiratory Rate

resprate.csv

  • rr_id

  • rr_startdate

  • rr_enddate

  • rr_value

  • dev_type

  • ev_int_id

  • int_id

  • sub_d

  • level_id

  • trig_trans_id

  • user_id

Blood Pressure

bp.csv

  • bp_id

  • bp_startdate

  • bp_enddate

  • bp_systolic

  • bp_diastolic

  • dev_type

  • ev_int_id

  • int_id

  • sub_id

  • level_id

  • trig_trans_id

  • user_id