Challenge
Users grant only partial data permissions
Agnotic approach
We design flows that degrade gracefully per type and re-prompt with clear purpose strings rather than assuming a full grant.
We turn HealthKit into a compliant clinical data source — reading HKQuantityType and HKCategoryType samples, normalizing patient-generated health data into FHIR Observations, and keeping raw data on-device where Apple requires it. Real integrations, not just familiarity.
Trusted by global innovators
























Apple HealthKit is the on-device store that aggregates steps, heart rate, HRV, ECG, blood oxygen, sleep, and dozens of other sample types from iPhone, Apple Watch, and paired third-party apps. There is no cloud API: your app must request per-type read authorization through HKHealthStore on the device, then sync the samples you are permitted to read to your own HIPAA-compliant backend.
The hard parts are consent granularity, background delivery, and mapping. HealthKit authorization is per data type and users can grant a partial set, so your pipeline must handle missing permissions gracefully. HKObserverQuery and HKAnchoredObjectQuery drive incremental background sync, and every HKQuantitySample carries units and metadata that must be normalized into FHIR Observations with correct LOINC codes before the data is clinically useful.
A privacy-first pipeline from HealthKit on-device samples to a FHIR-native clinical record your platform can trust.

Common failure modes
Challenge
Users grant only partial data permissions
Agnotic approach
We design flows that degrade gracefully per type and re-prompt with clear purpose strings rather than assuming a full grant.
Challenge
Duplicate samples from multiple source apps
Agnotic approach
Source-priority resolution and de-duplication before data ever reaches the FHIR store.
Challenge
Background sync silently stops
Agnotic approach
Persisted anchors, observer-query health checks, and sync-gap alerting so missed windows are caught fast.
Challenge
App Store rejection over health-data privacy
Agnotic approach
Defensible privacy nutrition label, on-device processing, and consent aligned with Apple's HealthKit rules.
We name the exact technical surface — the HealthKit types, queries, and FHIR resources your integration actually rides on.
Read HKQuantityType (heart rate, HRV, steps, VO2 max, blood oxygen) and HKCategoryType (sleep analysis, mindful minutes) with explicit per-type authorization.
Access HKElectrocardiogram voltage samples and HKClinicalRecord FHIR documents synced from connected providers via Health Records on iPhone.
HKObserverQuery with background delivery and HKAnchoredObjectQuery for incremental, deduplicated sync so no sample is missed or double-counted.
Normalize each sample to a FHIR R4 Observation with the right LOINC code, UCUM unit, and effectiveDateTime for a clean longitudinal record.
Honor Apple's on-device processing rules, purpose strings, and per-type consent, syncing only what the patient authorized to your BAA-covered backend.
De-noise raw PGHD, resolve source priority across paired apps, and compute derived trends before data reaches clinicians or ML pipelines.
Where it runs
Continuous vitals from Apple Watch feeding an RPM dashboard with billing-ready data.
ECG and irregular-rhythm notifications routed to clinicians for review.
Activity, sleep, and weight trends tied to care-plan goals.
Consented PGHD collection with export for study analysis.
Cycle, sleep, and HRV signals informing personalized plans.
Step and mobility tracking to flag recovery deviations early.
The gap between a HealthKit sample and a clinical FHIR Observation is where most consumer-health builds stall. We close it.
Health Insurance Portability and Accountability Act
Protect PHI with privacy-first architecture, encrypted storage and transmission, strict access controls, and traceable audit logs.
General Data Protection Regulation
Implement lawful consent flows, data minimization, retention controls, and secure processing for sensitive health data.
Fast Healthcare Interoperability Resources
Enable standardized health data exchange across apps, care teams, and systems through robust FHIR-ready APIs.
Health Level Seven International
Support enterprise-grade interoperability with HL7-based integrations for records, events, and clinical messaging workflows.
Health Information Trust Alliance
Align security programs to healthcare-specific control and risk management practices trusted by providers and ecosystem partners.
Health Information Technology for Economic and Clinical Health Act
Design with breach notification readiness, digital record safeguards, and operational controls that support regulated care programs.
FDA Software as a Medical Device
Plan software quality, traceability, and documentation pathways for products that may require SaMD review and submission.
Medical Device Regulation (European Union)
Prepare EU market-ready processes for risk classification, evidence tracking, and lifecycle governance under MDR expectations.
Substance Abuse and Mental Health Services Administration
Apply confidentiality controls and consent-aware sharing models for behavioral and mental health data experiences.
Standards we build against
A phased approach that treats entitlements, consent, and FHIR mapping as parallel tracks so your build reaches the App Store review with the privacy story already sound.
We map the exact HealthKit sample types your clinical use case needs, the consent copy, and the FHIR profile they map to.
HealthKit capability, background delivery entitlement, purpose strings, and the per-type HKHealthStore authorization flow.
Anchored and observer queries, FHIR Observation mapping, and validation against simulator and real-device sample data.
App Store submission with a defensible privacy nutrition label, plus sync-health dashboards and alerting once live.
Access methods
HealthKit is on-device only. Here is how each read path behaves and where it fits.
| Surface | Method | Typical use | Notes |
|---|---|---|---|
| Quantity samples | HKAnchoredObjectQuery | Heart rate, steps, HRV | Anchor persistence gives gap-free incremental sync. |
| Category samples | HKAnchoredObjectQuery | Sleep, mindfulness | Enumerated values; map to FHIR coded Observations. |
| ECG | HKElectrocardiogram query | AFib / rhythm review | Voltage series plus classification; large payloads. |
| Background updates | HKObserverQuery + delivery | Near-real-time RPM | Requires background delivery entitlement. |
| Clinical records | HKClinicalRecord | Provider FHIR docs | Read-only FHIR resources from linked health systems. |
There is no server-to-server HealthKit API — all reads happen on-device and sync to your BAA-covered backend.
Related proof of compliant, integration-heavy delivery: for Lera Health we built the privacy-first data layer and testing-to-insights workflow — the same discipline we bring to normalizing HealthKit patient-generated data into a trustworthy clinical record.

We ship real HealthKit integrations that survive App Store review and clinical scrutiny.
HIPAA, on-device privacy rules, and consent granularity designed into the pipeline from sprint one.
We've normalized wearable and femtech signals into FHIR before — your team won't be educating ours on sample types or LOINC coding.
Entitlements, consent copy, and FHIR mapping run in parallel so you reach a submittable build in weeks.
One accountable team across iOS engineering, backend FHIR, and compliance — not a hand-off chain.
Tell us the sample types and use case. We'll return a realistic plan with entitlements, consent design, and a FHIR mapping approach.
contact@agnotic.com
Partnerships
contact@agnotic.com