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>: Containsresource, the typed body system score, ornullif 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 ofBodySystemComponententries 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
nullresource— it indicates no score data exists yet for that body system. - Source
bodySystemIdfrom a priorgetHealthScore()call rather than hardcoding it. - See Health Score for the overall score this body system contributes to.
Updated 12 days ago
Did this page help you?
