How kartik-h6/pmas works
PMAS is an offline-first, pharmacist-led medication adherence and counselling platform. Patients provide consent, manage medication plans, record dose adherence and symptoms, and receive reminders; the app calculates summaries and can export de-identified research data. Pharmacists enrol patients, assign plans, and monitor adherence through a portal, with the backend supporting authenticated patient, pharmacist, and admin workflows. The repository includes dedicated local-storage, adherence, multilingual, export, and sync modules. Backend excerpts are partial, and the portal implementation was not sampled, so its internal behavior is not expanded here.
Main entry points: app.js App Workflows · main.py API Workflows · export.js Patient and Research Export · index.html Patient App
Components 19
Patient PWA
- Patient App
patient-app/demo/index.html - App Workflows
patient-app/demo/js/app.js - Local Data
patient-app/demo/js/db.js - Adherence Metrics
patient-app/demo/js/adherence.js - Counselling Languages
patient-app/demo/js/i18n.js - Dose Reminders
patient-app/demo/js/reminders.js - Offline PWA
patient-app/demo/sw.js - API Sync
patient-app/demo/js/api.js
Backend Service
- API Workflows
backend/main.py - Authentication and Roles
backend/auth.py - API Contracts
backend/schemas.py - Dual-Vault Data
backend/database.py
Pharmacist Care
- Pharmacist Portal
pharmacist-portal/index.html
Research Outputs
- Patient and Research Export
patient-app/demo/js/export.js
Other components
- Patient
- Browser Notifications
- Pharmacist
- Administrator
- Researcher
Connections 21
- Patient → Patient App: uses
- Patient App → App Workflows: loads
- App Workflows → Local Data: reads and writes
- App Workflows → Adherence Metrics: calculates
- App Workflows → Dose Reminders: checks doses
- Dose Reminders → Local Data: reads plans
- Dose Reminders → Browser Notifications: dispatches
- App Workflows → Counselling Languages: renders strings
- Patient App → Offline PWA: registers
- App Workflows → Patient and Research Export: requests reports
- Patient and Research Export → Local Data: reads records
- Patient and Research Export → Adherence Metrics: gets summaries
- App Workflows → API Sync: requests sync
- API Sync → API Workflows: sends API requests
- Pharmacist → Pharmacist Portal: uses
- Pharmacist Portal → API Workflows: requests care workflows
- Administrator → API Workflows: manages accounts
- API Workflows → Authentication and Roles: checks identity and role
- API Workflows → API Contracts: validates payloads
- API Workflows → Dual-Vault Data: reads and writes
- Researcher → Patient and Research Export: receives export