Skip to content

Bring HealthKit's FHIR Output in Line With the Published Profiles - #60

Closed
PSchmiedmayer wants to merge 1 commit into
mainfrom
fhir-conformance-healthkit
Closed

Bring HealthKit's FHIR Output in Line With the Published Profiles#60
PSchmiedmayer wants to merge 1 commit into
mainfrom
fhir-conformance-healthkit

Conversation

@PSchmiedmayer

@PSchmiedmayer PSchmiedmayer commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

♻️ Current situation & Problem

HealthKit samples converted to FHIR did not match the profiles grove-fhir publishes: metadata and provenance used spellings the guides do not define, and a release once shipped observations that declared a profile they violated.

⚙️ Release Notes

  • HealthKit FHIR output is aligned with the vocabulary the guides publish, across metadata, provenance, time zones, state of mind, ECG, category values, quantities, and workouts.
  • Platform metadata moves to grove-platform-metadata, with the metadata key carried in a key sub-extension rather than nested in the URL, and source records to grove-source-record-id.
  • Contained devices gain a form factor and a gateway operating system name, both derived from manufacturer and model and marked as inferred where written.
  • The platform vocabulary the framework writes is dumped for the guide to publish, so the code systems in grove-fhir are generated from the values Grove actually emits instead of being re-derived.

📚 Documentation

The conversion helpers document which spellings are written versus only read, and Migrating to Grove.md reflects the new metadata shape.

✅ Testing

  • GroveHealthKitFHIR on macOS: 16 suites covering category, quantity, correlation, workout, ECG, state-of-mind, metadata, time zone, and superseded-spelling behaviour, plus the macro expansions.
  • A conformance fixture target emits one resource per shape, which Scripts/validate-fhir-conformance.sh puts through the HL7 validator against both published guide packages.

Code of Conduct & Contributing Guidelines

By creating and submitting this pull request, you agree to follow our Code of Conduct and Contributing Guidelines:

Copilot AI lite review requested due to automatic review settings August 19, 2026 05:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d66d051-dcb1-4a1d-8d47-41b49d061e54


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@PSchmiedmayer

Copy link
Copy Markdown
Contributor Author

Contract target for the next revision: preserve this PR as the Grove Swift/HealthKit reference implementation for grove-fhir #6, but move the shared subject/source-identity/sensor/gateway/recording/study/provenance rules into a platform-neutral layer before the final package switch.

Health Connect is not being discarded because it is absent from Swift. Its Android implementation destination is MyHeartCounts-Android #31, which will target the same Mobile profiles and provide independent fixtures. Likewise, My Heart Counts clinical passthrough, study attribution, and metadata/privacy needs require explicit destinations rather than blanket deletion from the prototype inventory.

When #6 settles the package, rebase this PR on those accepted profiles and retain its deterministic HealthKit mappings/tests as evidence for grove-fhir #8. This note does not authorize merging the PR or changing its runners.

@PSchmiedmayer
PSchmiedmayer force-pushed the fhir-conformance-healthkit branch from fb78db4 to 899879e Compare August 19, 2026 17:20
@PSchmiedmayer
PSchmiedmayer force-pushed the fhir-conformance-healthkit branch from 899879e to c3a9543 Compare August 19, 2026 20:41
@PSchmiedmayer
PSchmiedmayer force-pushed the fhir-conformance-healthkit branch from c3a9543 to 1bbf763 Compare August 19, 2026 21:04
Base automatically changed from fhir-conformance to main August 19, 2026 21:16
@PSchmiedmayer
PSchmiedmayer force-pushed the fhir-conformance-healthkit branch from 1bbf763 to 3bc7487 Compare August 19, 2026 21:19
@PSchmiedmayer

Copy link
Copy Markdown
Contributor Author

Superseded by #67, which rewrites this work on the catalog-driven converter and the published v0.2 profiles. Sensor coverage, stable output identity, metadata-key handling and device provenance all carry over; the vocabulary is now sourced from the grove-fhir catalogs with a CI drift check rather than a golden dump in this repo.

@github-project-automation github-project-automation Bot moved this from Todo to Done in Grove Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants