AI

Charles Trinh — Deploying LLMs in Healthcare | Las Vegas, NV · Las Vegas, Nevada · Henderson · Clark County, Nevada · North Las Vegas, Nevada

A data-flow diagram showing PHI, redaction, inference boundary and audit log
Charles Trinh — Deploying LLMs in Healthcare

Deploying a language model inside a healthcare organisation is a data-boundary question before it is a modelling question. Where PHI goes, what stays in your boundary and what an incident looks like are the design decisions.

Start with the data-flow diagram

The deployment of a model into a healthcare workflow begins with one question: for every token the model sees, what data does it contain, and where does it go. The answer is a data-flow diagram that names the model host, the network path, the storage on the model host, the retention the vendor applies and the encryption that covers each hop. If the diagram cannot be drawn, the deployment cannot be approved, no matter how accurate the model. I draw the diagram before I touch a prompt.

PHI usually enters the flow in places nobody plans for. The prompt template carries the patient's name because the model generates a document with it; error strings captured in logs include the prompt; the request trace includes the prompt; and the vendor's support console can see a subset of requests. The model sees the intended PHI, and the intended PHI leaks into every logging system in the path unless the pipeline treats logs as a PHI boundary of their own. That leak is where most of the failures I find come from.

Once the diagram exists, the redaction plan follows. For a given workflow I decide which fields the model actually needs, which it can infer, and which it cannot. De-identification is not always possible, and trying to force it into a workflow that needs named patients is the wrong ambition; the right ambition is that any PHI that must reach the model travels under a business associate agreement with a narrow scope and a log that proves where it went.

The business associate path

Under HIPAA, a model that receives PHI is a business associate unless the workflow is designed so that it receives none. The business associate agreement defines the scope, the security expectation, the breach notification window and the permitted uses. None of that is negotiable down, and a vendor that will not sign one will not be deployed for any workflow that touches PHI. That rule removes several tools from consideration for clinical use before any evaluation begins, and it is the first thing I check.

I check the same across every subprocessor the vendor names. A model vendor's underlying inference provider, its observability provider and its support tooling may each receive a copy of the request. The BAA should name them or the flow should exclude them. A vendor whose parent-platform BAA does not extend to its model router has a real problem, and the subprocessor list is the first document I ask for, often alongside the model's evaluation report.

My own AWS estate runs under an active business associate agreement, which is how I can host parts of a pipeline — vector stores, guardrail checks, logging with the appropriate retention — with the agreement in place before the first request. Where a workflow needs inference on data that cannot leave an organisation's boundary, self-hosted inference on infrastructure under the organisation's own BAA is the only path, and the trade-off is operational: you keep the model at a given quality and version and you run it yourself.

Self-hosted versus managed inference

Managed inference wins on operational simplicity and loses control of the version. A managed model can be retired and replaced on a schedule the vendor chooses, and the pinned model id is a preference rather than a guarantee. Where reproducibility matters it should be a contractual point and a written limitation. The plan needs an agreement on how version changes are announced, and a fallback model that has been evaluated and is ready before the pinned one retires.

Self-hosted inference wins on control and loses on operations. It needs GPU capacity, capacity planning, a model update process, a security posture for the inference host, and the engineering to keep it healthy. It also locks you to a particular model at a particular time. The advantage is that no data leaves the boundary and the version is what you deployed. The cost is that the version is also what you have to defend at the next review, when the finding is that the model is outdated by a year.

The decision rarely needs to be all or nothing. Some workflows can tolerate a managed inference call with PHI inside a BAA and some cannot; the decision is per workflow, not per department. A design can put high-sensitivity workflows on self-hosted models and lower-sensitivity ones on a managed model, with the sensitivity classification written down and a data-flow diagram per class.

Guardrails, evaluation and failure handling

Guardrails, the pattern checks on either side of the model call, are worth having but they are not the safety case: a pattern block misses the prompt that reaches the same intent another way. What does real work is a narrow purpose plus a structured output schema, a policy check on the output before it reaches a workflow, and a review point wherever the output matters. Each of those can be measured; a guard on its own cannot.

The prompt pipeline must be evaluable like code. I capture a reference set of inputs and expected outputs — including adversarial inputs, prompt injections in patient text, and routine inputs — and I run them on every prompt change and every model version change. The failure modes I look for are jailbreaks, PHI bleed into output that should not contain it, format drift, language drift and refusal behaviour. Refusals are faults, not safety, when the workflow depends on the output reaching a clinician.

Failure handling is a design field, not a code afterthought. What does the workflow do if the model call times out, returns malformed output, is blocked by a guard, or comes back empty? Each case should have an explicit rule: fall back, route to human, degrade gracefully or refuse. The fallback is not "try again," because retries on a busy provider produce a queue that makes the workflow worse. I write the rule into the workflow spec with an owner and a test.

Incident response for a language-model workflow

A language model incident is not a service outage. It can be output containing a patient's identity in a context where the workflow expected it gone, or a vendor support engineer pulling a request log without a BAA permitting it. For those incidents the response is deterministic: identify the requests affected, notify under the BAA, contain the data, record the finding. None of that works without request-level provenance in place before the incident.

The containment playbook for a language model workflow should look like the containment playbook for any other business associate: a named owner, a technical capacity to stop the workflow in minutes, a way to isolate the vendor, and a way to retrieve the list of affected requests. I test the playbook before go-live by simulating one incident type, retrieving the affected request list, and measuring how quickly the workflow can be stopped. That test usually surfaces gaps that the plan has written around, and it is the most valuable rehearsal the programme runs.

Where a workflow feeds a clinical or billing decision, the incident response also includes a clinical or business consequence. That part is not mine — a clinician, a coding leader or a compliance officer decides whether affected outputs need re-review — but the technical side must deliver the request list and the retrieval fast enough for them to decide. That is the deliverable that makes the rest possible.

Operational cost and honest capacity

Managed inference costs are hard to predict from a demo and often badly estimated. A production pipeline that provides context to the model, validates output, retries failures and runs a draft and a checker call can cost considerably more per request than the pilot suggested. I estimate token cost per workflow from a representative load test, and I model the monthly cost against the observed workflow volume rather than the peak. That exercise usually reshapes the design before production, typically by reducing context length and by adding caching of routine requests.

Self-hosted inference adds an operational budget that is not on the invoice. GPU hours over-provisioned, a second inference node for redundancy, a maintenance window that does not interfere with clinicians, and staff training for the inference host are all part of the number. I price the run-cost and say plainly what the self-hosted design saves in data governance and costs in operations. Some workflows justify the trade, and some do not.

My background is engineering, not clinical practice, so any workflow I deploy carries the clinical leadership's signature on its purpose and review design. The design here connects to healthcare-ai for the general programme and to ai-vendor-diligence for the vendor evidence required before a deployment. It also connects to risk-adjustment-ai, where the same underlying pipeline supports coding and documentation analytics.

What is handed over

The handover is the pipeline, the evaluation harness, the data-flow diagram, the BAA and subprocessor inventory, the failure-handling rules and the incident playbook. All of it runs in the organisation's own repository and uses the organisation's own infrastructure where possible. None of it depends on the vendor's dashboard or a service I operate. The model provider is a dependency, not the system, and the system can be moved between providers without the workflow being redesigned.

The organisation's own engineers should be able to run the harness and change the prompt without me. Where they cannot, the engagement has not delivered the harness properly, and that is my problem to fix rather than a design feature. A deployment that only I can operate is a dependency dressed as a service, and it is the failure mode I am trying to prevent.

Engagements run in phases: two weeks to design the data flow and evaluate the vendor's BAA position; four to six weeks to build the pipeline and the evaluation harness for one workflow; the remaining work is per-workflow rollout using the same harness. That shape keeps the first go-live small enough to review properly and sets the pattern for the workflows that follow without repeating the design work.

Proof

  • ONC (g)(10) self-test PASS, 317 of 317 subtests, April 2026 — public suite URL
  • 67 public hostnames, 51 serving, one AWS account
  • 104 clearinghouse enrolments across 53 jurisdictions
  • USCDI v7 proposal — Patient Digital Identity Credential — listed at isp.healthit.gov
  • SAM.gov UEI MVKQW9DKKGB8 · CAGE 20KM5 · NPI 1194645564
  • AWS Business Associate Addendum active since 18 August 2026

Where this work is delivered

Engagements run from Las Vegas and reach across the valley: clients in Las Vegas, NV; Las Vegas, Nevada; Henderson; Clark County, Nevada; and North Las Vegas, Nevada — plus remote delivery nationwide.

How an engagement runs

1. Trace one real case

Follow a single patient or claim end to end with a timestamp at every hop, before any document is written.

2. Written findings

A findings list naming the defect, the system, the owner and the date.

3. Monthly review

Review the list monthly and check whether the dates held.

Frequently asked

What is this service?

This page describes charles trinh — deploying llms in healthcare — the scope, the failure modes it prevents and how the work is measured. It sits in the Security and Compliance category at trinh.io.

Where is the work delivered?

Engagements run from Las Vegas, Nevada across the valley — Las Vegas, Henderson, North Las Vegas, Spring Valley, Paradise, Winchester, Sunrise Manor, Enterprise, Summerlin, Clark County — and remotely anywhere in the United States. On-site work in the Las Vegas valley, remote delivery elsewhere.

What does it cost?

Standard rate $195 per hour, committed $165 per hour at twenty hours or more per week for three months or more; $1,600 standard day, $1,350 committed day. Scoped in writing before work starts, fixed fee where the deliverable is defined.

Who is Charles Trinh?

A technology architect in Las Vegas, Nevada, working in healthcare identity, consent and interoperability. Not a physician, not a medical practice, and not affiliated with any other Charles Trinh.

How does an engagement start?

With one trace of a real case and a written findings list naming the defect, the system, the owner and the date. The first call is twenty minutes and free: 702-559-3489.

Engagement

Scoped in writing before work starts; fixed fee where the deliverable is defined. First call is 20 minutes and free. 702-559-3489 · charles@trinh.io

Talk to Charles

Record

Profile

Healthcare technology architect working where federal regulation becomes production infrastructure. Built and operates a FHIR R4 clinical platform — SMART App Launch authorization server, patient and provider portals, SQLite — on a hardened single-host AWS estate of 67 public hostnames. The platform returned a self-test PASS on the ONC (g)(10) Standardized API test suite in April 2026, 317 of 317 subtests, publicly verifiable. Designed a consent architecture in which a permissioned ledger records patient grant, refusal and revocation as immutable events while all clinical data stays off-chain and encrypted per patient — no PHI on the ledger by design. Filed a proposed USCDI v7 data element with ONC on verifiable patient identity. Translates the Federal Register, HHS/CMS guidance and HITRUST requirements into architecture, controls and audit evidence.

Selected engineering scale

  • Self-managed estate of 67 public hostnames, 51 serving, on one AWS account.
  • FHIR R4 API with a SMART App Launch authorization server; patient and provider portals; an AI service layer; Hyperledger Fabric peer, orderer and CA; IPFS; a 337-table SQLite clinical store.
  • Two permissioned distributed ledgers in production, one operating a consent registry that records grant, refusal and revocation with no PHI on chain.
  • X12 005010 pipelines across eight transaction sets.
  • Designed, built, deployed and operated end to end by one person.

Credentials and standards work

  • Inferno (g)(10) self-test PASS, 317 of 317 subtests, April 2026 — the ONC Standardized API test suite. Standards validated: US Core 6.1.0, USCDI v3, SMART App Launch 2.0.0, Bulk Data 2.0.0. Public suite URL.
  • USCDI v7 public comment submission, April 2026 — proposed Patient Digital Identity Credential under the Provenance data class, listed publicly on the ONC Interoperability Standards Platform.
  • SAM.gov UEI MVKQW9DKKGB8 · CAGE 20KM5 · NPI 1194645564. AWS Business Associate Addendum active 18 August 2026.

Technical environment

AWS us-east-1 (compute, storage, messaging, SMS, email, voice) · Linux and systemd hardening · nginx · Fabric and EVM ledgers · FHIR R4 · X12 005010 · HL7 · SQLite · self-hosted mail, drive, search and monitoring · Git-based change control and CI release gates.

TRINH — Charles Trinh, technology architect
TRINH

Charles Trinh

Fractional CTO/CIO and Technology Architect — Healthcare Data, Identity & Regulated Infrastructure · Las Vegas, NV

Las Vegas, Nevada · US citizen · Fractional and project engagements

(702) 559-3489 Email Charles Trinh