Chronic condition monitor

From vitaclaw/vitaclaw · View interactive version

Chronic condition monitor is an AI agent skill from the GitHub repository vitaclaw/vitaclaw. Monitors multiple chronic disease indicators (BP, glucose, HbA1c, lipids, uric acid, creatinine, eGFR, liver function) against Chinese clinical guidelines. Detects abnormal trends, metabolic syndrome, and generates visit summaries. Use when the user tracks lab results or manages multiple chronic con

How to use this skill

Skill file

Chronic Condition Monitor

Record and track multiple chronic disease indicators, detect abnormal trends, perform cross-indicator analysis, assess severity, and generate visit summaries.

Capabilities

1. Multi-Indicator Recording

Track the following chronic disease indicators:

Blood Pressure: SBP / DBP (mmHg), pulse (bpm)

Blood Glucose: Fasting plasma glucose FPG (mmol/L), 2-hour postprandial glucose 2hPG (mmol/L), HbA1c (%)

Weight & BMI: Weight (kg), height (cm), BMI = weight(kg) / height(m)^2, waist circumference (cm)

Uric Acid: umol/L

Kidney Function: Serum creatinine Scr (umol/L), eGFR (mL/min/1.73m^2) via CKD-EPI 2021

Lipid Panel: Total cholesterol TC, triglycerides TG, LDL-C, HDL-C (all mmol/L)

Liver Function: ALT, AST (U/L)

2. Reference Ranges and Classification

For complete reference ranges and classification thresholds, see references/ranges.md

Classification logic:

3. Abnormal Trend Detection

Consecutive Out-of-Range:

Progressive Worsening:

Rate of Change:

Detection Steps:

  1. Glob memory/health/items/ to read indicator files
  2. Extract last 5-10 records from ## History table
  3. Apply all three detection algorithms per indicator
  4. Aggregate all alerts

4. Cross-Indicator Analysis

Metabolic Syndrome Detection

Diagnose metabolic syndrome when 3 of 5 criteria are met:

| # | Criterion | Threshold |

|---|-----------|-----------|

| 1 | Central obesity | Waist: male >= 90 cm, female >= 85 cm |

| 2 | Elevated triglycerides | TG >= 1.7 mmol/L |

| 3 | Low HDL-C | Male < 1.0 mmol/L, female < 1.3 mmol/L |

| 4 | Elevated blood pressure | SBP >= 130 or DBP >= 85 mmHg |

| 5 | Elevated fasting glucose | FPG >= 6.1 mmol/L |

Check each criterion against the most recent reading. >= 3 triggers metabolic syndrome warning.

Diabetes + Hypertension Comorbidity Alert

Trigger when both are met:

Alert content:

CKD Progression Markers

Trigger CKD progression alert on any of:

CKD staging reference (see kidney-function-tracker):

Hepatorenal Combined Abnormality

When ALT or AST is elevated AND creatinine is elevated or eGFR is decreased:

5. Severity Grading

Level 1 (Mild):

Level 2 (Moderate):

Level 3 (Severe):

6. Visit Summary Generation

Generate a structured visit summary covering the last 3-6 months.

Steps:

  1. Glob memory/health/items/*.md for all indicator files
  2. Read each file, extract ## History table data
  3. Filter records from the last 3-6 months
  4. Per indicator: compute latest, average, max, min, trend
  5. Run trend detection and cross-indicator analysis
  6. Read memory/health/_health-profile.md for baseline health info
  7. Read memory/health/items/medications.md for current medications
  8. Compile visit summary report

eGFR Calculation (CKD-EPI 2021, Race-Free)

Auto-calculate eGFR when creatinine is recorded.

Female:

Male:

Unit conversion: Chinese labs report creatinine in umol/L. Convert first:

Input Format

User provides indicator values in natural language. Parse and match to known indicators. Examples:

Output Format

Indicator Dashboard

# Chronic Condition Monitoring Report

## Date
YYYY-MM-DD

## Indicator Dashboard

| Indicator | Latest | Reference | Status | Trend |
|-----------|--------|-----------|--------|-------|
| Blood Pressure | 135/88 mmHg | < 120/80 | Elevated | Stable |
| Fasting Glucose | 6.8 mmol/L | 3.9-6.1 | Elevated | Rising |
| ... | ... | ... | ... | ... |

## Trend Alerts

### Persistent Elevation
- Fasting glucose: last 4 readings all above normal (6.5, 6.6, 6.7, 6.8)

### Progressive Deterioration
- Fasting glucose: 4 consecutive increases

### Rapid Change
- None

## Cross-Indicator Analysis

### Metabolic Syndrome Assessment
- [criteria evaluation, count met/5]
- **Result: meets N/5 criteria, [diagnosis or not]**

### Comorbidity Alerts
- [if applicable]

## Severity Assessment

**Overall Level: Level N (Mild/Moderate/Severe)**
- Abnormal indicators: N items
- Worsening trends: [details]
- Combined abnormalities: [details]
- **Recommendation: [action]**

Visit Summary

# Visit Summary

## Generated
YYYY-MM-DD (covering YYYY-MM-DD to YYYY-MM-DD)

## Basic Information
- Sex, Age, Height, Weight, BMI

## Current Medications
- [medication list with doses]

## Indicator Summary
### Blood Pressure (N readings)
| Stat | SBP | DBP |
|------|-----|-----|
| Latest / Average / Max / Min / Trend / Target rate |

### [Other indicators with similar tables]

## Issues Requiring Attention
1. [prioritized list]

## Suggested Discussion Topics
1. [for physician consultation]

Data Persistence

Follow health-memory write protocol:

  1. Update daily file: Insert/replace section ## Chronic Indicators [chronic-condition-monitor · HH:MM]
  2. Update items files: Update ## Recent Status, prepend row to ## History table, trim rows older than 90 days

Daily section format:

## Chronic Indicators [chronic-condition-monitor · 09:30]
- Blood Pressure: 135/88 mmHg, pulse 75 -> Elevated
- Fasting Glucose: 6.8 mmol/L -> Impaired fasting glucose
- Severity: Level 2 (Moderate)
- Alerts: Progressive FPG increase, Metabolic syndrome risk

Data files:

Alerts and Safety

Critical Value Thresholds

Emit immediate emergency alert when any of the following are detected:

Alert message: Seek immediate medical attention or call emergency services. This skill cannot replace emergency medical care.

Consult a Physician When

Medical Disclaimer

This skill is for health monitoring reference only. It does not constitute medical diagnosis or treatment advice. It does not diagnose diseases, formulate treatment plans, recommend medications, or replace physician consultations.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.