PATIENT
Ask, book, manage
ถามข้อมูล จองนัด ดูนัด เลื่อน/ยกเลิก และขอเจ้าหน้าที่ผ่าน LINE OA หรือ Web Widget
LINE / WEBAI SOLUTION CASE STUDY · 2026
ClinicBot เชื่อม LINE, AI, การจองนัด, CRM และงานของเจ้าหน้าที่ให้ทำงานบนบริบทและสถานะเดียวกัน ตั้งแต่คำถามแรกจนถึงการติดตามผล
BUSINESS → AI → OPERATIONS
EXECUTIVE SUMMARY
ClinicBot มี 4 operating lanes ที่ทำงานร่วมกัน: ประสบการณ์ผู้ป่วย, AI/control plane, workspace ของทีมคลินิก และ automation หลังบ้าน
PATIENT
ถามข้อมูล จองนัด ดูนัด เลื่อน/ยกเลิก และขอเจ้าหน้าที่ผ่าน LINE OA หรือ Web Widget
LINE / WEBAI + CONTROL
ตรวจ request และ tenant ก่อนให้ Gemini ใช้ conversation context, Knowledge Base และ tools
FASTAPI / GEMINICLINIC TEAM
ดูบทสนทนา รับช่วง จัดการนัด คนไข้ บริการ สาขา แพทย์ และข้อมูล AI จาก Dashboard
NEXT.JS / WEBSOCKETAUTOMATION
Worker ส่ง reminder, mark no-show, รัน campaign และขอ feedback โดยไม่บล็อก API
REDIS / ARQProblem
Solution
AI
Automation
Outcome
LIVE TEST ACCESS
เริ่มบทสนทนาใน LINE แล้วเปิด Dashboard เพื่อดู workflow ฝั่งคลินิกด้วยบัญชีสำหรับทดสอบ

สแกน QR หรือเปิด LINE Official Account เพื่อทดลองสนทนาและ workflow การจอง
Open LINE OAcloud.care.admin@cloudcareclinic.comCloudcareadmin@2026For interview testing only · บัญชีนี้จัดเตรียมไว้สำหรับทดลองระบบ
THE PROBLEM
โจทย์ไม่ใช่แค่ให้บอทตอบได้ แต่คือการรักษา context และสถานะธุรกิจให้ต่อเนื่องตลอด patient journey
CURRENT PROCESS
OPERATIONAL RISK
GROWTH CHALLENGE
THE SOLUTION
ทุก layer มี responsibility และ control point ชัดเจน จาก interaction ไปถึง durable state และงานติดตามผล
Experience
LINE OA · Web Widget · Next.js Dashboardแยกประสบการณ์ผู้ป่วยออกจากพื้นที่ควบคุมงานของคลินิก แต่ใช้ข้อมูลชุดเดียวกัน
Control plane
FastAPI · JWT · Bot Routerตรวจ tenant, signature, role, plan limit และ route request ไปยัง workflow ที่ถูกต้อง
Intelligence
Google Gemini · Knowledge retrieval · Toolsสร้างคำตอบจากข้อมูลคลินิก ตีความ intent และเลือก tool โดยไม่เขียนข้อมูลธุรกิจโดยตรง
Clinic operations
Appointment · CRM · Handoff · Campaignจัดการสถานะธุรกิจที่ตรวจสอบได้ ตั้งแต่ slot จนถึง conversation lifecycle
Data & automation
PostgreSQL/pgvector · Redis · ARQเก็บข้อมูลแบบ tenant-scoped, retrieval context, realtime event และงานตามเวลา
OPERATIONAL SCOPE
สถานะ bot_active → handoff_pending → handoff_active → resolved ทำให้ ownership ชัดเจน
คำนวณ slot จากสาขา แพทย์ บริการ วันหยุด นัดเดิม และจำนวนรับสูงสุด
รวม profile, tags, notes, preferences, consent และ appointment timeline ใน tenant เดียว
เจ้าหน้าที่จัดการ FAQ ที่เปิด/ปิดได้ พร้อมรูปประกอบสำหรับคำตอบของ AI
รองรับ draft/scheduled broadcast, segment, delivery status และ feedback หลังรับบริการ
ควบคุม quota ตาม plan, subscription ของคลินิก และ audit action สำคัญ
AI SOLUTION ARCHITECTURE
มอง architecture ตาม responsibility ก่อน แล้วคลิก component เพื่อดู technology, input/output และ dependency ที่ยืนยันในเอกสาร
LINE → Webhook → Context/Retrieval → Gemini/Tools → LINE reply
Dashboard → FastAPI API → Domain Service → PostgreSQL → WebSocket update
Scheduler/Service → Redis → ARQ Worker → LINE / PostgreSQL
RUNTIME & SERVICE CATALOG
รวม service layer เดิมกับ runtime ที่ยืนยันในคู่มือใหม่; Future คือสิ่งที่ไม่ได้อยู่ใน runtime ปัจจุบันหรือยังเป็น stub
FastAPI Runtime
backend/app/main.pyNext.js Dashboard
dashboard/AI Service
ai_service.pyConversation Service
conversation_service.pyAppointment Service
appointment_service.pyBroadcast Service
broadcast_service.pyReview Service
review_service.pyLINE Service
line_service.pyChannel Adapter
channel_adapter.pyFlex Message
flex_message.pyBilling Service
billing_service.pyPlan Catalog
plan_catalog.pyPostgreSQL + pgvector
docker-compose.yml · database.pyRedis Runtime
docker-compose.yml · redis.pyARQ Worker
workers/reminder_worker.pyPatient Payment Flow
Not in current runtimeAudit Service
audit_service.pyNotification Service
notification_service.pyEND-TO-END FLOW
pipeline ตั้งแต่ tenant/signature verification, context, handoff gate, retrieval, tool execution ไปจนถึง durable log และ async follow-through
ground คำตอบด้วยข้อมูลคลินิกที่เปิดใช้งาน
BOOKING STATE FLOW
AI INTELLIGENCE LAYER
AI ไม่ได้เชื่อมฐานข้อมูลโดยตรง: retrieval จัดบริบท, Gemini ตัดสินใจ และ domain service เป็นเจ้าของการเปลี่ยนสถานะ
MODEL
GROUNDING
ACTION
MULTIMODAL
CONTROL
BOUNDARY
WHY THIS ARCHITECTURE
ทุก choice มีเหตุผล ทางเลือก และ trade-off ที่ต้องบริหาร
SECURITY & GOVERNANCE
Current controls แยกจาก Recommended controls เพื่อไม่ทำให้ maturity ของระบบถูกตีความเกินจริง
PERFORMANCE & COST
ระบบมี quota และราคาแผนจริง แต่เอกสารไม่มี production latency, token cost หรือ throughput จึงแยก control ที่มีอยู่จาก measurement ที่ควรเพิ่ม
IMPLEMENTED COMMERCIAL CONTROL
ตัวเลขจาก plan catalog ปัจจุบัน เป็น subscription ของคลินิก ไม่ใช่ค่ารักษาหรือ payment ของคนไข้
300 AI messages
30 appointments
2,000 AI messages
200 appointments
8,000 AI messages
1,000 appointments
25,000 AI messages
Unlimited appointments
AI message quota is enforced by tenant plan
Track tokens, latency and model cost per tenant/use case
Conversation context and retrieved KB are supplied to Gemini
Measure retrieval relevance and trim low-value history/context
ARQ separates scheduled work from webhook/API
Monitor queue depth, duration, retry count and failure rate
Redis is available for cache and Pub/Sub
Define cache ownership, TTL and safe invalidation for tenant data
BUSINESS IMPACT
ผลกระทบเชิงคุณภาพที่อนุมานได้ตรงจาก architecture และ workflow; ตัวเลขควรเติมเมื่อมี production baseline
BEFORE
FAQ และเวลาเปิดทำการต้องตอบซ้ำโดยเจ้าหน้าที่AFTER
AI ใช้ Knowledge Base ของคลินิกและส่งต่อเมื่อเกินขอบเขตBEFORE
ข้อมูลจองต้องประสานหลายจุดAFTER
booking flow ตรวจสาขา บริการ วัน เวลา และ slot ก่อนสร้างนัดBEFORE
ทีมต้องเฝ้าทุกบทสนทนาตลอดเวลาAFTER
บอทดูแล intent ที่รองรับ พร้อมคิว human handoff ที่มี ownership ชัดเจนBEFORE
งานเตือนและติดตามผลแข่งกับ request หลักAFTER
ARQ worker แยก reminder, no-show, campaign และ feedback ออกจาก APIBEFORE
การเปลี่ยนข้อมูลและ usage มองเห็นแยกส่วนAFTER
Dashboard รวม analytics, plan usage และ audit trail สำหรับแต่ละ tenantSCALABILITY
Current architecture มีจุดแยกที่เหมาะกับการ scale; กลยุทธ์ด้านล่างคือ proposed evolution ไม่ใช่สิ่งที่อ้างว่า implement แล้ว
FUTURE ROADMAP
Roadmap ให้ความสำคัญกับ measurement และ governance ก่อนขยาย AI footprint
NOW
NEXT
SCALE
EXPAND
FROM AI ENGINEER TO AI MANAGER
AI leadership คือการเชื่อม business, model behavior, architecture, people, risk, cost และ governance ให้ตัดสินใจร่วมกันได้
ออกแบบจาก patient journey และงานที่คลินิกต้องส่งมอบ ไม่ใช่เริ่มจาก model
จำกัด model ด้วย knowledge, tools, ownership state และขอบเขตที่ส่งต่อคน
แยก channel, orchestration, domain, data และ async work เพื่อเปลี่ยนได้ทีละส่วน
กำหนด responsibility ระหว่าง bot, front desk, owner, operator และ developer ให้ตรวจสอบได้
ใช้ plan quota เป็น control ปัจจุบัน แล้ววัด token, latency, queue และคุณภาพก่อน optimize
รักษา tenant isolation, credential protection, consent, audit และ roadmap hardening อย่างโปร่งใส
KEY TAKEAWAYS
THIS IS NOT JUST A CHATBOT.