diff --git a/tests/integration/routes/parity/__snapshots__/analytics.01-invalid-slice.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.01-invalid-slice.json.snap new file mode 100644 index 000000000..d926ee8f1 --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.01-invalid-slice.json.snap @@ -0,0 +1,39 @@ +{ + "status": 422, + "cacheControl": null, + "body": { + "data": null, + "error": "Validation failed", + "details": { + "issues": [ + { + "path": "slice", + "code": "invalid_value", + "message": "Invalid input: expected \"summaries\"" + } + ] + }, + "meta": { + "errorCode": "analytics.invalid_query", + "requestId": "" + } + }, + "events": [ + { + "status": 422, + "action": { + "name": "analytics.get" + }, + "meta": { + "outcome": "invalid_query" + }, + "warnings": null, + "error": null + } + ], + "effects": [], + "stored": { + "healthScores": [], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.02-summaries-cold.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.02-summaries-cold.json.snap new file mode 100644 index 000000000..dc11c4909 --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.02-summaries-cold.json.snap @@ -0,0 +1,1463 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 60, + "latest": 82, + "min": 82, + "max": 84.4, + "mean": 83.18, + "median": 83.2, + "avg7": null, + "avg30": 82.42, + "slope7": { + "slope": -0.042, + "direction": "down", + "confidence": 0.93 + }, + "slope30": { + "slope": -0.04, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 83.46, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 91, + "latest": 123, + "min": 123, + "max": 137, + "mean": 129.92, + "median": 130, + "avg7": null, + "avg30": 130.36, + "slope7": { + "slope": -0.393, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": 0.071, + "direction": "up", + "confidence": 0.02 + }, + "avg30LastMonth": 130, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 91, + "latest": 78, + "min": 78, + "max": 86, + "mean": 81.96, + "median": 82, + "avg7": null, + "avg30": 81.82, + "slope7": { + "slope": -0.714, + "direction": "down", + "confidence": 0.36 + }, + "slope30": { + "slope": -0.017, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": 82, + "avg30LastYear": null + }, + "PULSE": { + "count": 60, + "latest": 64, + "min": 64, + "max": 69, + "mean": 66.5, + "median": 66.5, + "avg7": null, + "avg30": 66.32, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": -0.02, + "direction": "down", + "confidence": 0.01 + }, + "avg30LastMonth": 66.5, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 9, + "latest": 24, + "min": 24, + "max": 25.1, + "mean": 24.56, + "median": 24.6, + "avg7": null, + "avg30": 24.2, + "slope7": { + "slope": -0.014, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.021, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 24.78, + "avg30LastYear": null + }, + "SLEEP_DURATION": { + "count": 21, + "latest": 355, + "min": 355, + "max": 430, + "mean": 387.86, + "median": 390, + "avg7": 386.43, + "avg30": 387.86, + "slope7": { + "slope": -0.1, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.03, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 30, + "latest": 6000, + "min": 6000, + "max": 9833, + "mean": 7808.5, + "median": 7781.5, + "avg7": null, + "avg30": 7916.5, + "slope7": { + "slope": -373, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -30.397, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": 7511.5, + "avg30LastYear": null + }, + "BLOOD_GLUCOSE": { + "count": 60, + "latest": 128, + "min": 92, + "max": 147, + "mean": 112.95, + "median": 106.5, + "avg7": null, + "avg30": 112.95, + "slope7": { + "slope": -0.424, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.123, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 10, + "latest": 96, + "min": 96, + "max": 98, + "mean": 96.9, + "median": 97, + "avg7": null, + "avg30": 96.9, + "slope7": { + "slope": -0.036, + "direction": "down", + "confidence": 0.01 + }, + "slope30": { + "slope": -0.018, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 30, + "latest": 45, + "min": 45, + "max": 52, + "mean": 48.3, + "median": 48, + "avg7": null, + "avg30": 48.23, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.032, + "direction": "down", + "confidence": 0.02 + }, + "avg30LastMonth": 48.5, + "avg30LastYear": null + }, + "RESTING_HEART_RATE": { + "count": 40, + "latest": 58, + "min": 58, + "max": 61, + "mean": 59.5, + "median": 59.5, + "avg7": null, + "avg30": 59.41, + "slope7": { + "slope": -0.238, + "direction": "down", + "confidence": 0.24 + }, + "slope30": { + "slope": -0.006, + "direction": "stable", + "confidence": 0 + }, + "avg30LastMonth": 59.61, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_RECOVERY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SIX_MINUTE_WALK_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_ASCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_DESCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HRV_RMSSD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": null, + "lastSeenByType": { + "WEIGHT": { + "lastSeenAt": "2026-10-15T06:30:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_SYS": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_DIA": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "PULSE": { + "lastSeenAt": "2026-10-15T07:01:00.000Z", + "daysAgo": 0 + }, + "BODY_FAT": { + "lastSeenAt": "2026-10-15T06:31:00.000Z", + "daysAgo": 0 + }, + "SLEEP_DURATION": { + "lastSeenAt": "2026-10-15T04:15:00.000Z", + "daysAgo": 0 + }, + "ACTIVITY_STEPS": { + "lastSeenAt": "2026-10-15T09:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_GLUCOSE": { + "lastSeenAt": "2026-10-15T11:00:00.000Z", + "daysAgo": 0 + }, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": { + "lastSeenAt": "2026-10-15T04:40:00.000Z", + "daysAgo": 0 + }, + "HEART_RATE_VARIABILITY": { + "lastSeenAt": "2026-10-15T04:30:00.000Z", + "daysAgo": 0 + }, + "RESTING_HEART_RATE": { + "lastSeenAt": "2026-10-15T05:00:00.000Z", + "daysAgo": 0 + }, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "CARDIO_RECOVERY": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "SIX_MINUTE_WALK_DISTANCE": null, + "STAIR_ASCENT_SPEED": null, + "STAIR_DESCENT_SPEED": null, + "BREATHING_DISTURBANCES": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "HRV_RMSSD": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + }, + "sleepSourceDiscrepancy": null, + "recoveryEmpty": "general" + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "analytics.get.slim" + }, + "meta": { + "analytics": { + "slim_summaries": { + "row_count": 566, + "type_count": 11, + "path": "rollup", + "year_over_year_types": 0, + "slope_source": "rollup", + "median_source": "live", + "regression_source": "rollup" + } + }, + "cache.summaries_slice.outcome": "miss" + }, + "warnings": null, + "error": null + } + ], + "effects": [ + { + "effect": "ensureUserRollupsFresh", + "args": [ + "" + ] + } + ], + "stored": { + "healthScores": [], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.03-summaries-warm.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.03-summaries-warm.json.snap new file mode 100644 index 000000000..4242750d3 --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.03-summaries-warm.json.snap @@ -0,0 +1,1445 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 60, + "latest": 82, + "min": 82, + "max": 84.4, + "mean": 83.18, + "median": 83.2, + "avg7": null, + "avg30": 82.42, + "slope7": { + "slope": -0.042, + "direction": "down", + "confidence": 0.93 + }, + "slope30": { + "slope": -0.04, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 83.46, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 91, + "latest": 123, + "min": 123, + "max": 137, + "mean": 129.92, + "median": 130, + "avg7": null, + "avg30": 130.36, + "slope7": { + "slope": -0.393, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": 0.071, + "direction": "up", + "confidence": 0.02 + }, + "avg30LastMonth": 130, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 91, + "latest": 78, + "min": 78, + "max": 86, + "mean": 81.96, + "median": 82, + "avg7": null, + "avg30": 81.82, + "slope7": { + "slope": -0.714, + "direction": "down", + "confidence": 0.36 + }, + "slope30": { + "slope": -0.017, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": 82, + "avg30LastYear": null + }, + "PULSE": { + "count": 60, + "latest": 64, + "min": 64, + "max": 69, + "mean": 66.5, + "median": 66.5, + "avg7": null, + "avg30": 66.32, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": -0.02, + "direction": "down", + "confidence": 0.01 + }, + "avg30LastMonth": 66.5, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 9, + "latest": 24, + "min": 24, + "max": 25.1, + "mean": 24.56, + "median": 24.6, + "avg7": null, + "avg30": 24.2, + "slope7": { + "slope": -0.014, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.021, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 24.78, + "avg30LastYear": null + }, + "SLEEP_DURATION": { + "count": 21, + "latest": 355, + "min": 355, + "max": 430, + "mean": 387.86, + "median": 390, + "avg7": 386.43, + "avg30": 387.86, + "slope7": { + "slope": -0.1, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.03, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 30, + "latest": 6000, + "min": 6000, + "max": 9833, + "mean": 7808.5, + "median": 7781.5, + "avg7": null, + "avg30": 7916.5, + "slope7": { + "slope": -373, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -30.397, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": 7511.5, + "avg30LastYear": null + }, + "BLOOD_GLUCOSE": { + "count": 60, + "latest": 128, + "min": 92, + "max": 147, + "mean": 112.95, + "median": 106.5, + "avg7": null, + "avg30": 112.95, + "slope7": { + "slope": -0.424, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.123, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 10, + "latest": 96, + "min": 96, + "max": 98, + "mean": 96.9, + "median": 97, + "avg7": null, + "avg30": 96.9, + "slope7": { + "slope": -0.036, + "direction": "down", + "confidence": 0.01 + }, + "slope30": { + "slope": -0.018, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 30, + "latest": 45, + "min": 45, + "max": 52, + "mean": 48.3, + "median": 48, + "avg7": null, + "avg30": 48.23, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.032, + "direction": "down", + "confidence": 0.02 + }, + "avg30LastMonth": 48.5, + "avg30LastYear": null + }, + "RESTING_HEART_RATE": { + "count": 40, + "latest": 58, + "min": 58, + "max": 61, + "mean": 59.5, + "median": 59.5, + "avg7": null, + "avg30": 59.41, + "slope7": { + "slope": -0.238, + "direction": "down", + "confidence": 0.24 + }, + "slope30": { + "slope": -0.006, + "direction": "stable", + "confidence": 0 + }, + "avg30LastMonth": 59.61, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_RECOVERY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SIX_MINUTE_WALK_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_ASCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_DESCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HRV_RMSSD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": null, + "lastSeenByType": { + "WEIGHT": { + "lastSeenAt": "2026-10-15T06:30:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_SYS": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_DIA": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "PULSE": { + "lastSeenAt": "2026-10-15T07:01:00.000Z", + "daysAgo": 0 + }, + "BODY_FAT": { + "lastSeenAt": "2026-10-15T06:31:00.000Z", + "daysAgo": 0 + }, + "SLEEP_DURATION": { + "lastSeenAt": "2026-10-15T04:15:00.000Z", + "daysAgo": 0 + }, + "ACTIVITY_STEPS": { + "lastSeenAt": "2026-10-15T09:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_GLUCOSE": { + "lastSeenAt": "2026-10-15T11:00:00.000Z", + "daysAgo": 0 + }, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": { + "lastSeenAt": "2026-10-15T04:40:00.000Z", + "daysAgo": 0 + }, + "HEART_RATE_VARIABILITY": { + "lastSeenAt": "2026-10-15T04:30:00.000Z", + "daysAgo": 0 + }, + "RESTING_HEART_RATE": { + "lastSeenAt": "2026-10-15T05:00:00.000Z", + "daysAgo": 0 + }, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "CARDIO_RECOVERY": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "SIX_MINUTE_WALK_DISTANCE": null, + "STAIR_ASCENT_SPEED": null, + "STAIR_DESCENT_SPEED": null, + "BREATHING_DISTURBANCES": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "HRV_RMSSD": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + }, + "sleepSourceDiscrepancy": null, + "recoveryEmpty": "general" + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "analytics.get" + }, + "meta": { + "cache.summaries_slice.outcome": "hit" + }, + "warnings": null, + "error": null + } + ], + "effects": [], + "stored": { + "healthScores": [], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.04-default-cold.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.04-default-cold.json.snap new file mode 100644 index 000000000..fa58d3975 --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.04-default-cold.json.snap @@ -0,0 +1,2508 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 60, + "latest": 82, + "min": 82, + "max": 84.4, + "mean": 83.18, + "median": 83.2, + "avg7": null, + "avg30": 82.42, + "slope7": { + "slope": -0.042, + "direction": "down", + "confidence": 0.93 + }, + "slope30": { + "slope": -0.04, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 83.46, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 91, + "latest": 123, + "min": 123, + "max": 137, + "mean": 129.92, + "median": 130, + "avg7": null, + "avg30": 130.36, + "slope7": { + "slope": -0.393, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": 0.071, + "direction": "up", + "confidence": 0.02 + }, + "avg30LastMonth": 130, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 91, + "latest": 78, + "min": 78, + "max": 86, + "mean": 81.96, + "median": 82, + "avg7": null, + "avg30": 81.82, + "slope7": { + "slope": -0.714, + "direction": "down", + "confidence": 0.36 + }, + "slope30": { + "slope": -0.017, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": 82, + "avg30LastYear": null + }, + "PULSE": { + "count": 60, + "latest": 64, + "min": 64, + "max": 69, + "mean": 66.5, + "median": 66.5, + "avg7": null, + "avg30": 66.32, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": -0.02, + "direction": "down", + "confidence": 0.01 + }, + "avg30LastMonth": 66.5, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 9, + "latest": 24, + "min": 24, + "max": 25.1, + "mean": 24.56, + "median": 24.6, + "avg7": null, + "avg30": 24.2, + "slope7": { + "slope": -0.014, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.021, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 24.78, + "avg30LastYear": null + }, + "SLEEP_DURATION": { + "count": 21, + "latest": 355, + "min": 355, + "max": 430, + "mean": 387.86, + "median": 390, + "avg7": 386.43, + "avg30": 387.86, + "slope7": { + "slope": -0.1, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.03, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 30, + "latest": 6000, + "min": 6000, + "max": 9833, + "mean": 7808.5, + "median": 7781.5, + "avg7": null, + "avg30": 7916.5, + "slope7": { + "slope": -373, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -30.397, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": 7511.5, + "avg30LastYear": null + }, + "BLOOD_GLUCOSE": { + "count": 60, + "latest": 128, + "min": 92, + "max": 147, + "mean": 112.95, + "median": 106.5, + "avg7": null, + "avg30": 112.95, + "slope7": { + "slope": -0.424, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.123, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 10, + "latest": 96, + "min": 96, + "max": 98, + "mean": 96.9, + "median": 97, + "avg7": null, + "avg30": 96.9, + "slope7": { + "slope": -0.036, + "direction": "down", + "confidence": 0.01 + }, + "slope30": { + "slope": -0.018, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 30, + "latest": 45, + "min": 45, + "max": 52, + "mean": 48.3, + "median": 48, + "avg7": null, + "avg30": 48.23, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.032, + "direction": "down", + "confidence": 0.02 + }, + "avg30LastMonth": 48.5, + "avg30LastYear": null + }, + "RESTING_HEART_RATE": { + "count": 40, + "latest": 58, + "min": 58, + "max": 61, + "mean": 59.5, + "median": 59.5, + "avg7": null, + "avg30": 59.41, + "slope7": { + "slope": -0.238, + "direction": "down", + "confidence": 0.24 + }, + "slope30": { + "slope": -0.006, + "direction": "stable", + "confidence": 0 + }, + "avg30LastMonth": 59.61, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_RECOVERY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SIX_MINUTE_WALK_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_ASCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_DESCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HRV_RMSSD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": 25.9, + "bpInTargetPct": 11, + "bpInTargetPct7d": 14, + "bpInTargetPct30d": 17, + "bpInTargetPctAllTime": 12, + "bpInTargetPctPriorMonth": 10, + "bpInTargetPctPriorYear": null, + "bpInTargetCount90": 90, + "bpInTargetSpanDays90": 90, + "glucoseByContext": { + "FASTING": { + "count": 20, + "latest": 92, + "min": 92, + "max": 98, + "mean": 94.85, + "median": 95, + "avg7": 95, + "avg30": 94.85, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.079, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "POSTPRANDIAL": { + "count": 20, + "latest": 128, + "min": 128, + "max": 147, + "mean": 137.5, + "median": 137.5, + "avg7": 137, + "avg30": 137.5, + "slope7": { + "slope": -3, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.368, + "direction": "down", + "confidence": 0.14 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "UNSPECIFIED": { + "count": 20, + "latest": 105, + "min": 105, + "max": 108, + "mean": 106.5, + "median": 106.5, + "avg7": 106.29, + "avg30": 106.5, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.08 + }, + "slope30": { + "slope": -0.038, + "direction": "down", + "confidence": 0.04 + }, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "glucoseClinical": { + "stillLearning": false, + "stillLearningReason": null, + "windowDays": 30, + "actualSpanDays": 19.197916666666668, + "readingCount": 60, + "meanMgdl": 112.95, + "distribution": { + "tir": 1, + "tbrLevel1": 0, + "tbrLevel2": 0, + "tarLevel1": 0, + "tarLevel2": 0, + "minutesEquivalent": { + "tir": 1440, + "tbrLevel1": 0, + "tbrLevel2": 0, + "tarLevel1": 0, + "tarLevel2": 0 + } + }, + "gmi": 6.011764, + "estimatedA1c": 5.562717770034843, + "variability": { + "sd": 18.50462608216329, + "cv": 16.383024419799284, + "unstable": false + }, + "advanced": { + "jIndex": 17.280318718401364, + "lbgi": 0.37857697435062837, + "hbgi": 0.48362299410937315 + }, + "isSpotEstimate": true + }, + "correlations": { + "bpCompliance": { + "kind": "bp-compliance", + "status": "insufficient", + "n": 24, + "reason": "not_significant", + "points": [ + { + "x": 100, + "y": 125 + }, + { + "x": 100, + "y": 133 + }, + { + "x": 100, + "y": 126 + }, + { + "x": 100, + "y": 134 + }, + { + "x": 100, + "y": 127 + }, + { + "x": 0, + "y": 135 + }, + { + "x": 100, + "y": 128 + }, + { + "x": 100, + "y": 136 + }, + { + "x": 100, + "y": 137 + }, + { + "x": 100, + "y": 130 + }, + { + "x": 100, + "y": 123 + }, + { + "x": 50, + "y": 131 + }, + { + "x": 100, + "y": 124 + }, + { + "x": 100, + "y": 132 + }, + { + "x": 100, + "y": 125 + }, + { + "x": 100, + "y": 133 + }, + { + "x": 100, + "y": 134 + }, + { + "x": 0, + "y": 127 + }, + { + "x": 100, + "y": 135 + }, + { + "x": 100, + "y": 128 + }, + { + "x": 100, + "y": 136 + }, + { + "x": 100, + "y": 129 + }, + { + "x": 100, + "y": 137 + }, + { + "x": 100, + "y": 130 + } + ] + }, + "moodPulse": { + "kind": "mood-pulse", + "status": "insufficient", + "n": 28, + "reason": "not_significant", + "points": [ + { + "x": 1, + "y": 58 + }, + { + "x": 4, + "y": 59 + }, + { + "x": 2, + "y": 60 + }, + { + "x": 5, + "y": 61 + }, + { + "x": 3, + "y": 58 + }, + { + "x": 1, + "y": 59 + }, + { + "x": 4, + "y": 60 + }, + { + "x": 2, + "y": 61 + }, + { + "x": 5, + "y": 58 + }, + { + "x": 3, + "y": 59 + }, + { + "x": 1, + "y": 60 + }, + { + "x": 4, + "y": 61 + }, + { + "x": 2, + "y": 58 + }, + { + "x": 5, + "y": 59 + }, + { + "x": 3, + "y": 60 + }, + { + "x": 1, + "y": 61 + }, + { + "x": 4, + "y": 58 + }, + { + "x": 2, + "y": 59 + }, + { + "x": 5, + "y": 60 + }, + { + "x": 3, + "y": 61 + }, + { + "x": 1, + "y": 58 + }, + { + "x": 4, + "y": 59 + }, + { + "x": 2, + "y": 60 + }, + { + "x": 5, + "y": 61 + }, + { + "x": 3, + "y": 58 + }, + { + "x": 1, + "y": 59 + }, + { + "x": 4, + "y": 60 + }, + { + "x": 2, + "y": 61 + } + ] + }, + "weightWeekday": { + "kind": "weight-weekday", + "status": "insufficient", + "n": 28, + "reason": "not_significant", + "points": [ + { + "x": 4, + "y": 83.1 + }, + { + "x": 5, + "y": 83 + }, + { + "x": 6, + "y": 83 + }, + { + "x": 0, + "y": 83 + }, + { + "x": 1, + "y": 82.9 + }, + { + "x": 2, + "y": 82.9 + }, + { + "x": 3, + "y": 82.8 + }, + { + "x": 4, + "y": 82.8 + }, + { + "x": 5, + "y": 82.8 + }, + { + "x": 6, + "y": 82.7 + }, + { + "x": 0, + "y": 82.7 + }, + { + "x": 1, + "y": 82.6 + }, + { + "x": 2, + "y": 82.6 + }, + { + "x": 3, + "y": 82.6 + }, + { + "x": 4, + "y": 82.5 + }, + { + "x": 5, + "y": 82.5 + }, + { + "x": 6, + "y": 82.4 + }, + { + "x": 0, + "y": 82.4 + }, + { + "x": 1, + "y": 82.4 + }, + { + "x": 2, + "y": 82.3 + }, + { + "x": 3, + "y": 82.3 + }, + { + "x": 4, + "y": 82.2 + }, + { + "x": 5, + "y": 82.2 + }, + { + "x": 6, + "y": 82.2 + }, + { + "x": 0, + "y": 82.1 + }, + { + "x": 1, + "y": 82.1 + }, + { + "x": 2, + "y": 82 + }, + { + "x": 3, + "y": 82 + } + ] + }, + "degraded": false, + "windowDays": 28, + "path": "rollup" + }, + "healthScore": { + "composite": { + "status": "ok", + "value": { + "score": 86, + "band": "green", + "bandSetter": null, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "configured": false, + "scoreBasis": { + "domains": 3, + "recommended": 3, + "tier": "full", + "physiological": true + }, + "noiseFloor": 2, + "scoreVersion": 4 + }, + "coverage": { + "requiredInputs": 3, + "presentInputs": 3, + "historyDays": 20, + "missing": [ + "adiposity", + "wellbeing" + ] + }, + "confidence": { + "score": 71, + "band": "medium" + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + } + }, + "pillars": [ + { + "id": "BLOOD_PRESSURE", + "domain": "cardiometabolic", + "result": { + "status": "ok", + "value": { + "score": 73, + "scoreBasis": { + "axis": "diastolic", + "relation": "above_ceiling", + "offsetMmHg": 3, + "boundaryMmHg": 79 + }, + "observed": { + "value": 130, + "unit": "mmHg", + "label": "130/82 mmHg", + "asOf": "2026-10-15T00:00:00.000Z", + "sources": [ + "MANUAL" + ] + }, + "reference": { + "kind": "clinical-threshold", + "low": 120, + "high": 129, + "label": "120–129/70–79 mmHg", + "source": "ESH 2023" + }, + "noiseFloor": 1, + "deltaEligible": true, + "deltaIdentity": "graded_bp_pair_series" + }, + "coverage": { + "requiredInputs": 12, + "presentInputs": 12, + "historyDays": 90, + "missing": [] + }, + "confidence": { + "score": 100, + "band": "high" + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE" + ], + "source": "DAY", + "windowDays": 90, + "computedAt": "" + } + } + }, + { + "id": "GLYCAEMIA", + "domain": "cardiometabolic", + "result": { + "status": "ok", + "value": { + "score": 100, + "observed": { + "value": 95, + "unit": "mg/dL", + "label": "Fasting median 95 mg/dL", + "asOf": "2026-10-15T06:15:00.000Z", + "sources": [ + "MANUAL" + ] + }, + "reference": { + "kind": "clinical-threshold", + "low": 70, + "high": 99, + "label": "70–99 mg/dL fasting", + "source": "ADA 2025; Selvin 2010" + }, + "noiseFloor": 1, + "deltaEligible": true, + "deltaIdentity": "fasting_glucose" + }, + "coverage": { + "requiredInputs": 8, + "presentInputs": 8, + "historyDays": 20, + "missing": [] + }, + "confidence": { + "score": 22, + "band": "draft" + }, + "provenance": { + "inputs": [ + "GLYCAEMIA" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + } + } + }, + { + "id": "ACTIVITY", + "domain": "activity", + "result": { + "status": "ok", + "value": { + "score": 78, + "observed": { + "value": 7837, + "unit": "steps/day", + "label": "7,837 steps/day", + "asOf": "2026-10-14T00:00:00.000Z", + "sources": [ + "APPLE_HEALTH" + ] + }, + "reference": { + "kind": "guideline-band", + "low": 0, + "high": 10000, + "label": "benefit plateaus by 10,000 steps/day", + "source": "Paluch 2022" + }, + "noiseFloor": 5, + "deltaEligible": true, + "deltaIdentity": "ACTIVITY_STEPS" + }, + "coverage": { + "requiredInputs": 21, + "presentInputs": 21, + "historyDays": 28, + "missing": [] + }, + "confidence": { + "score": 100, + "band": "high" + }, + "provenance": { + "inputs": [ + "ACTIVITY" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + } + } + }, + { + "id": "SLEEP", + "domain": "sleep", + "result": { + "status": "ok", + "value": { + "score": 92, + "observed": { + "value": 388, + "unit": "minutes/night", + "label": "388 min/night + regularity", + "asOf": "2026-10-15T00:00:00.000Z", + "sources": [ + "APPLE_HEALTH" + ] + }, + "reference": { + "kind": "guideline-band", + "low": 420, + "high": null, + "label": "at least 420 min/night; long sleep is not penalised", + "source": "NSF 2015; Ai 2021; Daghlas 2019; Windred 2024" + }, + "noiseFloor": 2, + "deltaEligible": true, + "deltaIdentity": "sleep_duration_rhythm" + }, + "coverage": { + "requiredInputs": 14, + "presentInputs": 14, + "historyDays": 21, + "missing": [] + }, + "confidence": { + "score": 75, + "band": "high" + }, + "provenance": { + "inputs": [ + "SLEEP" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + } + } + }, + { + "id": "ADIPOSITY", + "domain": "adiposity", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "waist measurement" + ] + }, + "provenance": { + "inputs": [ + "ADIPOSITY" + ], + "source": "live", + "windowDays": 180, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "WELLBEING", + "domain": "wellbeing", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "completed WHO-5, PHQ-9 or GAD-7" + ] + }, + "provenance": { + "inputs": [ + "WELLBEING" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "LIPIDS", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "lipid panel with lab reference ranges" + ] + }, + "provenance": { + "inputs": [ + "LIPIDS" + ], + "source": "live", + "windowDays": 365, + "computedAt": "" + }, + "reason": "not_tracked" + } + } + ], + "delta": null, + "deltaReason": "first_eligibility_window", + "scoreVersion": 4, + "weightGoal": { + "status": "insufficient", + "coverage": { + "requiredInputs": 2, + "presentInputs": 1, + "historyDays": 1, + "missing": [ + "personal weight target" + ] + }, + "provenance": { + "inputs": [ + "WEIGHT", + "personal weight target" + ], + "source": "live", + "windowDays": 60, + "computedAt": "" + }, + "reason": "no_personal_goal" + }, + "algorithmNotice": { + "itemKey": "health_score_algorithm:4", + "dismissed": false + }, + "compositionNotice": null, + "restMode": { + "active": true, + "since": "2026-10-12T12:00:00.000Z", + "episodeCount": 1 + } + }, + "sleepStages": { + "windowDays": 30, + "nights": 21, + "totalMinutes": 8362, + "stages": { + "CORE": 4600, + "DEEP": 1575, + "REM": 1935, + "AWAKE": 252 + }, + "perNight": [ + { + "dayKey": "2026-09-25", + "stages": { + "CORE": 200, + "DEEP": 80, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-26", + "stages": { + "CORE": 240, + "DEEP": 75, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-27", + "stages": { + "CORE": 230, + "DEEP": 70, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-28", + "stages": { + "CORE": 220, + "DEEP": 80, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-29", + "stages": { + "CORE": 210, + "DEEP": 75, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-30", + "stages": { + "CORE": 200, + "DEEP": 70, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-01", + "stages": { + "CORE": 240, + "DEEP": 80, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-02", + "stages": { + "CORE": 230, + "DEEP": 75, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-03", + "stages": { + "CORE": 220, + "DEEP": 70, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-04", + "stages": { + "CORE": 210, + "DEEP": 80, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-05", + "stages": { + "CORE": 200, + "DEEP": 75, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-06", + "stages": { + "CORE": 240, + "DEEP": 70, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-07", + "stages": { + "CORE": 230, + "DEEP": 80, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-08", + "stages": { + "CORE": 220, + "DEEP": 75, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-09", + "stages": { + "CORE": 210, + "DEEP": 70, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-10", + "stages": { + "CORE": 200, + "DEEP": 80, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-11", + "stages": { + "CORE": 240, + "DEEP": 75, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-12", + "stages": { + "CORE": 230, + "DEEP": 70, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-13", + "stages": { + "CORE": 220, + "DEEP": 80, + "REM": 95, + "AWAKE": 12 + }, + "napMinutes": 35, + "napCount": 1 + }, + { + "dayKey": "2026-10-14", + "stages": { + "CORE": 210, + "DEEP": 75, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-15", + "stages": { + "CORE": 200, + "DEEP": 70, + "REM": 85, + "AWAKE": 12 + } + } + ] + }, + "sleepSourceDiscrepancy": null, + "lastSeenByType": { + "WEIGHT": { + "lastSeenAt": "2026-10-15T06:30:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_SYS": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_DIA": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "PULSE": { + "lastSeenAt": "2026-10-15T07:01:00.000Z", + "daysAgo": 0 + }, + "BODY_FAT": { + "lastSeenAt": "2026-10-15T06:31:00.000Z", + "daysAgo": 0 + }, + "SLEEP_DURATION": { + "lastSeenAt": "2026-10-15T04:15:00.000Z", + "daysAgo": 0 + }, + "ACTIVITY_STEPS": { + "lastSeenAt": "2026-10-15T09:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_GLUCOSE": { + "lastSeenAt": "2026-10-15T11:00:00.000Z", + "daysAgo": 0 + }, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": { + "lastSeenAt": "2026-10-15T04:40:00.000Z", + "daysAgo": 0 + }, + "HEART_RATE_VARIABILITY": { + "lastSeenAt": "2026-10-15T04:30:00.000Z", + "daysAgo": 0 + }, + "RESTING_HEART_RATE": { + "lastSeenAt": "2026-10-15T05:00:00.000Z", + "daysAgo": 0 + }, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "CARDIO_RECOVERY": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "SIX_MINUTE_WALK_DISTANCE": null, + "STAIR_ASCENT_SPEED": null, + "STAIR_DESCENT_SPEED": null, + "BREATHING_DISTURBANCES": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "HRV_RMSSD": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + } + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "score.record.write" + }, + "meta": { + "cache.summaries_slice.outcome": "hit", + "analytics": { + "bp_in_target": { + "path": "rollup", + "tz_guard": "near-utc" + } + }, + "correlations": { + "bpCompliance": "insufficient", + "moodPulse": "insufficient", + "weightWeekday": "insufficient", + "path": "rollup", + "window_days": 28, + "degraded": false, + "tz_guard": "near-utc" + }, + "dayKey": "2026-10-15", + "scoreVersion": 4, + "pillars": 4, + "cache.analytics.outcome": "miss", + "cache.analytics.key_hash": 364623505 + }, + "warnings": null, + "error": null + } + ], + "effects": [ + { + "effect": "ensureUserRollupsFresh", + "args": [ + "" + ] + } + ], + "stored": { + "healthScores": [ + { + "dayKey": "2026-10-15", + "timezone": "Europe/Berlin", + "composite": 86, + "band": "green", + "scoreVersion": 4, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "pillarScores": { + "SLEEP": 92, + "ACTIVITY": 78, + "GLYCAEMIA": 100, + "BLOOD_PRESSURE": 73 + }, + "inputFingerprint": "5653cd8c051404182d6c6f813a48b1c2ebc3abe1116901466ab7cc1ab70cb276", + "computedAt": "" + } + ], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.05-default-warm.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.05-default-warm.json.snap new file mode 100644 index 000000000..b7bc89c9c --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.05-default-warm.json.snap @@ -0,0 +1,2482 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 60, + "latest": 82, + "min": 82, + "max": 84.4, + "mean": 83.18, + "median": 83.2, + "avg7": null, + "avg30": 82.42, + "slope7": { + "slope": -0.042, + "direction": "down", + "confidence": 0.93 + }, + "slope30": { + "slope": -0.04, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 83.46, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 91, + "latest": 123, + "min": 123, + "max": 137, + "mean": 129.92, + "median": 130, + "avg7": null, + "avg30": 130.36, + "slope7": { + "slope": -0.393, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": 0.071, + "direction": "up", + "confidence": 0.02 + }, + "avg30LastMonth": 130, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 91, + "latest": 78, + "min": 78, + "max": 86, + "mean": 81.96, + "median": 82, + "avg7": null, + "avg30": 81.82, + "slope7": { + "slope": -0.714, + "direction": "down", + "confidence": 0.36 + }, + "slope30": { + "slope": -0.017, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": 82, + "avg30LastYear": null + }, + "PULSE": { + "count": 60, + "latest": 64, + "min": 64, + "max": 69, + "mean": 66.5, + "median": 66.5, + "avg7": null, + "avg30": 66.32, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": -0.02, + "direction": "down", + "confidence": 0.01 + }, + "avg30LastMonth": 66.5, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 9, + "latest": 24, + "min": 24, + "max": 25.1, + "mean": 24.56, + "median": 24.6, + "avg7": null, + "avg30": 24.2, + "slope7": { + "slope": -0.014, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.021, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 24.78, + "avg30LastYear": null + }, + "SLEEP_DURATION": { + "count": 21, + "latest": 355, + "min": 355, + "max": 430, + "mean": 387.86, + "median": 390, + "avg7": 386.43, + "avg30": 387.86, + "slope7": { + "slope": -0.1, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.03, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 30, + "latest": 6000, + "min": 6000, + "max": 9833, + "mean": 7808.5, + "median": 7781.5, + "avg7": null, + "avg30": 7916.5, + "slope7": { + "slope": -373, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -30.397, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": 7511.5, + "avg30LastYear": null + }, + "BLOOD_GLUCOSE": { + "count": 60, + "latest": 128, + "min": 92, + "max": 147, + "mean": 112.95, + "median": 106.5, + "avg7": null, + "avg30": 112.95, + "slope7": { + "slope": -0.424, + "direction": "down", + "confidence": 0 + }, + "slope30": { + "slope": -0.123, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 10, + "latest": 96, + "min": 96, + "max": 98, + "mean": 96.9, + "median": 97, + "avg7": null, + "avg30": 96.9, + "slope7": { + "slope": -0.036, + "direction": "down", + "confidence": 0.01 + }, + "slope30": { + "slope": -0.018, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 30, + "latest": 45, + "min": 45, + "max": 52, + "mean": 48.3, + "median": 48, + "avg7": null, + "avg30": 48.23, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.032, + "direction": "down", + "confidence": 0.02 + }, + "avg30LastMonth": 48.5, + "avg30LastYear": null + }, + "RESTING_HEART_RATE": { + "count": 40, + "latest": 58, + "min": 58, + "max": 61, + "mean": 59.5, + "median": 59.5, + "avg7": null, + "avg30": 59.41, + "slope7": { + "slope": -0.238, + "direction": "down", + "confidence": 0.24 + }, + "slope30": { + "slope": -0.006, + "direction": "stable", + "confidence": 0 + }, + "avg30LastMonth": 59.61, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_RECOVERY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SIX_MINUTE_WALK_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_ASCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_DESCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HRV_RMSSD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": 25.9, + "bpInTargetPct": 11, + "bpInTargetPct7d": 14, + "bpInTargetPct30d": 17, + "bpInTargetPctAllTime": 12, + "bpInTargetPctPriorMonth": 10, + "bpInTargetPctPriorYear": null, + "bpInTargetCount90": 90, + "bpInTargetSpanDays90": 90, + "glucoseByContext": { + "FASTING": { + "count": 20, + "latest": 92, + "min": 92, + "max": 98, + "mean": 94.85, + "median": 95, + "avg7": 95, + "avg30": 94.85, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.079, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "POSTPRANDIAL": { + "count": 20, + "latest": 128, + "min": 128, + "max": 147, + "mean": 137.5, + "median": 137.5, + "avg7": 137, + "avg30": 137.5, + "slope7": { + "slope": -3, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.368, + "direction": "down", + "confidence": 0.14 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "UNSPECIFIED": { + "count": 20, + "latest": 105, + "min": 105, + "max": 108, + "mean": 106.5, + "median": 106.5, + "avg7": 106.29, + "avg30": 106.5, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.08 + }, + "slope30": { + "slope": -0.038, + "direction": "down", + "confidence": 0.04 + }, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "glucoseClinical": { + "stillLearning": false, + "stillLearningReason": null, + "windowDays": 30, + "actualSpanDays": 19.197916666666668, + "readingCount": 60, + "meanMgdl": 112.95, + "distribution": { + "tir": 1, + "tbrLevel1": 0, + "tbrLevel2": 0, + "tarLevel1": 0, + "tarLevel2": 0, + "minutesEquivalent": { + "tir": 1440, + "tbrLevel1": 0, + "tbrLevel2": 0, + "tarLevel1": 0, + "tarLevel2": 0 + } + }, + "gmi": 6.011764, + "estimatedA1c": 5.562717770034843, + "variability": { + "sd": 18.50462608216329, + "cv": 16.383024419799284, + "unstable": false + }, + "advanced": { + "jIndex": 17.280318718401364, + "lbgi": 0.37857697435062837, + "hbgi": 0.48362299410937315 + }, + "isSpotEstimate": true + }, + "correlations": { + "bpCompliance": { + "kind": "bp-compliance", + "status": "insufficient", + "n": 24, + "reason": "not_significant", + "points": [ + { + "x": 100, + "y": 125 + }, + { + "x": 100, + "y": 133 + }, + { + "x": 100, + "y": 126 + }, + { + "x": 100, + "y": 134 + }, + { + "x": 100, + "y": 127 + }, + { + "x": 0, + "y": 135 + }, + { + "x": 100, + "y": 128 + }, + { + "x": 100, + "y": 136 + }, + { + "x": 100, + "y": 137 + }, + { + "x": 100, + "y": 130 + }, + { + "x": 100, + "y": 123 + }, + { + "x": 50, + "y": 131 + }, + { + "x": 100, + "y": 124 + }, + { + "x": 100, + "y": 132 + }, + { + "x": 100, + "y": 125 + }, + { + "x": 100, + "y": 133 + }, + { + "x": 100, + "y": 134 + }, + { + "x": 0, + "y": 127 + }, + { + "x": 100, + "y": 135 + }, + { + "x": 100, + "y": 128 + }, + { + "x": 100, + "y": 136 + }, + { + "x": 100, + "y": 129 + }, + { + "x": 100, + "y": 137 + }, + { + "x": 100, + "y": 130 + } + ] + }, + "moodPulse": { + "kind": "mood-pulse", + "status": "insufficient", + "n": 28, + "reason": "not_significant", + "points": [ + { + "x": 1, + "y": 58 + }, + { + "x": 4, + "y": 59 + }, + { + "x": 2, + "y": 60 + }, + { + "x": 5, + "y": 61 + }, + { + "x": 3, + "y": 58 + }, + { + "x": 1, + "y": 59 + }, + { + "x": 4, + "y": 60 + }, + { + "x": 2, + "y": 61 + }, + { + "x": 5, + "y": 58 + }, + { + "x": 3, + "y": 59 + }, + { + "x": 1, + "y": 60 + }, + { + "x": 4, + "y": 61 + }, + { + "x": 2, + "y": 58 + }, + { + "x": 5, + "y": 59 + }, + { + "x": 3, + "y": 60 + }, + { + "x": 1, + "y": 61 + }, + { + "x": 4, + "y": 58 + }, + { + "x": 2, + "y": 59 + }, + { + "x": 5, + "y": 60 + }, + { + "x": 3, + "y": 61 + }, + { + "x": 1, + "y": 58 + }, + { + "x": 4, + "y": 59 + }, + { + "x": 2, + "y": 60 + }, + { + "x": 5, + "y": 61 + }, + { + "x": 3, + "y": 58 + }, + { + "x": 1, + "y": 59 + }, + { + "x": 4, + "y": 60 + }, + { + "x": 2, + "y": 61 + } + ] + }, + "weightWeekday": { + "kind": "weight-weekday", + "status": "insufficient", + "n": 28, + "reason": "not_significant", + "points": [ + { + "x": 4, + "y": 83.1 + }, + { + "x": 5, + "y": 83 + }, + { + "x": 6, + "y": 83 + }, + { + "x": 0, + "y": 83 + }, + { + "x": 1, + "y": 82.9 + }, + { + "x": 2, + "y": 82.9 + }, + { + "x": 3, + "y": 82.8 + }, + { + "x": 4, + "y": 82.8 + }, + { + "x": 5, + "y": 82.8 + }, + { + "x": 6, + "y": 82.7 + }, + { + "x": 0, + "y": 82.7 + }, + { + "x": 1, + "y": 82.6 + }, + { + "x": 2, + "y": 82.6 + }, + { + "x": 3, + "y": 82.6 + }, + { + "x": 4, + "y": 82.5 + }, + { + "x": 5, + "y": 82.5 + }, + { + "x": 6, + "y": 82.4 + }, + { + "x": 0, + "y": 82.4 + }, + { + "x": 1, + "y": 82.4 + }, + { + "x": 2, + "y": 82.3 + }, + { + "x": 3, + "y": 82.3 + }, + { + "x": 4, + "y": 82.2 + }, + { + "x": 5, + "y": 82.2 + }, + { + "x": 6, + "y": 82.2 + }, + { + "x": 0, + "y": 82.1 + }, + { + "x": 1, + "y": 82.1 + }, + { + "x": 2, + "y": 82 + }, + { + "x": 3, + "y": 82 + } + ] + }, + "degraded": false, + "windowDays": 28, + "path": "rollup" + }, + "healthScore": { + "composite": { + "status": "ok", + "value": { + "score": 86, + "band": "green", + "bandSetter": null, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "configured": false, + "scoreBasis": { + "domains": 3, + "recommended": 3, + "tier": "full", + "physiological": true + }, + "noiseFloor": 2, + "scoreVersion": 4 + }, + "coverage": { + "requiredInputs": 3, + "presentInputs": 3, + "historyDays": 20, + "missing": [ + "adiposity", + "wellbeing" + ] + }, + "confidence": { + "score": 71, + "band": "medium" + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + } + }, + "pillars": [ + { + "id": "BLOOD_PRESSURE", + "domain": "cardiometabolic", + "result": { + "status": "ok", + "value": { + "score": 73, + "scoreBasis": { + "axis": "diastolic", + "relation": "above_ceiling", + "offsetMmHg": 3, + "boundaryMmHg": 79 + }, + "observed": { + "value": 130, + "unit": "mmHg", + "label": "130/82 mmHg", + "asOf": "2026-10-15T00:00:00.000Z", + "sources": [ + "MANUAL" + ] + }, + "reference": { + "kind": "clinical-threshold", + "low": 120, + "high": 129, + "label": "120–129/70–79 mmHg", + "source": "ESH 2023" + }, + "noiseFloor": 1, + "deltaEligible": true, + "deltaIdentity": "graded_bp_pair_series" + }, + "coverage": { + "requiredInputs": 12, + "presentInputs": 12, + "historyDays": 90, + "missing": [] + }, + "confidence": { + "score": 100, + "band": "high" + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE" + ], + "source": "DAY", + "windowDays": 90, + "computedAt": "" + } + } + }, + { + "id": "GLYCAEMIA", + "domain": "cardiometabolic", + "result": { + "status": "ok", + "value": { + "score": 100, + "observed": { + "value": 95, + "unit": "mg/dL", + "label": "Fasting median 95 mg/dL", + "asOf": "2026-10-15T06:15:00.000Z", + "sources": [ + "MANUAL" + ] + }, + "reference": { + "kind": "clinical-threshold", + "low": 70, + "high": 99, + "label": "70–99 mg/dL fasting", + "source": "ADA 2025; Selvin 2010" + }, + "noiseFloor": 1, + "deltaEligible": true, + "deltaIdentity": "fasting_glucose" + }, + "coverage": { + "requiredInputs": 8, + "presentInputs": 8, + "historyDays": 20, + "missing": [] + }, + "confidence": { + "score": 22, + "band": "draft" + }, + "provenance": { + "inputs": [ + "GLYCAEMIA" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + } + } + }, + { + "id": "ACTIVITY", + "domain": "activity", + "result": { + "status": "ok", + "value": { + "score": 78, + "observed": { + "value": 7837, + "unit": "steps/day", + "label": "7,837 steps/day", + "asOf": "2026-10-14T00:00:00.000Z", + "sources": [ + "APPLE_HEALTH" + ] + }, + "reference": { + "kind": "guideline-band", + "low": 0, + "high": 10000, + "label": "benefit plateaus by 10,000 steps/day", + "source": "Paluch 2022" + }, + "noiseFloor": 5, + "deltaEligible": true, + "deltaIdentity": "ACTIVITY_STEPS" + }, + "coverage": { + "requiredInputs": 21, + "presentInputs": 21, + "historyDays": 28, + "missing": [] + }, + "confidence": { + "score": 100, + "band": "high" + }, + "provenance": { + "inputs": [ + "ACTIVITY" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + } + } + }, + { + "id": "SLEEP", + "domain": "sleep", + "result": { + "status": "ok", + "value": { + "score": 92, + "observed": { + "value": 388, + "unit": "minutes/night", + "label": "388 min/night + regularity", + "asOf": "2026-10-15T00:00:00.000Z", + "sources": [ + "APPLE_HEALTH" + ] + }, + "reference": { + "kind": "guideline-band", + "low": 420, + "high": null, + "label": "at least 420 min/night; long sleep is not penalised", + "source": "NSF 2015; Ai 2021; Daghlas 2019; Windred 2024" + }, + "noiseFloor": 2, + "deltaEligible": true, + "deltaIdentity": "sleep_duration_rhythm" + }, + "coverage": { + "requiredInputs": 14, + "presentInputs": 14, + "historyDays": 21, + "missing": [] + }, + "confidence": { + "score": 75, + "band": "high" + }, + "provenance": { + "inputs": [ + "SLEEP" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + } + } + }, + { + "id": "ADIPOSITY", + "domain": "adiposity", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "waist measurement" + ] + }, + "provenance": { + "inputs": [ + "ADIPOSITY" + ], + "source": "live", + "windowDays": 180, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "WELLBEING", + "domain": "wellbeing", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "completed WHO-5, PHQ-9 or GAD-7" + ] + }, + "provenance": { + "inputs": [ + "WELLBEING" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "LIPIDS", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "lipid panel with lab reference ranges" + ] + }, + "provenance": { + "inputs": [ + "LIPIDS" + ], + "source": "live", + "windowDays": 365, + "computedAt": "" + }, + "reason": "not_tracked" + } + } + ], + "delta": null, + "deltaReason": "first_eligibility_window", + "scoreVersion": 4, + "weightGoal": { + "status": "insufficient", + "coverage": { + "requiredInputs": 2, + "presentInputs": 1, + "historyDays": 1, + "missing": [ + "personal weight target" + ] + }, + "provenance": { + "inputs": [ + "WEIGHT", + "personal weight target" + ], + "source": "live", + "windowDays": 60, + "computedAt": "" + }, + "reason": "no_personal_goal" + }, + "algorithmNotice": { + "itemKey": "health_score_algorithm:4", + "dismissed": false + }, + "compositionNotice": null, + "restMode": { + "active": true, + "since": "2026-10-12T12:00:00.000Z", + "episodeCount": 1 + } + }, + "sleepStages": { + "windowDays": 30, + "nights": 21, + "totalMinutes": 8362, + "stages": { + "CORE": 4600, + "DEEP": 1575, + "REM": 1935, + "AWAKE": 252 + }, + "perNight": [ + { + "dayKey": "2026-09-25", + "stages": { + "CORE": 200, + "DEEP": 80, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-26", + "stages": { + "CORE": 240, + "DEEP": 75, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-27", + "stages": { + "CORE": 230, + "DEEP": 70, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-28", + "stages": { + "CORE": 220, + "DEEP": 80, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-29", + "stages": { + "CORE": 210, + "DEEP": 75, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-30", + "stages": { + "CORE": 200, + "DEEP": 70, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-01", + "stages": { + "CORE": 240, + "DEEP": 80, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-02", + "stages": { + "CORE": 230, + "DEEP": 75, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-03", + "stages": { + "CORE": 220, + "DEEP": 70, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-04", + "stages": { + "CORE": 210, + "DEEP": 80, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-05", + "stages": { + "CORE": 200, + "DEEP": 75, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-06", + "stages": { + "CORE": 240, + "DEEP": 70, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-07", + "stages": { + "CORE": 230, + "DEEP": 80, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-08", + "stages": { + "CORE": 220, + "DEEP": 75, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-09", + "stages": { + "CORE": 210, + "DEEP": 70, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-10", + "stages": { + "CORE": 200, + "DEEP": 80, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-11", + "stages": { + "CORE": 240, + "DEEP": 75, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-12", + "stages": { + "CORE": 230, + "DEEP": 70, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-13", + "stages": { + "CORE": 220, + "DEEP": 80, + "REM": 95, + "AWAKE": 12 + }, + "napMinutes": 35, + "napCount": 1 + }, + { + "dayKey": "2026-10-14", + "stages": { + "CORE": 210, + "DEEP": 75, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-15", + "stages": { + "CORE": 200, + "DEEP": 70, + "REM": 85, + "AWAKE": 12 + } + } + ] + }, + "sleepSourceDiscrepancy": null, + "lastSeenByType": { + "WEIGHT": { + "lastSeenAt": "2026-10-15T06:30:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_SYS": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_DIA": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "PULSE": { + "lastSeenAt": "2026-10-15T07:01:00.000Z", + "daysAgo": 0 + }, + "BODY_FAT": { + "lastSeenAt": "2026-10-15T06:31:00.000Z", + "daysAgo": 0 + }, + "SLEEP_DURATION": { + "lastSeenAt": "2026-10-15T04:15:00.000Z", + "daysAgo": 0 + }, + "ACTIVITY_STEPS": { + "lastSeenAt": "2026-10-15T09:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_GLUCOSE": { + "lastSeenAt": "2026-10-15T11:00:00.000Z", + "daysAgo": 0 + }, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": { + "lastSeenAt": "2026-10-15T04:40:00.000Z", + "daysAgo": 0 + }, + "HEART_RATE_VARIABILITY": { + "lastSeenAt": "2026-10-15T04:30:00.000Z", + "daysAgo": 0 + }, + "RESTING_HEART_RATE": { + "lastSeenAt": "2026-10-15T05:00:00.000Z", + "daysAgo": 0 + }, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "CARDIO_RECOVERY": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "SIX_MINUTE_WALK_DISTANCE": null, + "STAIR_ASCENT_SPEED": null, + "STAIR_DESCENT_SPEED": null, + "BREATHING_DISTURBANCES": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "HRV_RMSSD": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + } + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "analytics.get" + }, + "meta": { + "cache.analytics.outcome": "hit", + "cache.analytics.key_hash": 364623505 + }, + "warnings": null, + "error": null + } + ], + "effects": [], + "stored": { + "healthScores": [ + { + "dayKey": "2026-10-15", + "timezone": "Europe/Berlin", + "composite": 86, + "band": "green", + "scoreVersion": 4, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "pillarScores": { + "SLEEP": 92, + "ACTIVITY": 78, + "GLYCAEMIA": 100, + "BLOOD_PRESSURE": 73 + }, + "inputFingerprint": "5653cd8c051404182d6c6f813a48b1c2ebc3abe1116901466ab7cc1ab70cb276", + "computedAt": "" + } + ], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.06-summaries-modules-off.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.06-summaries-modules-off.json.snap new file mode 100644 index 000000000..68d6c272a --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.06-summaries-modules-off.json.snap @@ -0,0 +1,1299 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 60, + "latest": 82, + "min": 82, + "max": 84.4, + "mean": 83.18, + "median": 83.2, + "avg7": null, + "avg30": 82.42, + "slope7": { + "slope": -0.042, + "direction": "down", + "confidence": 0.93 + }, + "slope30": { + "slope": -0.04, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 83.46, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 91, + "latest": 123, + "min": 123, + "max": 137, + "mean": 129.92, + "median": 130, + "avg7": null, + "avg30": 130.36, + "slope7": { + "slope": -0.393, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": 0.071, + "direction": "up", + "confidence": 0.02 + }, + "avg30LastMonth": 130, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 91, + "latest": 78, + "min": 78, + "max": 86, + "mean": 81.96, + "median": 82, + "avg7": null, + "avg30": 81.82, + "slope7": { + "slope": -0.714, + "direction": "down", + "confidence": 0.36 + }, + "slope30": { + "slope": -0.017, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": 82, + "avg30LastYear": null + }, + "PULSE": { + "count": 60, + "latest": 64, + "min": 64, + "max": 69, + "mean": 66.5, + "median": 66.5, + "avg7": null, + "avg30": 66.32, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": -0.02, + "direction": "down", + "confidence": 0.01 + }, + "avg30LastMonth": 66.5, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 9, + "latest": 24, + "min": 24, + "max": 25.1, + "mean": 24.56, + "median": 24.6, + "avg7": null, + "avg30": 24.2, + "slope7": { + "slope": -0.014, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.021, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 24.78, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 30, + "latest": 6000, + "min": 6000, + "max": 9833, + "mean": 7808.5, + "median": 7781.5, + "avg7": null, + "avg30": 7916.5, + "slope7": { + "slope": -373, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -30.397, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": 7511.5, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 10, + "latest": 96, + "min": 96, + "max": 98, + "mean": 96.9, + "median": 97, + "avg7": null, + "avg30": 96.9, + "slope7": { + "slope": -0.036, + "direction": "down", + "confidence": 0.01 + }, + "slope30": { + "slope": -0.018, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 30, + "latest": 45, + "min": 45, + "max": 52, + "mean": 48.3, + "median": 48, + "avg7": null, + "avg30": 48.23, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.032, + "direction": "down", + "confidence": 0.02 + }, + "avg30LastMonth": 48.5, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": null, + "lastSeenByType": { + "WEIGHT": { + "lastSeenAt": "2026-10-15T06:30:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_SYS": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_DIA": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "PULSE": { + "lastSeenAt": "2026-10-15T07:01:00.000Z", + "daysAgo": 0 + }, + "BODY_FAT": { + "lastSeenAt": "2026-10-15T06:31:00.000Z", + "daysAgo": 0 + }, + "ACTIVITY_STEPS": { + "lastSeenAt": "2026-10-15T09:00:00.000Z", + "daysAgo": 0 + }, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": { + "lastSeenAt": "2026-10-15T04:40:00.000Z", + "daysAgo": 0 + }, + "HEART_RATE_VARIABILITY": { + "lastSeenAt": "2026-10-15T04:30:00.000Z", + "daysAgo": 0 + }, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + }, + "sleepSourceDiscrepancy": null, + "recoveryEmpty": "general" + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "analytics.get" + }, + "meta": { + "cache.summaries_slice.outcome": "hit" + }, + "warnings": null, + "error": null + } + ], + "effects": [], + "stored": { + "healthScores": [ + { + "dayKey": "2026-10-15", + "timezone": "Europe/Berlin", + "composite": 86, + "band": "green", + "scoreVersion": 4, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "pillarScores": { + "SLEEP": 92, + "ACTIVITY": 78, + "GLYCAEMIA": 100, + "BLOOD_PRESSURE": 73 + }, + "inputFingerprint": "5653cd8c051404182d6c6f813a48b1c2ebc3abe1116901466ab7cc1ab70cb276", + "computedAt": "" + } + ], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.07-default-de-personal-target.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.07-default-de-personal-target.json.snap new file mode 100644 index 000000000..584f07eda --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.07-default-de-personal-target.json.snap @@ -0,0 +1,2169 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 60, + "latest": 82, + "min": 82, + "max": 84.4, + "mean": 83.18, + "median": 83.2, + "avg7": null, + "avg30": 82.42, + "slope7": { + "slope": -0.042, + "direction": "down", + "confidence": 0.93 + }, + "slope30": { + "slope": -0.04, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 83.46, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 91, + "latest": 123, + "min": 123, + "max": 137, + "mean": 129.92, + "median": 130, + "avg7": null, + "avg30": 130.36, + "slope7": { + "slope": -0.393, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": 0.071, + "direction": "up", + "confidence": 0.02 + }, + "avg30LastMonth": 130, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 91, + "latest": 78, + "min": 78, + "max": 86, + "mean": 81.96, + "median": 82, + "avg7": null, + "avg30": 81.82, + "slope7": { + "slope": -0.714, + "direction": "down", + "confidence": 0.36 + }, + "slope30": { + "slope": -0.017, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": 82, + "avg30LastYear": null + }, + "PULSE": { + "count": 60, + "latest": 64, + "min": 64, + "max": 69, + "mean": 66.5, + "median": 66.5, + "avg7": null, + "avg30": 66.32, + "slope7": { + "slope": -0.143, + "direction": "down", + "confidence": 0.04 + }, + "slope30": { + "slope": -0.02, + "direction": "down", + "confidence": 0.01 + }, + "avg30LastMonth": 66.5, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 9, + "latest": 24, + "min": 24, + "max": 25.1, + "mean": 24.56, + "median": 24.6, + "avg7": null, + "avg30": 24.2, + "slope7": { + "slope": -0.014, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.021, + "direction": "down", + "confidence": 0.99 + }, + "avg30LastMonth": 24.78, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 30, + "latest": 6000, + "min": 6000, + "max": 9833, + "mean": 7808.5, + "median": 7781.5, + "avg7": null, + "avg30": 7916.5, + "slope7": { + "slope": -373, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -30.397, + "direction": "down", + "confidence": 0.06 + }, + "avg30LastMonth": 7511.5, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 10, + "latest": 96, + "min": 96, + "max": 98, + "mean": 96.9, + "median": 97, + "avg7": null, + "avg30": 96.9, + "slope7": { + "slope": -0.036, + "direction": "down", + "confidence": 0.01 + }, + "slope30": { + "slope": -0.018, + "direction": "down", + "confidence": 0 + }, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 30, + "latest": 45, + "min": 45, + "max": 52, + "mean": 48.3, + "median": 48, + "avg7": null, + "avg30": 48.23, + "slope7": { + "slope": -1, + "direction": "down", + "confidence": 1 + }, + "slope30": { + "slope": -0.032, + "direction": "down", + "confidence": 0.02 + }, + "avg30LastMonth": 48.5, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": 25.9, + "bpInTargetPct": 7, + "bpInTargetPct7d": 14, + "bpInTargetPct30d": 10, + "bpInTargetPctAllTime": 8, + "bpInTargetPctPriorMonth": 10, + "bpInTargetPctPriorYear": null, + "bpInTargetCount90": 90, + "bpInTargetSpanDays90": 90, + "glucoseByContext": null, + "glucoseClinical": null, + "correlations": { + "bpCompliance": { + "kind": "bp-compliance", + "status": "insufficient", + "n": 24, + "reason": "not_significant", + "points": [ + { + "x": 100, + "y": 125 + }, + { + "x": 100, + "y": 133 + }, + { + "x": 100, + "y": 126 + }, + { + "x": 100, + "y": 134 + }, + { + "x": 100, + "y": 127 + }, + { + "x": 0, + "y": 135 + }, + { + "x": 100, + "y": 128 + }, + { + "x": 100, + "y": 136 + }, + { + "x": 100, + "y": 137 + }, + { + "x": 100, + "y": 130 + }, + { + "x": 100, + "y": 123 + }, + { + "x": 50, + "y": 131 + }, + { + "x": 100, + "y": 124 + }, + { + "x": 100, + "y": 132 + }, + { + "x": 100, + "y": 125 + }, + { + "x": 100, + "y": 133 + }, + { + "x": 100, + "y": 134 + }, + { + "x": 0, + "y": 127 + }, + { + "x": 100, + "y": 135 + }, + { + "x": 100, + "y": 128 + }, + { + "x": 100, + "y": 136 + }, + { + "x": 100, + "y": 129 + }, + { + "x": 100, + "y": 137 + }, + { + "x": 100, + "y": 130 + } + ] + }, + "moodPulse": { + "kind": "mood-pulse", + "status": "insufficient", + "n": 28, + "reason": "not_significant", + "points": [ + { + "x": 1, + "y": 58 + }, + { + "x": 4, + "y": 59 + }, + { + "x": 2, + "y": 60 + }, + { + "x": 5, + "y": 61 + }, + { + "x": 3, + "y": 58 + }, + { + "x": 1, + "y": 59 + }, + { + "x": 4, + "y": 60 + }, + { + "x": 2, + "y": 61 + }, + { + "x": 5, + "y": 58 + }, + { + "x": 3, + "y": 59 + }, + { + "x": 1, + "y": 60 + }, + { + "x": 4, + "y": 61 + }, + { + "x": 2, + "y": 58 + }, + { + "x": 5, + "y": 59 + }, + { + "x": 3, + "y": 60 + }, + { + "x": 1, + "y": 61 + }, + { + "x": 4, + "y": 58 + }, + { + "x": 2, + "y": 59 + }, + { + "x": 5, + "y": 60 + }, + { + "x": 3, + "y": 61 + }, + { + "x": 1, + "y": 58 + }, + { + "x": 4, + "y": 59 + }, + { + "x": 2, + "y": 60 + }, + { + "x": 5, + "y": 61 + }, + { + "x": 3, + "y": 58 + }, + { + "x": 1, + "y": 59 + }, + { + "x": 4, + "y": 60 + }, + { + "x": 2, + "y": 61 + } + ] + }, + "weightWeekday": { + "kind": "weight-weekday", + "status": "insufficient", + "n": 28, + "reason": "not_significant", + "points": [ + { + "x": 4, + "y": 83.1 + }, + { + "x": 5, + "y": 83 + }, + { + "x": 6, + "y": 83 + }, + { + "x": 0, + "y": 83 + }, + { + "x": 1, + "y": 82.9 + }, + { + "x": 2, + "y": 82.9 + }, + { + "x": 3, + "y": 82.8 + }, + { + "x": 4, + "y": 82.8 + }, + { + "x": 5, + "y": 82.8 + }, + { + "x": 6, + "y": 82.7 + }, + { + "x": 0, + "y": 82.7 + }, + { + "x": 1, + "y": 82.6 + }, + { + "x": 2, + "y": 82.6 + }, + { + "x": 3, + "y": 82.6 + }, + { + "x": 4, + "y": 82.5 + }, + { + "x": 5, + "y": 82.5 + }, + { + "x": 6, + "y": 82.4 + }, + { + "x": 0, + "y": 82.4 + }, + { + "x": 1, + "y": 82.4 + }, + { + "x": 2, + "y": 82.3 + }, + { + "x": 3, + "y": 82.3 + }, + { + "x": 4, + "y": 82.2 + }, + { + "x": 5, + "y": 82.2 + }, + { + "x": 6, + "y": 82.2 + }, + { + "x": 0, + "y": 82.1 + }, + { + "x": 1, + "y": 82.1 + }, + { + "x": 2, + "y": 82 + }, + { + "x": 3, + "y": 82 + } + ] + }, + "degraded": false, + "windowDays": 28, + "path": "rollup" + }, + "healthScore": { + "composite": { + "status": "ok", + "value": { + "score": 76, + "band": "green", + "bandSetter": null, + "composition": [ + "BLOOD_PRESSURE", + "ACTIVITY" + ], + "configured": false, + "scoreBasis": { + "domains": 2, + "recommended": 3, + "tier": "partial", + "physiological": true + }, + "noiseFloor": 3, + "scoreVersion": 4 + }, + "coverage": { + "requiredInputs": 3, + "presentInputs": 2, + "historyDays": 28, + "missing": [ + "adiposity", + "wellbeing" + ] + }, + "confidence": { + "score": 67, + "band": "medium" + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE", + "ACTIVITY" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + } + }, + "pillars": [ + { + "id": "BLOOD_PRESSURE", + "domain": "cardiometabolic", + "result": { + "status": "ok", + "value": { + "score": 73, + "scoreBasis": { + "axis": "diastolic", + "relation": "above_ceiling", + "offsetMmHg": 3, + "boundaryMmHg": 79 + }, + "observed": { + "value": 130, + "unit": "mmHg", + "label": "130/82 mmHg", + "asOf": "2026-10-15T00:00:00.000Z", + "sources": [ + "MANUAL" + ] + }, + "reference": { + "kind": "clinical-threshold", + "low": 120, + "high": 129, + "label": "120–129/70–79 mmHg", + "source": "ESH 2023" + }, + "personalReference": { + "kind": "guideline-band", + "low": 100, + "high": 125, + "label": "100–125/60–80 mmHg", + "source": "personal target" + }, + "noiseFloor": 1, + "deltaEligible": true, + "deltaIdentity": "graded_bp_pair_series" + }, + "coverage": { + "requiredInputs": 12, + "presentInputs": 12, + "historyDays": 90, + "missing": [] + }, + "confidence": { + "score": 100, + "band": "high" + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE" + ], + "source": "DAY", + "windowDays": 90, + "computedAt": "" + } + } + }, + { + "id": "GLYCAEMIA", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 8, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "8 fasting readings" + ] + }, + "provenance": { + "inputs": [ + "GLYCAEMIA" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "ACTIVITY", + "domain": "activity", + "result": { + "status": "ok", + "value": { + "score": 78, + "observed": { + "value": 7837, + "unit": "steps/day", + "label": "7,837 steps/day", + "asOf": "2026-10-14T00:00:00.000Z", + "sources": [ + "APPLE_HEALTH" + ] + }, + "reference": { + "kind": "guideline-band", + "low": 0, + "high": 10000, + "label": "benefit plateaus by 10,000 steps/day", + "source": "Paluch 2022" + }, + "noiseFloor": 5, + "deltaEligible": true, + "deltaIdentity": "ACTIVITY_STEPS" + }, + "coverage": { + "requiredInputs": 21, + "presentInputs": 21, + "historyDays": 28, + "missing": [] + }, + "confidence": { + "score": 100, + "band": "high" + }, + "provenance": { + "inputs": [ + "ACTIVITY" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + } + } + }, + { + "id": "ADIPOSITY", + "domain": "adiposity", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "waist measurement" + ] + }, + "provenance": { + "inputs": [ + "ADIPOSITY" + ], + "source": "live", + "windowDays": 180, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "WELLBEING", + "domain": "wellbeing", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "completed WHO-5, PHQ-9 or GAD-7" + ] + }, + "provenance": { + "inputs": [ + "WELLBEING" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "LIPIDS", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "lipid panel with lab reference ranges" + ] + }, + "provenance": { + "inputs": [ + "LIPIDS" + ], + "source": "live", + "windowDays": 365, + "computedAt": "" + }, + "reason": "not_tracked" + } + } + ], + "delta": null, + "deltaReason": "first_eligibility_window", + "scoreVersion": 4, + "weightGoal": { + "status": "insufficient", + "coverage": { + "requiredInputs": 2, + "presentInputs": 1, + "historyDays": 1, + "missing": [ + "personal weight target" + ] + }, + "provenance": { + "inputs": [ + "WEIGHT", + "personal weight target" + ], + "source": "live", + "windowDays": 60, + "computedAt": "" + }, + "reason": "no_personal_goal" + }, + "algorithmNotice": { + "itemKey": "health_score_algorithm:4", + "dismissed": false + }, + "compositionNotice": null, + "restMode": { + "active": true, + "since": "2026-10-12T12:00:00.000Z", + "episodeCount": 1 + } + }, + "sleepStages": { + "windowDays": 30, + "nights": 21, + "totalMinutes": 8362, + "stages": { + "CORE": 4600, + "DEEP": 1575, + "REM": 1935, + "AWAKE": 252 + }, + "perNight": [ + { + "dayKey": "2026-09-25", + "stages": { + "CORE": 200, + "DEEP": 80, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-26", + "stages": { + "CORE": 240, + "DEEP": 75, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-27", + "stages": { + "CORE": 230, + "DEEP": 70, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-28", + "stages": { + "CORE": 220, + "DEEP": 80, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-29", + "stages": { + "CORE": 210, + "DEEP": 75, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-09-30", + "stages": { + "CORE": 200, + "DEEP": 70, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-01", + "stages": { + "CORE": 240, + "DEEP": 80, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-02", + "stages": { + "CORE": 230, + "DEEP": 75, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-03", + "stages": { + "CORE": 220, + "DEEP": 70, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-04", + "stages": { + "CORE": 210, + "DEEP": 80, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-05", + "stages": { + "CORE": 200, + "DEEP": 75, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-06", + "stages": { + "CORE": 240, + "DEEP": 70, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-07", + "stages": { + "CORE": 230, + "DEEP": 80, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-08", + "stages": { + "CORE": 220, + "DEEP": 75, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-09", + "stages": { + "CORE": 210, + "DEEP": 70, + "REM": 95, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-10", + "stages": { + "CORE": 200, + "DEEP": 80, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-11", + "stages": { + "CORE": 240, + "DEEP": 75, + "REM": 85, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-12", + "stages": { + "CORE": 230, + "DEEP": 70, + "REM": 100, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-13", + "stages": { + "CORE": 220, + "DEEP": 80, + "REM": 95, + "AWAKE": 12 + }, + "napMinutes": 35, + "napCount": 1 + }, + { + "dayKey": "2026-10-14", + "stages": { + "CORE": 210, + "DEEP": 75, + "REM": 90, + "AWAKE": 12 + } + }, + { + "dayKey": "2026-10-15", + "stages": { + "CORE": 200, + "DEEP": 70, + "REM": 85, + "AWAKE": 12 + } + } + ] + }, + "sleepSourceDiscrepancy": null, + "lastSeenByType": { + "WEIGHT": { + "lastSeenAt": "2026-10-15T06:30:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_SYS": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "BLOOD_PRESSURE_DIA": { + "lastSeenAt": "2026-10-15T07:00:00.000Z", + "daysAgo": 0 + }, + "PULSE": { + "lastSeenAt": "2026-10-15T07:01:00.000Z", + "daysAgo": 0 + }, + "BODY_FAT": { + "lastSeenAt": "2026-10-15T06:31:00.000Z", + "daysAgo": 0 + }, + "ACTIVITY_STEPS": { + "lastSeenAt": "2026-10-15T09:00:00.000Z", + "daysAgo": 0 + }, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": { + "lastSeenAt": "2026-10-15T04:40:00.000Z", + "daysAgo": 0 + }, + "HEART_RATE_VARIABILITY": { + "lastSeenAt": "2026-10-15T04:30:00.000Z", + "daysAgo": 0 + }, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + } + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "analytics.get" + }, + "meta": { + "cache.summaries_slice.outcome": "hit", + "analytics": { + "bp_in_target": { + "path": "rollup", + "tz_guard": "near-utc" + } + }, + "correlations": { + "bpCompliance": "insufficient", + "moodPulse": "insufficient", + "weightWeekday": "insufficient", + "path": "rollup", + "window_days": 28, + "degraded": false, + "tz_guard": "near-utc" + }, + "cache.analytics.outcome": "miss", + "cache.analytics.key_hash": 364623463 + }, + "warnings": null, + "error": null + } + ], + "effects": [ + { + "effect": "ensureUserRollupsFresh", + "args": [ + "" + ] + } + ], + "stored": { + "healthScores": [ + { + "dayKey": "2026-10-15", + "timezone": "Europe/Berlin", + "composite": 86, + "band": "green", + "scoreVersion": 4, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "pillarScores": { + "SLEEP": 92, + "ACTIVITY": 78, + "GLYCAEMIA": 100, + "BLOOD_PRESSURE": 73 + }, + "inputFingerprint": "5653cd8c051404182d6c6f813a48b1c2ebc3abe1116901466ab7cc1ab70cb276", + "computedAt": "" + } + ], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.08-empty-account.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.08-empty-account.json.snap new file mode 100644 index 000000000..684280522 --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.08-empty-account.json.snap @@ -0,0 +1,1630 @@ +{ + "status": 200, + "cacheControl": "private, max-age=0, must-revalidate", + "body": { + "data": { + "summaries": { + "WEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_SYS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BLOOD_PRESSURE_DIA": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DURATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ACTIVITY_STEPS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BLOOD_GLUCOSE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TOTAL_BODY_WATER": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BONE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "OXYGEN_SATURATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HEART_RATE_VARIABILITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESTING_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ACTIVE_ENERGY_BURNED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FLIGHTS_CLIMBED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_RUNNING_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VO2_MAX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_FREE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FAT_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MUSCLE_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SKIN_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PULSE_WAVE_VELOCITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VASCULAR_AGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "VISCERAL_FAT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_ENV": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_HEADPHONE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "TIME_IN_DAYLIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AUDIO_EXPOSURE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESPIRATORY_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_MASS_INDEX": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LEAN_BODY_MASS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_HEART_RATE_AVERAGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_ASYMMETRY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_DOUBLE_SUPPORT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEP_LENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_RECOVERY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WRIST_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "FALL_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SIX_MINUTE_WALK_DISTANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_ASCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAIR_DESCENT_SPEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "IRREGULAR_RHYTHM_NOTIFICATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HIGH_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "LOW_HEART_RATE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WALKING_STEADINESS_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BREATHING_DISTURBANCE_EVENT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RECOVERY_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRESS_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STRAIN_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "HRV_RMSSD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "DAY_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WORKOUT_STRAIN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_PERFORMANCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_EFFICIENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_CONSISTENCY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_NEED": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ENERGY_EXPENDITURE_KJ": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AVERAGE_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MAX_HEART_RATE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_DISTURBANCE_COUNT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "ANS_CHARGE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "CARDIO_LOAD": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SLEEP_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "BODY_TEMPERATURE_DEVIATION": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "RESILIENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PHQ9_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GAD7_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "GRIP_STRENGTH": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "PAIN_NRS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_CIRCUMFERENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WAIST_TO_HEIGHT": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "WHO5_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "SCI_SCORE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "EXERCISE_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STAND_HOURS": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "MINDFUL_MINUTES": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "STATE_OF_MIND_VALENCE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "AFIB_BURDEN": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_CO2": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_TEMPERATURE": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + }, + "INDOOR_HUMIDITY": { + "count": 0, + "latest": null, + "min": null, + "max": null, + "mean": null, + "median": null, + "avg7": null, + "avg30": null, + "slope7": null, + "slope30": null, + "avg30LastMonth": null, + "avg30LastYear": null + } + }, + "bmi": null, + "bpInTargetPct": null, + "bpInTargetPct7d": null, + "bpInTargetPct30d": null, + "bpInTargetPctAllTime": null, + "bpInTargetPctPriorMonth": null, + "bpInTargetPctPriorYear": null, + "bpInTargetCount90": null, + "bpInTargetSpanDays90": null, + "glucoseByContext": {}, + "glucoseClinical": { + "stillLearning": true, + "stillLearningReason": "No glucose readings in the last 30 days.", + "windowDays": 30, + "actualSpanDays": 0, + "readingCount": 0, + "meanMgdl": null, + "distribution": null, + "gmi": null, + "estimatedA1c": null, + "variability": null, + "advanced": null, + "isSpotEstimate": true + }, + "correlations": { + "bpCompliance": { + "kind": "bp-compliance", + "status": "insufficient", + "n": 0, + "reason": "too_few_pairs", + "points": [] + }, + "moodPulse": { + "kind": "mood-pulse", + "status": "insufficient", + "n": 0, + "reason": "too_few_pairs", + "points": [] + }, + "weightWeekday": { + "kind": "weight-weekday", + "status": "insufficient", + "n": 0, + "reason": "too_few_pairs", + "points": [] + }, + "degraded": false, + "windowDays": 28, + "path": "live" + }, + "healthScore": { + "composite": { + "status": "insufficient", + "coverage": { + "requiredInputs": 3, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "cardiometabolic", + "activity", + "sleep", + "adiposity", + "wellbeing" + ] + }, + "provenance": { + "inputs": [], + "source": "none", + "windowDays": 0, + "computedAt": "" + }, + "reason": "no_usable_data" + }, + "pillars": [ + { + "id": "BLOOD_PRESSURE", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 12, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "date of birth" + ] + }, + "provenance": { + "inputs": [ + "BLOOD_PRESSURE" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "missing_reference_profile" + } + }, + { + "id": "GLYCAEMIA", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 8, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "8 fasting readings" + ] + }, + "provenance": { + "inputs": [ + "GLYCAEMIA" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "ACTIVITY", + "domain": "activity", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 21, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "21 days" + ] + }, + "provenance": { + "inputs": [ + "ACTIVITY" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "SLEEP", + "domain": "sleep", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 14, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "14 nights" + ] + }, + "provenance": { + "inputs": [ + "SLEEP" + ], + "source": "live", + "windowDays": 28, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "ADIPOSITY", + "domain": "adiposity", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "waist measurement" + ] + }, + "provenance": { + "inputs": [ + "ADIPOSITY" + ], + "source": "live", + "windowDays": 180, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "WELLBEING", + "domain": "wellbeing", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "completed WHO-5, PHQ-9 or GAD-7" + ] + }, + "provenance": { + "inputs": [ + "WELLBEING" + ], + "source": "live", + "windowDays": 90, + "computedAt": "" + }, + "reason": "not_tracked" + } + }, + { + "id": "LIPIDS", + "domain": "cardiometabolic", + "result": { + "status": "insufficient", + "coverage": { + "requiredInputs": 1, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "lipid panel with lab reference ranges" + ] + }, + "provenance": { + "inputs": [ + "LIPIDS" + ], + "source": "live", + "windowDays": 365, + "computedAt": "" + }, + "reason": "not_tracked" + } + } + ], + "delta": null, + "deltaReason": "no_current_score", + "scoreVersion": 4, + "weightGoal": { + "status": "insufficient", + "coverage": { + "requiredInputs": 2, + "presentInputs": 0, + "historyDays": 0, + "missing": [ + "weight reading", + "personal weight target" + ] + }, + "provenance": { + "inputs": [ + "WEIGHT", + "personal weight target" + ], + "source": "live", + "windowDays": 60, + "computedAt": "" + }, + "reason": "no_personal_goal" + }, + "algorithmNotice": { + "itemKey": "health_score_algorithm:4", + "dismissed": false + }, + "compositionNotice": null, + "restMode": null + }, + "sleepStages": null, + "sleepSourceDiscrepancy": null, + "lastSeenByType": { + "WEIGHT": null, + "BLOOD_PRESSURE_SYS": null, + "BLOOD_PRESSURE_DIA": null, + "PULSE": null, + "BODY_FAT": null, + "SLEEP_DURATION": null, + "ACTIVITY_STEPS": null, + "BLOOD_GLUCOSE": null, + "TOTAL_BODY_WATER": null, + "BONE_MASS": null, + "OXYGEN_SATURATION": null, + "HEART_RATE_VARIABILITY": null, + "RESTING_HEART_RATE": null, + "ACTIVE_ENERGY_BURNED": null, + "FLIGHTS_CLIMBED": null, + "WALKING_RUNNING_DISTANCE": null, + "VO2_MAX": null, + "BODY_TEMPERATURE": null, + "FAT_FREE_MASS": null, + "FAT_MASS": null, + "MUSCLE_MASS": null, + "SKIN_TEMPERATURE": null, + "PULSE_WAVE_VELOCITY": null, + "VASCULAR_AGE": null, + "VISCERAL_FAT": null, + "AUDIO_EXPOSURE_ENV": null, + "AUDIO_EXPOSURE_HEADPHONE": null, + "TIME_IN_DAYLIGHT": null, + "WALKING_STEADINESS": null, + "AUDIO_EXPOSURE_EVENT": null, + "RESPIRATORY_RATE": null, + "BODY_MASS_INDEX": null, + "LEAN_BODY_MASS": null, + "WALKING_HEART_RATE_AVERAGE": null, + "WALKING_ASYMMETRY": null, + "WALKING_DOUBLE_SUPPORT": null, + "WALKING_STEP_LENGTH": null, + "WALKING_SPEED": null, + "CARDIO_RECOVERY": null, + "WRIST_TEMPERATURE": null, + "FALL_COUNT": null, + "SIX_MINUTE_WALK_DISTANCE": null, + "STAIR_ASCENT_SPEED": null, + "STAIR_DESCENT_SPEED": null, + "BREATHING_DISTURBANCES": null, + "IRREGULAR_RHYTHM_NOTIFICATION": null, + "HIGH_HEART_RATE_EVENT": null, + "LOW_HEART_RATE_EVENT": null, + "WALKING_STEADINESS_EVENT": null, + "BREATHING_DISTURBANCE_EVENT": null, + "RECOVERY_SCORE": null, + "STRESS_SCORE": null, + "STRAIN_SCORE": null, + "HRV_RMSSD": null, + "DAY_STRAIN": null, + "WORKOUT_STRAIN": null, + "SLEEP_PERFORMANCE": null, + "SLEEP_EFFICIENCY": null, + "SLEEP_CONSISTENCY": null, + "SLEEP_NEED": null, + "ENERGY_EXPENDITURE_KJ": null, + "AVERAGE_HEART_RATE": null, + "MAX_HEART_RATE": null, + "SLEEP_DISTURBANCE_COUNT": null, + "ANS_CHARGE": null, + "CARDIO_LOAD": null, + "SLEEP_SCORE": null, + "BODY_TEMPERATURE_DEVIATION": null, + "RESILIENCE": null, + "PHQ9_SCORE": null, + "GAD7_SCORE": null, + "GRIP_STRENGTH": null, + "PAIN_NRS": null, + "WAIST_CIRCUMFERENCE": null, + "WAIST_TO_HEIGHT": null, + "WHO5_SCORE": null, + "SCI_SCORE": null, + "EXERCISE_MINUTES": null, + "STAND_MINUTES": null, + "STAND_HOURS": null, + "MINDFUL_MINUTES": null, + "STATE_OF_MIND_VALENCE": null, + "AFIB_BURDEN": null, + "INDOOR_CO2": null, + "INDOOR_TEMPERATURE": null, + "INDOOR_HUMIDITY": null + } + }, + "error": null + }, + "events": [ + { + "status": 200, + "action": { + "name": "analytics.get" + }, + "meta": { + "analytics": { + "slim_summaries": { + "row_count": 0, + "type_count": 0, + "path": "live", + "year_over_year_types": 0 + } + }, + "cache.summaries_slice.outcome": "miss", + "correlations": { + "bpCompliance": "insufficient", + "moodPulse": "insufficient", + "weightWeekday": "insufficient", + "path": "live", + "window_days": 28, + "degraded": false, + "tz_guard": "near-utc" + }, + "cache.analytics.outcome": "miss", + "cache.analytics.key_hash": 1185879026 + }, + "warnings": null, + "error": null + } + ], + "effects": [ + { + "effect": "ensureUserRollupsFresh", + "args": [ + "" + ] + }, + { + "effect": "ensureUserRollupsFresh", + "args": [ + "" + ] + } + ], + "stored": { + "healthScores": [], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/__snapshots__/analytics.09-anonymous.json.snap b/tests/integration/routes/parity/__snapshots__/analytics.09-anonymous.json.snap new file mode 100644 index 000000000..c624d07b3 --- /dev/null +++ b/tests/integration/routes/parity/__snapshots__/analytics.09-anonymous.json.snap @@ -0,0 +1,51 @@ +{ + "status": 401, + "cacheControl": null, + "body": { + "data": null, + "error": "Not authenticated", + "meta": { + "errorCode": "auth.missing", + "requestId": "" + } + }, + "events": [ + { + "status": 401, + "action": null, + "meta": null, + "warnings": null, + "error": { + "type": "HttpError", + "message": "Not authenticated" + } + } + ], + "effects": [], + "stored": { + "healthScores": [ + { + "dayKey": "2026-10-15", + "timezone": "Europe/Berlin", + "composite": 86, + "band": "green", + "scoreVersion": 4, + "composition": [ + "BLOOD_PRESSURE", + "GLYCAEMIA", + "ACTIVITY", + "SLEEP" + ], + "pillarScores": { + "SLEEP": 92, + "ACTIVITY": 78, + "GLYCAEMIA": 100, + "BLOOD_PRESSURE": 73 + }, + "inputFingerprint": "5653cd8c051404182d6c6f813a48b1c2ebc3abe1116901466ab7cc1ab70cb276", + "computedAt": "" + } + ], + "patterns": [] + } +} diff --git a/tests/integration/routes/parity/analytics.parity.test.ts b/tests/integration/routes/parity/analytics.parity.test.ts new file mode 100644 index 000000000..bda42c0bb --- /dev/null +++ b/tests/integration/routes/parity/analytics.parity.test.ts @@ -0,0 +1,251 @@ +/** + * Parity for `GET /api/analytics` while the response builder moves out of + * the route into `src/lib/analytics/response/`. + * + * One account with a full record (see `record-fixture.ts`) walks through the + * cases the route tells apart, in order, each request seeing the cache the + * earlier ones filled: a `slice` outside the closed set, the summaries slice + * cold and warm, the default body cold and warm, the summaries slice after + * the glucose, sleep and recovery modules were switched off (gated after the + * cache read), and the default body in another language with a personal + * blood-pressure target (a fresh cache cell, so the builder runs against the + * clinical band a second time and with glucose off). An account with no + * profile and no data, and an anonymous call, close the walk. After each + * request the snapshot holds the response and its cache header, the wide + * event, the rollup refreshes the request handed off, and the stored health + * scores and correlation patterns. + * + * The clock is pinned (`Date` only). The record's rollups are built once + * before the walk; the fire-and-forget refresh the route starts on every + * request is recorded instead of run, so the wide event never depends on + * whether it finished first. + */ +import { afterAll, beforeAll, describe, expect, it, vi } from "vitest"; + +import { GET } from "@/app/api/analytics/route"; +import { settleBackgroundTasks } from "@/lib/logging/background-tasks"; + +import { anonymous, callRoute, type RouteAuth } from "../../../kit/call-route"; +import { makeSession, makeUser } from "../../../kit/factories"; +import { + effectRecorder, + eventFacts, + expectParity, + stable, + wideEventRecorder, +} from "../../../kit/parity"; +import { getPrismaClient, truncateAllTables } from "../../setup"; +import { parityId, seedParityRecord } from "./record-fixture"; + +vi.mock("@/lib/logging/transports", async (importOriginal) => { + const actual = + await importOriginal(); + const { wideEventRecorder: recorder } = await import("../../../kit/parity"); + return { + ...actual, + emitIfSampled: (event: (typeof recorder.events)[number]) => { + recorder.events.push(event); + }, + }; +}); + +vi.mock("@/lib/rollups/measurement-rollups", async (importOriginal) => { + const actual = + await importOriginal(); + const { effectRecorder } = await import("../../../kit/parity"); + return { + ...actual, + ensureUserRollupsFresh: async (...args: unknown[]) => { + effectRecorder.record("ensureUserRollupsFresh", args); + }, + }; +}); + +const prisma = getPrismaClient(); +const NOW = new Date("2026-10-15T12:00:00.000Z"); +const TZ = "Europe/Berlin"; +const OWNER_ID = parityId("analytics", 1); +const EMPTY_ID = parityId("analytics", 2); + +let owner: RouteAuth; +let empty: RouteAuth; + +async function stored(userId: string) { + const [healthScores, patterns] = await Promise.all([ + prisma.healthScoreRecord.findMany({ + where: { userId }, + orderBy: { dayKey: "asc" }, + select: { + dayKey: true, + timezone: true, + composite: true, + band: true, + scoreVersion: true, + composition: true, + pillarScores: true, + inputFingerprint: true, + computedAt: true, + }, + }), + prisma.correlationPattern.findMany({ + where: { userId }, + orderBy: { canonicalKey: "asc" }, + select: { + canonicalKey: true, + family: true, + factorKey: true, + outcomeKey: true, + lagDays: true, + sampleSize: true, + effectSize: true, + pValue: true, + qValue: true, + evidenceHash: true, + isCurrent: true, + lastComputedAt: true, + }, + }), + ]); + return { healthScores, patterns }; +} + +async function step( + name: string, + options: { + auth?: RouteAuth; + query?: Record; + userId?: string; + } = {}, +): Promise { + wideEventRecorder.take(); + effectRecorder.take(); + const res = await callRoute(GET, { + method: "GET", + route: "/api/analytics", + query: options.query, + auth: options.auth ?? owner, + }); + const events = wideEventRecorder.take(); + expect(events.length).toBeGreaterThan(0); + // Work the request left running (a rollup fill behind a read) finishes + // before the next request, so each case starts from the same store. + await settleBackgroundTasks(); + await expectParity( + `analytics.${name}`, + stable( + { + status: res.status, + cacheControl: res.headers.get("cache-control"), + body: res.body, + events: events.map(eventFacts).map(withoutRollupCoverage), + effects: effectRecorder.take(), + stored: await stored(options.userId ?? OWNER_ID), + }, + { since: NOW }, + ), + ); +} + +/** + * The blood-pressure fast path reports how many rollup rows it read. That + * count follows the rollup tier's coverage at the moment of the request, + * which background refills outside this route decide, so it differs between + * two runs of the same code while the answer it fed does not. The answer + * stays pinned in `body`; only the three diagnostic counts are dropped. + */ +function withoutRollupCoverage(facts: unknown): unknown { + const meta = (facts as { meta?: { analytics?: { bp_in_target?: object } } }) + .meta; + const bp = meta?.analytics?.bp_in_target as + Record | undefined; + if (bp) { + delete bp.row_count; + delete bp.sys_rows; + delete bp.dia_rows; + } + return facts; +} + +beforeAll(async () => { + vi.useFakeTimers({ toFake: ["Date"], now: NOW }); + await truncateAllTables(prisma); + const ownerRow = await makeUser({ + id: OWNER_ID, + timezone: TZ, + locale: "en", + heightCm: 178, + dateOfBirth: new Date("1975-04-02T00:00:00.000Z"), + gender: "male", + }); + await seedParityRecord({ userId: OWNER_ID, now: NOW, tz: TZ, tag: "an" }); + const rollups = await vi.importActual< + typeof import("@/lib/rollups/measurement-rollups") + >("@/lib/rollups/measurement-rollups"); + await rollups.ensureUserRollupsFresh(OWNER_ID); + await settleBackgroundTasks(); + owner = await makeSession(ownerRow); + const emptyRow = await makeUser({ id: EMPTY_ID, timezone: "UTC" }); + empty = await makeSession(emptyRow); +}); + +afterAll(() => { + vi.useRealTimers(); +}); + +describe("GET /api/analytics parity", () => { + it("01 a slice outside the closed set", async () => { + await step("01-invalid-slice", { query: { slice: "summary" } }); + }); + + it("02 the summaries slice, cold", async () => { + await step("02-summaries-cold", { query: { slice: "summaries" } }); + }); + + it("03 the summaries slice, warm", async () => { + await step("03-summaries-warm", { query: { slice: "summaries" } }); + }); + + it("04 the default body, cold", async () => { + await step("04-default-cold"); + }); + + it("05 the default body, warm", async () => { + await step("05-default-warm"); + }); + + it("06 the summaries slice with modules off", async () => { + await prisma.user.update({ + where: { id: OWNER_ID }, + data: { + modulePreferencesJson: { + glucose: false, + sleep: false, + recovery: false, + }, + }, + }); + await step("06-summaries-modules-off", { query: { slice: "summaries" } }); + }); + + it("07 the default body in another language with a personal target", async () => { + await prisma.user.update({ + where: { id: OWNER_ID }, + data: { + locale: "de", + thresholdsJson: { + BLOOD_PRESSURE_SYS: { min: 100, max: 125 }, + BLOOD_PRESSURE_DIA: { min: 60, max: 80 }, + }, + }, + }); + await step("07-default-de-personal-target"); + }); + + it("08 an account with no profile and no data", async () => { + await step("08-empty-account", { auth: empty, userId: EMPTY_ID }); + }); + + it("09 an anonymous call", async () => { + await step("09-anonymous", { auth: anonymous }); + }); +}); diff --git a/tests/integration/routes/parity/record-fixture.ts b/tests/integration/routes/parity/record-fixture.ts new file mode 100644 index 000000000..40ad3cfe4 --- /dev/null +++ b/tests/integration/routes/parity/record-fixture.ts @@ -0,0 +1,294 @@ +/** + * One representative health record for the read-route parity walks. + * + * The aggregate routes (`/api/analytics`, `/api/dashboard/summary`, + * `/api/insights/comprehensive`, `/api/insights/generate`) shape their body + * from many domains at once, so a parity walk over them needs a record in + * which every block has something to say: daily weight and blood pressure + * long enough for the 90-day windows, a resting-pulse series, glucose in + * three meal contexts (one untagged), staged sleep nights with a nap, steps, + * oxygen saturation, HRV, a mood diary, a blood-pressure medication with an + * intake history that has skips and gaps, a second medication, and an open + * illness episode. + * + * Every value is a function of the day offset from `now`, so the record is + * the same on every run. Medications carry fixed ids, because some payloads + * hash or echo them; measurement ids are generated and blanked by `stable`. + * + * Not a test file. Only for tests under `tests/integration/`. + */ +import type { Prisma } from "@/generated/prisma/client"; + +import { getPrismaClient } from "../../setup"; + +const DAY_MS = 24 * 60 * 60 * 1000; + +/** A cuid-shaped fixed id: `c` and 24 lower-case alphanumerics. */ +export function parityId(tag: string, n: number): string { + return `c${`${tag}${n.toString(36)}`.padStart(24, "0")}`; +} + +/** A local `YYYY-MM-DD` key of `at` in `tz`. */ +function dayKey(at: Date, tz: string): string { + return new Intl.DateTimeFormat("en-CA", { + timeZone: tz, + year: "numeric", + month: "2-digit", + day: "2-digit", + }).format(at); +} + +/** The UTC instant `hh:mm` on the day `d` days before `now`. */ +function at(now: Date, d: number, hh: number, mm = 0): Date { + const base = new Date(now.getTime() - d * DAY_MS); + base.setUTCHours(hh, mm, 0, 0); + return base; +} + +export interface RecordFixture { + bpMedicationId: string; + otherMedicationId: string; +} + +/** + * Write the record onto an existing account. `tag` keeps the fixed ids of + * two records in one database apart. + */ +export async function seedParityRecord(options: { + userId: string; + now: Date; + tz: string; + tag: string; +}): Promise { + const { userId, now, tz, tag } = options; + const prisma = getPrismaClient(); + const rows: Prisma.MeasurementCreateManyInput[] = []; + const push = (row: Omit) => + rows.push({ userId, createdAt: row.measuredAt, ...row }); + + for (let d = 0; d < 60; d++) { + push({ + type: "WEIGHT", + value: Math.round((82 + d * 0.04) * 10) / 10, + unit: "kg", + source: "WITHINGS", + deviceType: "scale", + measuredAt: at(now, d, 6, 30), + }); + push({ + type: "PULSE", + value: 64 + (d % 6), + unit: "bpm", + measuredAt: at(now, d, 7, 1), + }); + if (d % 7 === 0) { + push({ + type: "BODY_FAT", + value: Math.round((24 + d * 0.02) * 10) / 10, + unit: "%", + source: "WITHINGS", + measuredAt: at(now, d, 6, 31), + }); + } + } + for (let d = 0; d < 120; d++) { + push({ + type: "BLOOD_PRESSURE_SYS", + value: 123 + ((d * 7) % 15), + unit: "mmHg", + measuredAt: at(now, d, 7, 0), + }); + push({ + type: "BLOOD_PRESSURE_DIA", + value: 78 + ((d * 5) % 9), + unit: "mmHg", + measuredAt: at(now, d, 7, 0), + }); + } + for (let d = 0; d < 40; d++) { + push({ + type: "RESTING_HEART_RATE", + value: 58 + (d % 4), + unit: "bpm", + source: "APPLE_HEALTH", + measuredAt: at(now, d, 5, 0), + }); + } + for (let d = 0; d < 20; d++) { + push({ + type: "BLOOD_GLUCOSE", + value: 92 + (d % 7), + unit: "mg/dL", + glucoseContext: "FASTING", + measuredAt: at(now, d, 6, 15), + }); + push({ + type: "BLOOD_GLUCOSE", + value: 128 + ((d * 3) % 20), + unit: "mg/dL", + glucoseContext: "POSTPRANDIAL", + measuredAt: at(now, d, 11, 0), + }); + push({ + type: "BLOOD_GLUCOSE", + value: 105 + (d % 4), + unit: "mg/dL", + measuredAt: at(now, d, 10, 0), + }); + } + // Staged nights ending on the morning of each wake day, and one nap. + for (let d = 0; d < 21; d++) { + const stage = ( + sleepStage: "CORE" | "DEEP" | "REM" | "AWAKE", + hh: number, + mm: number, + minutes: number, + ) => + push({ + type: "SLEEP_DURATION", + value: minutes, + unit: "min", + source: "APPLE_HEALTH", + deviceType: "watch", + sleepStage, + measuredAt: at(now, d, hh, mm), + }); + stage("CORE", 1, 0, 200 + (d % 5) * 10); + stage("DEEP", 2, 30, 70 + (d % 3) * 5); + stage("REM", 4, 0, 85 + (d % 4) * 5); + stage("AWAKE", 4, 15, 12); + } + push({ + type: "SLEEP_DURATION", + value: 35, + unit: "min", + source: "APPLE_HEALTH", + deviceType: "watch", + sleepStage: "CORE", + measuredAt: at(now, 2, 13, 40), + }); + for (let d = 0; d < 30; d++) { + push({ + type: "ACTIVITY_STEPS", + value: 6000 + ((d * 373) % 4000), + unit: "count", + source: "APPLE_HEALTH", + measuredAt: at(now, d, 9, 0), + }); + push({ + type: "HEART_RATE_VARIABILITY", + value: 45 + (d % 8), + unit: "ms", + source: "APPLE_HEALTH", + measuredAt: at(now, d, 4, 30), + }); + } + for (let d = 0; d < 10; d++) { + push({ + type: "OXYGEN_SATURATION", + value: 96 + (d % 3), + unit: "%", + source: "APPLE_HEALTH", + measuredAt: at(now, d, 4, 40), + }); + } + await prisma.measurement.createMany({ data: rows }); + + const moods = ["LAUSIG", "SCHLECHT", "OKAY", "GUT", "SUPER_GUT"]; + const moodRows: Prisma.MoodEntryCreateManyInput[] = []; + for (let d = 0; d < 45; d++) { + const score = 1 + ((d * 3) % 5); + const loggedAt = at(now, d, 9, 30); + moodRows.push({ + userId, + date: dayKey(loggedAt, tz), + mood: moods[score - 1], + score, + moodLoggedAt: loggedAt, + tz, + createdAt: loggedAt, + }); + } + await prisma.moodEntry.createMany({ data: moodRows }); + + const bpMedicationId = parityId(`${tag}med`, 1); + const otherMedicationId = parityId(`${tag}med`, 2); + const created = new Date(now.getTime() - 90 * DAY_MS); + await prisma.medication.create({ + data: { + id: bpMedicationId, + userId, + name: "Ramipril", + dose: "5mg", + createdAt: created, + schedules: { + create: [ + { + id: parityId(`${tag}sch`, 1), + windowStart: "08:00", + windowEnd: "10:00", + }, + ], + }, + categoryAssignment: { create: { category: "BLOOD_PRESSURE" } }, + }, + }); + await prisma.medication.create({ + data: { + id: otherMedicationId, + userId, + name: "Vitamin D", + dose: "1000 IU", + createdAt: created, + schedules: { + create: [ + { + id: parityId(`${tag}sch`, 2), + windowStart: "20:00", + windowEnd: "21:00", + }, + ], + }, + }, + }); + const intakes: Prisma.MedicationIntakeEventCreateManyInput[] = []; + for (let d = 1; d <= 45; d++) { + if (d % 9 === 0) continue; + const scheduledFor = at(now, d, 6, 0); + const skipped = d % 7 === 0; + intakes.push({ + id: parityId(`${tag}ie`, d), + userId, + medicationId: bpMedicationId, + scheduledFor, + takenAt: skipped ? null : at(now, d, 6, 20), + skipped, + createdAt: scheduledFor, + }); + if (d % 2 === 0) { + const evening = at(now, d, 18, 0); + intakes.push({ + id: parityId(`${tag}ie`, 100 + d), + userId, + medicationId: otherMedicationId, + scheduledFor: evening, + takenAt: at(now, d, 18, 30), + createdAt: evening, + }); + } + } + await prisma.medicationIntakeEvent.createMany({ data: intakes }); + + await prisma.illnessEpisode.create({ + data: { + id: parityId(`${tag}ill`, 1), + userId, + label: "Common cold", + type: "INFECTION", + onsetAt: new Date(now.getTime() - 3 * DAY_MS), + createdAt: new Date(now.getTime() - 3 * DAY_MS), + }, + }); + + return { bpMedicationId, otherMedicationId }; +}