Get Wearables

Retrieves health data from consumer wearable devices and fitness trackers (Fitbit, Apple Watch, Apple Health, Garmin, Samsung Health, Withings, Oura, Whoop).

Use this for questions about steps, activity, sleep tracking, home blood pressure, CGM glucose readings, body composition from smart scales, and other personal device data. For clinical vitals recorded at doctor visits or hospitals, use get_vitals instead.


Parameters:

  • person_id (Optional[str], default=None) – FHIR patient identifier. If omitted, extracted from the user's access token.
  • wearables (Optional[list[FHIR_WEARABLES]], default=None) – Filter to specific wearable metrics. If omitted, all available metrics are returned. Case-insensitive matching is applied; invalid values are silently dropped. See Enumerations below for the full list.
  • start_date (Optional[date], default=None) – Earliest date (inclusive) for wearable data (YYYY-MM-DD). If omitted, no lower bound.
  • end_date (Optional[date], default=None) – Latest date (inclusive) for wearable data (YYYY-MM-DD). If omitted, no upper bound. When start_date == end_date the end is automatically adjusted to capture the full day.
  • cardiovascular_score (Optional[int], default=None) – M2-calculated cardiovascular system score (0–100). When provided, integrated into the clinical summary to contextualize heart-related metrics. Interpretation: 90–100 Excellent, 75–89 Good, 60–74 Fair, less then 60 Critical.
  • sleep_score (Optional[int], default=None) – M2-calculated sleep/circadian system score (0–100). When provided, integrated into the clinical summary to contextualize sleep metrics. Same scoring scale as cardiovascular_score.
  • count (Optional[int], default=500) – Number of raw FHIR Observation records to fetch. Minimum 500 (automatically enforced). Use 500–1000 for daily summaries, 1000–5000 for weekly/monthly trends, 5000+ for comprehensive historical analysis.
  • debug (bool, default=False) – Enable diagnostic messaging.
  • output_formats (Optional[list[OUTPUT_FORMATS]], default=None) – Output format list. Defaults to ['statistics'] if omitted. Wearable summaries return structured statistical payloads (ranges, medians, data density, trend direction).
  • ignore_cache (Optional[bool], default=False) – Bypass cached data and fetch fresh records from the FHIR server.


FHIR_WEARABLES

Vital Signs: Blood Pressure | Heart Rate | Respiratory Rate | Body Temperature | SpO2 | Resting Heart Rate | Max Heart Rate | Heart Rate Variability Sleep: Sleep Duration | Deep Sleep | Light Sleep | REM Sleep | Awake Duration | In-Bed Duration Body Composition: Body Weight | BMI | Body Fat Percentage | Body Height | Body Fat Mass | Lean Body Mass | Muscle Mass | Waist Circumference | Hip Circumference Activity: Steps | Distance | Floors Climbed | Active Duration | VO2 Max | Energy Burned | Basal Metabolic Rate | Active Energy Burned | Workout Duration | Handgrip Strength Nutrition: Energy Consumed | Carbohydrate Intake | Protein Intake | Fat Intake | Water Intake | Dietary Fiber | Dietary Cholesterol | Sodium Intake | Saturated Fat | Calcium Intake Glucose/Diabetes: Blood Glucose | Avg Blood Glucose | Blood Ketone | Insulin | Time In Range | GMI | Time Above Target | Time Above Target Very High Spirometry: FEV1 | FVC | PEF | FEV1/FVC Ratio Coagulation: INR | PT Other: Menstrual Cycle Length

OUTPUT_FORMATS

table | markdown | timeline | statistics | csv


Returns: FhirRecordRetrievalOutput

  • result (Optional[str]) – Structured summary with per-metric statistics (min, max, average, median), trend direction, and data density.
  • error (Optional[str]) – Error message if retrieval failed.


Notes:

  • Requires valid access token; will raise if missing.
  • Wearable data is high-frequency; the 500-record minimum ensures meaningful statistical patterns.
  • Invalid wearable names are logged (debug mode) or silently ignored; if all provided names are invalid, all metrics are returned as a fallback.
  • cardiovascular_score and sleep_score are optional enrichment inputs — they do not filter data, they add clinical context to the generated summary.