Developer: DR.KESHARI

Hospital Node

hospitalnode.in · hnorder.in

India medical market · pharmacy · labs · care

Prescription medicines require valid Rx. Vaccines administered by licensed partners only.

PrivacyTermsConsentPaymentsLogisticsLicenses

Hospital Node

hospitalnode.in · hnorder.in

Phase 1Module 3Module 4Module 5LoginPortal

Platform Phase 3 MVP · Module 1

Module 1 — Authentication & Identity

Six layers: entry auth → OTP → provider onboarding → patient KYC stub → admin review → JWT session. Mapped from FastAPI spec to Supabase Auth on hospitalnode.in.

Layer 4 KYC is a STUB in spec — real Aadhaar/DigiLocker requires UIDAI/MeitY licensing before production.

Integration: 44% · /api/module1/status

Module 2 symptom checkerModule 3 pharmacyModule 4 paymentsModule 5 teleconsultCore Phase 1 (PP-01 ABHA)Blockchain commercePhase 3 extendPharmacy shopLive login

Schedule H gate composition (Module 1 + 3)

requires_prescription

Every Schedule H line has approved Rx covering quantity

Partial
requires_kyc

User completed KYC once per account (stub: last-4 + consent)

Gap
can_checkout

Both gates clear + stock OK + account active

Gap

Six layers

Layer 1 · entry-auth

Entry point — register / login / forgot password

Partial

Supabase Auth (email/password + phone OTP tab). DPDP consent via legal/consent-storage.

POST /auth/register · POST /auth/login · POST /auth/forgot-password · GET /auth/me

  • LiveLogin
  • LiveRegister
  • LiveForgot password
  • LiveReset password
Gaps (4)
  • No captcha after 3 failed logins (spec lockout pattern)
  • No 10-attempt account lock with 423 response
  • Role selection at register (patient/doctor/pharmacist) not aligned to spec UserRole enum
  • Indian phone regex / password-strength rules differ from FastAPI spec

Layer 2 · otp

OTP verification & resend

Partial

HospitalNodeAuthContext sendOtp/loginWithOtp — Supabase SMS provider dependent.

POST /auth/otp/verify · POST /auth/otp/resend · POST /auth/reset-password

  • PartialLogin OTP tab
  • PartialSupabase phone OTP
Gaps (4)
  • OTP purpose enum (registration/login/password_reset) not mirrored
  • No OTP lock after max attempts (spec otp_service)
  • SMS via MSG91/Gupshup not wired in hospitalnode (Supabase default)
  • Registration flow does not always end in otp_required before session

Layer 3 · onboarding

Provider credential upload (doctor / pharmacist)

Partial

vendor_kyc_submissions + magic-byte file upload pattern similar to spec; doctor MCI flow not separate.

POST /onboarding/credentials · GET /onboarding/credentials/status

  • PartialPharmacist / paramedic register
  • PartialVendor register
  • PartialVendor KYC upload
Gaps (4)
  • No POST /onboarding/credentials for doctor role
  • License PDF magic-byte validation not shared lib with spec
  • pending_approval / rejected resubmit states not on profiles
  • S3 private bucket for credential files — local/admin manual today

Layer 4 · kyc-gate

Patient KYC gate (Schedule H) — STUB in spec

Gap

place-catalog-order sets kycRequired from compliance; NO patient_kyc table or /api/kyc/* routes.

GET /kyc/status · POST /kyc/verify

  • PartialCart compliance (Rx flag)
  • PartialCheckout
  • LiveModule 1 status API
Gaps (4)
  • No GET/POST /api/kyc/status|verify for customers
  • No customer_kyc_records table (spec KYCRecord)
  • Cart can_checkout does not block on requires_kyc like Module 3 Layer 2
  • Real Aadhaar/DigiLocker — not started (legal licensing required)

Layer 5 · admin-review

Admin credential review queue

Partial

Vendor KYC queue for chemists — not doctor/pharmacist platform accounts.

GET /admin/credentials/pending · POST /admin/credentials/{id}/approve · POST /admin/credentials/{id}/reject · GET /admin/credentials/{id}/file

  • PartialAdmin partners KYC
  • PartialAdmin KYC approve API
Gaps (4)
  • No FIFO credential queue for doctor/pharmacist User accounts
  • reviewed_by audit from admin JWT name (spec Layer 6)
  • No NMC manual cross-check UI fields from spec
  • Account status flip pending_approval → active on approve not unified

Layer 6 · session-jwt

Session / JWT & per-request account_status

Partial

Supabase session cookies + getUser() in API routes; vendor/admin context helpers.

Bearer JWT on all protected routes · require_role(admin|doctor|pharmacist)

  • LiveAPI auth middleware
  • LiveVendor API context
  • PartialAdmin RBAC
Gaps (4)
  • No live account_status re-fetch on every request (approved while token valid)
  • Role guards differ from spec require_role() matrix
  • 15–30 min bearer expiry policy not documented in hospitalnode
  • Rejected doctors cannot resubmit via token without spec onboarding path

API map (spec → hospitalnode)

  • POST /auth/registerPartial

  • POST /auth/loginPartial

  • POST /auth/otp/verifyPartial

  • POST /onboarding/credentialsPartial

  • GET /kyc/statusGap

  • POST /kyc/verifyGap

  • GET /admin/credentials/pendingPartial

  • GET /cart + gatesPartial

Account status enum

  • pending_otp

    Awaiting Layer 2 OTP

    platformRoute:

  • pending_approval

    Doctor/pharmacist credentials submitted

    platformRoute:

  • active

    Full access

    platformRoute:

  • rejected

    Can resubmit credentials with valid token

    platformRoute:

  • locked

    10 failed logins

    platformRoute:

  • suspended

    Admin action

    platformRoute: