nhathuy.dev
Download CV
BACK TO PROJECTS
Electronic Medical Record product screenshot

Electronic Medical Record

Multi-tenant clinic & hospital SaaS

Backend Developer2024 — 20265 engineers

0

clinics on one platform

0k+

patient records

0%

faster record retrieval

0.0%

uptime

A multi-tenant SaaS platform for clinic and hospital management covering patient registration, queue management, consultations, medical records, billing, and secure document storage — serving 12 clinics on shared infrastructure with strict tenant isolation.

  • Enforcing tenant isolation for sensitive medical data across every API and background job.
  • Medical record search slowing down as records grew past tens of thousands.
  • Handling large medical documents without bloating the transactional database.
  • Designed multi-tenant RBAC for doctors, nurses, clinic admins, and staff with tenant-scoped guards on every route and worker.
  • Redesigned PostgreSQL schemas, indexes, and query patterns for record search and retrieval paths.
  • Moved documents to MinIO object storage with signed access flows, keeping only metadata in PostgreSQL; RabbitMQ workers handle long-running tasks.
  • Record search and retrieval ~40% faster after schema and index redesign.
  • 12 clinics and 50k+ patient records with zero cross-tenant data incidents.
  • 99.9% uptime with blocking work moved off the request path.
  • NestJS
  • PostgreSQL
  • Redis
  • RabbitMQ
  • MinIO
  • RBAC
  • Docker
  • AWS
tenant-scoped queriesasync jobsdocumentsClinic Web AppNestJS API (RBAC)RabbitMQ WorkersPostgreSQL (multi-t…MinIO Object Storage
  1. 01

    Domain modeling

    Mapped clinic workflows, tenants, roles, and record lifecycles.

    2 weeks
  2. 02

    Backend development

    APIs, RBAC, storage integration, background workers.

    18 months
  3. 03

    Hardening

    Tenancy edge cases, performance passes, audit reviews.

    Continuous