Skip to content

Heart And Vitals

github-actions[bot] edited this page Nov 9, 2026 · 1 revision

Status: Current implemented behavior with a transitional shared loader. Audience: Users and contributors. Implementation: features/heart, features/vitals, features/manualentry/vitals, data/repository/HeartRepository.kt, data/repository/VitalsRepository.kt. Navigation: Screen.Metric, vitals entry routes; heart and vitals dashboard widgets. Related: Feature map, Manual entry of metrics, Statistics.

Heart and vitals are related but distinct feature areas.

  • features/heart owns heart-rate-oriented state, presentation mapping, and route wrappers for average heart rate, resting heart rate, and HRV.
  • features/vitals owns vitals-facing screens and UI helpers such as blood pressure, SpO2, VO2 max, respiratory rate, body temperature, blood glucose, skin temperature, and the Today Vitals overview.

The current implementation still shares HeartViewModel and the heart period loader across heart and vitals routes. That is an intentional transitional boundary: the user-facing vitals UI lives in features/vitals, while some loading/state infrastructure remains shared until a deeper split is worth the extra complexity.

Implemented Metrics

Heart metrics:

  • Average heart rate.
  • Resting heart rate.
  • HRV.

Vitals metrics:

  • Blood pressure.
  • SpO2.
  • VO2 max.
  • Respiratory rate.
  • Body temperature.
  • Blood glucose.
  • Skin temperature.

Skin Temperature

Health Connect stores skin temperature as a signed variation from a baseline the device set, with the baseline optional and per record, and a record can span hours with a sample a minute. The screen keeps the two apart:

  • Every value is a variation in signed degrees, under "Variation from baseline". Nothing reconstructs an absolute temperature.
  • Charts are zero-centred (LineAxisRange.ZeroCentred) with a dashed zero line. The day view draws the records' samples on the day timeline (SkinTemperatureDayChart); samples travel in SkinTemperatureEntry.deltas for a day query only.
  • Comparisons are signed degrees, never a percent of a delta (ComparisonDisplayStyle.SIGNED_VALUE), and the personal baseline keeps the days below zero (includeNonPositive). The deviation tile is "Vs usual average".
  • The device baseline has its own tile: the one the period's records share, else the newest, flagged; "Not provided by source" when there is none. A record without samples is "No variation recorded", never its baseline as a reading.
  • The code lives in features/vitals/SkinTemperatureSections.kt and SkinTemperatureDayChart.kt.

Detail Pattern

Heart and vitals detail screens use the shared metric detail scaffold:

  • Day, week, month, and year ranges.
  • Selected anchor date.
  • Previous/next period navigation.
  • Calendar date picking.
  • Pull to refresh.
  • Intraday charts where sample data is available.
  • Period charts, statistics, thresholds, comparisons, data confidence, source labels, and entry lists.
  • Reorderable sections.

OpenVitals-created vitals entries can be edited or deleted when the app has write permission and ownership can be verified. External records stay read-only.

Blood Pressure Categories

The latest reading is named with the categories of one guideline. Settings > Vitals holds the choice: ACC/AHA 2017 (the default), ESH 2023, ESC 2024, or ISH 2020. ACC/AHA counts 130/80 mmHg as high; the other three count 140/90.

  • A reading takes the highest category that either number reaches.
  • Every guideline flags a reading above 180 systolic or above 120 diastolic.
  • The "How it is classified" card on the blood pressure screen names the guideline, lists its thresholds, and links its sources.
  • The thresholds are for adult readings taken in a clinic. Home readings often run lower.

Today Vitals

Each heart and vitals dashboard tile opens its own focused metric screen directly - tapping Blood pressure opens the blood pressure detail, not an intermediate overview.

Data Boundaries

Heart-rate and vitals records are read through feature-facing repository/use-case APIs rather than a global browser. Manual vitals entry lives under features/manualentry/vitals; dashboard cards route to focused heart or vitals detail destinations.


Generated from docs/features/heart-and-vitals.md. Edit it there; changes made here are overwritten.

Home

Features

How-to

App

Reference

Engineering

Proposals

Releases

Project

Clone this wiki locally