Partner FHIR access
When a provider accepts your vendor hub link and grants FHIR data, your software can ask for "this patient's results" by API. You always speak standard FHIR R4 to Velacent Bridge; Velacent Bridge answers from the provider's own system, whether that system is a FHIR server, answers HL7 v2 queries, or has a REST API that its vendor mapped to FHIR. Velacent Bridge does not keep a copy of what the provider's system answers: each answer is passed through to you.
Where
- On a provider's link:
https://<provider's API host>/v1/links/{link_id}/fhir - In the sandbox (synthetic patients, never billed):
https://<host>/sandbox/v1/fhir
Start with GET .../fhir/metadata. It is a FHIR CapabilityStatement that states exactly what this link can do: the resource types, interactions and search parameters that the provider's system answers and the provider granted you. Nothing else is advertised, so a request outside it is refused with an OperationOutcome that names the limitation.
Ask for data, get a token
In your link request (vendor console, Developers), name the FHIR data you read and, only if your product needs it, the data you write. Velacent Bridge records it as SMART scopes such as system/Observation.rs (read and search) or system/Observation.cu (create and update). The provider grants all, part or none of it; read only is the default.
Tokens come from the same OAuth 2.0 client credentials as the rest of the Data API. A token request may ask for scopes within the provider's grant (scope=system/Patient.rs system/Observation.rs); asking for more is invalid_scope. A token that asks for none follows whatever the provider currently grants. When the provider narrows its grant, your existing tokens lose the removed access within seconds.
Find a patient, then read its data
You never browse a provider's patient list. A patient is found by:
- an identifier you already hold, as
system|value:POST .../fhir/Patient/_searchwith the form bodyidentifier=urn:oid:1.2.3.4|MRN-001(use POST: a GET URL is kept in request logs along the way, andGET .../fhir/Patient?identifier=...is accepted only for clients that cannot POST), or - family, given and birthdate together (a full date) that match exactly one patient: more than one match is refused with
422(multiple-matches) and nothing is returned.
A provider may restrict lookups to identifiers only, or allow any patient search. Once your link has looked a patient up, you can read and search that patient's data for 24 hours (each lookup renews it):
GET .../fhir/Observation?patient={id}&category=laboratory&_count=50
POST .../fhir/Observation/_search (form body: patient={id}&code=http://loinc.org|2345-7)
GET .../fhir/Observation/{id} (If-None-Match: W/"3" answers 304 when unchanged)
Every clinical search names exactly one patient (or subject=Patient/{id}). Population-wide searches are not offered. A read of a resource that belongs to a patient your link has not looked up answers 404, exactly like a resource that does not exist.
Results are FHIR searchset Bundles. Follow the next link to page: it is valid for 10 minutes and only for your link, holds up to 100 resources a page, and a search can be continued for at most 50 pages. _include=Observation:patient is supported where /metadata states it.
On HL7 v2 query systems (for example an immunization registry), patient-specific searches use chained patient parameters: GET .../fhir/Immunization?patient.identifier=urn:oid:1.2.3.4|MRN-001, under the same lookup rules.
Write, where granted
POST .../fhir/{type} creates and PUT .../fhir/{type}/{id} updates, only on FHIR systems and only with a c or u scope the provider granted. The resource must reference a patient your link looked up; an update cannot create a resource. Because Velacent Bridge keeps no copy of answers, nothing can be replayed: a create that carries Idempotency-Key is refused (400, not-supported) rather than silently not applied. Use FHIR conditional create instead.
Retry a create safely (conditional create)
If a create fails or times out, the provider's system may still have stored it. Give the resource an identifier of your own (for example your order or accession number) and send it in If-None-Exist; then send exactly the same request again to retry:
POST .../fhir/Observation
Content-Type: application/fhir+json
If-None-Exist: identifier=https://your-app.example/accession|A-1001
{"resourceType": "Observation", "status": "final",
"subject": {"reference": "Patient/{id}"},
"identifier": [{"system": "https://your-app.example/accession", "value": "A-1001"}], ...}
201 Created: nothing carried that identifier; the resource was created.200 OKwith the resource: one resource of this patient already carries it (your earlier attempt went through); nothing new was created.412 Precondition Failed: more than one resource of this patient carries it; nothing was created. Search the patient's resources and sort out the duplicates.503withRetry-After: the provider's system did not answer. Wait forRetry-After, then send the same request again.
Rules:
- Only
identifier=system|valueis accepted (URL-encoded or not, with or without theObservation?prefix some clients add), and the resource must carry that identifier with the same system and value. Other criteria are refused with anOperationOutcome. - The check only looks at the patient the resource references, which your link must have looked up. Resources of other patients never affect the answer.
- Your link needs read and search on the type as well as create, because the answer can be the existing resource.
/metadatastatesconditionalCreatefor each type you can create.truewith "evaluated by the provider's server" means the provider's FHIR server checks and creates in one step.truewith "emulated by Velacent Bridge" means Velacent Bridge searches by the identifier first and creates only when nothing matches. That is not atomic: two creates with the same identifier sent at the same time can both create, and a retry sent while the provider's system is still working on the earlier request can miss it. Retry one request at a time, afterRetry-After.falsemeans the type cannot be created conditionally on this link (the provider's system does not search it by identifier, or your link lacks read and search on it).- Creating a
Patientthis way looks the identifier up first: it counts toward the 30 patient lookups a minute, and the patient found can then be used like any patient you looked up. - HL7 v2 query and REST-mapped systems take no writes, so
If-None-Existthere is refused (501). - The search Velacent Bridge runs for an emulated conditional create is one more call to the provider's system, counted like any other call.
Errors
- FHIR-level outcomes are
OperationOutcome(application/fhir+json):400(unsupported or invalid parameter),403(not granted, or a patient your link has not looked up),404,412(a conditional create matched more than one resource),422(more than one patient matches, or the provider's system refused),429(too many requests in flight on this link),501(the provider's system cannot do this; see/metadata),502(the provider's system answered something Velacent Bridge will not pass on, for example data of another patient),503withRetry-After(the provider's system is not answering). - Authentication, rate limits and other platform errors are
application/problem+json, as on the rest of the Data API.
FHIR client libraries
The facade is plain FHIR R4 (standard headers, searchset Bundles with next links, _search with a form body, conditional reads with ETag, conditional creates with If-None-Exist), so standard open-source FHIR clients that support a bearer token work with it, and the official TypeScript and Python SDKs add helpers for it (identifier lookup, paging, conditional create). Examples of such clients: HAPI FHIR's generic client (Java), the Firely .NET SDK, fhirclient (Python), fhir.js and fhir-kit-client (JavaScript). Velacent Bridge's conformance tests drive the facade the way these clients do (standard headers, _search POST, paging links, conditional reads, conditional creates, _include or a clear refusal); Velacent Bridge has not run these libraries themselves in its tests.
What the provider sees
The provider sees each request your link makes: when, which resource type and interaction, the outcome and how many resources were returned, never the content. Every request is recorded in the provider's audit trail before it reaches the provider's system.
Cost
Free for you. Each call Velacent Bridge makes to the provider's system counts as one message in and one out on the provider's subscription.
Something unclear or missing? Ask Help in the Velacent Bridge console; answers link to the right screen. How support works.