Flagship study · healthcare operations MVP

Referral, clinic check-in and patient records share one protected workflow.

A NestJS API connects doctor and secretary mobile flows, a patient portal and a network admin console for Egypt-focused referral operations.

Classification
Studio product build · multi-surface MVP
Our role
Full-stack architecture, security schema and mobile/web delivery
Surfaces
Doctor and secretary app · patient portal · admin console
Boundary
KMS key rotation and several external integrations remain Phase 2 work.

Evidence at a glance

Measured and documented scope.

38+

Screens across three portals

Stage 2 flagship case study §4.A

256-bit

AES encryption for patient National IDs

Stage 2 flagship case study §4.A, §4.D

O(1)

Deterministic blind-index lookup

Stage 2 flagship case study §4.A, §4.D

3 roles

Doctor · patient/secretary · admin

Stage 2 flagship case study §4.A

The MVP scope and screen count are from the Stage 2 case study. KMS-backed key rotation, live payment settlement, diagnostic lab APIs and push delivery remain Phase 2 boundaries.

The situation

From a broken hand-off to a bounded workflow.

Before

  • Referrals sent by handwritten notes or WhatsApp lost clinical context and visit attribution.
  • Clinics had no reliable way to confirm an in-person visit.
  • Encrypted National IDs could not be checked for duplicates with ordinary plaintext SQL lookup.

After

  • Doctors create referrals and patients receive a referral-linked discount code.
  • A geofenced secretary check-in changes referral state and records the commission ledger entry.
  • Encrypted IDs stay unreadable at rest while a blind index supports duplicate checks.

Executive snapshot

MedConnect Egypt: where the work sits today.

01

Operational problem

Referral workflows need tracked patient handoffs, clinic check-ins, and privacy-aware patient matching.

02

What we built

A single API and relational wallet ledger connect referral creation, clinic check-in, and administrative review.

03

Release boundary

A referral MVP with a NestJS monolithic API, React Native and web clients, encrypted national IDs, and geofenced clinic check-ins. Clinical deployment and the documented Phase 2 integrations are not claimed.

System architecture

One NestJS API coordinates three portals and a protected relational record.

Authentication and referral state pass through shared domain modules; patient identity fields remain encrypted in PostgreSQL.

100%
Doctor, patient and admin portals authenticate against one NestJS monolithic API. Referral and geofence logic uses a shared wallet ledger; patient identity is encrypted with AES-256 and indexed by a deterministic SHA-256 hash. PostgreSQL stores domain records and Redis holds session and check-in state.Doctor & secretary appReact Native / ExpoPatient portalMobile and webNetwork adminReact web consoleNestJS APIJWT · RBAC · referrals · walletPrivacy moduleAES-256 + SHA-256 blind indexPostgreSQL + RedisRecords · ledger · session state
Read the architecture in text

Doctor, patient and admin portals authenticate against one NestJS monolithic API. Referral and geofence logic uses a shared wallet ledger; patient identity is encrypted with AES-256 and indexed by a deterministic SHA-256 hash. PostgreSQL stores domain records and Redis holds session and check-in state.

  1. Doctor & secretary app: React Native / Expo
  2. Patient portal: Mobile and web
  3. Network admin: React web console
  4. NestJS API: JWT · RBAC · referrals · wallet
  5. Privacy module: AES-256 + SHA-256 blind index
  6. PostgreSQL + Redis: Records · ledger · session state

Decisions that matter later

Three choices tied to the operating outcome.

01

Encrypt identity while keeping duplicate checks practical

A database backup does not expose readable National IDs, and intake can still detect existing patients.

02

Require a geofenced check-in before referral credit

Remote claims cannot quietly trigger a clinic referral payout.

03

Keep related domains in one deployable API

A lean team can audit authentication, referrals and wallet accounting without premature distributed-system overhead.

Evidence record

What supports the published claims.

  • Privately verified

    The documented delivery is a multi-surface MVP, not a clinical production launch.

    Stage 2 flagship case study, section 4; honest release boundary.

A similar operational challenge?

Start with a scoped project review.

Choose an engagement and share the workflow, constraints and target timeline.

Discuss a project