Core Functions
The Rehabilitation Training Analysis Skill provides comprehensive rehabilitation data analysis functionality, helping users track rehabilitation progress, identify improvement patterns, and optimize training plans.
Main Function Modules:
- Rehabilitation Progress Analysis - Assess functional improvement trends and rehabilitation outcomes
- Functional Improvement Curves - Visualize changes in functional indicators such as ROM, muscle strength, and balance
- Pain Pattern Recognition - Analyze pain score change trends and triggering factors
- Goal Achievement Rate Assessment - Track the completion status of rehabilitation goals
- Rehabilitation Phase Analysis - Assess progress in the current phase and readiness for phase transition
- Training Adherence Assessment - Analyze the execution status of training plans
Trigger Conditions
The skill is automatically triggered under the following conditions:
- The user uses
/rehab progressto view rehabilitation progress - The user uses
/rehab analysisto perform rehabilitation analysis - The user uses
/rehab trendsto view trend analysis - The user uses
/rehab reportto generate a rehabilitation report
Execution Steps
Step 1: Data Reading
Read rehabilitation data files:
data/rehabilitation-tracker.json- Main rehabilitation recorddata/rehabilitation-logs/YYYY-MM/YYYY-MM-DD.json- Daily training log
Data validation:
- Check whether the files exist
- Verify data structure integrity
- Confirm there are enough data points for analysis (at least 3 assessments or 10 days of training records are recommended)
Step 2: Functional Assessment Trend Analysis
Range of Motion (ROM) analysis:
- 分析不同时间点的ROM测量值
- 计算ROM改善速率(度/周)
- 识别ROM平台期或倒退
- 预测达到目标ROM的时间
- 与目标范围对比
Muscle strength improvement analysis:
- 追踪肌力等级变化(MMT评分)
- 识别肌力提升模式
- 比较不同肌群恢复速度
- 评估肌力不平衡情况
Balance function analysis:
- 平衡测试分数趋势
- 单腿站立时间改善
- 平衡稳定性评估
- 跌倒风险变化
Step 3: Pain Pattern Analysis
Pain temporal analysis:
- 分析晨起疼痛趋势
- 分析活动后疼痛趋势
- 识别疼痛加重/缓解模式
- 关联疼痛与训练强度
Pain trigger factor identification:
- 特定训练项目与疼痛关系
- 训练强度与疼痛相关性
- 活动类型与疼痛关系
- 时间因素对疼痛影响
Step 4: Training Adherence Calculation
Adherence metrics:
依从性 = (实际训练次数 / 计划训练次数) × 100%
Analysis dimensions:
- Weekly adherence
- Monthly adherence
- Overall adherence
- Adherence for different training types
Step 5: Goal Achievement Assessment
Goal progress tracking:
- Calculate the completion percentage of each goal
- Estimate the goal achievement time
- Identify lagging goals
- Provide goal adjustment suggestions
Step 6: Rehabilitation Phase Assessment
Current phase analysis:
- Phase goal completion status
- Whether ready to enter the next phase
- Phase transition suggestions
Step 7: Generate Report
Output includes:
- Rehabilitation progress summary
- Functional improvement trends
- Pain control status
- Training adherence evaluation
- Goal achievement assessment
- Phase progress suggestions
- Personalized suggestions
Output Format
Rehabilitation Progress Report Structure
# 康复进展报告
**报告日期**: YYYY-MM-DD
**康复时长**: X天
**当前阶段**: 第X阶段 - 阶段名称
## 1. 康复进展摘要
[整体进展评价:优秀/良好/一般/需改进]
- 康复时长:X天(第X周)
- 完成训练:X次
- 训练依从性:X%
- 当前阶段进展:X%
## 2. 功能改善趋势
### 关节活动度(ROM)
- [关节名] [活动类型]: 基线X° → 当前X° → 改善X°
- 改善速率:X°/周
- 达到目标时间预估:X周
- 趋势分析:[改善趋势描述]
### 肌力评估
- [肌群名]: 基线X/5 → 当前X/5 → 改善X级
- 肌力提升模式:[描述]
- 肌力平衡:[评估]
### 平衡功能
- [测试类型]: 基线X → 当前X → 改善X
- 平衡稳定性:[评估]
- 跌倒风险:[评估]
## 3. 疼痛控制情况
- 平均疼痛水平:X/10
- 疼痛趋势:[改善/稳定/加重]
- 疼痛模式:[描述]
- 触发因素:[识别出的触发因素]
- 疼痛控制建议:[建议]
## 4. 训练依从性
- 整体依从性:X%
- 计划训练:X次
- 实际训练:X次
- 依从性评价:[优秀/良好/一般/需改进]
- 缺训原因分析:[如有]
## 5. 目标达成情况
### 已达成目标(X个)
- 目标1:[描述] - 达成日期:YYYY-MM-DD
- ...
### 进行中目标(X个)
- 目标1:[描述] - 当前进度:X% - 预计达成:YYYY-MM-DD
- ...
### 滞后目标(X个)
- 目标1:[描述] - 当前进度:X% - 需要关注
## 6. 康复阶段进展
**当前阶段**: 第X阶段 - [阶段名称]
- 阶段目标完成:X/X
- 阶段进度:X%
- 阶段持续时间:X周
- **阶段评价**: [评价]
**是否准备好进入下一阶段**: [是/否]
- [准备好的理由] / [需要继续努力的项目]
## 7. 个性化建议
### 训练建议
- [具体训练建议]
### 目标调整建议
- [目标调整建议]
### 阶段转换建议
- [阶段转换建议]
### 注意事项
- [需要注意的事项]
## 8. 下次评估
**下次评估日期**: YYYY-MM-DD
**评估重点**: [重点评估项目]
Brief Progress Report
## 康复进展简报
📊 **整体进展**: 良好
⏱️ **康复时长**: 第X周(X天)
🎯 **阶段**: 第X阶段 - [阶段名称]
**功能改善**:
- ROM: +X°(改善速率X°/周)✅
- 肌力: 提升X级 ✅
- 平衡: 改善X% ✅
**疼痛控制**: 平均X/10([趋势])
**训练依从性**: X%([评价])
**目标达成**: X/X(X%)
**当前阶段**: X/X目标完成
**下一阶段准备**: [是/否]
💡 **建议**: [1-2条核心建议]
Data Sources
Main Data File
- File Path:
data/rehabilitation-tracker.json - Read Fields:
user_profile- User profile and basic rehabilitation informationrehabilitation_goals- Rehabilitation goal listexercise_log- Training logfunctional_assessments- Functional assessment recordsphase_progression- Phase progress recordspain_diary- Pain diarystatistics- Statistics
Log data file
- File path:
data/rehabilitation-logs/YYYY-MM/YYYY-MM-DD.json - Read fields:
daily_summary- Daily training summaryexercise_sessions- Training detailspain_entries- Pain recordsassessments- Assessment recordsnotes- Daily notes
Analysis algorithm
1. Improvement trend analysis
Linear regression analysis:
使用最小二乘法拟合功能改善趋势
改善速率 = (当前值 - 基线值) / 时间间隔
Improvement pattern recognition:
- Linear improvement: steady and continuous improvement
- Stepwise improvement: rapid improvement after a plateau
- Plateau: improvement stagnation
- Regression: decline in function (requires attention)
2. Pain time-series analysis
Moving average calculation:
7日移动平均疼痛 = sum(近7天疼痛) / 7
Pain trend determination:
- Improvement: pain score decreases by ≥20%
- Stable: pain score change <20%
- Worsening: pain score increases by ≥20%
3. Adherence calculation
总体依从性 = (实际训练天数 / 计划训练天数) × 100%
训练类型依从性 = (某类型实际完成 / 某类型计划完成) × 100%
Adherence evaluation:
- Excellent: ≥90%
- Good: 75-89%
- Fair: 60-74%
- Needs improvement: <60%
4. Goal achievement prediction
Linear extrapolation:
预测时间 = 当前日期 + ((目标值 - 当前值) / 改善速率)
Factors considered:
- Recent rate of improvement
- History of plateaus
- Training adherence
5. Phase transition readiness assessment
Readiness score:
准备度 = (已达成阶段目标数 / 阶段目标总数) × 100%
准备度 ≥ 80%: 建议进入下一阶段
准备度 60-79%: 可考虑进入下一阶段,需谨慎
准备度 < 60%: 建议继续当前阶段
Safety and privacy
Data security principles
-
Local storage
- All rehabilitation data is stored only on the user's local device
- Not uploaded to any cloud server
- Not shared with third parties
-
Privacy protection
- Personal health information is kept strictly confidential
- Data files do not contain personally identifiable information
- Users have full control over data access permissions
-
Data integrity
- Raw data is not modified
- Analysis results are based on real data
- Supports data export and backup
Medical safety boundaries
What the system cannot do:
- ❌ Does not provide specific rehabilitation training prescriptions
- ❌ Does not replace professional guidance from a rehabilitation therapist
- ❌ Does not diagnose injuries or complications
- ❌ Does not adjust rehabilitation phase plans
- ❌ Does not predict rehabilitation prognosis timelines
- ❌ Does not manage acute pain or injuries
What the system can do:
- ✅ Provides data analysis and trend identification
- ✅ Provides progress tracking and goal management
- ✅ Provides general rehabilitation advice
- ✅ Provides reminders to seek professional rehabilitation care
- ✅ Records training and assessment data
- ✅ Generates rehabilitation progress reports
Important notes:
- All rehabilitation training plans should follow the guidance of a rehabilitation therapist
- Any worsening of pain or decline in function should prompt timely medical attention
- Regular professional assessment is key to successful rehabilitation
- System suggestions are for reference only and do not replace professional judgment
Error Handling
Data Reading Errors
Error Type 1: File does not exist
错误信息: "未找到康复数据文件,请先使用 /rehab start 开始康复追踪"
处理建议: 引导用户开始康复记录
Error Type 2: Insufficient data
错误信息: "数据不足,至少需要3次功能评估或10天训练记录才能生成分析报告"
当前数据: X次评估,X天训练记录
处理建议: 建议用户继续记录更多数据
Error Type 3: Data structure error
错误信息: "数据文件结构异常,请检查数据完整性"
处理建议: 建议用户重新初始化康复档案
Analysis Process Errors
Error Type: Calculation exception
错误信息: "数据分析过程中出现异常,请稍后重试"
处理建议: 记录错误日志,提供基础数据展示
Output Generation Errors
Error Type: Report generation failed
错误信息: "报告生成失败,请尝试简化查询条件或联系技术支持"
处理建议: 提供简化版报告或原始数据导出
Usage Examples
Example 1: View rehabilitation progress
User input:
/rehab progress
Skill execution:
- Read rehabilitation-tracker.json
- Read the rehabilitation log for the past 30 days
- Analyze functional improvement trends
- Calculate training adherence
- Assess goal achievement status
- Generate progress report
Output:
# 康复进展报告
## 康复进展摘要
📊 整体进展: 良好
⏱️ 康复时长: 第6周(36天)
🎯 当前阶段: 第3阶段 - 强化期
## 功能改善
- 膝关节屈曲: 30° → 120° (+90°) ✅
- 膝关节伸直: -10° → 0° (+10°) ✅
- 股四头肌肌力: 3/5 → 4/5 (提升1级) ✅
- 单腿站立: 5秒 → 30秒 (+25秒) ✅
## 疼痛控制
- 平均疼痛: 1.5/10(良好控制)
- 疼痛趋势: 稳定 ✅
## 训练依从性: 92%(优秀)
## 目标达成: 8/14(57%)
- ✅ 已达成: 8个
- 🔄 进行中: 5个
- ⚠️ 滞后: 1个
## 阶段进展
第3阶段进度: 2/5目标完成(40%)
下一阶段准备: 需要继续努力
💡 建议: 继续当前训练强度,重点关注股四头肌强化训练
Example 2: Analyze functional improvement trends
User input:
/rehab trends rom
Skill execution:
- Extract all ROM assessment records
- Plot ROM improvement curve (text description)
- Calculate improvement rate
- Predict time to reach goal
- Identify improvement patterns
Output:
# 关节活动度(ROM)趋势分析
## 膝关节屈曲
📈 改善趋势: 良好
时间线:
- 5/15: 30° (基线)
- 5/30: 70° (+40°)
- 6/15: 100° (+30°)
- 6/20: 120° (+20°)
改善速率: 8.6°/周
目标: 135°
预计达成: 2025-08-01(还需2周)
趋势: 持续改善 ✅
## 膝关节伸直
✅ 已达成目标
时间线:
- 5/15: -10° (基线)
- 6/10: 0° (达成目标) ✅
- 6/20: 0° (维持)
改善速率: 2.5°/周
目标: 0°
达成日期: 2025-06-10
趋势: 维持目标 ✅
## 建议
- 膝关节屈曲进展良好,继续保持
- 注意伸直维持训练,避免屈曲挛缩
- 预计2周内可达到屈曲目标
Example 3: Assess pain patterns
User input:
/rehab analysis pain
Skill execution:
- Extract all pain records
- Analyze temporal changes in pain
- Identify pain triggers
- Assess pain control effectiveness
Output:
# 疼痛模式分析
## 疼痛趋势
📉 总体趋势: 改善中
- 基线疼痛: 5/10
- 当前疼痛: 2/10
- 改善: 3分(60%改善)✅
## 时序模式
- 晨起疼痛: 1/10(轻度)
- 活动后疼痛: 2/10(轻度)
- 休息时疼痛: 0/10(无痛)
## 触发因素识别
- 主要触发因素: 延长坐姿、上下楼梯
- 疼痛加剧活动: 下楼梯、深蹲
- 缓解因素: 休息、冰敷、抬高
## 训练相关疼痛
- 训练时平均疼痛: 1.2/10(安全范围)
- 训练后疼痛: 2/10(快速缓解)
- 训练依从性不受疼痛影响 ✅
## 建议
- 疼痛控制良好,继续当前训练强度
- 注意训练后休息和冰敷
- 避免疼痛加剧活动(深蹲、下楼梯)
- 如疼痛>4/10,及时就医评估
Correlation Analysis
Association with Exercise Module
Correlation analysis:
- Association between rehabilitation training and recovery of motor function
- Relationship between rehabilitation training intensity and heart rate changes
- Association between functional improvement and daily activity level
Example:
用户使用 /rehab analysis correlation fitness
技能读取:
- rehabilitation-tracker.json
- fitness-tracker.json
- 分析康复训练与运动指标的相关性
Association with Sleep Module
Correlation analysis:
- Relationship between training intensity and sleep quality
- Relationship between pain level and sleep duration
- Analysis of sleep needs during recovery
Association with Medication Module
Correlation analysis:
- Trends in analgesic use
- Relationship between medication use and training intensity
- Pain control and medication adherence
Usage Examples
Scenario 1: New user starts rehabilitation
用户: /rehab start acl-surgery 2025-05-01
系统: 初始化康复档案,设置基础目标,提供初始建议
技能: rehabilitation-analyzer(可选,用于初步评估)
Scenario 2: Record daily training
用户: /rehab exercise slr 3x15 pain2
系统: 记录训练数据,更新训练日志
技能: 不触发(仅记录)
Scenario 3: View progress report
用户: /rehab progress
系统: 调用 rehabilitation-analyzer 技能
技能: 完整分析,生成进展报告
Scenario 4: Analyze a specific function
用户: /rehab trends rom
系统: 调用 rehabilitation-analyzer 技能
技能: ROM专项分析,生成趋势报告
Scenario 5: Assess pain patterns
用户: /rehab analysis pain
系统: 调用 rehabilitation-analyzer 技能
技能: 疼痛专项分析,识别模式和触发因素
Skill version: v1.0 Last updated: 2026-01-06 Maintainer: WellAlly Tech