@ovok/native 1.6.1 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokBackgroundSyncModule.java +25 -3
- package/android/src/main/java/com/ovok/sdk/backgroundsync/OvokHealthConnectWorker.java +6 -2
- package/app.plugin.js +4 -2
- package/lib/commonjs/modules/auth/default-translation.js +69 -0
- package/lib/commonjs/modules/auth/default-translation.js.map +1 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/commonjs/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/commonjs/modules/auth/hooks/use-session.js +22 -6
- package/lib/commonjs/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/commonjs/modules/auth/index.js +1 -0
- package/lib/commonjs/modules/auth/index.js.map +1 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js +27 -1
- package/lib/commonjs/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/commonjs/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/commonjs/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/login-link.js +4 -3
- package/lib/commonjs/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js +4 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js +2 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js +6 -2
- package/lib/commonjs/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/session/components/session-list.js +5 -3
- package/lib/commonjs/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/commonjs/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/commonjs/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/commonjs/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/commonjs/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/commonjs/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/commonjs/modules/auth/utils/sign-out-google.js +16 -0
- package/lib/commonjs/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/commonjs/modules/background-sync/android-background-sync.js.map +1 -1
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js +12 -1
- package/lib/commonjs/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/commonjs/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/status.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/components/item/title.js +1 -2
- package/lib/commonjs/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/commonjs/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js +12 -1
- package/lib/commonjs/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js +109 -39
- package/lib/commonjs/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js +37 -14
- package/lib/commonjs/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js +32 -8
- package/lib/commonjs/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js +52 -1
- package/lib/commonjs/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js +20 -11
- package/lib/commonjs/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/commonjs/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/commonjs/modules/bt-management/index.js +11 -0
- package/lib/commonjs/modules/bt-management/index.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js +5 -1
- package/lib/commonjs/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/bt-manager.js +56 -16
- package/lib/commonjs/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/commonjs/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js +97 -2
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js +74 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +52 -0
- package/lib/commonjs/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js +0 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js +22 -2
- package/lib/commonjs/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js +1 -0
- package/lib/commonjs/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -1
- package/lib/commonjs/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js +4 -0
- package/lib/commonjs/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/commonjs/modules/bt-management/utils/device-title.js +17 -0
- package/lib/commonjs/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/commonjs/modules/content/content-card/components/title.js +1 -3
- package/lib/commonjs/modules/content/content-card/components/title.js.map +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/commonjs/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/android/android-health-sync.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/apple/apple-health-sync.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/commonjs/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/commonjs/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/commonjs/modules/data-sync/index.js +11 -0
- package/lib/commonjs/modules/data-sync/index.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/android-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js +1 -1
- package/lib/commonjs/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js +40 -5
- package/lib/commonjs/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/commonjs/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/commonjs/modules/data-sync/types/get-data-from-provider-props.js +4 -0
- package/lib/commonjs/modules/data-sync/types/get-total-count-props.js +4 -0
- package/lib/commonjs/modules/data-sync/types/health-data.js +12 -0
- package/lib/commonjs/modules/data-sync/types/health-data.js.map +1 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js +39 -0
- package/lib/commonjs/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js +232 -0
- package/lib/commonjs/modules/data-sync/utils/convert-generic-health-data.js.map +1 -0
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js +36 -6
- package/lib/commonjs/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js +40 -9
- package/lib/commonjs/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js +1 -0
- package/lib/commonjs/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-latest-observation-dates-by-code.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js +90 -14
- package/lib/commonjs/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js +100 -14
- package/lib/commonjs/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js +12 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-records-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js +21 -17
- package/lib/commonjs/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js +55 -0
- package/lib/commonjs/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/commonjs/modules/diary/components/no-data.js +1 -2
- package/lib/commonjs/modules/diary/components/no-data.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/commonjs/modules/helpers/form-items/form-select.js +13 -13
- package/lib/commonjs/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/commonjs/modules/image/components/optimized-image.js +18 -0
- package/lib/commonjs/modules/image/components/optimized-image.js.map +1 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js +0 -1
- package/lib/commonjs/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js +0 -1
- package/lib/commonjs/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/date-range.js +4 -3
- package/lib/commonjs/modules/measurement/components/date-range.js.map +1 -1
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/commonjs/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/commonjs/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/commonjs/modules/setting/components/list-header.js +1 -2
- package/lib/commonjs/modules/setting/components/list-header.js.map +1 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js +0 -1
- package/lib/commonjs/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/commonjs/modules/tab/components/tab-item.js +0 -1
- package/lib/commonjs/modules/tab/components/tab-item.js.map +1 -1
- package/lib/commonjs/modules/theme/utils/generate-theme.js +35 -4
- package/lib/commonjs/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/commonjs/modules/tile/components/measured-value.js +0 -3
- package/lib/commonjs/modules/tile/components/measured-value.js.map +1 -1
- package/lib/commonjs/modules/tile/components/title.js +0 -1
- package/lib/commonjs/modules/tile/components/title.js.map +1 -1
- package/lib/commonjs/modules/ui/components/background-sync-setting.js +11 -5
- package/lib/commonjs/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js +19 -6
- package/lib/commonjs/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/commonjs/modules/ui/components/health-import-card.js +15 -3
- package/lib/commonjs/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js +95 -0
- package/lib/commonjs/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/commonjs/modules/ui/components/pairing-flow.js +75 -31
- package/lib/commonjs/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js +3 -4
- package/lib/commonjs/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/commonjs/modules/ui/components/urine-test-result.js +6 -4
- package/lib/commonjs/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/commonjs/modules/ui/index.js +11 -0
- package/lib/commonjs/modules/ui/index.js.map +1 -1
- package/lib/commonjs/modules/ui/use-ovok-ui.js +3 -0
- package/lib/commonjs/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/module/modules/auth/default-translation.js +68 -0
- package/lib/module/modules/auth/default-translation.js.map +1 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js +2 -0
- package/lib/module/modules/auth/delete-account-button/components/delete-account-button.js.map +1 -1
- package/lib/module/modules/auth/hooks/use-session.js +22 -6
- package/lib/module/modules/auth/hooks/use-session.js.map +1 -1
- package/lib/module/modules/auth/index.js +1 -0
- package/lib/module/modules/auth/index.js.map +1 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js +27 -1
- package/lib/module/modules/auth/logout-button/components/logout-button.js.map +1 -1
- package/lib/module/modules/auth/profile/components/profile-form.js +0 -1
- package/lib/module/modules/auth/profile/components/profile-form.js.map +1 -1
- package/lib/module/modules/auth/register/components/form/register-button.js +2 -2
- package/lib/module/modules/auth/register/components/form/register-button.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/description.js +0 -1
- package/lib/module/modules/auth/register/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/register/components/header/title.js +5 -2
- package/lib/module/modules/auth/register/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/register/components/login-link.js +4 -3
- package/lib/module/modules/auth/register/components/login-link.js.map +1 -1
- package/lib/module/modules/auth/register/components/register-with-separator.js +1 -2
- package/lib/module/modules/auth/register/components/register-with-separator.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js +4 -1
- package/lib/module/modules/auth/reset-password/components/form/inputs.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js +2 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-button.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js +6 -2
- package/lib/module/modules/auth/reset-password/components/form/reset-password-form-provider.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js +0 -1
- package/lib/module/modules/auth/reset-password/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/reset-password/components/header/title.js +5 -2
- package/lib/module/modules/auth/reset-password/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/session/components/session-list.js +5 -3
- package/lib/module/modules/auth/session/components/session-list.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/footer.js +0 -1
- package/lib/module/modules/auth/sign-in/components/footer.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js +2 -2
- package/lib/module/modules/auth/sign-in/components/form/signin-button.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js +0 -1
- package/lib/module/modules/auth/sign-in/components/header/description.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/header/title.js +5 -2
- package/lib/module/modules/auth/sign-in/components/header/title.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js +1 -2
- package/lib/module/modules/auth/sign-in/components/login-with-separator.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/register-link.js +4 -3
- package/lib/module/modules/auth/sign-in/components/register-link.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/site-url.js +1 -3
- package/lib/module/modules/auth/sign-in/components/site-url.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/apple-login-text.js.map +1 -1
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js +1 -3
- package/lib/module/modules/auth/sign-in/components/social-logins/google-login-text.js.map +1 -1
- package/lib/module/modules/auth/utils/sign-out-google.js +12 -0
- package/lib/module/modules/auth/utils/sign-out-google.js.map +1 -0
- package/lib/module/modules/background-sync/android-background-sync.js.map +1 -1
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js +12 -1
- package/lib/module/modules/background-sync/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js +0 -1
- package/lib/module/modules/breathing-exercise/components/method-name.js.map +1 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js +0 -1
- package/lib/module/modules/breathing-exercise/components/remaining-time.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/status.js +1 -2
- package/lib/module/modules/bt-device/components/item/status.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/sub-title.js +1 -2
- package/lib/module/modules/bt-device/components/item/sub-title.js.map +1 -1
- package/lib/module/modules/bt-device/components/item/title.js +1 -2
- package/lib/module/modules/bt-device/components/item/title.js.map +1 -1
- package/lib/module/modules/bt-device/constants/supported-devices.js +4 -2
- package/lib/module/modules/bt-device/constants/supported-devices.js.map +1 -1
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js +12 -1
- package/lib/module/modules/bt-management/components/android-bluetooth-foreground-service.js.map +1 -1
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js +110 -41
- package/lib/module/modules/bt-management/components/bluetooth-device-picker.js.map +1 -1
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js +37 -14
- package/lib/module/modules/bt-management/components/bt-provider-child-wrapper.js.map +1 -1
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js +32 -8
- package/lib/module/modules/bt-management/constants/measurement-field-catalog.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js +52 -1
- package/lib/module/modules/bt-management/hooks/runtime-context.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js +20 -11
- package/lib/module/modules/bt-management/hooks/use-paired-devices.js.map +1 -1
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js +5 -8
- package/lib/module/modules/bt-management/hooks/use-request-permissions.js.map +1 -1
- package/lib/module/modules/bt-management/index.js +1 -0
- package/lib/module/modules/bt-management/index.js.map +1 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js +5 -1
- package/lib/module/modules/bt-management/services/background-sync/background-sync-coordinator.js.map +1 -1
- package/lib/module/modules/bt-management/services/bt-manager.js +56 -16
- package/lib/module/modules/bt-management/services/bt-manager.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js +9 -6
- package/lib/module/modules/bt-management/services/devices/boso/boso.medicus.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js +98 -2
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js +68 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.files.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js +48 -0
- package/lib/module/modules/bt-management/services/devices/bp2/bp2.history-sequencer.js.map +1 -0
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js +0 -1
- package/lib/module/modules/bt-management/services/devices/bt-connection-handler.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js +22 -2
- package/lib/module/modules/bt-management/services/devices/bt-managed-device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js +1 -0
- package/lib/module/modules/bt-management/services/devices/custom/custom.device.js.map +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js +1 -1
- package/lib/module/modules/bt-management/services/devices/lepu/lepu.file-transfer.js.map +1 -1
- package/lib/module/modules/bt-management/types/bluetooth-error.js +4 -0
- package/lib/module/modules/bt-management/types/bluetooth-error.js.map +1 -1
- package/lib/module/modules/bt-management/utils/device-title.js +12 -0
- package/lib/module/modules/bt-management/utils/device-title.js.map +1 -0
- package/lib/module/modules/content/content-card/components/cover-badge.js +1 -3
- package/lib/module/modules/content/content-card/components/cover-badge.js.map +1 -1
- package/lib/module/modules/content/content-card/components/title.js +1 -3
- package/lib/module/modules/content/content-card/components/title.js.map +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js +1 -1
- package/lib/module/modules/content/content-detail/components/content-detail-rich-content.js.map +1 -1
- package/lib/module/modules/data-sync/components/android/android-health-sync.js.map +1 -1
- package/lib/module/modules/data-sync/components/apple/apple-health-sync.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js +2 -2
- package/lib/module/modules/data-sync/components/manually-request-sheet/description.js.map +1 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js +0 -1
- package/lib/module/modules/data-sync/components/manually-request-sheet/title.js.map +1 -1
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js +30 -21
- package/lib/module/modules/data-sync/components/sync-progress-list/sync-progress-list.js.map +1 -1
- package/lib/module/modules/data-sync/index.js +1 -0
- package/lib/module/modules/data-sync/index.js.map +1 -1
- package/lib/module/modules/data-sync/services/android-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/apple-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js +1 -1
- package/lib/module/modules/data-sync/services/base-health-sync-service.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/data-processor.js +40 -5
- package/lib/module/modules/data-sync/services/managers/data-processor.js.map +1 -1
- package/lib/module/modules/data-sync/services/managers/sync-progress-manager.js.map +1 -1
- package/lib/module/modules/data-sync/types/get-data-from-provider-props.js +2 -0
- package/lib/module/modules/data-sync/types/get-total-count-props.js +2 -0
- package/lib/module/modules/data-sync/types/health-data.js +7 -0
- package/lib/module/modules/data-sync/types/health-data.js.map +1 -0
- package/lib/module/modules/data-sync/types/health-sync-keys.js +38 -1
- package/lib/module/modules/data-sync/types/health-sync-keys.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js +227 -0
- package/lib/module/modules/data-sync/utils/convert-generic-health-data.js.map +1 -0
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js +37 -7
- package/lib/module/modules/data-sync/utils/convert-records-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js +41 -10
- package/lib/module/modules/data-sync/utils/convert-samples-to-observation.js.map +1 -1
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js +1 -0
- package/lib/module/modules/data-sync/utils/generate-observation-entry.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-latest-observation-dates-by-code.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js +92 -16
- package/lib/module/modules/data-sync/utils/get-records-from-health-connect.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js +100 -14
- package/lib/module/modules/data-sync/utils/get-samples-from-health.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-records-count.js +12 -1
- package/lib/module/modules/data-sync/utils/get-total-records-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js +20 -16
- package/lib/module/modules/data-sync/utils/get-total-samples-count.js.map +1 -1
- package/lib/module/modules/data-sync/utils/health-observation-device.js +50 -0
- package/lib/module/modules/data-sync/utils/health-observation-device.js.map +1 -0
- package/lib/module/modules/diary/components/no-data.js +1 -2
- package/lib/module/modules/diary/components/no-data.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js +1 -1
- package/lib/module/modules/helpers/form-items/form-date-field.js.map +1 -1
- package/lib/module/modules/helpers/form-items/form-select.js +13 -13
- package/lib/module/modules/helpers/form-items/form-select.js.map +1 -1
- package/lib/module/modules/image/components/optimized-image.js +18 -0
- package/lib/module/modules/image/components/optimized-image.js.map +1 -1
- package/lib/module/modules/journal/past-journal/components/title.js +0 -1
- package/lib/module/modules/journal/past-journal/components/title.js.map +1 -1
- package/lib/module/modules/language-switcher/components/option/label.js +0 -1
- package/lib/module/modules/language-switcher/components/option/label.js.map +1 -1
- package/lib/module/modules/measurement/components/date-range.js +4 -3
- package/lib/module/modules/measurement/components/date-range.js.map +1 -1
- package/lib/module/modules/measurement/components/measurement-list-item.js +10 -10
- package/lib/module/modules/measurement/components/measurement-list-item.js.map +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js +1 -1
- package/lib/module/modules/questionnaire-response-form/components/fields/questionnaire-date-field.js.map +1 -1
- package/lib/module/modules/setting/components/list-header.js +1 -2
- package/lib/module/modules/setting/components/list-header.js.map +1 -1
- package/lib/module/modules/setting/components/setting-list-item.js +0 -1
- package/lib/module/modules/setting/components/setting-list-item.js.map +1 -1
- package/lib/module/modules/tab/components/tab-item.js +0 -1
- package/lib/module/modules/tab/components/tab-item.js.map +1 -1
- package/lib/module/modules/theme/utils/generate-theme.js +35 -4
- package/lib/module/modules/theme/utils/generate-theme.js.map +1 -1
- package/lib/module/modules/tile/components/measured-value.js +0 -3
- package/lib/module/modules/tile/components/measured-value.js.map +1 -1
- package/lib/module/modules/tile/components/title.js +0 -1
- package/lib/module/modules/tile/components/title.js.map +1 -1
- package/lib/module/modules/ui/components/background-sync-setting.js +11 -5
- package/lib/module/modules/ui/components/background-sync-setting.js.map +1 -1
- package/lib/module/modules/ui/components/bluetooth-state-notice.js +19 -6
- package/lib/module/modules/ui/components/bluetooth-state-notice.js.map +1 -1
- package/lib/module/modules/ui/components/health-import-card.js +15 -3
- package/lib/module/modules/ui/components/health-import-card.js.map +1 -1
- package/lib/module/modules/ui/components/measurement-trend-chart.js +91 -0
- package/lib/module/modules/ui/components/measurement-trend-chart.js.map +1 -0
- package/lib/module/modules/ui/components/pairing-flow.js +78 -34
- package/lib/module/modules/ui/components/pairing-flow.js.map +1 -1
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js +4 -5
- package/lib/module/modules/ui/components/supported-devices-catalog-list.js.map +1 -1
- package/lib/module/modules/ui/components/urine-test-result.js +6 -4
- package/lib/module/modules/ui/components/urine-test-result.js.map +1 -1
- package/lib/module/modules/ui/index.js +1 -0
- package/lib/module/modules/ui/index.js.map +1 -1
- package/lib/module/modules/ui/use-ovok-ui.js +4 -1
- package/lib/module/modules/ui/use-ovok-ui.js.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/auth/default-translation.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts +8 -2
- package/lib/typescript/commonjs/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/commonjs/src/modules/auth/logout-button/types/logout-button-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/register/components/login-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/commonjs/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/commonjs/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/commonjs/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/background-sync/android-background-sync.d.ts +3 -2
- package/lib/typescript/commonjs/src/modules/background-sync/android-background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts +13 -4
- package/lib/typescript/commonjs/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts +4 -0
- package/lib/typescript/commonjs/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts +6 -2
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts +17 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts +6 -0
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/commonjs/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/components/android/android-health-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/apple/apple-health-sync.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/commonjs/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/android-health-sync-service.d.ts +4 -4
- package/lib/typescript/commonjs/src/modules/data-sync/services/android-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts +5 -5
- package/lib/typescript/commonjs/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts +1 -3
- package/lib/typescript/commonjs/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts +7 -9
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +6 -6
- package/lib/typescript/commonjs/src/modules/data-sync/services/managers/sync-progress-manager.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/convert-data-props.d.ts +6 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/convert-data-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-total-count-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/get-total-count-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-data.d.ts +14 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-data.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts +19 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts +7 -5
- package/lib/typescript/commonjs/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts +1 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts +1 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-observation-dates-by-code.d.ts +3 -3
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-observation-dates-by-code.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts +2 -2
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +6 -8
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts +20 -4
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-records-count.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts +3 -8
- package/lib/typescript/commonjs/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts +9 -0
- package/lib/typescript/commonjs/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/commonjs/src/modules/measurement/types/measurement-list-item-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/commonjs/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/commonjs/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/commonjs/src/modules/theme/utils/generate-theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/commonjs/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/commonjs/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/commonjs/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/commonjs/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/commonjs/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/commonjs/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts +2 -0
- package/lib/typescript/module/src/modules/auth/default-translation.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/auth/delete-account-button/components/delete-account-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts +8 -2
- package/lib/typescript/module/src/modules/auth/hooks/use-session.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/components/logout-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.d.ts +6 -1
- package/lib/typescript/module/src/modules/auth/logout-button/types/logout-button-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/form/register-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/register/components/login-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/inputs.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/form/reset-password-form-provider.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts +2 -46
- package/lib/typescript/module/src/modules/auth/reset-password/contexts/reset-password-form-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts +1 -47
- package/lib/typescript/module/src/modules/auth/reset-password/hooks/use-reset-password-form.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts +3 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-context-type.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts +1 -0
- package/lib/typescript/module/src/modules/auth/reset-password/types/reset-password-form-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/session/components/session-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/form/signin-button.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/header/title.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/sign-in/components/register-link.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts +3 -0
- package/lib/typescript/module/src/modules/auth/utils/sign-out-google.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/background-sync/android-background-sync.d.ts +3 -2
- package/lib/typescript/module/src/modules/background-sync/android-background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/background-sync/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-device/constants/supported-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/android-bluetooth-foreground-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts +13 -4
- package/lib/typescript/module/src/modules/bt-management/components/bluetooth-device-picker.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/components/bt-provider-child-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts +4 -0
- package/lib/typescript/module/src/modules/bt-management/constants/measurement-field-catalog.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts +6 -2
- package/lib/typescript/module/src/modules/bt-management/hooks/runtime-context.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-paired-devices.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/hooks/use-request-permissions.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/background-sync/background-sync-coordinator.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts +9 -0
- package/lib/typescript/module/src/modules/bt-management/services/bt-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/boso/boso.medicus.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts +17 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts +17 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.files.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts +28 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bp2/bp2.history-sequencer.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-connection-handler.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts +6 -0
- package/lib/typescript/module/src/modules/bt-management/services/devices/bt-managed-device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/services/devices/custom/custom.device.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/background-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts +1 -0
- package/lib/typescript/module/src/modules/bt-management/types/bluetooth-error.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts +7 -1
- package/lib/typescript/module/src/modules/bt-management/types/btprovider-children-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts +2 -0
- package/lib/typescript/module/src/modules/bt-management/types/custom-device-definition.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts +8 -0
- package/lib/typescript/module/src/modules/bt-management/utils/device-title.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/components/android/android-health-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/apple/apple-health-sync.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/manually-request-sheet/description.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts +8 -5
- package/lib/typescript/module/src/modules/data-sync/components/sync-progress-list/sync-progress-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/data-sync/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/android-health-sync-service.d.ts +4 -4
- package/lib/typescript/module/src/modules/data-sync/services/android-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts +5 -5
- package/lib/typescript/module/src/modules/data-sync/services/apple-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts +1 -3
- package/lib/typescript/module/src/modules/data-sync/services/base-health-sync-service.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts +7 -9
- package/lib/typescript/module/src/modules/data-sync/services/managers/data-processor.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts +6 -6
- package/lib/typescript/module/src/modules/data-sync/services/managers/sync-progress-manager.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-authorization-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/apple-health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/convert-data-props.d.ts +6 -2
- package/lib/typescript/module/src/modules/data-sync/types/convert-data-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/get-data-from-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/get-total-count-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/data-sync/types/get-total-count-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts +3 -3
- package/lib/typescript/module/src/modules/data-sync/types/health-authorization-status.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-data.d.ts +14 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-data.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts +19 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-keys.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts +7 -5
- package/lib/typescript/module/src/modules/data-sync/types/health-sync-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/types/sync-progress.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts +9 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-generic-health-data.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts +1 -2
- package/lib/typescript/module/src/modules/data-sync/utils/convert-records-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts +1 -2
- package/lib/typescript/module/src/modules/data-sync/utils/convert-samples-to-observation.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/generate-observation-entry.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-observation-dates-by-code.d.ts +3 -3
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-observation-dates-by-code.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts +2 -2
- package/lib/typescript/module/src/modules/data-sync/utils/get-latest-valid-start-date.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts +6 -8
- package/lib/typescript/module/src/modules/data-sync/utils/get-records-from-health-connect.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts +20 -4
- package/lib/typescript/module/src/modules/data-sync/utils/get-samples-from-health.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-records-count.d.ts +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-records-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts +3 -8
- package/lib/typescript/module/src/modules/data-sync/utils/get-total-samples-count.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts +9 -0
- package/lib/typescript/module/src/modules/data-sync/utils/health-observation-device.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/helpers/form-items/form-date-field.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/helpers/form-items/form-select.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/image/components/optimized-image.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/date-range.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/components/measurement-list-item.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts +2 -0
- package/lib/typescript/module/src/modules/measurement/types/measurement-list-item-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/hooks/use-app-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts +1 -1
- package/lib/typescript/module/src/modules/theme/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts +12 -3
- package/lib/typescript/module/src/modules/theme/types/theme-provider-props.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts +3 -1
- package/lib/typescript/module/src/modules/theme/utils/generate-theme.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/components/background-sync-setting.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts +7 -1
- package/lib/typescript/module/src/modules/ui/components/bluetooth-state-notice.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts +5 -1
- package/lib/typescript/module/src/modules/ui/components/health-import-card.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts +19 -0
- package/lib/typescript/module/src/modules/ui/components/measurement-trend-chart.d.ts.map +1 -0
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts +16 -1
- package/lib/typescript/module/src/modules/ui/components/pairing-flow.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/supported-devices-catalog-list.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/components/urine-test-result.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/index.d.ts +1 -0
- package/lib/typescript/module/src/modules/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts +4 -1
- package/lib/typescript/module/src/modules/ui/types.d.ts.map +1 -1
- package/lib/typescript/module/src/modules/ui/use-ovok-ui.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.convertGenericHealthDataToObservation = void 0;
|
|
7
|
+
var _healthData = require("../types/health-data.js");
|
|
8
|
+
var _healthObservationDevice = require("./health-observation-device.js");
|
|
9
|
+
/* eslint-disable max-lines */
|
|
10
|
+
|
|
11
|
+
const FHIR_UNIT_SYSTEM = "http://unitsofmeasure.org";
|
|
12
|
+
const LOINC_SYSTEM = "http://loinc.org";
|
|
13
|
+
const convertGenericHealthDataToObservation = async ({
|
|
14
|
+
data,
|
|
15
|
+
patientId,
|
|
16
|
+
mode,
|
|
17
|
+
typeIdentifier: configuredTypeIdentifier,
|
|
18
|
+
typeIdentifierCodes
|
|
19
|
+
}) => {
|
|
20
|
+
const first = data[0];
|
|
21
|
+
if (!first) {
|
|
22
|
+
return [];
|
|
23
|
+
}
|
|
24
|
+
const value = first;
|
|
25
|
+
const typeIdentifier = String(configuredTypeIdentifier ?? value.typeIdentifier ?? value.quantityType ?? value.categoryType ?? value.recordType ?? "health-data");
|
|
26
|
+
const code = typeIdentifierCodes?.[typeIdentifier] ?? typeIdentifier;
|
|
27
|
+
const interval = getInterval(data);
|
|
28
|
+
const measurement = getMeasurement(first, mode, interval);
|
|
29
|
+
if (!measurement || !patientId) {
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
const metadata = getMetadata(first);
|
|
33
|
+
const device = (0, _healthObservationDevice.getHealthObservationDevice)(metadata);
|
|
34
|
+
const observationDate = interval?.start ?? getDate(first);
|
|
35
|
+
const observation = {
|
|
36
|
+
resourceType: "Observation",
|
|
37
|
+
id: getStableObservationId({
|
|
38
|
+
typeIdentifier,
|
|
39
|
+
code,
|
|
40
|
+
interval,
|
|
41
|
+
date: observationDate,
|
|
42
|
+
measurement
|
|
43
|
+
}),
|
|
44
|
+
status: "registered",
|
|
45
|
+
subject: {
|
|
46
|
+
reference: `Patient/${patientId}`
|
|
47
|
+
},
|
|
48
|
+
code: {
|
|
49
|
+
coding: [{
|
|
50
|
+
system: LOINC_SYSTEM,
|
|
51
|
+
code
|
|
52
|
+
}]
|
|
53
|
+
},
|
|
54
|
+
...(device ? {
|
|
55
|
+
device
|
|
56
|
+
} : {}),
|
|
57
|
+
...(interval ? {
|
|
58
|
+
effectivePeriod: {
|
|
59
|
+
start: interval.start.toISOString(),
|
|
60
|
+
end: interval.end.toISOString()
|
|
61
|
+
}
|
|
62
|
+
} : observationDate ? {
|
|
63
|
+
effectiveDateTime: observationDate.toISOString()
|
|
64
|
+
} : {}),
|
|
65
|
+
...measurement
|
|
66
|
+
};
|
|
67
|
+
if (mode === "daily-summary" && (0, _healthData.isAggregatedHealthData)(first)) {
|
|
68
|
+
observation.component = [...(first.minimum === undefined ? [] : [component("Minimum", first.minimum, first.unit)]), ...(first.maximum === undefined ? [] : [component("Maximum", first.maximum, first.unit)])];
|
|
69
|
+
}
|
|
70
|
+
const stageComponents = getSleepStageComponents(data);
|
|
71
|
+
if (stageComponents.length > 0) {
|
|
72
|
+
observation.component = [...(observation.component ?? []), ...stageComponents];
|
|
73
|
+
}
|
|
74
|
+
return [observation];
|
|
75
|
+
};
|
|
76
|
+
exports.convertGenericHealthDataToObservation = convertGenericHealthDataToObservation;
|
|
77
|
+
const getMeasurement = (value, mode, interval) => {
|
|
78
|
+
const raw = value;
|
|
79
|
+
if ((0, _healthData.isAggregatedHealthData)(value)) {
|
|
80
|
+
const number = value.kind === "daily-summary" ? value.average : value.value;
|
|
81
|
+
return number === undefined ? undefined : {
|
|
82
|
+
valueQuantity: quantity(number, value.unit)
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
if (mode === "session" && interval) {
|
|
86
|
+
return {
|
|
87
|
+
valueQuantity: quantity((interval.end.getTime() - interval.start.getTime()) / 60000, "min")
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
const extracted = extractValue(raw);
|
|
91
|
+
return extracted ? {
|
|
92
|
+
valueQuantity: quantity(extracted.value, extracted.unit)
|
|
93
|
+
} : undefined;
|
|
94
|
+
};
|
|
95
|
+
const extractValue = raw => {
|
|
96
|
+
if (typeof raw.quantity === "number") {
|
|
97
|
+
return {
|
|
98
|
+
value: raw.quantity,
|
|
99
|
+
unit: String(raw.unit ?? "1")
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
const candidates = [["height", "inMeters", "m"], ["bodyFat", "percentage", "%"], ["mass", "inKilograms", "kg"], ["weight", "inKilograms", "kg"], ["distance", "inMeters", "m"], ["energy", "inKilocalories", "kcal"]];
|
|
103
|
+
for (const [containerKey, valueKey, fallbackUnit] of candidates) {
|
|
104
|
+
const container = raw[containerKey];
|
|
105
|
+
if (typeof container?.[valueKey] === "number") {
|
|
106
|
+
return {
|
|
107
|
+
value: container[valueKey],
|
|
108
|
+
unit: normalizeUnit(String(container.unit ?? fallbackUnit))
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
const alternateCandidates = [["height", "value", "m"], ["mass", "value", "kg"], ["weight", "value", "kg"], ["distance", "value", "m"], ["energy", "value", "kcal"]];
|
|
113
|
+
for (const [containerKey, valueKey, fallbackUnit] of alternateCandidates) {
|
|
114
|
+
const container = raw[containerKey];
|
|
115
|
+
if (typeof container?.[valueKey] === "number") {
|
|
116
|
+
return {
|
|
117
|
+
value: container[valueKey],
|
|
118
|
+
unit: normalizeUnit(String(container.unit ?? fallbackUnit))
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const scalarCandidates = [["count", "count"], ["floors", "count"], ["rate", "count/min"], ["beatsPerMinute", "count/min"], ["percentage", "%"], ["vo2MillilitersPerMinuteKilogram", "mL/kg/min"]];
|
|
123
|
+
for (const [key, unit] of scalarCandidates) {
|
|
124
|
+
if (typeof raw[key] === "number") {
|
|
125
|
+
return {
|
|
126
|
+
value: raw[key],
|
|
127
|
+
unit
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
};
|
|
133
|
+
const getInterval = data => {
|
|
134
|
+
const intervals = data.map(item => {
|
|
135
|
+
const raw = item;
|
|
136
|
+
const startValue = raw.startDate ?? raw.startTime ?? 0;
|
|
137
|
+
const start = new Date(startValue);
|
|
138
|
+
const endValue = raw.endDate ?? raw.endTime ?? start;
|
|
139
|
+
const end = new Date(endValue);
|
|
140
|
+
return Number.isNaN(start.getTime()) || Number.isNaN(end.getTime()) ? undefined : {
|
|
141
|
+
start,
|
|
142
|
+
end
|
|
143
|
+
};
|
|
144
|
+
}).filter(Boolean);
|
|
145
|
+
if (intervals.length === 0) {
|
|
146
|
+
return undefined;
|
|
147
|
+
}
|
|
148
|
+
return {
|
|
149
|
+
start: new Date(Math.min(...intervals.map(({
|
|
150
|
+
start
|
|
151
|
+
}) => start.getTime()))),
|
|
152
|
+
end: new Date(Math.max(...intervals.map(({
|
|
153
|
+
end
|
|
154
|
+
}) => end.getTime())))
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
const getDate = value => {
|
|
158
|
+
const raw = value;
|
|
159
|
+
const date = raw.endDate ?? raw.endTime ?? raw.startDate ?? raw.startTime ?? raw.time;
|
|
160
|
+
if (!date) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
const parsed = new Date(date);
|
|
164
|
+
return Number.isNaN(parsed.getTime()) ? undefined : parsed;
|
|
165
|
+
};
|
|
166
|
+
const getMetadata = value => {
|
|
167
|
+
const raw = value;
|
|
168
|
+
const metadata = raw.metadata ?? {};
|
|
169
|
+
const sourceRevision = raw.sourceRevision;
|
|
170
|
+
const source = sourceRevision?.source;
|
|
171
|
+
const device = raw.device ?? metadata.device;
|
|
172
|
+
return {
|
|
173
|
+
manufacturer: String(device?.manufacturer ?? metadata.dataOrigin ?? "") || undefined,
|
|
174
|
+
model: typeof device?.model === "string" ? device.model : undefined,
|
|
175
|
+
sourceApp: String(source?.name ?? raw.sourceApp ?? metadata.dataOrigin ?? "") || undefined,
|
|
176
|
+
recordingMethod: typeof metadata.recordingMethod === "number" ? metadata.recordingMethod : undefined
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
const getSleepStageComponents = data => data.flatMap(item => {
|
|
180
|
+
const stages = item.stages ?? [];
|
|
181
|
+
if (stages.length === 0) {
|
|
182
|
+
const raw = item;
|
|
183
|
+
const start = raw.startDate ?? raw.startTime;
|
|
184
|
+
const end = raw.endDate ?? raw.endTime;
|
|
185
|
+
const duration = start && end ? (new Date(end).getTime() - new Date(start).getTime()) / 60000 : 0;
|
|
186
|
+
return Number.isFinite(duration) && duration > 0 && raw.value !== undefined ? [component(`Sleep stage ${String(raw.value)}`, duration, "min")] : [];
|
|
187
|
+
}
|
|
188
|
+
return stages.flatMap(stage => {
|
|
189
|
+
const raw = stage;
|
|
190
|
+
const start = new Date(raw.startTime);
|
|
191
|
+
const end = new Date(raw.endTime);
|
|
192
|
+
const duration = (end.getTime() - start.getTime()) / 60000;
|
|
193
|
+
return Number.isFinite(duration) && duration > 0 ? [component(`Sleep stage ${String(raw.stage)}`, duration, "min")] : [];
|
|
194
|
+
});
|
|
195
|
+
});
|
|
196
|
+
const component = (label, value, unit) => ({
|
|
197
|
+
code: {
|
|
198
|
+
text: label
|
|
199
|
+
},
|
|
200
|
+
valueQuantity: quantity(value, unit)
|
|
201
|
+
});
|
|
202
|
+
const quantity = (value, unit) => ({
|
|
203
|
+
value,
|
|
204
|
+
unit,
|
|
205
|
+
system: FHIR_UNIT_SYSTEM,
|
|
206
|
+
code: normalizeUnit(unit)
|
|
207
|
+
});
|
|
208
|
+
const normalizeUnit = unit => ({
|
|
209
|
+
kilometers: "km",
|
|
210
|
+
meters: "m",
|
|
211
|
+
miles: "mi",
|
|
212
|
+
kilograms: "kg",
|
|
213
|
+
grams: "g",
|
|
214
|
+
milligrams: "mg",
|
|
215
|
+
kilocalories: "kcal",
|
|
216
|
+
calories: "cal",
|
|
217
|
+
minutes: "min",
|
|
218
|
+
seconds: "s",
|
|
219
|
+
beatsPerMinute: "count/min"
|
|
220
|
+
})[unit] ?? unit;
|
|
221
|
+
const getStableObservationId = ({
|
|
222
|
+
typeIdentifier,
|
|
223
|
+
code,
|
|
224
|
+
interval,
|
|
225
|
+
date,
|
|
226
|
+
measurement
|
|
227
|
+
}) => {
|
|
228
|
+
const time = interval ? `${interval.start.toISOString()}-${interval.end.toISOString()}` : date?.toISOString() ?? "undated";
|
|
229
|
+
const value = measurement.valueQuantity?.value ?? "empty";
|
|
230
|
+
return `health-${[typeIdentifier, code, time, value].join("-").replace(/[^a-zA-Z0-9.-]/g, "-").slice(0, 64)}`;
|
|
231
|
+
};
|
|
232
|
+
//# sourceMappingURL=convert-generic-health-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_healthData","require","_healthObservationDevice","FHIR_UNIT_SYSTEM","LOINC_SYSTEM","convertGenericHealthDataToObservation","data","patientId","mode","typeIdentifier","configuredTypeIdentifier","typeIdentifierCodes","first","value","String","quantityType","categoryType","recordType","code","interval","getInterval","measurement","getMeasurement","metadata","getMetadata","device","getHealthObservationDevice","observationDate","start","getDate","observation","resourceType","id","getStableObservationId","date","status","subject","reference","coding","system","effectivePeriod","toISOString","end","effectiveDateTime","isAggregatedHealthData","component","minimum","undefined","unit","maximum","stageComponents","getSleepStageComponents","length","exports","raw","number","kind","average","valueQuantity","quantity","getTime","extracted","extractValue","candidates","containerKey","valueKey","fallbackUnit","container","normalizeUnit","alternateCandidates","scalarCandidates","key","intervals","map","item","startValue","startDate","startTime","Date","endValue","endDate","endTime","Number","isNaN","filter","Boolean","Math","min","max","time","parsed","sourceRevision","source","manufacturer","dataOrigin","model","sourceApp","name","recordingMethod","flatMap","stages","duration","isFinite","stage","label","text","kilometers","meters","miles","kilograms","grams","milligrams","kilocalories","calories","minutes","seconds","beatsPerMinute","join","replace","slice"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-generic-health-data.ts"],"mappings":";;;;;;AAKA,IAAAA,WAAA,GAAAC,OAAA;AAGA,IAAAC,wBAAA,GAAAD,OAAA;AARA;;AAcA,MAAME,gBAAgB,GAAG,2BAA2B;AACpD,MAAMC,YAAY,GAAG,kBAAkB;AAEhC,MAAMC,qCAAqC,GAAG,MAAAA,CAAO;EAC1DC,IAAI;EACJC,SAAS;EACTC,IAAI;EACJC,cAAc,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KAAK;EACdC,OAAO,EAAE,GAAG;EACZC,cAAc,EAAE;AAClB,CAAC,EAAEpE,IAAI,CAAC,IAAIA,IAAI;AAElB,MAAMf,sBAAsB,GAAGA,CAAC;EAC9BxB,cAAc;EACdS,IAAI;EACJC,QAAQ;EACRe,IAAI;EACJb;AAOF,CAAC,KAAa;EACZ,MAAMoE,IAAI,GAAGtE,QAAQ,GACjB,GAAGA,QAAQ,CAACS,KAAK,CAACa,WAAW,CAAC,CAAC,IAAItB,QAAQ,CAACuB,GAAG,CAACD,WAAW,CAAC,CAAC,EAAE,GAC/DP,IAAI,EAAEO,WAAW,CAAC,CAAC,IAAI,SAAS;EAEpC,MAAM5B,KAAK,GAAGQ,WAAW,CAACqC,aAAa,EAAE7C,KAAK,IAAI,OAAO;EAEzD,OAAO,UAAU,CAACJ,cAAc,EAAES,IAAI,EAAEuE,IAAI,EAAE5E,KAAK,CAAC,CACjDwG,IAAI,CAAC,GAAG,CAAC,CACTC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAC/BC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE;AACnB,CAAC","ignoreList":[]}
|
|
@@ -5,17 +5,34 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.convertRecordsToObservation = void 0;
|
|
7
7
|
var _core = require("@ovok/core");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var _convertGenericHealthData = require("./convert-generic-health-data.js");
|
|
9
|
+
var _healthObservationDevice = require("./health-observation-device.js");
|
|
10
|
+
const convertRecordsToObservation = async props => {
|
|
11
|
+
const {
|
|
12
|
+
data,
|
|
13
|
+
client,
|
|
14
|
+
measurementTypeKey,
|
|
15
|
+
mode = "point"
|
|
16
|
+
} = props;
|
|
17
|
+
if (mode !== "point") {
|
|
18
|
+
return (0, _convertGenericHealthData.convertGenericHealthDataToObservation)({
|
|
19
|
+
...props,
|
|
20
|
+
mode
|
|
21
|
+
});
|
|
22
|
+
}
|
|
13
23
|
const record = data[0];
|
|
14
24
|
if (!record) {
|
|
15
25
|
return [];
|
|
16
26
|
}
|
|
27
|
+
if (!isCoreMeasurementTypeKey(measurementTypeKey)) {
|
|
28
|
+
return (0, _convertGenericHealthData.convertGenericHealthDataToObservation)({
|
|
29
|
+
...props,
|
|
30
|
+
mode
|
|
31
|
+
});
|
|
32
|
+
}
|
|
17
33
|
const service = _core.ObservationServiceCreator.getInstance().getService(measurementTypeKey);
|
|
18
|
-
const
|
|
34
|
+
const typedRecord = record;
|
|
35
|
+
const measurement = service?.convertRecordToMeasurement?.(typedRecord);
|
|
19
36
|
if (!measurement) {
|
|
20
37
|
return [];
|
|
21
38
|
}
|
|
@@ -23,12 +40,25 @@ const convertRecordsToObservation = async ({
|
|
|
23
40
|
measurement
|
|
24
41
|
});
|
|
25
42
|
const recordTime = getRecordTime(record);
|
|
43
|
+
const device = (0, _healthObservationDevice.getHealthObservationDevice)({
|
|
44
|
+
manufacturer: typedRecord.metadata?.device?.manufacturer,
|
|
45
|
+
model: typedRecord.metadata?.device?.model,
|
|
46
|
+
sourceApp: typedRecord.metadata?.dataOrigin,
|
|
47
|
+
recordingMethod: typedRecord.metadata?.recordingMethod
|
|
48
|
+
});
|
|
26
49
|
return observationBody.map(observation => ({
|
|
27
50
|
...observation,
|
|
51
|
+
...(device ? {
|
|
52
|
+
device: {
|
|
53
|
+
...(observation.device ?? {}),
|
|
54
|
+
...device
|
|
55
|
+
}
|
|
56
|
+
} : {}),
|
|
28
57
|
effectiveDateTime: recordTime ?? observation.effectiveDateTime
|
|
29
58
|
}));
|
|
30
59
|
};
|
|
31
60
|
exports.convertRecordsToObservation = convertRecordsToObservation;
|
|
61
|
+
const isCoreMeasurementTypeKey = value => Object.values(_core.MeasurementTypeKey).includes(value);
|
|
32
62
|
const getRecordTime = record => {
|
|
33
63
|
if ("time" in record) {
|
|
34
64
|
return record.time;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","convertRecordsToObservation","data","client","measurementTypeKey","record","service","ObservationServiceCreator","getInstance","getService","measurement","convertRecordToMeasurement","observationBody","generateObservationBodiesByMeasurement","recordTime","getRecordTime","map","observation","effectiveDateTime","exports","time","endTime","startTime","undefined"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-records-to-observation.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_core","require","_convertGenericHealthData","_healthObservationDevice","convertRecordsToObservation","props","data","client","measurementTypeKey","mode","convertGenericHealthDataToObservation","record","isCoreMeasurementTypeKey","service","ObservationServiceCreator","getInstance","getService","typedRecord","measurement","convertRecordToMeasurement","observationBody","generateObservationBodiesByMeasurement","recordTime","getRecordTime","device","getHealthObservationDevice","manufacturer","metadata","model","sourceApp","dataOrigin","recordingMethod","map","observation","effectiveDateTime","exports","value","Object","values","MeasurementTypeKey","includes","time","endTime","startTime","undefined"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-records-to-observation.ts"],"mappings":";;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,yBAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAEO,MAAMG,2BAA2B,GAAG,MACzCC,KAAgC,IACL;EAC3B,MAAM;IAAEC,IAAI;IAAEC,MAAM;IAAEC,kBAAkB;IAAEC,IAAI,GAAG;EAAQ,CAAC,GAAGJ,KAAK;EAElE,IAAII,IAAI,KAAK,OAAO,EAAE;IACpB,OAAO,IAAAC,+DAAqC,EAAC;MAAE,GAAGL,KAAK;MAAEI;IAAK,CAAC,CAAC;EAClE;EAEA,MAAME,MAAM,GAAGL,IAAI,CAAC,CAAC,CAAC;EAEtB,IAAI,CAACK,MAAM,EAAE;IACX,OAAO,EAAE;EACX;EAEA,IAAI,CAACC,wBAAwB,CAACJ,kBAAkB,CAAC,EAAE;IACjD,OAAO,IAAAE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a,GACjBZ,MAAgC,IACT;EACvB,IAAI,MAAM,IAAIA,MAAM,EAAE;IACpB,OAAOA,MAAM,CAAC8B,IAAI;EACpB;EAEA,IAAI,SAAS,IAAI9B,MAAM,EAAE;IACvB,OAAOA,MAAM,CAAC+B,OAAO;EACvB;EAEA,IAAI,WAAW,IAAI/B,MAAM,EAAE;IACzB,OAAOA,MAAM,CAACgC,SAAS;EACzB;EAEA,OAAOC,SAAS;AAClB,CAAC","ignoreList":[]}
|
|
@@ -5,14 +5,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.convertSamplesToObservation = void 0;
|
|
7
7
|
var _core = require("@ovok/core");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
var _convertGenericHealthData = require("./convert-generic-health-data.js");
|
|
9
|
+
var _healthObservationDevice = require("./health-observation-device.js");
|
|
10
|
+
const convertSamplesToObservation = async props => {
|
|
11
|
+
const {
|
|
12
|
+
data,
|
|
13
|
+
client,
|
|
14
|
+
measurementTypeKey,
|
|
15
|
+
mode = "point"
|
|
16
|
+
} = props;
|
|
17
|
+
if (mode !== "point") {
|
|
18
|
+
return (0, _convertGenericHealthData.convertGenericHealthDataToObservation)({
|
|
19
|
+
...props,
|
|
20
|
+
mode
|
|
21
|
+
});
|
|
22
|
+
}
|
|
13
23
|
if (data.length === 0) {
|
|
14
24
|
return [];
|
|
15
25
|
}
|
|
26
|
+
if (!isCoreMeasurementTypeKey(measurementTypeKey)) {
|
|
27
|
+
return (0, _convertGenericHealthData.convertGenericHealthDataToObservation)({
|
|
28
|
+
...props,
|
|
29
|
+
mode
|
|
30
|
+
});
|
|
31
|
+
}
|
|
16
32
|
const service = _core.ObservationServiceCreator.getInstance().getService(measurementTypeKey);
|
|
17
33
|
const measurement = service.convertSamplesToMeasurement(data);
|
|
18
34
|
if (!measurement) {
|
|
@@ -21,10 +37,25 @@ const convertSamplesToObservation = async ({
|
|
|
21
37
|
const observationBody = await client.generateObservationBodiesByMeasurement({
|
|
22
38
|
measurement
|
|
23
39
|
});
|
|
24
|
-
return observationBody.map((observation, index) =>
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
40
|
+
return observationBody.map((observation, index) => {
|
|
41
|
+
const sample = data?.[index];
|
|
42
|
+
const device = sample ? (0, _healthObservationDevice.getHealthObservationDevice)({
|
|
43
|
+
manufacturer: sample.device?.manufacturer,
|
|
44
|
+
model: sample.device?.model,
|
|
45
|
+
sourceApp: sample.sourceRevision?.source?.name
|
|
46
|
+
}) : undefined;
|
|
47
|
+
return {
|
|
48
|
+
...observation,
|
|
49
|
+
...(device ? {
|
|
50
|
+
device: {
|
|
51
|
+
...(observation.device ?? {}),
|
|
52
|
+
...device
|
|
53
|
+
}
|
|
54
|
+
} : {}),
|
|
55
|
+
effectiveDateTime: sample?.endDate?.toISOString() || sample?.startDate?.toISOString() || observation.effectiveDateTime
|
|
56
|
+
};
|
|
57
|
+
});
|
|
28
58
|
};
|
|
29
59
|
exports.convertSamplesToObservation = convertSamplesToObservation;
|
|
60
|
+
const isCoreMeasurementTypeKey = value => Object.values(_core.MeasurementTypeKey).includes(value);
|
|
30
61
|
//# sourceMappingURL=convert-samples-to-observation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","convertSamplesToObservation","data","client","measurementTypeKey","length","service","ObservationServiceCreator","getInstance","getService","measurement","convertSamplesToMeasurement","observationBody","generateObservationBodiesByMeasurement","map","observation","index","effectiveDateTime","endDate","toISOString","startDate","exports"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-samples-to-observation.ts"],"mappings":";;;;;;AAKA,IAAAA,KAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_core","require","_convertGenericHealthData","_healthObservationDevice","convertSamplesToObservation","props","data","client","measurementTypeKey","mode","convertGenericHealthDataToObservation","length","isCoreMeasurementTypeKey","service","ObservationServiceCreator","getInstance","getService","measurement","convertSamplesToMeasurement","observationBody","generateObservationBodiesByMeasurement","map","observation","index","sample","device","getHealthObservationDevice","manufacturer","model","sourceApp","sourceRevision","source","name","undefined","effectiveDateTime","endDate","toISOString","startDate","exports","value","Object","values","MeasurementTypeKey","includes"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/convert-samples-to-observation.ts"],"mappings":";;;;;;AAKA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,yBAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAEO,MAAMG,2BAA2B,GAAG,MACzCC,KAAgC,IACL;EAC3B,MAAM;IAAEC,IAAI;IAAEC,MAAM;IAAEC,kBAAkB;IAAEC,IAAI,GAAG;EAAQ,CAAC,GAAGJ,KAAK;EAElE,IAAII,IAAI,KAAK,OAAO,EAAE;IACpB,OAAO,IAAAC,+DAAqC,EAAC;MAAE,GAAGL,KAAK;MAAEI;IAAK,CAAC,CAAC;EAClE;EAEA,IAAIH,IAAI,CAACK,MAAM,KAAK,CAAC,EAAE;IACrB,OAAO,EAAE;EACX;EAEA,IAAI,CAACC,wBAAwB,CAACJ,kBAAkB,CAAC,EAAE;IACjD,OAAO,IAAAE,+DAAqC,EAAC;MAAE,GAAGL,KAAK;MAAEI;IAAK,CAAC,CAAC;EAClE;EAEA,MAAMI,OAAO,GAAGC,+BAAyB,CAACC,WAAW,CAAC,CAAC,CAACC,UAAU,CAChER,kBACF,CAAC;EAED,MAAMS,WAAW,GAAGJ,OAAO,CAACK,2BAA2B,CACrDZ,IACF,CAAC;EAED,IAAI,CAACW,WAAW,EAAE;IAChB,OAAO,EAAE;EACX;EAEA,MAAME,eAAe,GAAG,MAAMZ,MAAM,CAACa,sCAAsC,CAAC;IAC1EH;EACF,CAAC,CAAC;EAEF,OAAOE,eAAe,CAACE,GAAG,CAAC,CAACC,WAAW,EAAEC,KAAK,KAAK;IACjD,MAAMC,MAAM,GAAGlB,IAAI,GAAGiB,KAAK,CAA2D;IAEtF,MAAME,MAAM,GAAGD,MAAM,GACjB,IAAAE,mDAA0B,EAAC;MACzBC,YAAY,EAAEH,MAAM,CAACC,MAAM,EAAEE,YAAY;MACzCC,KAAK,EAAEJ,MAAM,CAACC,MAAM,EAAEG,KAAK;MAC3BC,SAAS,EAAEL,MAAM,CAACM,cAAc,EAAEC,MAAM,EAAEC;IAC5C,CAAC,CAAC,GACFC,SAAS;IAEb,OAAO;MACL,GAAGX,WAAW;MACd,IAAIG,MAAM,GACN;QAAEA,MAAM,EAAE;UAAE,IAAIH,WAAW,CAACG,MAAM,IAAI,CAAC,CAAC,CAAC;UAAE,GAAGA;QAAO;MAAE,CAAC,GACxD,CAAC,CAAC,CAAC;MACPS,iBAAiB,EACfV,MAAM,EAAEW,OAAO,EAAEC,WAAW,CAAC,CAAC,IAC9BZ,MAAM,EAAEa,SAAS,EAAED,WAAW,CAAC,CAAC,IAChCd,WAAW,CAACY;IAChB,CAAC;EACH,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAlC,2BAAA,GAAAA,2BAAA;AAEF,MAAMQ,wBAAwB,GAC5B2B,KAAa,IAEbC,MAAM,CAACC,MAAM,CAACC,wBAAkB,CAAC,CAACC,QAAQ,CAACJ,KAA2B,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateObservationEntry","groupedObservationBodies","provider","map","observationBodies","groupIndex","observationBody","bodyIndex","syncIdentifier","id","syncIdentifierSystem","fullUrl","request","method","url","ifNoneExist","encodeURIComponent","resource","identifier","system","value","device","hasMember","reference","flat","exports"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/generate-observation-entry.ts"],"mappings":";;;;;;AASO,MAAMA,wBAAwB,GAAGA,CAAC;EACvCC,wBAAwB;EACxBC;AAC6B,CAAC,KAAiC;EAC/D,OAAOD,wBAAwB,CAC5BE,GAAG,CAAC,CAACC,iBAAiB,EAAEC,UAAU,KACjCD,iBAAiB,CAACD,GAAG,CAAC,CAACG,eAAe,EAAEC,SAAS,KAAK;IACpD,MAAMC,cAAc,GAAG,GAAGN,QAAQ,IAAII,eAAe,CAACG,EAAE,IAAI,GAAGJ,UAAU,IAAIE,SAAS,EAAE,EAAE;IAE1F,MAAMG,oBAAoB,GACxB,mEAAmE;IAErE,OAAO;MACLC,OAAO,EAAE,8CAA8CN,UAAU,IAAIE,SAAS,EAAE;MAChFK,OAAO,EAAE;QACPC,MAAM,EAAE,MAAe;QACvBC,GAAG,EAAE,aAAa;QAClBC,WAAW,EAAE,cAAcC,kBAAkB,CAACN,oBAAoB,CAAC,IAAIM,kBAAkB,CAACR,cAAc,CAAC;MAC3G,CAAC;MACDS,QAAQ,EAAE;QACR,GAAGX,eAAe;QAClBY,UAAU,EAAE,CACV,IAAIZ,eAAe,CAACY,UAAU,IAAI,EAAE,CAAC,EACrC;UACEC,MAAM,EACJ,yEAAyE;UAC3EC,KAAK,EAAElB;QACT,CAAC,EACD;UACEiB,MAAM,EAAET,oBAAoB;UAC5BU,KAAK,EAAEZ;QACT,CAAC,CACF;QACDa,MAAM,EAAE;
|
|
1
|
+
{"version":3,"names":["generateObservationEntry","groupedObservationBodies","provider","map","observationBodies","groupIndex","observationBody","bodyIndex","syncIdentifier","id","syncIdentifierSystem","fullUrl","request","method","url","ifNoneExist","encodeURIComponent","resource","identifier","system","value","device","hasMember","reference","flat","exports"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/generate-observation-entry.ts"],"mappings":";;;;;;AASO,MAAMA,wBAAwB,GAAGA,CAAC;EACvCC,wBAAwB;EACxBC;AAC6B,CAAC,KAAiC;EAC/D,OAAOD,wBAAwB,CAC5BE,GAAG,CAAC,CAACC,iBAAiB,EAAEC,UAAU,KACjCD,iBAAiB,CAACD,GAAG,CAAC,CAACG,eAAe,EAAEC,SAAS,KAAK;IACpD,MAAMC,cAAc,GAAG,GAAGN,QAAQ,IAAII,eAAe,CAACG,EAAE,IAAI,GAAGJ,UAAU,IAAIE,SAAS,EAAE,EAAE;IAE1F,MAAMG,oBAAoB,GACxB,mEAAmE;IAErE,OAAO;MACLC,OAAO,EAAE,8CAA8CN,UAAU,IAAIE,SAAS,EAAE;MAChFK,OAAO,EAAE;QACPC,MAAM,EAAE,MAAe;QACvBC,GAAG,EAAE,aAAa;QAClBC,WAAW,EAAE,cAAcC,kBAAkB,CAACN,oBAAoB,CAAC,IAAIM,kBAAkB,CAACR,cAAc,CAAC;MAC3G,CAAC;MACDS,QAAQ,EAAE;QACR,GAAGX,eAAe;QAClBY,UAAU,EAAE,CACV,IAAIZ,eAAe,CAACY,UAAU,IAAI,EAAE,CAAC,EACrC;UACEC,MAAM,EACJ,yEAAyE;UAC3EC,KAAK,EAAElB;QACT,CAAC,EACD;UACEiB,MAAM,EAAET,oBAAoB;UAC5BU,KAAK,EAAEZ;QACT,CAAC,CACF;QACDa,MAAM,EAAE;UACN,IAAIf,eAAe,CAACe,MAAM,IAAI,CAAC,CAAC,CAAC;UACjCH,UAAU,EAAE;YACVC,MAAM,EACJ,yEAAyE;YAC3EC,KAAK,EAAElB;UACT;QACF,CAAC;QACDoB,SAAS,EACPf,SAAS,KAAK,CAAC,GACX,EAAE,GACF,CACE;UACEgB,SAAS,EAAE,8CAA8ClB,UAAU;QACrE,CAAC;MAEX;IACF,CAAC;EACH,CAAC,CACH,CAAC,CACAmB,IAAI,CAAC,CAAC;AACX,CAAC;AAACC,OAAA,CAAAzB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["generateObservationSearchEntry","code","patientId","provider","searchParams","URLSearchParams","set","encodeURIComponent","request","method","url","toString","getLatestObservationDatesByCode","codes","client","entries","map","bundle","executeBatch","resourceType","type","entry","idx","observationResource","resource","observation","date","effectivePeriod","end","effectiveDateTime","exports"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-latest-observation-dates-by-code.ts"],"mappings":";;;;;;AAKA,MAAMA,8BAA8B,GAAGA,CACrCC,
|
|
1
|
+
{"version":3,"names":["generateObservationSearchEntry","code","patientId","provider","searchParams","URLSearchParams","set","encodeURIComponent","request","method","url","toString","getLatestObservationDatesByCode","codes","client","entries","map","bundle","executeBatch","resourceType","type","entry","idx","observationResource","resource","observation","date","effectivePeriod","end","effectiveDateTime","exports"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-latest-observation-dates-by-code.ts"],"mappings":";;;;;;AAKA,MAAMA,8BAA8B,GAAGA,CACrCC,IAAY,EACZC,SAAiB,EACjBC,QAAgB,KACA;EAChB,MAAMC,YAAY,GAAG,IAAIC,eAAe,CAAC,CAAC;EAE1CD,YAAY,CAACE,GAAG,CAAC,MAAM,EAAEL,IAAI,CAAC;EAC9BG,YAAY,CAACE,GAAG,CACd,YAAY,EACZ,2EAA2EH,QAAQ,EACrF,CAAC;EACDC,YAAY,CAACE,GAAG,CAAC,SAAS,EAAE,WAAWC,kBAAkB,CAACL,SAAS,CAAC,EAAE,CAAC;EACvEE,YAAY,CAACE,GAAG,CAAC,WAAW,EAAE,WAAW,CAAC;EAC1CF,YAAY,CAACE,GAAG,CAAC,OAAO,EAAE,OAAO,CAAC;EAClCF,YAAY,CAACE,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC;EAE/B,OAAO;IACLE,OAAO,EAAE;MACPC,MAAM,EAAE,KAAK;MACbC,GAAG,EAAE,eAAeN,YAAY,CAACO,QAAQ,CAAC,CAAC;IAC7C;EACF,CAAC;AACH,CAAC;AASM,MAAMC,+BAA+B,GAAG,MAAAA,CAAO;EACpDC,KAAK;EACLX,SAAS;EACTY,MAAM;EACNX;AACoC,CAAC,KAAK;EAC1C,MAAMY,OAAO,GAAGF,KAAK,CAACG,GAAG,CAAEf,IAAI,IAC7BD,8BAA8B,CAACC,IAAI,EAAEC,SAAS,EAAEC,QAAQ,CAC1D,CAAC;EAED,MAAMc,MAAM,GAAG,MAAMH,MAAM,CAACI,YAAY,CAAC;IACvCC,YAAY,EAAE,QAAQ;IACtBC,IAAI,EAAE,OAAO;IACbC,KAAK,EAAEN;EACT,CAAC,CAAC;EAEF,OAAO,CAACE,MAAM,CAACI,KAAK,IAAI,EAAE,EAAEL,GAAG,CAAC,CAACK,KAAK,EAAEC,GAAG,KAAK;IAC9C,MAAMC,mBAAmB,GAAGF,KAAK,CAACG,QAAkB;IAEpD,MAAMC,WAAW,GAAGF,mBAAmB,EAAEF,KAAK,GAAG,CAAC,CAAC,EAAEG,QAExC;IAEb,MAAME,IAAI,GACRD,WAAW,EAAEE,eAAe,EAAEC,GAAG,IAAIH,WAAW,EAAEI,iBAAiB;IAErE,OAAO;MACL5B,IAAI,EAAEY,KAAK,CAACS,GAAG,CAAC;MAChBI,IAAI,EAAEA;IACR,CAAC;EACH,CAAC,CAAC;AACJ,CAAC;AAACI,OAAA,CAAAlB,+BAAA,GAAAA,+BAAA","ignoreList":[]}
|
|
@@ -7,30 +7,106 @@ exports.getRecordsFromHealthConnect = void 0;
|
|
|
7
7
|
var _dateFns = require("date-fns");
|
|
8
8
|
var _reactNativeHealthConnect = require("react-native-health-connect");
|
|
9
9
|
const getRecordsFromHealthConnect = async ({
|
|
10
|
-
startDate: _startDate,
|
|
11
10
|
typeIdentifier,
|
|
11
|
+
startDate: _startDate,
|
|
12
12
|
chunkSize = 5000,
|
|
13
|
-
anchor
|
|
13
|
+
anchor,
|
|
14
|
+
mode = "point"
|
|
14
15
|
}) => {
|
|
15
|
-
|
|
16
|
+
if (mode === "daily-total" || mode === "daily-summary") {
|
|
17
|
+
return getDailyAggregates(typeIdentifier, mode, _startDate);
|
|
18
|
+
}
|
|
19
|
+
const startDate = _startDate ? (0, _dateFns.addSeconds)(new Date(_startDate), 1).toISOString() : (0, _dateFns.subDays)(new Date(), 30).toISOString();
|
|
16
20
|
const endDate = new Date().toISOString();
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
timeRangeFilter,
|
|
21
|
+
const result = await (0, _reactNativeHealthConnect.readRecords)(typeIdentifier, {
|
|
22
|
+
timeRangeFilter: {
|
|
23
|
+
operator: "between",
|
|
24
|
+
startTime: startDate,
|
|
25
|
+
endTime: endDate
|
|
26
|
+
},
|
|
24
27
|
pageSize: chunkSize,
|
|
25
|
-
pageToken
|
|
28
|
+
pageToken: anchor
|
|
26
29
|
});
|
|
27
30
|
return {
|
|
28
|
-
data:
|
|
29
|
-
anchor:
|
|
31
|
+
data: result.records,
|
|
32
|
+
anchor: result.pageToken ? {
|
|
30
33
|
typeIdentifier,
|
|
31
|
-
anchor:
|
|
34
|
+
anchor: result.pageToken
|
|
32
35
|
} : undefined
|
|
33
36
|
};
|
|
34
37
|
};
|
|
35
38
|
exports.getRecordsFromHealthConnect = getRecordsFromHealthConnect;
|
|
39
|
+
const getDailyAggregates = async (typeIdentifier, mode, _startDate) => {
|
|
40
|
+
const aggregateType = typeIdentifier;
|
|
41
|
+
const startDate = _startDate ? (0, _dateFns.startOfDay)(new Date(_startDate)) : (0, _dateFns.startOfDay)((0, _dateFns.subDays)(new Date(), 30));
|
|
42
|
+
const today = (0, _dateFns.startOfDay)(new Date());
|
|
43
|
+
const groups = await (0, _reactNativeHealthConnect.aggregateGroupByPeriod)({
|
|
44
|
+
recordType: aggregateType,
|
|
45
|
+
timeRangeFilter: {
|
|
46
|
+
operator: "between",
|
|
47
|
+
startTime: startDate.toISOString(),
|
|
48
|
+
endTime: today.toISOString()
|
|
49
|
+
},
|
|
50
|
+
timeRangeSlicer: {
|
|
51
|
+
period: "DAYS",
|
|
52
|
+
length: 1
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
const data = groups.flatMap(group => {
|
|
56
|
+
const end = new Date(group.endTime);
|
|
57
|
+
if (end > today) {
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
const result = group.result;
|
|
61
|
+
const measurement = aggregateMeasurement(typeIdentifier, result, mode);
|
|
62
|
+
if (!measurement) {
|
|
63
|
+
return [];
|
|
64
|
+
}
|
|
65
|
+
const dataOrigins = result.dataOrigins;
|
|
66
|
+
return [{
|
|
67
|
+
kind: mode,
|
|
68
|
+
typeIdentifier,
|
|
69
|
+
startDate: new Date(group.startTime),
|
|
70
|
+
endDate: end,
|
|
71
|
+
sourceApp: dataOrigins?.[0],
|
|
72
|
+
...measurement
|
|
73
|
+
}];
|
|
74
|
+
});
|
|
75
|
+
return {
|
|
76
|
+
data,
|
|
77
|
+
anchor: undefined
|
|
78
|
+
};
|
|
79
|
+
};
|
|
80
|
+
const aggregateMeasurement = (typeIdentifier, result, mode) => {
|
|
81
|
+
if (mode === "daily-summary" && typeIdentifier === "HeartRate") {
|
|
82
|
+
const average = numberValue(result.BPM_AVG);
|
|
83
|
+
return average === undefined ? undefined : {
|
|
84
|
+
unit: "count/min",
|
|
85
|
+
average,
|
|
86
|
+
minimum: numberValue(result.BPM_MIN),
|
|
87
|
+
maximum: numberValue(result.BPM_MAX)
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
switch (typeIdentifier) {
|
|
91
|
+
case "Steps":
|
|
92
|
+
return value(numberValue(result.COUNT_TOTAL), "count");
|
|
93
|
+
case "Distance":
|
|
94
|
+
return value(nestedNumber(result.DISTANCE, "inKilometers"), "km");
|
|
95
|
+
case "ActiveCaloriesBurned":
|
|
96
|
+
return value(nestedNumber(result.ACTIVE_CALORIES_TOTAL, "inKilocalories"), "kcal");
|
|
97
|
+
case "FloorsClimbed":
|
|
98
|
+
return value(numberValue(result.FLOORS_CLIMBED_TOTAL), "count");
|
|
99
|
+
case "ExerciseSession":
|
|
100
|
+
return value(scale(nestedNumber(result.EXERCISE_DURATION_TOTAL, "inSeconds"), 1 / 60), "min");
|
|
101
|
+
default:
|
|
102
|
+
return undefined;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const value = (measurement, unit) => measurement === undefined ? undefined : {
|
|
106
|
+
unit,
|
|
107
|
+
value: measurement
|
|
108
|
+
};
|
|
109
|
+
const numberValue = value => typeof value === "number" && Number.isFinite(value) ? value : undefined;
|
|
110
|
+
const nestedNumber = (value, key) => numberValue(value?.[key]);
|
|
111
|
+
const scale = (value, factor) => value === undefined ? undefined : value * factor;
|
|
36
112
|
//# sourceMappingURL=get-records-from-health-connect.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_dateFns","require","_reactNativeHealthConnect","getRecordsFromHealthConnect","
|
|
1
|
+
{"version":3,"names":["_dateFns","require","_reactNativeHealthConnect","getRecordsFromHealthConnect","typeIdentifier","startDate","_startDate","chunkSize","anchor","mode","getDailyAggregates","addSeconds","Date","toISOString","subDays","endDate","result","readRecords","timeRangeFilter","operator","startTime","endTime","pageSize","pageToken","data","records","undefined","exports","aggregateType","startOfDay","today","groups","aggregateGroupByPeriod","recordType","timeRangeSlicer","period","length","flatMap","group","end","measurement","aggregateMeasurement","dataOrigins","kind","sourceApp","average","numberValue","BPM_AVG","unit","minimum","BPM_MIN","maximum","BPM_MAX","value","COUNT_TOTAL","nestedNumber","DISTANCE","ACTIVE_CALORIES_TOTAL","FLOORS_CLIMBED_TOTAL","scale","EXERCISE_DURATION_TOTAL","Number","isFinite","key","factor"],"sourceRoot":"../../../../../src","sources":["modules/data-sync/utils/get-records-from-health-connect.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AACA,IAAAC,yBAAA,GAAAD,OAAA;AAeO,MAAME,2BAA2B,GAAG,MAAAA,CAAO;EAChDC,cAAc;EACdC,SAAS,EAAEC,UAAU;EACrBC,SAAS,GAAG,IAAI;EAChBC,MAAM;EACNC,IAAI,GAAG;AAC6B,CAAC,KAElC;EACH,IAAIA,IAAI,KAAK,aAAa,IAAIA,IAAI,KAAK,eAAe,EAAE;IACtD,OAAOC,kBAAkB,CAACN,cAAc,EAAEK,IAAI,EAAEH,UAAU,CAAC;EAC7D;EAEA,MAAMD,SAAS,GAAGC,UAAU,GACxB,IAAAK,mBAAU,EAAC,IAAIC,IAAI,CAACN,UAA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