DoseTrack Pro

Health

Original Idea

Medication Adherence Coach A mobile app with smart snoozes, adherence streaks, and caregiver sharing to keep routines on track.

Product Requirements Document: DoseTrack Pro (v1.0)

1. Executive Summary

DoseTrack Pro is a high-reliability medication adherence platform designed to bridge the gap between medical prescription and patient habit. Leveraging 2026’s local-first architecture and native system-level alarms, the app provides an "intelligent coach" experience that goes beyond simple reminders. It features smart-snooze logic to combat alert fatigue, barcode-verified medication entry, and a real-time caregiver "fail-safe" notification system. Built on a HIPAA-compliant AWS serverless backbone, DoseTrack Pro ensures that sensitive health data remains secure while providing life-saving consistency for patients with chronic conditions.

2. Problem Statement

Medication non-adherence is a silent crisis, contributing to over $100B in annual healthcare costs and significantly worsening patient outcomes. Existing apps fail because:

  1. Alert Fatigue: Reminders are easily dismissed or silenced.
  2. Complexity: Manual entry of long medication names is error-prone.
  3. Isolation: Caregivers lack visibility until a health crisis occurs.
  4. Reliability: Cloud-dependent notifications fail in low-connectivity environments.

3. Goals & Success Metrics

  • Adherence Rate: Achieve a Medication Adherence Rate (MAR) of >90% for active users.
  • Retention: Maintain a 60% Day-30 retention rate (crucial for habit formation).
  • Caregiver Response: Ensure caregiver alerts are delivered within 60 seconds of a missed critical dose window.
  • Verification Accuracy: 99% success rate in medication identification via barcode scanning.

4. User Personas

  • Chronic Charlie (45): Manages hypertension and diabetes. Needs a "set and forget" system that handles complex titration.
  • Senior Sarah (78): Has mild cognitive impairment. Needs high-contrast UI, loud persistent alarms, and zero manual typing.
  • Caring Clara (52): Sarah’s daughter. Needs peace of mind that her mother took her morning pills without calling her daily.

5. User Stories

  • As a Patient, I want to scan my pill bottle barcode so that the app automatically fetches the correct dosage and instructions.
  • As a Patient, I want a snooze button that reminds me again in 15 minutes with increasing volume so I don't forget if I'm currently busy.
  • As a Caregiver, I want to be notified if my loved one misses a "Critical" dose by more than one hour so I can intervene.
  • As a Patient, I want to generate a PDF of my 30-day adherence to show my doctor during my next visit.

6. Functional Requirements

6.1 Medication Management

  • Barcode Entry: Integration with Scanbot SDK to parse GS1 DataMatrix and NDC codes.
  • FDA Integration: Real-time lookup using the FDA NDC Directory API, mapped to RxNorm (RxCUI) for generic/brand consistency.
  • Stock Tracking: Automatic decrementing of pill counts with "Low Refill" warnings.

6.2 Smart Notification System

  • Local-First Alarms: Uses iOS AlarmKit and Android AlarmManager (Exact Alarms) to bypass Silent/DND modes.
  • Exponential Snooze: Interval-based alerts (e.g., 5 min, then 3 min, then 1 min) with increasing haptic feedback.
  • Criticality Levels: Users can tag meds as "Critical" (High-priority alarm) or "Routine" (Standard notification).

6.3 Caregiver Ecosystem

  • Permissioned Sharing: OAuth2-based invitation system for caregivers.
  • Escalation Logic: If a "Critical" dose is not marked "Taken" within the buffer window (default 60m), trigger a Twilio SMS and Push to the caregiver.

6.4 Reporting & Gamification

  • Streaks: Visual "Adherence Streak" counter to incentivize daily use.
  • PDF Generation: Monthly clinical-grade reports using react-pdf/renderer.

7. Technical Requirements

7.1 Tech Stack (2026 Standards)

  • Frontend: React Native 0.83.x (New Architecture/Fabric enabled).
  • Language: TypeScript v5.9 (using "Erasable Syntax" for Node compatibility).
  • Backend: Node.js v24.x LTS (Krypton) using native type-stripping.
  • Database: Amazon Aurora Serverless v2 (PostgreSQL) with Row Level Security (RLS).
  • Local Persistence: PowerSync + SQLite (Nitro-SQLite bridge) for local-first synchronization.

7.2 Core Integrations

  • FDA API: For NDC medication validation.
  • DrugBank Clinical API: For real-time Drug-Drug Interaction (DDI) warnings.
  • AWS KMS: For AES-256 encryption of PHI at rest.
  • Notifee: For advanced Android foreground service notification management.

8. Data Model

| Entity | Key Fields | Relationships | | :--- | :--- | :--- | | User | id, email, role, timezone, kms_key_id | 1:N with Medications | | Medication | id, user_id, rxcui, brand_name, stock_count | 1:N with DoseSchedules | | DoseSchedule | id, med_id, cron_expression, is_critical | 1:N with AdherenceLogs | | AdherenceLog | id, schedule_id, status (Taken/Skipped), timestamp | N:1 with DoseSchedule | | Relation | patient_id, caregiver_id, access_level | N:N via User |

9. API Specification (Sample)

  • POST /v1/sync/logs: Push local offline logs to PostgreSQL.
    • Payload: [{ logId: UUID, status: "taken", timestamp: ISO8601 }]
    • Security: Requires app.current_tenant_id session variable for RLS.
  • GET /v1/meds/lookup/{barcode}: Queries NDC API and returns JSON object.

10. UI/UX Requirements

  • Accessibility: Support for "Extra Large" system font sizes. Minimum touch target of 48x48dp.
  • Feedback Loops: Micro-animations (Lottie) when a user completes a dose to trigger a dopamine response.
  • Color Palette: High-contrast (AAA compliant). Critical alerts in #D32F2F (Medical Red).

11. Non-Functional Requirements

  • Security: HIPAA Compliance. No PHI in logs. TLS 1.3 for all traffic.
  • Availability: Alarms must fire 99.99% of the time, even without internet.
  • Latency: Local UI updates must be <16ms (60fps) using React 19 Compiler.

12. Out of Scope

  • Direct pharmacy prescription refills (Phase 2).
  • In-app video calls between patient and doctor.
  • Support for wearable pill dispensers (Phase 3).

13. Risks & Mitigations

  • Risk: Users ignore snoozes indefinitely.
    • Mitigation: Implementation of "Forced Caregiver Escalation" for critical meds.
  • Risk: Inaccurate Barcode Data.
    • Mitigation: Manual override and secondary search via drug name fuzzy-matching.

14. Implementation Tasks

Phase 1: Foundation & HIPAA Infrastructure

  • [ ] Provision AWS environment with HIPAA BAA via AWS Artifact.
  • [ ] Initialize React Native 0.83.x project with New Architecture enabled.
  • [ ] Set up PostgreSQL with Row Level Security (RLS) policies and pgAudit.
  • [ ] Configure Node.js v24.x LTS backend with native TypeScript execution.

Phase 2: Local-First Core & Med Entry

  • [ ] Implement Nitro-SQLite and PowerSync for bi-directional local/server sync.
  • [ ] Integrate Scanbot SDK for GS1 DataMatrix/NDC barcode scanning.
  • [ ] Build FDA NDC API integration service with 10-to-11 digit conversion logic.
  • [ ] Implement fuzzy-search for manual medication entry.

Phase 3: High-Priority Alarms & Snooze

  • [ ] Create Native Bridge for iOS AlarmKit to bypass Silent/Focus modes.
  • [ ] Implement Android AlarmManager with SCHEDULE_EXACT_ALARM permissions.
  • [ ] Develop "Smart Snooze" algorithm using MMKV for ultra-fast local state tracking.
  • [ ] Build the "Taken/Snooze/Skip" foreground notification UI using Notifee.

Phase 4: Caregiver & Reporting

  • [ ] Implement OAuth2 invitation flow for Caregiver-Patient linking.
  • [ ] Set up Twilio Lambda trigger for missed "Critical" dose SMS escalation.
  • [ ] Build Clinical Report generator using react-pdf/renderer.
  • [ ] Implement monthly email summary via SendGrid.

Phase 5: Security & QA

  • [ ] Perform penetration testing on RLS boundaries.
  • [ ] Conduct "Dead Battery/Reboot" testing to ensure alarms persist.
  • [ ] Finalize HIPAA compliance audit and technical documentation.
  • [ ] Beta release to group of 50 chronic care patients.