$export · NDJSON · async status
Charles Trinh — Bulk FHIR Export | Las Vegas, NV · Las Vegas, Nevada · Henderson · Clark County, Nevada · North Las Vegas, Nevada

Bulk FHIR export is how a payer or provider hands a population of records to another system without paginating through it one patient at a time. It is asynchronous by design, and the asynchrony is where the engineering lives.
What this is
The Bulk Data Access specification defines a kickoff request, a status poll, and a set of files delivered as NDJSON. The client asks for a group or a set of resource types, receives a job identifier, polls until the job completes, and then downloads one or more files. Each of those steps has failure modes that a synchronous API does not.
The first is scope. A bulk export of a large population produces files measured in gigabytes, and the client has to be able to stream them rather than load them. A client that reads the whole file into memory works in testing and fails in production, and the failure is a memory exhaustion rather than a clear error.
The second is resumption. A job that fails partway through has to be restartable without re-exporting everything. The specification allows for this through the status endpoint, and a client that treats a failed poll as a terminal error will re-run the whole export.
The third is authorisation. Bulk export is a population-level operation, and the authorisation model is correspondingly strict: a client is permitted to export a group it is entitled to, not an arbitrary set of patients. Getting that boundary wrong is a data breach rather than a bug.
The fourth is data volume and retention. Exported files are typically retained for a limited window, and a client that downloads lazily will find the files gone. The download has to complete within the window, and the window has to be known.
Finally, bulk export is the mechanism behind several regulatory requirements, including payer-to-payer exchange. Building it once, correctly, serves several obligations; building it per obligation produces several inconsistent implementations.
There is a server-side dimension that clients often ignore. The exporting system has to assemble the population, serialise it, store it and serve it, and each of those steps has a cost that scales with the population. A client that kicks off an export of the entire population every hour is a load problem for its own infrastructure, and the rate limits that prevent it are usually discovered after the first incident.
Incremental export changes the shape of the problem. Where the server supports it, a client can request only the resources changed since a previous export, which reduces volume dramatically and makes frequent synchronisation practical. Designing for incremental from the start is far cheaper than retrofitting it once the full export has become too slow.
Data quality is the third dimension. An NDJSON export is a stream of resources, and a stream can contain duplicates, references to resources that were not exported, and resources that fail validation. A client that assumes a clean stream will produce a downstream dataset with dangling references, and the failure surfaces much later in whatever consumes it.
Finally, bulk export is an audit surface. Every export is a population-level access to patient data, and the record of who exported what, when, and under which authorisation is exactly what an examiner asks for. Logging the kickoff, the completion and the download is not optional.
A further consideration is the relationship between bulk export and the patient access requirement. A patient-facing application rarely needs a population export; it needs one patient record, fetched synchronously. Bulk export serves the population-level obligations, such as payer-to-payer exchange and research, and conflating the two produces a patient application that is slow and a population process that is fragile. Choosing the right mechanism per obligation is the design decision that keeps both workable.
The final point is about scale testing. A bulk export that works on a thousand patients and fails on a million has not been tested, it has been sampled. Building a synthetic population large enough to exercise the streaming, the resumption and the storage limits is the only way to know the design holds, and it is the step most often skipped because it is the least visible.
How I do it
I start with the authorisation model: which clients may export which groups, and how that entitlement is expressed and enforced. That decision shapes everything downstream.
From there I build the client as a state machine: kickoff, poll, download, verify, complete. Each state is persisted, so a restart resumes rather than repeats, and each transition is logged with the job identifier.
Downloads are streamed and written to durable storage, with checksums verified against what the server reported. A partial download is detected and retried rather than silently accepted.
Testing uses a synthetic population large enough to exercise streaming and resumption, because those are the paths that fail at scale and pass in a sandbox.
Finally, I document the retention window and the operational runbook for a failed export, so the process is repeatable rather than dependent on the person who built it.
Where the server supports incremental export, the client uses it and tracks the cursor between runs, so routine synchronisation is small and frequent rather than large and rare.
Rate limits are respected explicitly, with a per-client concurrency cap and a backoff, so the export does not become a load problem for the exporting system.
The client validates the stream: duplicate detection, reference resolution against the exported set, and a report of resources that failed validation. A stream with dangling references is flagged rather than silently consumed.
Every export is logged with the client, the group, the resource types, the start and completion times and the authorisation used, so the audit question has an answer.
Where a patient-facing need exists, it is served by the synchronous API rather than by a filtered bulk export, because the latency and the authorisation model are different. The two mechanisms are kept separate in the architecture and in the documentation.
The handover includes the authorisation model, the state machine, the validation report and the runbook. Those four artefacts let an operator answer why an export failed and what to do about it without reconstructing the design from the code.
Retention is documented explicitly, with the window stated and the download scheduled to complete well inside it. A client that discovers the window by finding the files gone has learned the lesson at the worst possible moment.
Artifacts you keep
- An authorisation model naming which clients may export which groups
- A persisted export state machine that resumes rather than repeats
- Streamed downloads with checksum verification
- A synthetic population test exercising streaming and resumption
- A runbook covering retention windows and failed-export recovery
Proof
- ONC (g)(10) self-test PASS, 317 of 317 subtests, April 2026
- ONC (g)(10) self-test PASS, 317 of 317 subtests, April 2026 — public suite URL
- 104 clearinghouse enrolments across 53 jurisdictions
- 67 public hostnames, 51 serving, one AWS account
- SAM.gov UEI MVKQW9DKKGB8 · CAGE 20KM5 · NPI 1194645564
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
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
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
- Phone: 702-559-3489
- Email: charles@trinh.io
- Based in Las Vegas, Nevada · working remotely across the United States
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 — bulk fhir export — 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.
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.