You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,11 @@
34
34
*`queryCorrelationType`
35
35
*`deleteSamples`
36
36
37
+
Read below about `CLINICAL_READ_PERMISSION` to use these
38
+
*`queryClinicalSampleType`
39
+
*`queryForClinicalRecordsFromSource`
40
+
*`queryForClinicalRecordsWithFHIRResourceType`
41
+
37
42
### Resources
38
43
39
44
* The official Apple documentation for [HealthKit can be found here](https://developer.apple.com/library/ios/documentation/HealthKit/Reference/HealthKit_Framework/index.html#//apple_ref/doc/uid/TP40014707).
`HEALTH_READ_PERMISSION` and `HEALTH_WRITE_PERMISSION` are shown when your app asks for access to data in HealthKit.
55
60
61
+
If you would like to read clinical record data from the HealthKit store you will need to provide an extra variable during the plugin install. The `CLINICAL_READ_PERMISSION` can be set to include the ability to read FHIR resources. The value that is set here will be used in the `NSHealthClinicalHealthRecordsShareUsageDescription` key of your app's `info.plist` file. It will be shown when your app asks for clinical record data from HealthKit. Do not include the `CLINICAL_READ_PERMISSION` variable unless you really need access to the clinical record data otherwise Apple may reject your app.
62
+
63
+
The `Health Records` capability will be enabled if the `CLINICAL_READ_PERMISSION` is provided.
64
+
65
+
Here is an install example with `CLINICAL_READ_PERMISSION` -
// this is used to search for a specific FHIR resource type
317
+
// it uses predicateForClinicalRecordsWithFHIRResourceType (https://developer.apple.com/documentation/healthkit/hkquery/2999414-predicateforclinicalrecordswithf?language=objc)
318
+
// In most cases, there’s a one-to-one correspondance between the clinical record types and the FHIR resource types;
319
+
// therefore, most queries already return samples from a single FHIR resource type.
320
+
// However, queries for the HKClinicalTypeIdentifierMedicationRecord type can return records from the
321
+
// HKFHIRResourceTypeMedicationOrder, HKFHIRResourceTypeMedicationDispense, and HKFHIRResourceTypeMedicationStatement FHIR resource types.
322
+
// You can use this predicate to limit your query to one of these FHIR types.
// it uses predicateForClinicalRecordsFromSource (https://developer.apple.com/documentation/healthkit/hkquery/2999413-predicateforclinicalrecordsfroms?language=objc)
0 commit comments