HealthKit API, HRV Research

To whom this may concern,


I am writing as I have several questions regarding your PPG sensors and in particular your API as I would like to use your HRV data for research purposes.
  • Do the PPG sensors found within your device take readings 24 7 and at what refresh rate i.e. 50Hz? 

  • If so, then would I be able to retrieve this data from your cloud database

  • If not then can I, upon the users request, override this protocol via the API to make sure that the PPG sensor is operating constantly

  • What file format does the data come in and what exact metrics are contained within the file i.e. IBI, sdnn, rmssd?

I look forward to your response.

Best regards,

This is a forum for 3rd party programmers with Apple engineers assisting on the tough questions. So to maximize your learning and the developer community to help you, you'll need to do some basic web searches yourself including searches on this forum:

Apple provides the Apple Watch which does provide some aspects of heart rate variability and that information is exposed via a HealthKit API:


IBI, sdnn, rmssd?



heartRateVariabilitySDNN
A quantity sample type that measures the standard deviation of heartbeat intervals. 

https://developer.apple.com/documentation/healthkit/hkquantitytypeidentifier/2881127-heartratevariabilitysdnn


retrieve this data from your cloud database

HealthKit APIs are device-based APIs as that data is stored on device in the iOS Health database. Some types of health data can be captured directly from the Apple Watch but in general all data should eventually wind up in the iOS Health database. So, if a user grants a 3rd party app (and hopefully you'll create a great research app) the app can extract that data. Users can view HRV data in the iOS Health app. The App Store does list many HRV apps.

Apple does have strict requirements for both app developers and researchers when handling user health data and Apple does support the research community:

https://developer.apple.com/carekit/

And there is some published research about this very subject such as the 2018 "Validation of the Apple Watch for Heart Rate Variability Measurements during Relax and Mental Stress in Healthy Subjects" with the standard "I'm just referencing, I'm not endorsing" disclaimer.


make sure that the PPG sensor is operating constantly

In general, this is out of the app developer's hands as you cannot force the device to report its data faster, or force the HealthKit API to surface that data to you faster, or control how often the Health database is updated. As of iOS 14, only heart rate data may be transmitted every few of seconds while all other health data generated off the Apple Watch may be transmitted up to 30 minutes later. So continuous monitoring has a different definition in consumer-targeted health care devices such as the Apple Watch and this is not related to accuracy but only to data types supported, speed of generation, transmission, and storage.

Best of luck with your research project.

May I know where I can see the HeartRate transmission schedule that you mentioned? I'm running an experiment that needs heart rate data via PPG in real time or as close as possible. Also, can the data that's a few second lagged be continuously transmitted?

HealthKit API, HRV Research
 
 
Q