Analyze Health Trends and Generate Insights
Analyzes health data trends and correlations over time - weight, symptoms, medication, labs, mood, and sleep.
Why it matters
Analyze historical health data across multiple dimensions to identify trends, correlations, and significant changes, providing data-driven health insights and generating comprehensive reports.
Outcomes
What it gets done
Track and analyze trends in weight, BMI, symptoms, medication adherence, lab results, mood, and sleep.
Identify correlations between lifestyle factors, medications, and health outcomes.
Detect significant changes and potential health risks based on data patterns.
Generate detailed text and interactive HTML reports summarizing health status and providing actionable recommendations.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/ag-health-trend-analyzer | bash Overview
Health Trends Analyzer
Analyzes health data trends over time across weight, symptoms, medication adherence, lab results, and mood/sleep, with correlation analysis and change-point detection for early warnings. Use it when asking what's changed in recent health data or whether a symptom or medication correlates with something else; it does not diagnose or prescribe.
What it does
Analyzes health data trends and patterns over a time window - three months by default, adjustable to 1, 6, or 12 months or a custom range - across five dimensions: weight and BMI trend direction and magnitude; symptom patterns (frequency, recurring triggers); medication adherence (overall and per-drug compliance rate, missed-dose patterns); lab-result trends (biochemical markers like cholesterol, glucose, and blood pressure against reference ranges); and mood-sleep correlation. A correlation engine links medication starts to symptom changes, lifestyle factors like diet and sleep to symptoms and mood, and cycle data to symptoms for women's health tracking, using Pearson and Spearman correlation, cross-correlation, and treatment-effect assessment. It detects significant changes (rapid weight shifts, new symptoms, medication changes) and threshold alerts (approaching dangerous BMI or radiation-dose levels) via CUSUM, sliding-window t-tests, and Bayesian change-point detection, then generates predictive insights - risk assessment, prevention suggestions, and early warnings - before a trend becomes severe.
function pearsonCorrelation(x, y) {
// returns -1 (negative) to 1 (positive)
}
Output comes as a concise text report - overall assessment, per-dimension trend with specific numbers, correlation coefficients, risk flags, a recheck schedule, and a mandatory disclaimer - or a fully self-contained interactive HTML report with six ECharts visualizations: a weight/BMI dual-axis line chart, color-coded symptom-frequency bars, a medication-adherence gauge, a lab-trend line with reference bands, a correlation heatmap, and a mood/sleep dual-axis area chart, all printable, shareable, and requiring no external network calls.
When to use - and when NOT to
Use it when a user asks what's changed in their health recently, wants a trend report on weight, symptoms, medication adherence, lab results, mood, or sleep, or asks whether a symptom or medication correlates with something else.
Its safety boundary is explicit: it never gives a medical diagnosis, specific medication advice, or a prognosis - every report carries a reference-only disclaimer and recommends professional review. It only analyzes already-recorded data, never inferring missing information, and when data is insufficient (under one month), it says so rather than forcing a trend.
Inputs and outputs
Input: a time range (three months by default) and health data files - profile, symptom logs, mood logs, diet logs, medication logs, and lab results, plus optional cycle, pregnancy, menopause, allergy, and radiation records. Output: a concise text report or a full interactive HTML report with specific numbers, trend direction, and correlation coefficients - for example, sleep duration to mood scoring r=0.78 - plus a recheck plan.
Integrations
Correlates with the same health-tracking system's cycle-tracker, pregnancy-tracker, menopause-tracker, allergy, and radiation-record modules, and connects to related commands /symptom, /mood, /diet, /medication, and /query. Runs entirely locally using only Read, Grep, Glob, and Write tools - no external API calls, so nothing leaves the device.
Who it's for
Users wanting a data-grounded view of how their health metrics are trending and correlating over time, not a diagnostic or prognostic tool.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.