INTEGRATION
Charles Trinh — Healthcare API Gateway Design | Las Vegas, NV · Las Vegas, Nevada · Henderson · Clark County, Nevada · North Las Vegas, Nevada

A healthcare API gateway is the place where your FHIR surface, your audit trail, your rate limits and your consent enforcement meet. I design the layer that decides who can read what, and prove it with an audit record for every call.
The gateway is a policy layer, not a proxy
A healthcare API gateway is frequently implemented as a reverse proxy with a rate limit in front of an FHIR server. That is a proxy. The gateway I design is a policy layer that decides, for every call, whether the caller may read the resource, what the caller may see of it, what must be recorded about the call and what the caller should be told if the answer is no. The FHIR server underneath implements the resources; the gateway implements the organisation's rules about who can see which patient.
The distinction matters because the FHIR server has limited knowledge of the organisation. It knows the resource and the token; it does not know that a particular analyst is on a specific clinical team, that the clinical team's consent has expired for one patient, or that the caller's IP range is not on the approved list for bulk access. The gateway is the only place those rules can be assembled before the call reaches the server.
I design the gateway around the answer request. Every call is evaluated in four stages: authentication, authorisation, consent and audit. A call that fails authentication is rejected. A call that fails authorisation is rejected with a 403. A call that passes both but fails consent either is rejected or has the response filtered, depending on the customer's policy. Every call that passes all four is audited. The audit happens before the response leaves the gateway, so the customer can prove the call was made even if the response was lost on the wire.
Authentication: the door and the token behind it
Authentication is OAuth 2.0 in the healthcare API world, with SMART on FHIR scopes for the resource-level permissions. The gateway is a resource server that validates the access token from the customer's authorisation server and extracts the scopes, the patient context and the subject. The validation is not just a signature check; the gateway must check the issuer, the audience and the scope, and the scope check is a copy of the mapping document that I insist the customer maintain alongside the authorisation server's configuration.
The most common authentication mistake in a healthcare gateway is trusting the scope without checking the patient context. A patient/Observation.read token bound to a patient the caller cannot see must be refused, and the refusal audited. The FHIR server will not refuse this on the gateway's behalf, because the server sees only the token and the resource ID. The gateway is the only layer that can compare the token's patient context to the requested resource's patient, and the comparison has to happen before the call reaches the server.
Client credential tokens are the second pattern, used for backend services and bulk access. They are broader by design, and the gateway must apply a different policy. Bulk access is scoped to a group of patients, and the group is defined in the customer's Group resource, not by the token. The gateway reads the group from the token, checks the caller is an approved service, and audits the group's size. That audit is the only record of who asked for a large export.
Consent: the filter that decides what is shown
Consent is where the healthcare gateway diverges from a generic API gateway. The customer's organisation has consent rules that are not the FHIR server's business: research consent, sensitive-category restrictions, parental consent for minors and consent withdrawal. The gateway implements the rules before the response reaches the caller. Two patterns are common: an outright refusal for some resources and a filtered response for others. The choice depends on the customer's policy, and the customer's privacy office makes it.
I implement consent as a policy decision point that the gateway calls for every call. The policy decision point reads the customer's consent registry and returns a decision that includes the filtered resources. The decision is cached for a short period, but the cache is invalidated when the consent registry changes. If the customer's portal writes to the registry and the registry writes to the cache, the latency is seconds. If the registry is a nightly batch, the latency is a day, and the customer's compliance team needs to know that.
The filtered response is the harder one because it can leak information through structure. A Bundle that returns zero results because consent was applied is indistinguishable from a Bundle that returns zero results because the patient has no data. The gateway logs the filtering decision and returns a correlation ID in the response header. The caller's support team sees the correlation ID, the customer's audit looks up the decision, and the patient is not told anything they do not already know.
Audit: the trail that proves the gateway worked
Every call passes through the audit stage, and the audit record is written before the response is returned. The record carries the timestamp, the caller's identity, the token's issuer, the scopes that were presented, the resource that was requested, the consent decision, the filter applied (if any) and the response status. The record is immutable; it goes to a write-once store or an append-only log that the customer's internal audit can query. The retention period is the customer's decision and is set by their compliance team.
The audit record is the difference between a gateway the customer can defend in an audit and one they cannot. In a HIPAA context, the audit log is part of the evidence of access controls, and in an ONC (g)(10) readiness assessment the audit trail is often the gap the assessor names first. I have seen a gateway with excellent policy enforcement score poorly because the audit record did not include the consent decision, so the auditor could not tell whether the policy had been applied or whether the data was simply empty.
The audit trail's query performance matters more than the write performance. The customer's compliance team wants to answer questions like "who accessed patient X's record in the last 30 days" in minutes. The write side is cheap; the query side needs an index on the patient identifier and the time. I design the audit store's query access for the compliance team from the start and run a benchmark during the build with a million records. A compliance query that takes hours is a compliance query that gets answered with "we could not find it".
Rate limits and the failure mode nobody tests
Rate limits in healthcare are usually applied to protect the gateway's backend, not to charge the caller. The typical configuration is a per-caller limit, a per-patient limit and a global limit. Each is set by the customer's operations team with the gateway's help. The limits are not a security control in themselves; they are a fairness and availability control. The security control is the authentication and authorisation stage.
The failure mode I see is a rate limit that trips during a legitimate bulk export or a nightly reconciliation. The FHIR $export operation runs a batch of long-lived calls in a short window and will exceed a per-caller limit configured for interactive use. I configure a separate rate class for bulk and export operations, with a limit sized for the customer's expected export volume, and a schedule that runs the export in the customer's maintenance window. The gateway must never throttle a customer reconciliation it mistook for a script.
The probe I use to prove the gateway works is a pair of calls: one inside the policy and one outside. The first returns 200 with the resource and an audit record. The second returns the expected 403 or the filtered response and an audit record. The probe runs in the non-production environment and is repeated in production after cutover. Without the pair, the build rarely shows the gateway's configuration is active. The customer's support team sees a passing health check and assumes the gateway is working; the pair proves it.
Choosing a gateway and what it costs to run
Gateway options range from a managed cloud API gateway (with the healthcare policies layered on top) to an open-source gateway (Kong, Envoy, or an API-management platform) to a healthcare-specific gateway from a vendor that bundles policy templates. A managed gateway costs more per call but removes the operations burden; the customer's compliance team may prefer it because the vendor's certifications cover part of the audit. An open-source gateway is cheaper and more flexible, but the customer's team runs it and the team's capacity is the constraint.
The cost of running a gateway is roughly the cost of the underlying platform plus the cost of the policy maintenance. Consent rules change; the customer's privacy office updates the registry and the policy decision point needs to reflect the change. I quote the policy maintenance separately from the platform cost; The patient identity and consent work is where the policy decision point's design gets detailed, and the patient access API work is where the gateway's external surface is specified.
The gateway I hand over has a documented policy (in a document the customer's compliance can read), a tested audit trail, a rate-limit class for each caller type and a pair of probes the customer runs every day. It has an owner on the customer's operations team and a runbook on the customer's on-call rotation. The gateway is a working part of the estate, not a reverse proxy with a name.
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 — healthcare api gateway design — 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
- Phone: 702-559-3489
- Email: charles@trinh.io
- Based in Las Vegas, Nevada · working remotely across the United States
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.