medication-tracker

star 0

Tracks daily medication schedules for elderly patients. Monitors dose confirmations, identifies missed doses, and maintains a real-time adherence log.

Aakash-Sabharwal By Aakash-Sabharwal schedule Updated 4/2/2026

name: medication-tracker description: "Tracks daily medication schedules for elderly patients. Monitors dose confirmations, identifies missed doses, and maintains a real-time adherence log." allowed-tools: Bash Read Write

Medication Tracker Skill

Purpose

This skill manages the patient's medication schedule. It is the core intelligence of MedGuard — knowing what to take, when to take it, whether it was taken, and what to do when it isn't.

Trigger Conditions

This skill activates when:

  • A scheduled dose reminder time is reached
  • A patient sends a message ("Did I take my metformin today?", "What's my next pill?")
  • A caregiver asks for an adherence report
  • A missed dose pattern is detected

Patient Interaction Flow

Step 1: Dose Reminder

When a reminder time is reached, send:

"Hi [Name]! 💊 It's time for your [Medication Name] ([Dosage]). Have you taken it yet?" Buttons: [✅ Yes, I took it] [⏰ Remind me in 15 mins] [❓ I'm not sure]

Step 2: Confirmation Handling

  • "Yes, I took it" → Log as CONFIRMED. Reply: "Great! ✅ Logged. Your next dose is [Time/Med]."
  • "Remind in 15 mins" → Schedule snooze. Max 2 snoozes per dose before escalation.
  • "I'm not sure" → Ask: "No worries! Would you like me to check your last confirmed dose time?"

Step 3: No Response After 30 Minutes

  • Send a second gentle reminder via the patient's backup channel (SMS if primary is app).
  • Log status as PENDING.

Step 4: Missed Dose Detection

If no confirmation after 2 reminders → mark as MISSED. Trigger the caregiver-alert skill.

Medication Schedule Format

The agent reads from a structured schedule stored in data/schedules/{patient_id}.json:

{
  "patient_id": "P-001",
  "patient_name": "Margaret Collins",
  "medications": [
    {
      "name": "Metformin",
      "dosage": "500mg",
      "times": ["08:00", "20:00"],
      "with_food": true,
      "critical": false
    },
    {
      "name": "Warfarin",
      "dosage": "2.5mg",
      "times": ["18:00"],
      "with_food": false,
      "critical": true
    }
  ]
}

Adherence Logging

Every event is logged to data/logs/{patient_id}/adherence_{YYYY-MM-DD}.jsonl:

{"timestamp": "2025-08-15T08:03:22Z", "medication": "Metformin 500mg", "status": "CONFIRMED", "channel": "app", "snooze_count": 0}
{"timestamp": "2025-08-15T18:45:00Z", "medication": "Warfarin 2.5mg", "status": "MISSED", "channel": "sms", "snooze_count": 2, "escalated": true}

Adherence Rate Calculation

weekly_adherence_rate = (confirmed_doses / total_scheduled_doses) * 100

Flag if rate drops below 80% in any 7-day window.

Natural Language Queries the Agent Should Handle

  • "What pills do I have today?" → List today's full schedule
  • "Did I take my blood pressure medicine?" → Look up last confirmation for that medication
  • "I feel dizzy after my Warfarin" → Log symptom note + recommend calling physician + alert caregiver if critical medication
  • "Skip my evening dose" → Confirm with patient if this is intentional, log reason, notify caregiver if critical
Install via CLI
npx skills add https://github.com/Aakash-Sabharwal/medguardai --skill medication-tracker
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
Aakash-Sabharwal
Aakash-Sabharwal Explore all skills →