[Technical Questions] Accessing/storing lab values in HealthKit #117
Replies: 2 comments 1 reply
-
Hi Viraj! Thanks for putting through into this. Did it get resolved in class? I'm sorry that we can't write labs to HealthKit. I think your approach of writing the data to FHIR elements (just make sure to find the right LOINC code for the labs) and pushing them to firebase is the right approach. A little inconvenient not to have everything in HK, but I think it's our best option. |
Beta Was this translation helpful? Give feedback.
-
Hey Viraj, @PSchmiedmayer and @vishnuravi and I chatted a bit more and to keep it a little simpler you guys can store all the info locally without firebase and later in the course we can incorporate a data export function to a central database. Data in HealthKit will be synced to iCloud anyway (like the temperatures). We can discuss more at the next meeting, but for now you can keep everything local in SwiftData. |
Beta Was this translation helpful? Give feedback.
-
In what area do you have a technical challenge?
HealthKit
Description
Problem: we would like to store/access lab values in HealthKit. For German users, we cannot access EHR records to automatically get lab values. We have users manually enter lab values; however, we cannot store these to HealthKit because there is no defined HKQuantityIdentifier and we cannot subclass HKQuantitySample class. The HKCorrelation types seem ideal but they only allow for predefined blood pressure or food correlations.
We discussed potential solutions with Nick and Oliver. The most promising right now seems to be storing lab values outside of HealthKit in SpeziStorage and then encoding to FHIR to push to Firestore. However, it would be most ideal to store all our data together in HealthKit if possible and automatically push to Firestore.
Please let us know your thoughts and whether there's a way to do this, or whether we should simple use a workaround approach. Thank you so much!
Reproduction
Not a code problem, but a design problem.
Expected behavior
Solution: ability to push a struct of lab values to HealthKit and Firestore.
Additional context
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions