Documentation / Pipelines

Egress pipelines

Publish resources to a REST API or a folder when they change.

An egress pipeline is an Apache® NiFi™ flow that checks the raw vault every few seconds and sends every new or changed resource that matches its trigger. Choose Add Egress to create one.

The editor

The page for Add Egress (and Edit and Duplicate) shows the pipeline as a row of connected steps:

StepChoose
FlowWhat the pipeline does. Each flow is a tile with a short description. The flow of an existing pipeline cannot be changed.
Data sourceThe vault the pipeline is connected to (with its FHIR® version).
ServeOnly for the FHIR REST API facade: serve the raw vault, the MDM golden records or an anonymized vault. For an anonymized vault you also choose which one.
Integration serverThe Apache NiFi server that runs the flow, with its status. Servers are added in Pipelines > Settings.

Select a step to open its choices as tiles; picking one moves on to the next step. A step with nothing chosen yet has a dashed outline. Once the pipeline is deployed, its data source and server are locked until you remove it from the server. Below the steps are the name, the settings of the flow in groups, and Advanced: database connection, a section that is closed until you open it. It holds the database host, port, user and password that NiFi uses; leave them blank to connect the way the data source does. The JDBC driver is not asked here: it is set once for all pipelines in Pipelines > Settings > Database drivers.

FlowWhat it does
Publish to a REST APISends each resource as JSON. Always this URL uses POST or PUT; FHIR style uses PUT to <URL>/<Type>/<id>. Authentication: none, user name and password, or bearer token. Undeliverable resources go to a folder.
Publish to a folderWrites each resource as a JSON file in a folder on the NiFi server, overwriting or keeping versions.
Bulk push to a FHIR serverSends the current version of every matching resource, then every change, to a FHIR server as batch Bundles (one PUT per resource, so the ids are kept), several Bundles in parallel. Basic authentication. FHIR server type (Generic or Smile CDR) and, for Smile CDR, the optional Admin API port tell the Monitor page what it can read: see Monitor: FHIR servers.
TriggerPublishes when
Resources of one or more types changeAny resource of the chosen types is created or updated.
Resources of one type that match a search changeA resource of that type that matches the search parameters (FHIR syntax, for example gender=female&_lastUpdated=ge2026-01-01) is created or updated.

Check trigger validates the trigger and shows how many resources match now. Also send the resources that already exist controls whether the existing matching resources are sent on the first run; otherwise only changes after deployment are sent.

Careful

Deleted resources are not published. The search filter needs the FHIR REST functions in the raw vault and supports the search parameters of the data source plus _id and _lastUpdated. A resource that is committed late with an older load time can be missed.