Skip to content

Implement Shared Health Observation for Validation, Normalization & Transformation #412

Description

@janoliver20

Summary

Create the new health observation implementation in the MORE KMM app.

The observation provides the common processing pipeline for health data received from platform-specific providers. It is responsible for validating, normalizing, and transforming incoming health data into the provider-independent DataGateway API model.

Apple Health and Google Health Connect integrations will subsequently connect to this observation.

Scope

Implement the shared health observation and processing pipeline in the KMM shared module.

The flow should follow:

Platform Health Data
        │
        ▼
     Validate
        │
        ▼
     Normalize
        │
        ▼
     Transform
        │
        ▼
DataGateway API Model
        │
        ▼
    DataGateway

Responsibilities include:

  • Accepting health data from platform-specific integrations.
  • Validating required values and data consistency.
  • Normalizing provider-specific representations into common concepts.
  • Mapping normalized values to the new health API model.
  • Preserving provider/source information.
  • Handling unsupported or unavailable values without inventing data.
  • Sending transformed observations to the DataGateway.
  • Providing an architecture that can be reused by additional health providers in the future.

Acceptance Criteria

  • A shared health observation is implemented in the KMM shared module.
  • The observation can receive data from platform-specific health integrations.
  • Incoming health data is validated before transformation.
  • Provider-specific values are normalized into the agreed common representation.
  • Normalized data is transformed into the new DataGateway API model.
  • Provider/source information is preserved.
  • Missing or unsupported provider values are handled correctly.
  • Invalid data is handled without causing the observation pipeline to fail unexpectedly.
  • Transformed observations can be sent successfully to the DataGateway.
  • Unit tests cover validation, normalization, and transformation.
  • The implementation is designed so Apple Health and Google Health Connect can use the same shared processing pipeline.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions