Case Study 01 · EPIC TECHNOLOGY · Clinical AI · 2026
Ho Chi Minh City Traditional Medicine Hospital
Clinical AI & Decision-Support Platform
Under my Head of Artificial Intelligence role at EPIC TECHNOLOGY, I architected and built a clinician-facing AI chatbot and clinical decision-support platform for Ho Chi Minh City Traditional Medicine Hospital ↗. The system gives one main clinical agent semantic ownership of the clinician turn while keeping clinical facts, evidence, permissions, persistence, provenance and publication safety under deterministic application control.
Reviewed against the latest active source state and current implementation boundary on . Baseline validation and the newer feedback-driven stabilization state are reported separately.
Interactive architecture map
Semantic freedom inside a deliberately narrow authority boundary.
The public map uses capability-level names instead of internal branches, release labels, hosts or operator identifiers. Focused views isolate the clinician turn, evidence-research path and deterministic clinical-authority path.
Technology & system decisions
The stack follows authority boundaries, not a framework checklist.
Each technology has a narrow job: clinician interaction, semantic reasoning, durable evidence, derived retrieval, asynchronous work, or deployability. The architecture deliberately avoids making the LLM, vector index, or orchestration framework the system of record.
Next.js · React · TypeScript
Clinician-facing UI, streaming interaction and document-oriented workflows stay separated from clinical intelligence and persistence concerns.
Python · FastAPI · AsyncIO · SSE/WebSockets
Typed API contracts, authenticated conversation state and bounded model/tool execution provide a controllable boundary around probabilistic behavior.
LLMs · owned tool loop · deterministic clinical services
The model owns language and source/tool choice; approved clinical facts, permissions and publication rules remain application-owned rather than model-redecidable.
PostgreSQL · vector/hybrid search · Qdrant
PostgreSQL is canonical for turns, observations, evidence identity and audit. Vector search is derived and rebuildable, so retrieval cannot silently become a competing memory store.
Celery · RabbitMQ
Long-running ingestion and background workloads are isolated from the clinician request path with explicit retry and failure boundaries.
Docker · Linux · Nginx · Playwright
Portable on-prem-oriented deployment, reverse-proxy boundaries and browser-level verification support a protected hospital environment without coupling the design to one cloud runtime.
Problem
A hospital assistant cannot let fluent prose become clinical truth.
A useful clinician assistant must understand natural Vietnamese follow-ups, prescriptions, tables and documents while remembering exactly what was observed, which approved source or clinical service owns each fact, what evidence remains valid across turns, and what happens when evidence is missing or inconsistent.
The difficult architecture problem is therefore not “add an LLM to a medical UI.” It is deciding where probabilistic semantic reasoning is valuable and where it must stop.
My ownership
One clinician-intelligence path on top of a proven hospital application shell.
Consolidated model-visible context, research, exact-handle observation recall, executable tools, model-round budgets, deadline policy and answer publication into one owned composition boundary rather than spreading semantic decisions across multiple framework layers.
The main agent resolves clinician intent, references, source needs, tool choice and answer scope itself, avoiding multiple semantic components that can disagree about the same turn.
Interaction findings, prescription findings, approved entity mappings, severity/rating fields and approved knowledge identity remain deterministic. The agent may decide when to call a clinical tool and how to explain the result, but it cannot invert or override approved facts.
Made durable evidence state canonical in PostgreSQL, kept vector search derived and rebuildable, bounded approved-corpus research, treated retrieved content as data rather than instructions, and retained conditional exact-support verification plus deterministic guards before publication.
Runtime contract
Architecture decisions
One semantic owner
The main agent owns the semantic turn. A separate intent classifier/router does not constrain the main decision, reducing control-loop disagreement.
Owned composition boundary
The clinical intelligence layer owns context projection, research execution, recall contracts, executable tools, model budget and publication behavior; shared application code stays focused on transport, auth, persistence and mature bounded kernels.
No ceremonial graph
A graph abstraction is used only when it owns meaningful state transitions. The active clinician path favors a simpler bounded application kernel instead of framework ceremony.
PostgreSQL is canonical
Conversation turns, typed clinical observations, evidence references, source metadata, audit and owner/ACL state remain canonical durable truth.
Search is derived
Vector/hybrid retrieval accelerates approved-corpus research but cannot become competing clinical memory. Published evidence is rebound to canonical authorized source identity.
Evidence is data
Retrieved documents and tool payloads can inform the model but never act as instructions that override the system’s tool, permission, clinical-authority or publication contracts.
Evidence Workspace
Chat history is linguistic context; persisted observations are the clinical notebook.
The system projects typed prior observations and exact evidence into the next clinician turn. Follow-up resolution stays generic and owner/conversation scoped rather than adding a phrase-specific function for every Vietnamese wording pattern.
This lets the model understand “cái thuốc lúc nãy” or a narrow follow-up semantically while the system still knows which persisted observation and source handle can actually support the answer.
Bounded evidence research
Search enough to answer; stop before research becomes an uncontrolled agent.
For knowledge-grounded questions, the main turn can delegate a bounded research objective over the approved local corpus. The research path plans a small set of semantic queries, retrieves in parallel, deduplicates and curates evidence, assesses sufficiency, and permits at most one targeted refinement before returning a compact evidence pack.
The clinician runtime does not browse arbitrary live websites. This makes provenance, latency, source governance and reproducibility explicit rather than mixing them with open-ended web exploration.
Answer publication
Verification supports the main decision; it does not become another semantic brain.
Main answer owns scope
Narrow questions stay narrow and bounded lists stay bounded in the original main-agent response rather than being reclassified by a second semantic controller.
Deterministic fast path
Pure clinical-tool or compute-supported answers can pass deterministic grounding/application guards without an unnecessary extra model round.
Source-grounded verification
Corpus/document/mixed prose can receive a bounded exact-support check before publication where evidence semantics actually require it.
Durable answer record
Published output retains citations, source identity and durable state; the assistant’s prose is not itself the system of record.
Validation state · reviewed 2026-09-05
Validation and deployment evidence from the previous protected-UAT baseline is intentionally not transferred to the newer clinician-feedback stabilization source. The exact resulting source must pass its required gate before it is treated as the next UAT baseline.
Public disclosure boundary
Show architecture and evidence, never hospital internals.
The portfolio omits patient data, private corpus contents, credentials, internal hosts, exact deployment identifiers, transient source revisions and operator-only runbooks. A future public demo should use synthetic prescriptions, sanitized knowledge and isolated credentials rather than exposing the protected hospital environment.