← Back to Selected Work
Case StudyProprietary details are hidden

Sehat Kahani

Pakistan's Leading Telemedicine & Digital Healthcare Platform

At a Glance Proof

Role:Full Stack Developer · Zetsol Technologies
Timeline:Dec 2023 to Jan 2026
Team Context:Clinical engineering pod: native mobile developers (Swift, Kotlin, Java), web engineers (Angular), backend engineers (Koa.js, Express.js), QA, and clinical liaisons
Current Status:Live in production
Outcome:

Built resilient, high-volume telemedicine pipelines serving thousands of daily consultations across rural clinics, urban mobile users, and major corporate healthcare partners with sub-60-second physician match times.

What I Owned:

Developed backend REST APIs in Koa.js and Express.js, clinical and admin portals in Angular, transactional medical schemas in MySQL, real-time consultation chat with SendBird SDK, and integrations for native mobile apps in Swift, Kotlin, and Java.

Tech Stack:

Angular clinical management portals · Koa.js & Express.js backend services · MySQL relational database · SendBird SDK for encrypted clinical chat · Native Java/Kotlin (Android) & Swift (iOS) mobile apps · WebRTC video

Section 01

Project Overview

Millions of citizens in Pakistan lack immediate access to quality healthcare due to geographic remoteness, severe physician shortages in rural areas, and congested tertiary hospitals. Sehat Kahani required a reliable telemedicine platform capable of connecting patients with licensed physicians 24/7 in under 60 seconds, even over low-bandwidth cellular connections.

Target Users: Patients seeking consultations, licensed general physicians and specialists, rural nurse intermediaries, hospital administrators, and corporate HR managers.

Key Constraints:
  • ▹Private health data (PHDS/HIPAA standards) had to stay protected at rest and in transit.
  • ▹Video consultations must maintain stability even on fluctuating 2G/3G mobile networks in semi-urban and rural areas.
  • ▹Third-party lab and pharmacy delivery API downtime must not block doctor consultations or delay medical care.
Explicitly Out of Scope:Direct hardware biosensor driver interfacing and health insurance underwriting adjudication.
Section 02

Platform Capabilities & Feature Architecture

Comprehensive architectural breakdown covering user-facing controls, background services, and automated workflows.

Instant Care01

24/7 Instant Tele-Consultations & Doctor Matching

Rapid video, voice, and text consultations connecting patients in under 60 seconds

  • ▹Rapid Physician Routing: Dynamic queuing matching incoming patient consultation requests with available licensed general physicians in under 60 seconds.
  • ▹40+ Specialist Clinics: Scheduled consultations across cardiology, gynecology, pediatrics, dermatology, oncology, psychiatry, and internal medicine.
  • ▹Multi-Modal Communication: Secure, low-bandwidth optimized WebRTC video streaming, crystal-clear audio calls, and encrypted in-consultation chat powered by SendBird SDK.
  • ▹Native Mobile Apps: Dedicated high-performance apps built in Swift for iOS and Java/Kotlin for Android, optimized for low-latency video and audio consultations.
Digital Records02

Encrypted Electronic Medical Records (EMR)

Centralized, compliant medical history vault for patients and practitioners

  • ▹Comprehensive Patient Timeline: Consolidated repository of previous consultations, chronic condition notes, vitals histories, and surgical records.
  • ▹Relational Clinical Storage: Structured, ACID-compliant patient histories, consultation sessions, and billing logs stored in MySQL with field-level encryption.
  • ▹Diagnostic Report Attachments: Secure upload and high-speed viewing of high-resolution radiology scans, blood tests, and ultrasound PDFs.
  • ▹Automated Compliance Audit Trails: Immutable logging of every record inspection, prescription generation, and modification for healthcare compliance.
Pharmacy & Labs03

E-Prescriptions & Asynchronous Fulfillment Rails

End-to-end digital prescription generation and home medicine delivery

  • ▹Standardized Drug Database: Doctor prescription builder featuring verified pharmaceutical brand names, dosages, frequencies, and duration intervals.
  • ▹Automated Pharmacy Dispatch: Webhook integration routing prescriptions directly to certified partner e-pharmacies for doorstep medicine delivery.
  • ▹At-Home Lab Sample Collection: Digital diagnostic test orders that automatically schedule certified phlebotomists to collect patient samples at home.
  • ▹Fulfillment Status Tracking: Real-time order tracking from prescription validation and pharmacy packing to courier delivery.
Rural Access04

Rural E-Clinics & Nurse Intermediary Portals

Bridging the urban-rural healthcare divide through nurse-assisted telemedicine hubs

  • ▹Nurse-Assisted Walk-In Flow: Dedicated tablet/desktop interface allowing trained community nurses to register walk-in patients in remote villages.
  • ▹Vitals Recording Station: Rapid capture of blood pressure, blood glucose, temperature, and pulse prior to initiating doctor video connection.
  • ▹Low-Bandwidth Video Optimization: Dynamic video stream scaling sustaining continuous clinical consultations even on erratic 2G/3G connections.
  • ▹Physical Prescription Printout: In-clinic printing of digitally signed prescriptions for patients without smartphones or digital literacy.
Corporate Care05

Corporate Wellness & Mental Health Portals

Enterprise health benefits, outpatient coverage, and psychological counseling

  • ▹B2B Enterprise Admin Dashboard: Real-time corporate health analytics, utilization metrics, and employee coverage verification.
  • ▹Dedicated Mental Health Services: Confidential online counseling and therapy sessions with certified psychologists and psychiatrists.
  • ▹Corporate OPD Wallet Deductions: Automated billing against corporate employee health allowances with zero out-of-pocket friction.
  • ▹Preventative Health Checkups: Scheduled annual screenings, corporate health risk assessments, and wellness webinars.
Section 03

Product Flow & System Context

One unified platform bridges patients, doctors, rural clinics, and fulfillment partners. Patient consultation requests from native mobile apps (Java, Kotlin, Swift) and web pass through Koa.js and Express.js API gateways into an atomic doctor claiming engine. Consultations execute via WebRTC video and SendBird chat channels, patient records store in MySQL, while prescription and lab fulfillment events queue into resilient asynchronous webhook workers.

Patients & Doctors [Java, Kotlin, Swift, Angular] ──(WebRTC / SendBird SDK / HTTPS)──> Koa.js & Express Gateway ──> MySQL [Transactional EMR & Consultations] ──> Async Webhook Workers ──> Partner E-Pharmacies & Diagnostic Labs
Stateless clinical services handle high-concurrency patient traffic while asynchronous queues protect doctor sessions from third-party vendor downtime.
Section 04

Tech Stack and Runtime Architecture

Native Mobile Applications

Hardware-accelerated mobile apps for patients and doctors featuring low-latency camera/microphone integration and push notifications.

Swift (iOS), Kotlin & Java (Android)

Clinical Management Web Portal

High-density clinical web dashboard for physician consultations, patient queue triage, and EMR review.

Angular, TypeScript

Clinical API & Consultation Gateway

Handles patient routing, doctor queue management, JWT authentication, and consultation lifecycles.

Koa.js, Express.js, Node.js

Encrypted Messaging Engine

HIPAA-ready encrypted messaging infrastructure powering clinical chats, doctor-patient file attachments, and consultation transcripts.

SendBird SDK

Relational Health Store (EMR)

Strict ACID-compliant relational storage for patient records, medical histories, prescription entries, diagnostic attachments, and immutable audit trails.

MySQL with Field-Level Encryption

Fulfillment Webhook Bus

Enqueues asynchronous dispatch to partner e-pharmacies and diagnostic sample collectors with retry backoff.

Node.js Workers, Redis Queue
Section 05

Critical Execution Flow

Appointment Booking to Prescription & Lab Fulfillment

How a patient books a session, connects securely with a doctor, and receives automated medicine delivery.

01

Patient Booking & Atomic Claim Guard

Patient requests a consultation via mobile or web; Koa.js/Express gateway creates a pending consultation record with an atomic database lock in MySQL to prevent concurrent double-booking.

02

Doctor Notification & Claim Lock

Available licensed physicians receive push alerts; the first doctor to claim acquires the atomic lock and assigns their scoped physician credentials.

03

Encrypted Video & SendBird Chat Session

Short-lived, cryptographically scoped session tokens are generated for WebRTC video and SendBird chat, granting room access strictly for the scheduled consultation window.

04

Digital Prescription & Asynchronous Dispatch

Doctor enters digital prescription and diagnostic test orders; system commits records to MySQL and enqueues asynchronous webhooks to fulfillment partners with automatic retries.

Section 06

Architectural Decisions & Trade-Offs

DecisionAlternatives ConsideredWhy ChosenCost / Risk AcceptedQuality Attribute
Koa.js and Express.js dual-microservice backend architectureMonolithic single-framework setup, Django or Ruby backendsKoa.js provides an ultra-lightweight, high-throughput asynchronous core for real-time consultation triage and doctor matching, while Express.js reliably orchestrates clinical administration, reporting, and webhook fulfillment.Required maintaining consistent middleware patterns and error handling standards across both services.Performance, Throughput & Maintainability
MySQL relational database for clinical records and EMR over NoSQLSchemaless document stores without relational constraintsPatient diagnoses, pharmacy orders, doctor billing, and clinical audit records necessitate strict ACID guarantees, normalized table foreign keys, and zero transactional anomalies.Required strict schema migration governance across releases.ACID Consistency, Compliance & Data Integrity
SendBird SDK for HIPAA-compliant encrypted in-consultation chatBuilding custom WebSocket chat server from scratchProvided production-grade encrypted messaging, file attachment upload security, typing indicators, and offline message caching with established compliance out of the box.Incurred third-party SDK subscription dependency and vendor API version maintenance.Security, Compliance & Fast Time to Market
Section 07

What We Delivered & Future Roadmap

What Shipped
  • ✓High-performance backend APIs powering thousands of remote clinical consultations daily.
  • ✓Instant physician matching connecting patients to certified doctors in under 60 seconds.
  • ✓Role-based clinical dashboards for doctors, hospital administrators, and diagnostic partners.
  • ✓Rural E-Clinic portal supporting nurse intermediaries and offline-tolerant vitals logging.
  • ✓Resilient asynchronous prescription and lab fulfillment integration pipeline.
What I Would Improve Next
  • →Distributed tracing across pharmacy and courier partner networks.
  • →Edge caching for static doctor profile and specialty directory data.
  • →AI-assisted clinical note summarization for faster doctor handover.
More Architectures

Explore Other Flagship Case Studies

Flagship Case Study

SentinelKids

Parent-Child Digital Safety & Device Management Platform

Delivered a resilient parent-child monitoring infrastructure processing high-frequency device telemetry with sub-200ms alert propagation, real-time web filtering, instant app blocking, and multi-device synchronization across zero-rollback releases.

Node.js & Express.js backend services Read Case Study →
Flagship Case Study

Neem

Embedded Financial Infrastructure & Banking-as-a-Service Platform

Delivered mission-critical embedded banking, collections, and bulk disbursement modules for a licensed financial infrastructure platform, facilitating seamless money movement, automated reconciliation, and earned wage access.

Next.js & React for dashboard UX Read Case Study →

Interested in how this project approach can help your product?

I can walk you through the stack choices, delivery process, and results.