Manages medication schedules, tracks adherence (doses taken vs. due), identifies missed dose patterns, and monitors refill timelines. Use when the user logs medications, asks about adherence, or needs a medication schedule.
Manage multi-drug records, generate daily medication schedules, calculate adherence rates, identify missed-dose patterns, and track refill timelines.
Record fields:
| Field | Description | Example |
|---|---|---|
| Drug name | Generic or brand name | Amlodipine / Norvasc |
| Dose | Single dose | 5mg |
| Frequency | Frequency code | QD / BID / TID / QID / QW / PRN |
| Timing | Timing code | AC / PC / HS / AM / PM |
| Start date | Start date | 2026-01-15 |
| End date | Stop date (optional) | 2026-06-15 or empty |
| Prescriber | Prescribing physician (optional) | Dr. Zhang |
| Notes | Special instructions |
| Do not take with grapefruit |
Frequency codes:
| Code | Meaning | Daily doses |
|---|---|---|
| QD | Once daily | 1 |
| BID | Twice daily | 2 |
| TID | Three times daily | 3 |
| QID | Four times daily | 4 |
| QW | Once weekly | 1/7 |
| Q2W | Every two weeks | 1/14 |
| QM | Once monthly | 1/30 |
| PRN | As needed | Not included in adherence |
Timing codes:
| Code | Meaning | Suggested time |
|---|---|---|
| AC | Before meals | 30 min before meal |
| PC | After meals | 30 min after meal |
| HS | At bedtime | 30 min before sleep |
| AM | Morning | After waking |
| PM | Afternoon | 14:00-16:00 |
| EMPTY | Fasting | 1 hour before breakfast |
| WITH_FOOD | With food | During meal |
Operations: Add, discontinue (set end date to today, preserve history), modify (record change history), list current medications.
Formula: Adherence rate = (actual doses taken / doses due) * 100%
Dimensions:
| Dimension | Calculation |
|---|---|
| Daily | Today's taken / today's due * 100% |
| Weekly (7-day rolling) | Past 7 days total taken / total due * 100% |
| Monthly (30-day rolling) | Past 30 days total taken / total due * 100% |
| Per-drug | Drug's taken / drug's due * 100% |
| Overall | Weighted average across all drugs |
Doses due: Derived from frequency code and active date range. PRN drugs excluded from adherence calculation. Only count doses within the drug's active period.
Adherence grades:
| Rate | Grade | Interpretation |
|---|---|---|
| >= 80% | Good | Regular adherence, maintain current pattern |
| 50-79% | Fair | Frequent misses affecting efficacy; analyze causes, set reminders |
| < 50% | Poor | Severe non-adherence; discuss regimen simplification with physician |
Steps:
memory/health/items/medications.md for drug listmemory/health/daily/*.md for the target date range## Medications sections from daily filesTime-of-day pattern: Compare completion rates across time slots (morning / midday / evening / bedtime). Flag any slot with rate significantly lower than others.
Day-of-week pattern: Compare daily completion rates Monday through Sunday. Flag if weekends are notably lower than weekdays.
Drug-specific pattern: Compare per-drug adherence. Flag any drug with adherence notably below overall average (by 20%+). Possible causes: side effects, inconvenience, forgetting.
Steps:
Generate today's medication schedule from the active drug list.
Time-slot ordering:
Multi-dose distribution: BID = morning + evening; TID = morning + midday + evening; QID = morning + midday + evening + bedtime.
Flag the following known high-risk combinations when a new drug is added:
| Combination | Risk |
|---|---|
| Warfarin + NSAIDs | Increased bleeding risk |
| ACEIs + Potassium-sparing diuretics | Hyperkalemia risk |
| Statins + Macrolides | Rhabdomyolysis risk |
| Metformin + Iodinated contrast | Lactic acidosis risk |
| Digoxin + Amiodarone | Digoxin toxicity risk |
For comprehensive interaction checking, recommend the user run a dedicated drug-interaction-checker skill or consult a pharmacist.
Remaining supply: Remaining days = remaining tablets / daily doses
Reminders:
# Daily Medication Schedule
## Date
YYYY-MM-DD (Day of week)
## Today's Plan
### Morning (07:00-08:30)
| Time | Drug | Dose | Requirement | Status |
|------|------|------|-------------|--------|
| 07:00 | Levothyroxine | 50ug | Fasting, 1h before meal | [ ] |
| 07:30 | Metformin | 500mg | With food | [ ] |
| 08:00 | Amlodipine | 5mg | After meal | [ ] |
### Midday (11:30-12:30)
| Time | Drug | Dose | Requirement | Status |
|------|------|------|-------------|--------|
### Evening (17:30-18:30)
| Time | Drug | Dose | Requirement | Status |
|------|------|------|-------------|--------|
### Bedtime (21:30)
| Time | Drug | Dose | Requirement | Status |
|------|------|------|-------------|--------|
## Summary
- Total: N drugs, M doses
- Special notes: [e.g., Levothyroxine must be taken fasting, 1h apart from others]
## Refill Alerts
- [Drug]: N tablets remaining (~N days), refill soon
# Adherence Report
## Period
YYYY-MM-DD to YYYY-MM-DD (N days)
## Overall Adherence
- **Rate: N% (Good/Fair/Poor)**
- Doses due: N
- Doses taken: N
- Doses missed: N
## Per-Drug Adherence
| Drug | Dose | Freq | Due | Taken | Rate | Grade |
|------|------|------|-----|-------|------|-------|
## Missed Dose Patterns
### Time-of-Day Analysis
| Slot | Rate | Assessment |
|------|------|-----------|
### Day-of-Week Analysis
| Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|-----|-----|-----|-----|-----|-----|-----|
### Drug-Specific Analysis
- [Drug with low adherence]: [analysis]
## Improvement Suggestions
1. [specific, actionable suggestion]
Follow health-memory write protocol:
## Medications [medication-reminder · HH:MM]memory/health/items/medications.md):
## Current Medications table## Recent Status: today's adherence, 7-day, 30-day, next refill## Adherence History tableItems file structure:
---