Migrate some Apple Health daily data providers to V2.#613
Open
greinard wants to merge 1 commit into
Open
Conversation
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This branch migrates a number of Apple Health daily data providers to use the V2 API. I also added a few new ones. To the extent possible, I used the V2 aggregate API.
New Providers:
Apple Health Blood Glucose(V2 type:Blood Glucose, aggregate:avg)Apple Health Min Blood Glucose(V2 type:Blood Glucose, aggregate:min)Apple Health Max Blood Glucose(V2 type:Blood Glucose, aggregate:max)Apple Health Min Heart Rate(V2 type:Hourly Minimum Heart Rate, aggregate:min)Health Connect Blood Glucose(V2 type:blood-glucose, aggregate:avg)Health Connect Min Blood Glucose(V2 type:blood-glucose, aggregate:min)Health Connect Max Blood Glucose(V2 type:blood-glucose, aggregate:max)Combined Blood Glucose- Uses theApple Health Blood GlucoseandHealth Connect Blood Glucosedata providers, prioritizing the value from Apple Health when both are present for a given day.Updated Providers:
Apple Health Max Heart Rate(V2 type:Hourly Maximum Heart Rate, aggregate:max)Apple Health Heart Rate Range- Uses values from the V2 min and max heart rate providers to compute the range for each day.Apple Health Mindful Minutes(V2 type:Mindful Sessions, filter:not SilverCloud CBT)Apple Health Resting Heart Rate(V2 type:Resting Heart Rate, aggregate:avg)Apple Health Sleep Time(V2 type:Sleep Analysis, values:['AsleepCore', 'AsleepREM', 'AsleepDeep', 'Asleep'])Apple Health Core Sleep Time(V2 type:Sleep Analysis, value:AsleepCore)Apple Health REM Sleep Time(V2 type:Sleep Analysis, value:AsleepREM)Apple Health Deep Sleep Time(V2 type:Sleep Analysis, value:AsleepDeep)Apple Health In Bed Time(V2 type:Sleep Analysis, value:InBed)Apple Health Steps(V2 type:Hourly Steps, aggregate:sum)Apple Health Steps While Wearing Device(V2 type:Hourly Steps, aggregate:sum)Combined Mindful Minutes- Updated the criteria for using the V2Apple Health Mindful Minutesprovider.Combined Resting Heart Rate- Updated the criteria for using the V2Apple Health Resting Heart Rateprovider.Combined Sleep Time- Updated the criteria for using the V2Apple Health Sleep Timeprovider.Combined Steps- Updated the criteria for using the V2Apple Health Stepsprovider.Security
No new security risk. Just migrating to use the delegated V2 device data API, which is already accessible to participants.
Testing
This change requires a VB PR to fully test.
Documentation
@CareEvolution/api-docs.