← Selected work

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.

RoleAI Architect / Lead Builder · EPIC TECHNOLOGY
ArchitectureSingle semantic owner · bounded evidence research · deterministic clinical authority
ValidationValidated/deployed protected-UAT baseline · clinician-feedback stabilization in progress

Reviewed against the latest active source state and current implementation boundary on . Baseline validation and the newer feedback-driven stabilization state are reported separately.

Protected UATa protected-UAT baseline was validated and deployed; later real clinician feedback superseded the previous doctor-ready snapshot
Current stabilizationfeedback-driven fixes are in progress; the resulting source still requires exact validation and deliberate UAT redeployment before becoming the next baseline
One ownerthe main clinical agent owns request, reference, source/tool choice and answer scope semantics
No production claimproduction and hospital-information-system integration remain outside the authorized boundary

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.

Interaction

Next.js · React · TypeScript

Clinician-facing UI, streaming interaction and document-oriented workflows stay separated from clinical intelligence and persistence concerns.

Application boundary

Python · FastAPI · AsyncIO · SSE/WebSockets

Typed API contracts, authenticated conversation state and bounded model/tool execution provide a controllable boundary around probabilistic behavior.

Clinical intelligence

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.

Evidence & retrieval

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.

Asynchronous workflows

Celery · RabbitMQ

Long-running ingestion and background workloads are isolated from the clinician request path with explicit retry and failure boundaries.

Delivery & verification

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.

Clinical intelligence composition

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.

Single semantic owner

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.

Clinical fact authority

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.

Evidence, publication and reliability

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

// one semantic owner per clinician turnclinician → main agent ↔ approved tools/evidence → guarded publication// bounded rounds, bounded research, bounded deadline
MODELlanguage · references · research planning · tool/source choice · answer scopeAPPLICATION / APPROVED DATApermissions · persistence · provenance · contracts · deterministic clinical facts

Architecture decisions

01

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.

02

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.

03

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.

04

PostgreSQL is canonical

Conversation turns, typed clinical observations, evidence references, source metadata, audit and owner/ACL state remain canonical durable truth.

05

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.

06

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

Protected clinician-UAT baselineValidated and deployed
Current clinician-feedback stabilizationIn progress · not merge/deploy eligible yet
Semantic ownershipMain agent owns request / reference / source / tool / scope
Clinical authorityDeterministic approved facts remain non-redecidable
Evidence statePostgreSQL canonical · vector search derived
Production / HIS authorizationNot authorized · not claimed

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.

Protected environment is not a public demo