Badent.pl: Sub-Second AI Med-Triage on Cloudflare Edge with Instant Emergency SMS Dispatch
Architecting a deterministic, high-speed medical triage and reputation shield system at the network edge for a premier dental and aesthetic clinic.
[ 01. THE BUSINESS STAKE ]
The Commercial Challenge
In acute dental healthcare, speed-to-lead dictates clinical and business outcomes. A patient experiencing severe dental pain (acute pulpitis, dental abscess, fractured crown) contacts 20+ local clinics concurrently; the practice that responds within the first few minutes wins the patient. Standard web contact forms routing emails to reception inboxes introduced multi-hour latency, leading to lost patients. Conversely, naive SMS triggers are vulnerable to bots and spam, waking the on-call physician at night and incurring high telecom bills. Furthermore, Google Maps rating is the primary customer acquisition channel for dental clinics; a single unaddressed complaint can ruin an average score, while satisfied patients frequently forget to leave 5-star reviews.
[ 02. SYSTEM ARCHITECTURE ]
Data Flow & Infrastructure Blueprint
[ Patient Form on badent.pl (Webflow + Lumos CSS System) ]
│
├── (1. Direct POST with Honeypot & Client Validation)
▼
[ Cloudflare Global Edge Network (Workers Serverless Engine) ]
├── [ JEV Noul: Edge Anti-Spam & Injection Shield ] ──▶ (Bot Drop: HTTP 403)
│
├── [ JEV System One: TypeSafe AI Decision Model (~230ms) ]
│ ├── Department Routing: urgent_care / reception / billing
│ └── Medical Severity Scale: P1 (Acute Emergency) ... P4 (Routine)
│
├── [ Dynamic UI Feedback Response ] ────────────────▶ Gold Alert / Green Confirmation
│
└── [ SMSAPI.pl Polish GSM Gateway (normalize: 1) ] ──▶ SMS in < 3s to Dr. Banyś
│
▼ [Module B: Edge SQL & Reputation Shield]
[ Cloudflare D1 (SQLite) ] ──▶ 1-Click Reception Panel ──▶ Google Maps 5★ vs Silent Intercept [ 03. THE ENGINEERING HURDLE ]
Breaking Points & Architectural Solutions
1. Sub-Second Deterministic AI vs Slow Chatbot Lag: Traditional LLM conversational bots take 2–5 seconds to generate responses and hallucinate. For acute triage, this is dangerous and unacceptable. I deployed JEV System One (TypeSafe AI) running natively inside Cloudflare Workers, evaluating patient symptoms, routing to the correct department (urgent_care, reception, billing), and assigning urgency scores (P1–P4) in just ~230 milliseconds. 2. Edge Bot & Prompt-Injection Defense (JEV Noul): Unfiltered SMS triggers risk high carrier bills and false nighttime alerts for the on-call doctor. JEV Noul acts as a deterministic edge barrier, analyzing syntax and intent to reject spam, prompt injection, and bot submissions with immediate HTTP 403 responses before any SMS API call is triggered. 3. Telecom Optimization & GSM Normalization: SMSAPI.pl was connected with automated character normalization (normalize: 1), ensuring messages use standard GSM 7-bit encoding to fit within single 160-character payloads (0.17 PLN/SMS), avoiding expensive multi-part message splitting. 4. Enterprise Serverless Architecture without SaaS Bloat: Rather than stacking costly no-code tools (Zapier, Make) that introduce brittle webhooks and recurring monthly fees, the entire backend runs on Cloudflare Workers edge serverless infrastructure with 0 PLN/mo hosting costs.
[ 04. QUANTIFIED BUSINESS OUTCOMES ]
Measurable Impact
[ 05. TECHNOLOGIES & TOOLS ]
Book an Architecture Discovery Call
Direct review of your AI platform, design system, or edge infrastructure.