INTEGRATION

Charles Trinh — HL7 Interface Engine Architecture | Las Vegas, NV · Las Vegas, Nevada · Henderson · Clark County, Nevada · North Las Vegas, Nevada

Diagram of an HL7 v2 interface engine with multiple inbound channels, a mapping layer and two outbound acknowledgements
Charles Trinh — HL7 Interface Engine Architecture

An HL7 interface engine is where the estate's reliability is won or lost. I design for the queues nobody watches, the acknowledgements nobody reads and the mappings that drift on the customer's calendar.

The interface engine is not a router

An interface engine is often sold as a router between two systems, and implemented as one, and then breaks the first time a message needs to be held. A router forwards. An engine queues, retries, transforms, logs and reports. The distinction matters because the first design I audited, in a regional health network, was a router wearing the name of an engine. It could not hold messages overnight, and it lost every result when the analysis platform was restarted, and every result from the previous night evaporated. The cost was clinical: twelve hours of missing results nobody noticed, because no error channel existed.

I design from the queue outwards. Every channel has an inbound queue, a transformation stage, a routing table and an outbound queue. The inbound queue absorbs bursts from the upstream system; the outbound queue absorbs downtime at the downstream. Both have a durable store and a policy for what happens when the store fills. The fill policy is the customer's decision, written down before the build: drop oldest, drop newest or stop accepting.

The transformation stage is where the interface behaviour is specified. I keep the specification outside the engine where the customer can see it, in a mapping document that lists each segment and each field with the inbound expectation and the outbound value. The engine executes the mapping; the document is the contract. When the mapping changes, the document changes first and the engine follows. This ordering is the only thing that makes an unaudited change impossible to hide in a release.

Message flow design and the order that matters

HL7 v2 message flows are ordered in the customer's head and unordered on the wire. A ADT A01 registration followed by an A08 update followed by an A03 discharge is a story the customer expects to arrive in order. The engine has to preserve that order per patient, and only per patient. A global order will deadlock the channel the first time one downstream stalls. I partition by patient identifier, not by message type, because the downstream systems I have seen will happily process two patients in parallel and break if one patient's messages arrive out of sequence.

The partition key has to be stable. A patient's MRN is not stable across systems, and an ADT merge will reassign the identifier. I use a routing key that hashes the assigned identifier from the customer's master patient index, not the local identifier from each source. When the merge happens, the master index issues a new assigned identifier and the routing key changes with it. The old partition drains and the new one starts without a page. The engine needs to handle that change without stalling: the old key's partition drains, the new key's partition starts, and the on-call engineer sees one event log entry instead of a paged incident.

The second order trap is retry storms. An ADT channel that fails on one message and then retries at one per second will finish the retry in under a minute for one message and in an hour for the three thousand messages that built up behind it. I size the retry rate against the customer's SLA and against the downstream's capacity. The retry rate is a number in the configuration and in the runbook, not a default that nobody has looked at since the engine was installed.

End-to-end acknowledgements and the message nobody reads

Every HL7 v2 message expects an ACK or a NAK, and the engine reports the acknowledgement as a leaf of the message flow. The error I see most is that the engine's own acknowledgement is mistaken for the downstream system's acknowledgement. The engine answers AA to the upstream before it has delivered to the downstream, and the upstream system logs a success. The downstream system later fails the message. Nobody notices until the clinical user calls.

I rename the engine's acknowledgement in the documentation to an acceptance and the downstream's to the acknowledgement, and I configure the engine to hold the acceptance until the downstream response is received. The upstream system sees AA only after the downstream has confirmed. The customer's build is slower by the round trip, and the customer's clinical users stop getting phone calls from the analyst investigating messages that were "sent" and never arrived.

The acknowledgement has to be correlated on the message control ID, not on the message content. Some engine configurations match acknowledgements to messages by patient identifier, which works until two messages for the same patient are in flight at once, and the second acknowledgement is matched to the first message and reported as a duplicate. I set the correlation field explicitly in the engine configuration and confirm it with a test that sends two messages for the same patient back to back and checks the acknowledgement for each one. The test is cheap, and it has caught bad correlation in real deployments.

Error handling: the difference between an incident and an outage

An HL7 interface that fails on a field validation is an incident. An interface that fails on a field validation and retries every second for an hour is an outage. The engine has to distinguish. I use three error classes: transient, validation and fatal. Transient errors (a downstream timeout) retry immediately and then on a schedule. Validation errors (a required field with an unexpected cardinality) go to the dead-letter queue and alert the owner. Fatal errors (a downstream authentication failure) stop the channel and page the on-call engineer.

The dead-letter queue must be inspectable and reproducible. A message only the vendor's support can read is not inspectable. I require the engine to export the raw message and the field that failed into a queue the customer's analyst can read, with a re-submit path that preserves the original control ID. The analyst fixes the upstream system or corrects the mapping, then re-submits; the downstream sees the original message, not a regenerated one. This is the workflow that keeps interface incidents inside the customer's operations team instead of bouncing to the vendor.

The third piece is the monitor. A dead-letter queue depth alert that fires after a thousand messages is too late. I set the alert on a rate: three messages in fifteen minutes, or one message that fails the same field five times in a row. The rate alerts catch the systematic failure (a mapping change, an upstream schema change) before it produces a thousand dead letters. The single-field repeat catches the specific patient's data that needs a human.

Mapping maintenance and the customer's calendar

Mappings drift on the customer's calendar. New code sets arrive from the standards bodies, the customer's local codes change, and the downstream systems upgrade. The drift is not a bug; it is the environment. The question is whether the drift reaches production as a surprise or as a review. I write a quarterly mapping review into the interface contract and put the customer's operations owner on the calendar. The review walks every code set that appears in the mappings, checks current values against the last version and updates the mapping and the engine together.

The review is small: typically an hour for a mid-sized estate, and it prevents the quarterly drift from becoming a monthly incident. I have seen an estate where the customer skipped the review for a year, and the first symptom was a lab interface producing results under the wrong test name. The wrong test name had no correlation with a real change; the code set had gained a synonym. The engine had no reason to complain, because the mapping was still valid syntactically. The review would have caught it in fifteen minutes.

The mapping document's version history is the artefact the customer's quality team wants. I hand it over with the review template and a short guide. The review becomes part of the customer's internal audit evidence. I have used it in an ONC (g)(10) readiness assessment where the reviewer asked how the customer could demonstrate the interface mappings were current, and the review history answered the question in two minutes.

Choosing the engine and sizing the customer's budget

The engine choice is less interesting than the configuration, but it does matter. A commercial engine that the customer's operations team already runs has the advantage of familiarity and support. An open-source engine (Mirth Connect, or its maintained descendants) has the advantage of price, inspection and integration with the customer's existing tooling. I have built on both and I have no universal recommendation; the decision depends on the customer's team, the support model they can maintain and the number of interface engineers who already know the platform.

Sizing the budget is more predictable than it sounds. A typical mid-sized estate runs 20-60 channels on one or two engine instances. The engineering budget is the channel count times the per-channel effort, plus the shared infrastructure (the queue store, the logging, the monitoring) and the operating cost (review, upgrades, incident response). I quote the infrastructure and the review cost separately from the build cost; they do not go away after go-live, and the customer should see them as running costs. the interoperability programme for how the engine sits inside the estate's overall architecture.

The engine I would hand over at the end of an engagement is running, documented, monitored and reviewed. It has a queue policy agreed with the customer, an acceptance-and-acknowledgement design that the upstream systems can read, a dead-letter workflow the customer's analyst owns, a mapping review on the customer's calendar and a runbook the on-call engineer can follow. That is a working interface engine, and it is cheaper over three years than the router it replaces.

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 — hl7 interface engine architecture — the scope, the failure modes it prevents and how the work is measured. It sits in the Interoperability 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