2

I'm developing an app that works with Clinical Health Records. The idea is to fetch FHIR resources and process them in a certain way. Although getting the FHIR data is easy, I cannot find out what account or organization the record belongs to.

Neither HKClinicalRecord nor HKFHIRResource classes have methods or fields that might lead to account or healthcare organization.

At the same time, the standard Apple Health application does know the account for each record. It even allows to open it and see the patient's data (see screenshots). Apple's app can filter records by their organizations. That exactly what I'm looking for in my app. Can anybody give me a clue about how to get that information in my code?

The screenshots:

Ivan Grishaev
  • 1,583
  • 10
  • 15

1 Answers1

5

Look at HKClinicalRecord.sourceRevision.source, it tells you where the FHIR data is from. It is an HKSource instance that has a name.

Pascal
  • 16,846
  • 4
  • 60
  • 69
  • I was able to get that and bundleIdentifier, is there any way to get any further meta of the source? Such as source thumbnail or any other unique identifiers? – David Jarrin Nov 26 '19 at 14:16
  • No, as of today that's all the information available from the HealthKit objects – Pascal Jun 18 '21 at 18:19