Body System Score

b.well Health SDK for Android

Retrieving Body System Score

Overview

The getBodySystemScore method in the b.well SDK retrieves a detailed score for a single body system (e.g. cardiovascular, sleep, respiratory, musculoskeletal) for the authenticated patient. Use a bodySystemId returned from Health Score to call this method.

Method Signature

suspend fun getBodySystemScore(bodySystemId: String): BWellResult<BodySystemScoreResult>
  • bodySystemId: The identifier of the body system to retrieve a score for.
  • BWellResult<BodySystemScoreResult>: Contains resource, the typed body system score, or null if no data exists.

Data Class: BodySystemScore

  • id: Unique identifier for the body system score.
  • bodySystemId: The identifier of the body system this score is for.
  • title: Human readable name of the body system.
  • score: The body system's score.
  • grade: A letter-grade representation of the score.
  • trendDirection: The direction the score is trending.
  • trendRate: The rate of change of the score.
  • calculationDate, periodStart, periodEnd: Dates describing when the score was calculated and the period it covers.
  • quality: A data-quality assessment for the score.
  • recommendations: A list of recommendation strings.
  • bioAge, actualAge, bioAgeOffset: Biological age metrics derived from the score.
  • components: A list of BodySystemComponent entries contributing to the score.
  • dailyScores: A list of daily score history entries.

Example Usage

val result = BWellSdk.health.getBodySystemScore(bodySystemId)
if (result.success() && result is BWellResult.SingleResource) {
    val score = result.data?.resource
}

Best Practices

  • Handle a null resource — it indicates no score data exists yet for that body system.
  • Source bodySystemId from a prior getHealthScore() call rather than hardcoding it.
  • See Health Score for the overall score this body system contributes to.

Did this page help you?