A full view of how PatientPulse (provider backend) and PulseVault (patient mobile app) are designed, how they connect to India's Digital Health infrastructure, and how to extend the platform.
React + TypeScript + Vite
Kotlin + Jetpack Compose
React (patient-web)
React (insurer-portal)
React (provider-web)
FastAPI · Python · 452 endpoints
Express · Node.js · 88 endpoints
OTP · SSO · MFA · Google OAuth
OPD · IPD · Emergency · Triage
Forecasting · Lab AI · Scribe
Claims · Payments · GST
DPIA · Consent · Audit · DSR
Multi-schema · Audit chain · LISTEN/NOTIFY
Offline-first local persistence
S3 / GCS / Azure — health records
ABHA · PHR · HFR · HPR
HL7 · Bundles · Adapters
Claims Exchange
Payments · Subscriptions
SMS · WhatsApp · OTP
PatientPulse is a domain-chunked FastAPI monolith. Rather than microservices (which add ops overhead) or a single giant module (which becomes unmaintainable), it uses a chunked pattern — independent domain registries that register routes into one process.
Entry point · uvicorn · ASGI · middleware stack
Domain registry — each chunk registers its own routes
auth · care_flow · mobile_bff · enterprise_compat · bureau · ipd · billing…
Core clinical entities
Multi-org isolation
Audit chain · consent
Operational metrics
PulseVault is a multi-module Android application with a clean-architecture layering — feature modules sit on top of core modules. The Node.js backend acts as a BFF (Backend for Frontend) with a staged proxy migration path to PatientPulse canonical.
OTP login flow
Daily summary
Health records
AI health cards
Consent + sharing
Appointments
Repository pattern · sync orchestration
Retrofit · OkHttp · generated SDK
Room · offline-first entities
EncryptedSharedPreferences · JWT
Kotlin data classes · API contracts
→ Proxies to PatientPulse
→ Proxies to PatientPulse
→ FCM via proxy
archive-ready / write-disable / read-only
Mobile app or web portal calls POST /auth/patient/request-otp
PatientPulse calls Twilio (SMS or WhatsApp), rate-limited per phone/IP
POST /auth/patient/verify-otp returns JWT access token + HttpOnly refresh cookie
Access token used in Authorization header; refresh via POST /v1/auth/refresh
Consult note saved via POST /opd/consult-notes — triggers outbox event
PatientPulse assembles R4 Bundle (Patient + Conditions + Medications + Observations)
Feature 7B: AI generates patient summary, fetches available doctors for follow-up
Bundle auto-pushed to patient's ABHA-linked health locker via ABDM connector
Configurable mode: stub (dev) or live (prod). Handles ABHA linking, PHR push/pull, HFR sync, HPR sync.
Maps PatientPulse domain models → HL7 FHIR R4 resources. Supports Bundle, Patient, Condition, MedicationRequest, Observation.
National Health Claims Exchange integration. Submit claims, poll status, handle pre-auth flows via correlation IDs.
Ensemble: XGBoost + LightGBM + Prophet + SARIMAX. Predicts OPD/Emergency load 1–14 days ahead.
Interprets lab reports via LLM (OpenAI or local Ollama). Returns abnormal flags + recommendations.
Transcript → SOAP note generation. Reduces documentation burden for doctors.
Kill switch at GET /admin/ai/kill-switch. Review queue for AI outputs. No raw patient data in prompts by default.
Set AI_ENABLED=true, configure either OPENAI_API_KEY (cloud) or AI_LOCAL_MODEL_URL (Ollama for on-premise). AI_NO_RAW_PATIENT_DATA=true strips identifiers before LLM calls.
Docker container · Railway or Render · Auto-scale on load
Node.js Docker · Proxy mode to PatientPulse · Deprecation gate controls rollout
Managed PostgreSQL · Supabase or RDS · SSL required · Direct URL for migrations
Reverse proxy · TLS termination
Android push notifications
S3 / GCS / Azure for records
Metrics at /metrics endpoint