Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Physical Effort Metric #40

Merged

Conversation

MatthewTurk247
Copy link
Contributor

Support for Physical Effort Metric

♻️ Current situation & Problem

Currently, HealthKitOnFHIR does not support the HKQuantityTypeIdentifierPhysicalEffort type, a recent addition to HealthKit. Now we are adding the ability to encode a FHIR resource related to this physical effort metric, measured in metabolic equivalents (calories per hour per kilogram).

⚙️ Release Notes

  • Added support for HKQuantityTypeIdentifierPhysicalEffort in HealthKit extension to enable tracking of physical effort in kcal/hr/kg.

📚 Documentation

This feature is implemented with an emphasis on maintaining consistency with existing types and ensuring that the new data can be seamlessly integrated with our tools and UI.

✅ Testing

See HKQuantitySampleTests.swift.

Code of Conduct & Contributing Guidelines

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

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for the additions to HealthKitOnFHIR!

I had one comment in the PR.

It would be great if you can also adjust the documentation at https://github.com/StanfordBDHG/HealthKitOnFHIR/blob/main/Sources/HealthKitOnFHIR/HealthKitOnFHIR.docc/SupportedHKQuantityTypes.md to include the new type and mapping.

Copy link
Member

@PSchmiedmayer PSchmiedmayer left a comment

Choose a reason for hiding this comment

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

Thank you for the improvements and clarifications; this looks great to me!

@MatthewTurk247
Copy link
Contributor Author

Thank you for the improvements and clarifications; this looks great to me!

Awesome! Thanks for the feedback. A few remaining details: HKQuantitySampleTests.swift uses some deprecated enums, and without that status check passing, I cannot merge the branch. Additionally, a few other checks are still pending in status. What course of action do you suggest?

Copy link

codecov bot commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.86%. Comparing base (825e960) to head (93c6474).
Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main      #40   +/-   ##
=======================================
  Coverage   92.86%   92.86%           
=======================================
  Files          23       23           
  Lines        1092     1092           
=======================================
  Hits         1014     1014           
  Misses         78       78           

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 825e960...93c6474. Read the comment docs.

@PSchmiedmayer
Copy link
Member

@MatthewTurk247 The deprivation warnings did not affect the unit test; it was an issue that the simulator was not starting properly. I have also fixed some flakey behavior in the UI tests.

@PSchmiedmayer PSchmiedmayer added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 7, 2024
@PSchmiedmayer PSchmiedmayer merged commit 54d06c3 into StanfordBDHG:main Mar 7, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants