How to store ECG data on apple healthkit?
up vote
0
down vote
favorite
I am new to IOS app development. I have been trying to learn how to work with Apple HealthKit API. So far, as an experiment I have managed to build a simple app which could store and retrieve data from the HealthKit such as blood type, heart rate etc (i can furnish the code if anyone needs it-it is already available on the internet). I am able to do this functionality because healthkitStore exposes these typeIdentifiers for the app developers. However, I am a bit lost when I want to create a new typeIdentifier such for storing ECG/EKG on the healthKit? I want to feed ECG/EKG signals into my app and use the HealthKitStore to save these information. Am i missing something?I know I am slow, but i have searched a lot over the internet, but I could not find any specific solutions. Is this not possible? But the whole point of opening the API to the developers is to create new apps with different features.
I have no specific requirement as far as storing and retrieving ECG data is concerned, as i simply want to create a PoC without any constraints but focusing on the functionality.
Will I be wrong If i want to create the above by using
struct HKClinicalTypeIdentifier
and then use Clinical Record type identifier
static let labResultRecord: HKClinicalTypeIdentifier
Is this the correct direction?
Any direction, motivation or criticism is much welcomed.
ios swift3 health-kit
add a comment |
up vote
0
down vote
favorite
I am new to IOS app development. I have been trying to learn how to work with Apple HealthKit API. So far, as an experiment I have managed to build a simple app which could store and retrieve data from the HealthKit such as blood type, heart rate etc (i can furnish the code if anyone needs it-it is already available on the internet). I am able to do this functionality because healthkitStore exposes these typeIdentifiers for the app developers. However, I am a bit lost when I want to create a new typeIdentifier such for storing ECG/EKG on the healthKit? I want to feed ECG/EKG signals into my app and use the HealthKitStore to save these information. Am i missing something?I know I am slow, but i have searched a lot over the internet, but I could not find any specific solutions. Is this not possible? But the whole point of opening the API to the developers is to create new apps with different features.
I have no specific requirement as far as storing and retrieving ECG data is concerned, as i simply want to create a PoC without any constraints but focusing on the functionality.
Will I be wrong If i want to create the above by using
struct HKClinicalTypeIdentifier
and then use Clinical Record type identifier
static let labResultRecord: HKClinicalTypeIdentifier
Is this the correct direction?
Any direction, motivation or criticism is much welcomed.
ios swift3 health-kit
Since the watch has an ecg function there must be an apple way to store and use this data without defining your own types. The documentation is worse than Apple's normally lousy standard though.
– john elemans
Nov 19 at 18:05
So I think the ECG as a TypeIdentifier is currently missing from the HealthKit API. Certainly, looking at the screenshots Apple has provided of the ECG functionality, it looks like it will have its own section in the Health app like Heart Rate, Heart Rate Variability and VO2 Max for example. I suspect that with WatchOS 5.1.2 there will also be a new iOS release change. These will likely have the api calls added. It’s odd though that Apple hasn’t got these changes into the beta first to allow developers to get support in their apps.
– Simon Edwardes
Dec 1 at 15:34
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I am new to IOS app development. I have been trying to learn how to work with Apple HealthKit API. So far, as an experiment I have managed to build a simple app which could store and retrieve data from the HealthKit such as blood type, heart rate etc (i can furnish the code if anyone needs it-it is already available on the internet). I am able to do this functionality because healthkitStore exposes these typeIdentifiers for the app developers. However, I am a bit lost when I want to create a new typeIdentifier such for storing ECG/EKG on the healthKit? I want to feed ECG/EKG signals into my app and use the HealthKitStore to save these information. Am i missing something?I know I am slow, but i have searched a lot over the internet, but I could not find any specific solutions. Is this not possible? But the whole point of opening the API to the developers is to create new apps with different features.
I have no specific requirement as far as storing and retrieving ECG data is concerned, as i simply want to create a PoC without any constraints but focusing on the functionality.
Will I be wrong If i want to create the above by using
struct HKClinicalTypeIdentifier
and then use Clinical Record type identifier
static let labResultRecord: HKClinicalTypeIdentifier
Is this the correct direction?
Any direction, motivation or criticism is much welcomed.
ios swift3 health-kit
I am new to IOS app development. I have been trying to learn how to work with Apple HealthKit API. So far, as an experiment I have managed to build a simple app which could store and retrieve data from the HealthKit such as blood type, heart rate etc (i can furnish the code if anyone needs it-it is already available on the internet). I am able to do this functionality because healthkitStore exposes these typeIdentifiers for the app developers. However, I am a bit lost when I want to create a new typeIdentifier such for storing ECG/EKG on the healthKit? I want to feed ECG/EKG signals into my app and use the HealthKitStore to save these information. Am i missing something?I know I am slow, but i have searched a lot over the internet, but I could not find any specific solutions. Is this not possible? But the whole point of opening the API to the developers is to create new apps with different features.
I have no specific requirement as far as storing and retrieving ECG data is concerned, as i simply want to create a PoC without any constraints but focusing on the functionality.
Will I be wrong If i want to create the above by using
struct HKClinicalTypeIdentifier
and then use Clinical Record type identifier
static let labResultRecord: HKClinicalTypeIdentifier
Is this the correct direction?
Any direction, motivation or criticism is much welcomed.
ios swift3 health-kit
ios swift3 health-kit
edited Nov 19 at 14:18
asked Nov 19 at 14:02
codeheadache
96
96
Since the watch has an ecg function there must be an apple way to store and use this data without defining your own types. The documentation is worse than Apple's normally lousy standard though.
– john elemans
Nov 19 at 18:05
So I think the ECG as a TypeIdentifier is currently missing from the HealthKit API. Certainly, looking at the screenshots Apple has provided of the ECG functionality, it looks like it will have its own section in the Health app like Heart Rate, Heart Rate Variability and VO2 Max for example. I suspect that with WatchOS 5.1.2 there will also be a new iOS release change. These will likely have the api calls added. It’s odd though that Apple hasn’t got these changes into the beta first to allow developers to get support in their apps.
– Simon Edwardes
Dec 1 at 15:34
add a comment |
Since the watch has an ecg function there must be an apple way to store and use this data without defining your own types. The documentation is worse than Apple's normally lousy standard though.
– john elemans
Nov 19 at 18:05
So I think the ECG as a TypeIdentifier is currently missing from the HealthKit API. Certainly, looking at the screenshots Apple has provided of the ECG functionality, it looks like it will have its own section in the Health app like Heart Rate, Heart Rate Variability and VO2 Max for example. I suspect that with WatchOS 5.1.2 there will also be a new iOS release change. These will likely have the api calls added. It’s odd though that Apple hasn’t got these changes into the beta first to allow developers to get support in their apps.
– Simon Edwardes
Dec 1 at 15:34
Since the watch has an ecg function there must be an apple way to store and use this data without defining your own types. The documentation is worse than Apple's normally lousy standard though.
– john elemans
Nov 19 at 18:05
Since the watch has an ecg function there must be an apple way to store and use this data without defining your own types. The documentation is worse than Apple's normally lousy standard though.
– john elemans
Nov 19 at 18:05
So I think the ECG as a TypeIdentifier is currently missing from the HealthKit API. Certainly, looking at the screenshots Apple has provided of the ECG functionality, it looks like it will have its own section in the Health app like Heart Rate, Heart Rate Variability and VO2 Max for example. I suspect that with WatchOS 5.1.2 there will also be a new iOS release change. These will likely have the api calls added. It’s odd though that Apple hasn’t got these changes into the beta first to allow developers to get support in their apps.
– Simon Edwardes
Dec 1 at 15:34
So I think the ECG as a TypeIdentifier is currently missing from the HealthKit API. Certainly, looking at the screenshots Apple has provided of the ECG functionality, it looks like it will have its own section in the Health app like Heart Rate, Heart Rate Variability and VO2 Max for example. I suspect that with WatchOS 5.1.2 there will also be a new iOS release change. These will likely have the api calls added. It’s odd though that Apple hasn’t got these changes into the beta first to allow developers to get support in their apps.
– Simon Edwardes
Dec 1 at 15:34
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
I found an alternate solution to the above issue. I am writing this so that if anyone has similar issue can take a similar approach if needed.
Basically at the time of writing this thread, there are no ECG typeIdentifier available for developers to use. However, the way around it is to create a HKQauntiySample object and pass the ECG values as metadata. But the only issue that i am facing with such an approach is to do with the rate at which the live/historical ECG can be saved into the healthkit.
The sampling frequency for the ECG e.g is 200 Hz. I am not able to store the data with subsecond timestamp. It can only provide upto seconds of timestamp. Also, it seems, the maximum rate at which data can be stored using the above object is as low as 160Hz. Maybe this is a limitation of the interface, healtkitstore etc. I dont know. Hope this closes the issue.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
I found an alternate solution to the above issue. I am writing this so that if anyone has similar issue can take a similar approach if needed.
Basically at the time of writing this thread, there are no ECG typeIdentifier available for developers to use. However, the way around it is to create a HKQauntiySample object and pass the ECG values as metadata. But the only issue that i am facing with such an approach is to do with the rate at which the live/historical ECG can be saved into the healthkit.
The sampling frequency for the ECG e.g is 200 Hz. I am not able to store the data with subsecond timestamp. It can only provide upto seconds of timestamp. Also, it seems, the maximum rate at which data can be stored using the above object is as low as 160Hz. Maybe this is a limitation of the interface, healtkitstore etc. I dont know. Hope this closes the issue.
add a comment |
up vote
0
down vote
accepted
I found an alternate solution to the above issue. I am writing this so that if anyone has similar issue can take a similar approach if needed.
Basically at the time of writing this thread, there are no ECG typeIdentifier available for developers to use. However, the way around it is to create a HKQauntiySample object and pass the ECG values as metadata. But the only issue that i am facing with such an approach is to do with the rate at which the live/historical ECG can be saved into the healthkit.
The sampling frequency for the ECG e.g is 200 Hz. I am not able to store the data with subsecond timestamp. It can only provide upto seconds of timestamp. Also, it seems, the maximum rate at which data can be stored using the above object is as low as 160Hz. Maybe this is a limitation of the interface, healtkitstore etc. I dont know. Hope this closes the issue.
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
I found an alternate solution to the above issue. I am writing this so that if anyone has similar issue can take a similar approach if needed.
Basically at the time of writing this thread, there are no ECG typeIdentifier available for developers to use. However, the way around it is to create a HKQauntiySample object and pass the ECG values as metadata. But the only issue that i am facing with such an approach is to do with the rate at which the live/historical ECG can be saved into the healthkit.
The sampling frequency for the ECG e.g is 200 Hz. I am not able to store the data with subsecond timestamp. It can only provide upto seconds of timestamp. Also, it seems, the maximum rate at which data can be stored using the above object is as low as 160Hz. Maybe this is a limitation of the interface, healtkitstore etc. I dont know. Hope this closes the issue.
I found an alternate solution to the above issue. I am writing this so that if anyone has similar issue can take a similar approach if needed.
Basically at the time of writing this thread, there are no ECG typeIdentifier available for developers to use. However, the way around it is to create a HKQauntiySample object and pass the ECG values as metadata. But the only issue that i am facing with such an approach is to do with the rate at which the live/historical ECG can be saved into the healthkit.
The sampling frequency for the ECG e.g is 200 Hz. I am not able to store the data with subsecond timestamp. It can only provide upto seconds of timestamp. Also, it seems, the maximum rate at which data can be stored using the above object is as low as 160Hz. Maybe this is a limitation of the interface, healtkitstore etc. I dont know. Hope this closes the issue.
answered Nov 29 at 9:28
codeheadache
96
96
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53376307%2fhow-to-store-ecg-data-on-apple-healthkit%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Since the watch has an ecg function there must be an apple way to store and use this data without defining your own types. The documentation is worse than Apple's normally lousy standard though.
– john elemans
Nov 19 at 18:05
So I think the ECG as a TypeIdentifier is currently missing from the HealthKit API. Certainly, looking at the screenshots Apple has provided of the ECG functionality, it looks like it will have its own section in the Health app like Heart Rate, Heart Rate Variability and VO2 Max for example. I suspect that with WatchOS 5.1.2 there will also be a new iOS release change. These will likely have the api calls added. It’s odd though that Apple hasn’t got these changes into the beta first to allow developers to get support in their apps.
– Simon Edwardes
Dec 1 at 15:34