Solutions โ†’ HealthBridge
๐ŸŸข Platform Active

HealthBridge KSA
Digital Health Platform

Four integrated products โ€” NPHIES compliance, patient flow, CBAHI accreditation recovery, and specialty clinical forms โ€” all deployed at the Cloudflare edge.


Product A

๐Ÿ”— NPHIES Survival Bridge

Compliance middleware connecting legacy PMS to Saudi Arabia's national insurance exchange without replacing existing systems.

What It Does

Acts as a translation layer between your existing Practice Management System and NPHIES. Submit claims, check eligibility, and handle pre-authorizations โ€” all without touching legacy code.

  • FHIR R4 claim bundle construction from legacy HL7 v2 / flat-file formats
  • Real-time eligibility checks (Tameen) with KV-layer caching
  • Pre-authorization workflows (Masdar) with status polling
  • Claim rejection analysis with CCHI error code mapping
  • Audit log of every NPHIES transaction in D1 database
  • Retry queue via RabbitMQ for failed submissions
Node.js / TypeScript FHIR R4 PostgreSQL Redis CF KV Cache RabbitMQ
POST /api/nphies/claims
// Submit FHIR claim bundle
status: "queued"
claimId: "clm-uuid-..."
nphiesRef: "NPHIES-2024-..."
GET /api/nphies/eligibility/:id
// KV cache: 5min TTL
eligible: true
network: "Tawuniya"
cached: false
expiresAt: "2024-..."

Product B

๐Ÿฅ FlowClinic Express

Patient flow optimizer for high-volume expatriate polyclinics. Reduces wait times, eliminates paper queues, and improves NPS scores.

What It Does

A touch-screen kiosk system supporting Arabic/English (RTL/LTR) that handles patient registration, queue assignment, SMS notification, and doctor-call management โ€” all in real time.

  • Bilingual kiosk UI (Arabic RTL + English LTR) running in a browser
  • Real-time queue management via Socket.io WebSockets
  • SMS notifications (appointment reminders, "Doctor is ready") via Twilio
  • Specialty routing โ€” routes patients to correct clinic based on chief complaint
  • Staff dashboard with live patient flow metrics
  • Waiting time analytics stored in PostgreSQL
Node.js / TypeScript Socket.io PostgreSQL Redis / Bull Twilio SMS RTL/LTR UI
GET /api/queue/status
waiting: 12
serving: 3
avgWait: "14 min"
nextToken: "A-047"
WS /queue/updates
// Real-time push to kiosks &
// staff dashboards via Socket.io
event: "CALL_PATIENT"
token: "A-047"
room: "Room 3"

Product C

๐Ÿ“‹ CBAHI Remediation Suite

Accreditation recovery tools for hospitals with Denial or Conditional status. Track gaps, upload evidence, and measure survey readiness.

What It Does

Gives hospital quality teams a structured workspace to address CBAHI survey findings, upload compliance evidence to R2 cloud storage, and track progress toward Full Accreditation.

  • CBAHI findings database โ€” all standards tracked in D1 edge database
  • Gap scoring dashboard โ€” RAG status per standard domain
  • Evidence upload to R2 (policies, audits, incident reports)
  • Survey readiness score with predictive accreditation timeline
  • Corrective Action Plan (CAP) workflow with assignee tracking
  • Mock survey simulator based on CBAHI question banks
Node.js / TypeScript CF D1 Database CF R2 Storage PostgreSQL CBAHI Standards
GET /api/compliance/findings/fac-001
total: 47
resolved: 31
pending: 16
readinessScore: 66
status: "Conditional"
PUT /api/documents/fac-001/cbahi/doc-uuid
// Upload evidence to R2
stored: true
size: "247KB"
etag: "\"abc123\""

Product D

๐Ÿฆท Specialty Smart-Forms

NPHIES-compliant clinical modules for Dental, Dermatology, and Ophthalmology โ€” interactive visual forms with Arabic/English support.

What It Does

Replaces paper-based specialty documentation with interactive, NPHIES-ready digital forms. Each specialty gets visual input tools (tooth charts, body maps, eye grids) that generate compliant FHIR observations.

  • Dental: Interactive FDI tooth numbering chart with per-tooth conditions
  • Dermatology: Body map lesion placement with ABCDE criteria scoring
  • Ophthalmology: Visual acuity grids, IOP tracking, fundus annotation
  • All forms export to FHIR R4 Observation resources
  • RTL/LTR toggle for Arabic and English clinical staff
  • Photos and imaging stored in R2 with patient-linked metadata
Node.js / TypeScript FHIR R4 CF R2 Imaging PostgreSQL Sharp (image processing) RTL/LTR UI
GET /api/forms/dental/:patientId
// Returns FDI tooth chart data
teeth: { "11": { condition: "decay" }, ... }
POST /api/forms/ophthal/:patientId
// FHIR Observation output
resourceType: "Observation"
code: "363926002" // Visual acuity
valueQuantity: { value: 20, unit: "/40" }

Architecture

Edge-Native System Design

Cloudflare Workers handle edge routing, caching, and lightweight API logic. Backend services run on AWS Bahrain / Oracle Jeddah for KSA data residency.

Browser / Kiosk
โ†’
CF Worker: API Gateway
โ†’
KV: Sessions
โ†“
CF Worker: NPHIES Proxy
โ†’
KV: Cache
โ†’
NPHIES API
CF Worker: Doc Store
โ†’
R2: Documents
CF Worker: Compliance DB
โ†’
D1: SQLite DB
Node.js Backend (AWS Bahrain)
โ†’
PostgreSQL (KSA only)

API Gateway

Edge routing, JWT auth, rate limiting via KV

NPHIES Proxy

Eligibility cache ยท 5-min TTL ยท FHIR R4

Document Store

R2 object storage ยท CBAHI evidence files

Compliance DB

D1 SQLite ยท CBAHI findings ยท Audit log


Quick Start

Get Running in 5 Minutes

# 1. Clone and install
git clone https://github.com/Fadil369/Solutions.git && cd Solutions/workers
npm install
# 2. Configure Cloudflare resources
cp .dev.vars.example .dev.vars # Add CF_API_TOKEN, CF_ACCOUNT_ID
npm run cf:setup # Creates KV namespaces, D1, R2
# 3. Run workers locally
npm run dev:all # Starts all 4 workers on different ports
# 4. Deploy to Cloudflare
npm run deploy:all # Deploys all workers