Skip to content
Jai Jhamb
All work
Healthcare · 2026 · University major project

Swastha

Healthcare and pharmacy platform focused on practical patient workflows.

React · Next.js · Node.js · Express · MongoDB · Gemini

01Problem

Patients, doctors and pharmacies in one platform: sign-in, health records, doctor chat, medicines ordered from pharmacy stock, and prescription scanning.

The aim was to keep a patient’s records, their doctors and their medicines in one flow — and to turn a photo of a prescription into medicine information a patient can use.

02My role

Full-stack developer, team of five

I worked across the full stack: the healthcare workflows, the backend and database, and the prescription-scanning integration.

03What I built

  1. Patient

    OTP sign-in

    Doctor

    Verified by an admin

    Pharmacy

    Its own portal

  2. Patient and doctor app

    React, served by the API

    Pharmacy portal

    Next.js · stock and orders

    REST

  3. Healthcare and pharmacy services

    Node.js · Express · records, chat, orders, checkout

  4. Prescription reading

    Gemini

    Database

    MongoDB · medicines, orders, records

The model reads the prescription. The medicine database decides what it says.
  • OTP sign-in for patients, and doctor registration verified by an admin.
  • Health records and doctor notes. A doctor who looks up a patient is linked to them, and only a linked doctor can chat with that patient.
  • Ordering across 1,215 Indian medicines, with generic and branded substitutes matched by salt.
  • A pharmacy portal: stock kept by batch, with expiry and the pharmacy’s own price, and incoming orders with their status.
  • The same medicine compared across pharmacies, by each pharmacy’s price.
  • Idempotent checkout, safe against double billing.
  • Prescription scanning from a photo.

04Engineering decisions

    • Option A

      Trust the OCR text

    • Option BChosen

      Match it against known data

    Trade-off
    Raw output is simpler. Matching adds a lookup step, but a misread medicine name can’t reach an order unchecked.
    Decision
    Prescription text from Gemini is fuzzy-matched against the medicine database, with a second pass and a fallback when no API key is set.
    Why
    AI proposes; known data decides.
    • Option A

      Trust the client to submit once

    • Option BChosen

      Make checkout idempotent

    Trade-off
    Trusting the client is simpler. Idempotency needs a key per checkout, but retries become safe.
    Decision
    Idempotent checkout.
    Why
    Retries and double taps must never double-bill.
    • Option A

      Password

    • Option BChosen

      One-time code

    Trade-off
    Passwords work offline from SMS. OTP depends on the phone, but there’s nothing to forget.
    Decision
    OTP login for patients.
    Why
    Patients sign in with their phone instead of remembering another password. For a healthcare app, the simplest sign-in was the right one.

05What I learned

Software that handles health information needs care. AI output should be checked against reliable data, not trusted blindly.