health-trend-analyzer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

健康趋势分析器

Health Trend Analyzer

分析一段时间内健康数据的趋势和模式,识别变化、相关性,并提供数据驱动的健康洞察。
Analyze trends and patterns in health data over time, identify changes and correlations, and provide data-driven health insights.

核心功能

Core Features

1. 多维度趋势分析

1. Multi-dimensional Trend Analysis

  • 体重/BMI 趋势:追踪体重和BMI随时间的变化,评估健康趋势
  • 症状模式:识别反复出现的症状、频率变化、潜在诱因
  • 药物依从性:分析用药规律,识别漏服模式和改善空间
  • 化验结果趋势:追踪生化指标变化(胆固醇、血糖、血压等)
  • 情绪与睡眠:关联情绪状态与睡眠质量,识别心理健康趋势
  • Weight/BMI Trends: Track changes in weight and BMI over time to evaluate health trends
  • Symptom Patterns: Identify recurring symptoms, frequency changes, and potential triggers
  • Medication Adherence: Analyze medication-taking patterns, identify missed dose patterns, and find areas for improvement
  • Lab Result Trends: Track changes in biochemical indicators (cholesterol, blood glucose, blood pressure, etc.)
  • Mood and Sleep: Correlate emotional states with sleep quality to identify mental health trends

2. 相关性分析引擎

2. Correlation Analysis Engine

  • 药物-症状相关性:识别新药物是否与症状变化相关
  • 生活方式影响:关联饮食/睡眠与症状和情绪
  • 治疗效果评估:衡量治疗是否导致改善
  • 周期-症状相关性:女性健康追踪中的周期相关性
  • Medication-Symptom Correlation: Identify if new medications are associated with symptom changes
  • Lifestyle Impact: Correlate diet/sleep with symptoms and mood
  • Treatment Effect Evaluation: Measure if treatments lead to improvements
  • Cycle-Symptom Correlation: Cycle correlation in women's health tracking

3. 变化检测

3. Change Detection

  • 显著变化:警告快速体重变化、新症状、药物变化
  • 恶化模式:早期识别健康状况下降
  • 改善识别:强调积极的健康变化
  • 阈值警报:接近危险水平时警告(辐射、BMI极值)
  • Significant Changes: Warn of rapid weight changes, new symptoms, and medication changes
  • Deterioration Patterns: Early identification of declining health status
  • Improvement Recognition: Highlight positive health changes
  • Threshold Alerts: Warn when approaching dangerous levels (radiation, BMI extremes)

4. 预测性洞察

4. Predictive Insights

  • 风险评估:基于趋势识别风险因素
  • 预防建议:基于模式建议预防措施
  • 早期预警:在问题变得严重之前预测
  • Risk Assessment: Identify risk factors based on trends
  • Prevention Recommendations: Suggest preventive measures based on patterns
  • Early Warning: Predict issues before they become serious

使用说明

Usage Instructions

触发条件

Trigger Conditions

当用户提到以下场景时,使用此技能:
通用询问
  • ✅ "过去一段时间我的健康有什么变化?"
  • ✅ "分析我的健康趋势"
  • ✅ "我的身体状况有什么变化?"
  • ✅ "健康状况总结"
具体维度
  • ✅ "我的体重/BMI有什么趋势?"
  • ✅ "分析我的症状模式"
  • ✅ "我的用药依从性怎么样?"
  • ✅ "我的化验指标有什么变化?"
  • ✅ "我的情绪和睡眠趋势"
相关性分析
  • ✅ "我的症状和什么相关?"
  • ✅ "我的药物有效吗?"
  • ✅ "睡眠和我的情绪有什么关系?"
时间范围
  • 默认分析过去3个月的数据
  • 支持:"过去1个月"、"过去6个月"、"过去1年"
  • 支持:"2025年1月至今"、"最近90天"
Use this skill when users mention the following scenarios:
General Inquiries:
  • ✅ "What changes have occurred in my health over the past period?"
  • ✅ "Analyze my health trends"
  • ✅ "What's changed with my physical condition?"
  • ✅ "Health status summary"
Specific Dimensions:
  • ✅ "What's the trend of my weight/BMI?"
  • ✅ "Analyze my symptom patterns"
  • ✅ "How is my medication adherence?"
  • ✅ "What changes are there in my lab indicators?"
  • ✅ "My mood and sleep trends"
Correlation Analysis:
  • ✅ "What are my symptoms related to?"
  • ✅ "Is my medication effective?"
  • ✅ "What's the relationship between sleep and my mood?"
Time Range:
  • Default analysis of past 3 months of data
  • Supported: "Past 1 month", "Past 6 months", "Past 1 year"
  • Supported: "From January 2025 to present", "Last 90 days"

执行步骤

Execution Steps

步骤 1:确定分析时间范围

Step 1: Determine Analysis Time Range

从用户输入中提取时间范围,或使用默认值(3个月)。
Extract the time range from user input, or use the default value (3 months).

步骤 2:读取健康数据

Step 2: Read Health Data

读取以下数据源:
javascript
// 1. 个人档案(BMI、体重)
const profile = readFile('data/profile.json');

// 2. 症状记录
const symptomFiles = glob('data/symptoms/**/*.json');
const symptoms = readAllJson(symptomFiles);

// 3. 情绪记录
const moodFiles = glob('data/mood/**/*.json');
const moods = readAllJson(moodFiles);

// 4. 饮食记录
const dietFiles = glob('data/diet/**/*.json');
const diets = readAllJson(dietFiles);

// 5. 用药日志
const medicationLogs = glob('data/medication-logs/**/*.json');

// 6. 女性健康数据(如适用)
const cycleData = readFile('data/cycle-tracker.json');
const pregnancyData = readFile('data/pregnancy-tracker.json');
const menopauseData = readFile('data/menopause-tracker.json');

// 7. 过敏史
const allergies = readFile('data/allergies.json');

// 8. 辐射记录
const radiation = readFile('data/radiation-records.json');
Read the following data sources:
javascript
// 1. 个人档案(BMI、体重)
const profile = readFile('data/profile.json');

// 2. 症状记录
const symptomFiles = glob('data/symptoms/**/*.json');
const symptoms = readAllJson(symptomFiles);

// 3. 情绪记录
const moodFiles = glob('data/mood/**/*.json');
const moods = readAllJson(moodFiles);

// 4. 饮食记录
const dietFiles = glob('data/diet/**/*.json');
const diets = readAllJson(dietFiles);

// 5. 用药日志
const medicationLogs = glob('data/medication-logs/**/*.json');

// 6. 女性健康数据(如适用)
const cycleData = readFile('data/cycle-tracker.json');
const pregnancyData = readFile('data/pregnancy-tracker.json');
const menopauseData = readFile('data/menopause-tracker.json');

// 7. 过敏史
const allergies = readFile('data/allergies.json');

// 8. 辐射记录
const radiation = readFile('data/radiation-records.json');

步骤 3:数据过滤

Step 3: Data Filtering

根据时间范围过滤数据:
javascript
function filterByDate(data, startDate, endDate) {
  return data.filter(item => {
    const itemDate = new Date(item.date || item.created_at);
    return itemDate >= startDate && itemDate <= endDate;
  });
}
Filter data based on the time range:
javascript
function filterByDate(data, startDate, endDate) {
  return data.filter(item => {
    const itemDate = new Date(item.date || item.created_at);
    return itemDate >= startDate && itemDate <= endDate;
  });
}

步骤 4:趋势分析

Step 4: Trend Analysis

对每个数据维度进行趋势分析:
4.1 体重/BMI 趋势
  • 提取历史体重数据
  • 计算BMI变化
  • 识别趋势方向(上升/下降/稳定)
  • 评估变化幅度
4.2 症状模式
  • 统计症状频率
  • 识别高频症状
  • 分析症状时间模式
  • 检测症状诱因
4.3 药物依从性
  • 计算总体依从率
  • 分析各药物依从性
  • 识别漏服模式
  • 评估改善建议
4.4 化验结果
  • 追踪多次报告中的生化指标
  • 与参考范围对比
  • 识别改善/恶化
  • 标记异常指标
4.5 情绪与睡眠
  • 关联情绪评分与睡眠时长
  • 识别情绪波动模式
  • 检测压力水平
  • 评估心理健康趋势
Perform trend analysis for each data dimension:
4.1 Weight/BMI Trends
  • Extract historical weight data
  • Calculate BMI changes
  • Identify trend direction (upward/downward/stable)
  • Evaluate change magnitude
4.2 Symptom Patterns
  • Count symptom frequencies
  • Identify high-frequency symptoms
  • Analyze symptom time patterns
  • Detect symptom triggers
4.3 Medication Adherence
  • Calculate overall adherence rate
  • Analyze adherence for each medication
  • Identify missed dose patterns
  • Evaluate improvement suggestions
4.4 Lab Results
  • Track biochemical indicators across multiple reports
  • Compare with reference ranges
  • Identify improvements/deterioration
  • Mark abnormal indicators
4.5 Mood and Sleep
  • Correlate mood scores with sleep duration
  • Identify mood fluctuation patterns
  • Detect stress levels
  • Evaluate mental health trends

步骤 5:相关性分析

Step 5: Correlation Analysis

使用统计方法识别相关性:
javascript
// 皮尔逊相关系数
function pearsonCorrelation(x, y) {
  // 计算相关系数
  // 返回值范围:-1(负相关)到 1(正相关)
}

// 应用场景
- 药物开始日期 vs 症状频率
- 睡眠时长 vs 情绪评分
- 体重变化 vs 饮食记录
- 运动量 vs 情绪状态
Use statistical methods to identify correlations:
javascript
// 皮尔逊相关系数
function pearsonCorrelation(x, y) {
  // 计算相关系数
  // 返回值范围:-1(负相关)到 1(正相关)
}

// 应用场景
- 药物开始日期 vs 症状频率
- 睡眠时长 vs 情绪评分
- 体重变化 vs 饮食记录
- 运动量 vs 情绪状态

步骤 6:变化检测

Step 6: Change Detection

识别显著变化:
javascript
// 变化点检测
function detectChangePoints(timeSeries) {
  // 使用统计方法检测显著变化点
  // 例如:体重突然下降、症状突然增加
}

// 阈值警报
function checkThresholds(value, thresholds) {
  // 检查是否接近或超过危险阈值
  // 例如:BMI > 30、辐射剂量 > 安全限
}
Identify significant changes:
javascript
// 变化点检测
function detectChangePoints(timeSeries) {
  // 使用统计方法检测显著变化点
  // 例如:体重突然下降、症状突然增加
}

// 阈值警报
function checkThresholds(value, thresholds) {
  // 检查是否接近或超过危险阈值
  // 例如:BMI > 30、辐射剂量 > 安全限
}

步骤 7:生成洞察

Step 7: Generate Insights

基于分析结果生成预测性洞察:
javascript
// 风险评估
function assessRisks(trends) {
  // 识别高风险趋势
  // 例如:快速体重下降、频繁症状
}

// 预防建议
function generateRecommendations(trends, correlations) {
  // 基于模式建议预防措施
  // 例如:改善睡眠、提高用药依从性
}

// 早期预警
function earlyWarnings(trends) {
  // 在问题变得严重之前预测
  // 例如:症状频率上升、情绪持续低落
}
Generate predictive insights based on analysis results:
javascript
// 风险评估
function assessRisks(trends) {
  // 识别高风险趋势
  // 例如:快速体重下降、频繁症状
}

// 预防建议
function generateRecommendations(trends, correlations) {
  // 基于模式建议预防措施
  // 例如:改善睡眠、提高用药依从性
}

// 早期预警
function earlyWarnings(trends) {
  // 在问题变得严重之前预测
  // 例如:症状频率上升、情绪持续低落
}

步骤 8:生成可视化报告

Step 8: Generate Visualization Report

生成交互式HTML报告:
  1. 数据汇总:生成JSON格式的分析结果
  2. HTML模板渲染:将数据注入HTML模板
  3. ECharts图表配置:配置6种交互式图表
  4. 保存文件:保存为独立HTML文件
详细输出格式参见:数据源说明
Generate an interactive HTML report:
  1. Data Summary: Generate analysis results in JSON format
  2. HTML Template Rendering: Inject data into the HTML template
  3. ECharts Chart Configuration: Configure 6 types of interactive charts
  4. Save File: Save as a standalone HTML file
Detailed output format refers to: Data Sources Description

输出格式

Output Formats

文本报告(简洁版)

Text Report (Concise Version)

健康趋势分析报告
━━━━━━━━━━━━━━━━━━━━━━━━━━
生成时间: 2025-12-31
分析周期: 过去3个月 (2025-10-01 至 2025-12-31)

📊 总体评估
━━━━━━━━━━━━━━━━━━━━━━━━━━
改善中: 体重管理、胆固醇水平
稳定: 血糖控制、情绪状态
需关注: 用药依从性、睡眠质量

📊 体重/BMI 趋势
├─ 当前体重: 68.5 kg
├─ 当前 BMI: 23.1(正常范围)
├─ 3个月变化: -2.3 kg(-3.2%)
├─ 趋势: 📉 逐渐减重
└─ 评估: ✅ 积极趋势,在健康范围内

💊 药物依从性
├─ 当前药物: 3种
├─ 总体依从率: 78%
├─ 漏服次数: 8次
├─ 最好: 阿司匹林 (95%)
└─ 需改进: 氨氯地平 (65%)

⚠️ 症状模式
├─ 最频繁: 头痛(过去3个月 12次)
├─ 趋势: 📉 频率下降(较上期减少4次)
├─ 潜在诱因: 与睡眠质量识别出中等相关(r=0.62)
└─ 建议: 继续改善睡眠模式

🧪 化验结果趋势
├─ 胆固醇: 240 → 210 mg/dL(改善 ✅)
├─ 血糖: 5.6 → 5.4 mmol/L(稳定)
├─ 上次检查: 30天前
└─ 建议: 3个月后复查

😊 情绪与睡眠
├─ 平均情绪评分: 6.8/10
├─ 平均睡眠时长: 6.5小时
├─ 趋势: 情绪稳定,睡眠略有改善
└─ 相关性: 睡眠时长与情绪评分强相关(r=0.78)

🔗 相关性分析
━━━━━━━━━━━━━━━━━━━━━━━━━━
• 睡眠时长 ↔ 情绪评分: 强正相关 (r=0.78)
• 体重变化 ↔ 饮食记录: 中等相关 (r=0.55)
• 用药依从性 ↔ 症状频率: 中等负相关 (r=-0.62)

💡 风险评估与建议
━━━━━━━━━━━━━━━━━━━━━━━━━━

🟢 继续保持
• 当前体重管理方法有效
• 胆固醇水平改善明显

🟡 需要关注
• 提高氨氯地平依从性(设置提醒)
• 增加睡眠时长至7-8小时

📅 复查计划
• 3个月后复查血脂四项
• 1个月后评估用药依从性改善

━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ 免责声明
本分析仅供参考,不替代专业医疗诊断。
请咨询医生获取专业建议。
Health Trend Analysis Report
━━━━━━━━━━━━━━━━━━━━━━━━━━
Generation Time: 2025-12-31
Analysis Period: Past 3 months (2025-10-01 to 2025-12-31)

📊 Overall Assessment
━━━━━━━━━━━━━━━━━━━━━━━━━━
Improving: Weight management, cholesterol levels
Stable: Blood glucose control, emotional state
Needs Attention: Medication adherence, sleep quality

📊 Weight/BMI Trends
├─ Current Weight: 68.5 kg
├─ Current BMI: 23.1 (Normal Range)
├─ 3-month Change: -2.3 kg (-3.2%)
├─ Trend: 📉 Gradual weight loss
└─ Assessment: ✅ Positive trend, within healthy range

💊 Medication Adherence
├─ Current Medications: 3 types
├─ Overall Adherence Rate: 78%
├─ Missed Doses: 8 times
├─ Best: Aspirin (95%)
└─ Needs Improvement: Amlodipine (65%)

⚠️ Symptom Patterns
├─ Most Frequent: Headache (12 times in past 3 months)
├─ Trend: 📉 Decreasing frequency (4 fewer than previous period)
├─ Potential Trigger: Moderate correlation identified with sleep quality (r=0.62)
└─ Recommendation: Continue improving sleep patterns

🧪 Lab Result Trends
├─ Cholesterol: 240 → 210 mg/dL (Improved ✅)
├─ Blood Glucose: 5.6 → 5.4 mmol/L (Stable)
├─ Last Check: 30 days ago
└─ Recommendation: Recheck in 3 months

😊 Mood and Sleep
├─ Average Mood Score: 6.8/10
├─ Average Sleep Duration: 6.5 hours
├─ Trend: Stable mood, slight improvement in sleep
└─ Correlation: Strong correlation between sleep duration and mood score (r=0.78)

🔗 Correlation Analysis
━━━━━━━━━━━━━━━━━━━━━━━━━━
• Sleep Duration ↔ Mood Score: Strong positive correlation (r=0.78)
• Weight Change ↔ Diet Records: Moderate correlation (r=0.55)
• Medication Adherence ↔ Symptom Frequency: Moderate negative correlation (r=-0.62)

💡 Risk Assessment and Recommendations
━━━━━━━━━━━━━━━━━━━━━━━━━━

🟢 Keep Up the Good Work
• Current weight management methods are effective
• Cholesterol levels have improved significantly

🟡 Needs Attention
• Improve amlodipine adherence (set reminders)
• Increase sleep duration to 7-8 hours

📅 Follow-up Plan
• Recheck lipid panel in 3 months
• Evaluate medication adherence improvement in 1 month

━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ Disclaimer
This analysis is for reference only and does not replace professional medical diagnosis.
Please consult a doctor for professional advice.

HTML可视化报告(完整版)

HTML Visualization Report (Full Version)

生成包含ECharts交互式图表的独立HTML文件,包含:
  1. 总体评估卡片:关键指标一目了然
  2. 体重/BMI趋势图:双Y轴折线图(体重 + BMI)
  3. 症状频率图:颜色编码的柱状图(高频红/中频黄/低频绿)
  4. 药物依从性仪表盘:总体依从率 + 各药物详情
  5. 化验结果趋势图:多系列折线图 + 参考线
  6. 相关性热图:热力图展示变量间相关性
  7. 情绪与睡眠面积图:双Y轴面积图
HTML文件特点
  • ✅ 完全独立(所有依赖通过CDN)
  • ✅ 交互式图表(缩放、导出、图例切换)
  • ✅ 响应式设计(移动端适配)
  • ✅ 可打印(打印优化样式)
  • ✅ 可分享(发送给医生)
Generate a standalone HTML file with ECharts interactive charts, including:
  1. Overall Assessment Card: Key indicators at a glance
  2. Weight/BMI Trend Chart: Dual Y-axis line chart (weight + BMI)
  3. Symptom Frequency Chart: Color-coded bar chart (high frequency red/medium frequency yellow/low frequency green)
  4. Medication Adherence Dashboard: Overall adherence rate + details for each medication
  5. Lab Result Trend Chart: Multi-series line chart + reference lines
  6. Correlation Heatmap: Heatmap showing correlations between variables
  7. Mood and Sleep Area Chart: Dual Y-axis area chart
HTML File Features:
  • ✅ Fully standalone (all dependencies via CDN)
  • ✅ Interactive charts (zoom, export, legend toggle)
  • ✅ Responsive design (mobile-adapted)
  • ✅ Printable (print-optimized styles)
  • ✅ Shareable (send to doctors)

数据源

Data Sources

主要数据源

Primary Data Sources

数据源文件路径数据内容
个人档案
data/profile.json
体重、身高、BMI历史
症状记录
data/symptoms/**/*.json
症状名称、严重程度、持续时间
情绪记录
data/mood/**/*.json
情绪评分、睡眠质量、压力水平
饮食记录
data/diet/**/*.json
餐次、食物、卡路里、营养素
用药日志
data/medication-logs/**/*.json
用药时间、依从性记录
化验结果
data/medical_records/**/*.json
生化指标、参考范围
Data SourceFile PathData Content
Personal Profile
data/profile.json
Weight, height, BMI history
Symptom Records
data/symptoms/**/*.json
Symptom name, severity, duration
Mood Records
data/mood/**/*.json
Mood score, sleep quality, stress level
Diet Records
data/diet/**/*.json
Meals, food, calories, nutrients
Medication Logs
data/medication-logs/**/*.json
Medication time, adherence records
Lab Results
data/medical_records/**/*.json
Biochemical indicators, reference ranges

辅助数据源

Secondary Data Sources

数据源文件路径数据内容
女性周期
data/cycle-tracker.json
周期长度、症状记录
孕期追踪
data/pregnancy-tracker.json
孕周、体重、检查记录
更年期
data/menopause-tracker.json
症状、HRT使用
过敏史
data/allergies.json
过敏原、严重程度
辐射记录
data/radiation-records.json
累积辐射剂量
详细数据结构说明请参考:data-sources.md
Data SourceFile PathData Content
Women's Cycle
data/cycle-tracker.json
Cycle length, symptom records
Pregnancy Tracker
data/pregnancy-tracker.json
Gestational week, weight, checkup records
Menopause
data/menopause-tracker.json
Symptoms, HRT usage
Allergy History
data/allergies.json
Allergens, severity
Radiation Records
data/radiation-records.json
Cumulative radiation dose
Detailed data structure description refers to: data-sources.md

分析算法

Analysis Algorithms

时间序列分析

Time Series Analysis

  • 趋势检测(线性回归)
  • 季节性分析
  • 异常值检测
  • Trend detection (linear regression)
  • Seasonal analysis
  • Outlier detection

相关性分析

Correlation Analysis

  • 皮尔逊相关系数(连续变量)
  • 斯皮尔曼相关系数(有序变量)
  • 交叉相关分析(时间序列)
  • Pearson correlation coefficient (continuous variables)
  • Spearman correlation coefficient (ordinal variables)
  • Cross-correlation analysis (time series)

变化点检测

Change Point Detection

  • CUSUM算法
  • 滑动窗口t检验
  • 贝叶斯变化点检测
  • CUSUM algorithm
  • Sliding window t-test
  • Bayesian change point detection

统计指标

Statistical Indicators

  • 均值、中位数、标准差
  • 百分位数(25%, 50%, 75%)
  • 变化率(环比、同比)
详细算法说明请参考:algorithms.md
  • Mean, median, standard deviation
  • Percentiles (25%, 50%, 75%)
  • Change rates (month-over-month, year-over-year)
Detailed algorithm description refers to: algorithms.md

安全与隐私

Safety and Privacy

必须遵循

Must Follow

  • ❌ 不给出医疗诊断
  • ❌ 不给出具体用药建议
  • ❌ 不判断生死预后
  • ❌ 标注免责声明(仅供参考)
  • ❌ Do not provide medical diagnoses
  • ❌ Do not provide specific medication advice
  • ❌ Do not judge life-or-death prognosis
  • ❌ Include a disclaimer (for reference only)

信息准确度

Information Accuracy

  • ✅ 仅基于已记录的数据进行分析
  • ✅ 不推测或推断缺失信息
  • ✅ 明确标注数据来源和时间范围
  • ✅ 建议应由医疗专业人员审查
  • ✅ Only analyze based on recorded data
  • ✅ Do not speculate or infer missing information
  • ✅ Clearly label data sources and time ranges
  • ✅ Recommendations should be reviewed by medical professionals

隐私保护

Privacy Protection

  • ✅ 所有数据保持本地
  • ✅ 无外部API调用
  • ✅ 分析结果仅保存在本地
  • ✅ HTML报告独立运行(无数据传输)
  • ✅ All data remains local
  • ✅ No external API calls
  • ✅ Analysis results are only stored locally
  • ✅ HTML reports run independently (no data transmission)

错误处理

Error Handling

数据缺失

Data Missing

  • 无数据:输出"暂无数据,建议先记录[数据类型]"
  • 数据不足:输出"数据不足(需要至少1个月数据才能进行趋势分析)"
  • 数据范围窄:使用现有数据,提示"建议延长记录时间以获得更准确的趋势"
  • No Data: Output "No data available. It is recommended to record [data type] first"
  • Insufficient Data: Output "Insufficient data (at least 1 month of data is required for trend analysis)"
  • Narrow Data Range: Use existing data and prompt "It is recommended to extend the recording time for more accurate trends"

分析失败

Analysis Failure

  • 无法计算趋势:输出"无法计算趋势,数据点不足"
  • 相关性分析失败:输出"相关性分析需要更多数据"
  • 图表渲染失败:降级为文本报告
  • Unable to Calculate Trends: Output "Unable to calculate trends due to insufficient data points"
  • Correlation Analysis Failure: Output "More data is needed for correlation analysis"
  • Chart Rendering Failure: Degrade to text report

使用示例

Usage Examples

示例 1:一般健康趋势

Example 1: General Health Trends

用户:"过去3个月我的健康有什么变化?" 输出:生成完整的HTML报告,包含所有维度的趋势分析
User: "What changes have occurred in my health over the past 3 months?" Output: Generate a complete HTML report with trend analysis across all dimensions

示例 2:症状分析

Example 2: Symptom Analysis

用户:"分析我的症状模式" 输出:重点分析症状频率、诱因、趋势
User: "Analyze my symptom patterns" Output: Focus on symptom frequency, triggers, and trends

示例 3:体重趋势

Example 3: Weight Trends

用户:"我的体重有什么趋势?" 输出:重点分析体重/BMI变化、与饮食/运动的相关性
User: "What's the trend of my weight?" Output: Focus on weight/BMI changes and correlations with diet/exercise

示例 4:药物有效性

Example 4: Medication Effectiveness

用户:"我的降压药有效吗?" 输出:关联药物开始日期与血压读数、症状改善
更多完整示例请参考:examples.md
User: "Is my blood pressure medication effective?" Output: Correlate medication start date with blood pressure readings and symptom improvements
More complete examples refer to: examples.md

相关命令

Related Commands

  • /symptom
    :记录症状
  • /mood
    :记录情绪
  • /diet
    :记录饮食
  • /medication
    :管理药物和用药记录
  • /query
    :查询特定数据点
  • /symptom
    : Record symptoms
  • /mood
    : Record mood
  • /diet
    : Record diet
  • /medication
    : Manage medications and medication records
  • /query
    : Query specific data points

技术实现

Technical Implementation

工具限制

Tool Limitations

此Skill仅使用以下工具(无需额外权限):
  • Read:读取JSON数据文件
  • Grep:搜索特定模式
  • Glob:按模式查找数据文件
  • Write:生成HTML报告(保存到
    data/health-reports/
This Skill only uses the following tools (no additional permissions required):
  • Read: Read JSON data files
  • Grep: Search for specific patterns
  • Glob: Find data files by pattern
  • Write: Generate HTML reports (save to
    data/health-reports/
    )

性能优化

Performance Optimization

  • 增量读取:仅读取指定时间范围的数据文件
  • 数据缓存:避免重复读取同一文件
  • 延迟计算:按需生成图表数据
  • Incremental reading: Only read data files within the specified time range
  • Data caching: Avoid re-reading the same file
  • Lazy calculation: Generate chart data on demand

扩展性

Extensibility

  • 支持添加新的数据维度
  • 支持自定义图表类型
  • 支持自定义分析算法
  • Support adding new data dimensions
  • Support custom chart types
  • Support custom analysis algorithms