StanfordSpezi / SpeziKt

Kotlin & Android Version of the Stanford Spezi Framework
http://spezi.health/SpeziKt/
MIT License
7 stars 1 forks source link

Adds Health Connect codings to mapper #56

Closed vishnuravi closed 1 week ago

vishnuravi commented 1 week ago

Adds Health Connect codings to mapper

:recycle: Current situation & Problem

Currently, the HealthConnectToFHIR mapper adds LOINC codes to each FHIR observation generated from a Health Connect Record. However, it may be useful to also add the Health Connect Record class name as a code as well, as it can facilitate mapping in the reverse direction as well as make it easier for users to understand the origin of the data when mixed with FHIR observations from other sources, such as HealthKitOnFHIR on iOS.

In addition, several Health Connect Records do not have corresponding LOINC codes, therefore providing the Health Connect Record class name is the only way to identify them.

The corresponding library on iOS - HealthKitOnFHIR - also does this: https://github.com/StanfordBDHG/HealthKitOnFHIR/blob/main/Sources/HealthKitOnFHIR/Resources/HKSampleMapping.json

Release Notes

Adds the Health Connect Record class name as the second coding for each Record in the mapper.

:pencil: Code of Conduct & Contributing Guidelines

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

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 42.84%. Comparing base (ec45f58) to head (aaedc64).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56/graphs/tree.svg?width=650&height=150&src=pr&token=rrQTC1h5A7&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi)](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) ```diff @@ Coverage Diff @@ ## main #56 +/- ## ============================================ + Coverage 41.99% 42.84% +0.86% Complexity 296 296 ============================================ Files 111 111 Lines 3227 3275 +48 Branches 470 470 ============================================ + Hits 1355 1403 +48 Misses 1770 1770 Partials 102 102 ``` | [Flag](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | `33.48% <ø> (ø)` | | | [unittests](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | `28.66% <100.00%> (+1.11%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) | Coverage Δ | | |---|---|---| | [...althconnectonfhir/RecordToObservationMapperImpl.kt](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56?src=pr&el=tree&filepath=modules%2Fhealthconnectonfhir%2Fsrc%2Fmain%2Fjava%2Fedu%2Fstanford%2Fhealthconnectonfhir%2FRecordToObservationMapperImpl.kt&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi#diff-bW9kdWxlcy9oZWFsdGhjb25uZWN0b25maGlyL3NyYy9tYWluL2phdmEvZWR1L3N0YW5mb3JkL2hlYWx0aGNvbm5lY3RvbmZoaXIvUmVjb3JkVG9PYnNlcnZhdGlvbk1hcHBlckltcGwua3Q=) | `100.00% <100.00%> (ø)` | | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Last update [ec45f58...aaedc64](https://app.codecov.io/gh/StanfordSpezi/SpeziKt/pull/56?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=StanfordSpezi).