A filter is a rule you define to conditionally allow or automatically stop certain asynchronous notifications from delivering to your destination(s) (i.e., notifications you receive). You should use filters to:
Reduce noise: Prevent irrelevant data from reaching your system.
Manage workflows: Only process notifications that meet specific criteria (e.g., only accept PatientAdmin messages for patients in the cardiology department).
There are two types of filters:
Send if: Conditionally allow certain notifications based on one or more defined rules.
Block all: Don’t allow any notifications for this subscription.
You can apply, or link, filters to subscriptions that rely on either Redox data models or Redox FHIR®.
Filters are one of many operations that can be applied during log processing. Learn about operations.
Prerequisites
All environment users can view filters. However, a user must be assigned to an engineer or a support role to create or edit filters. Learn about user roles.
Recommendation about PHI in filters
If you choose to filter fields with PHI, users assigned to an observer role might unintentionally access confidential data. Keep in mind that access to filter contents is managed by a different permission from the one managing access to log payloads.
Before creating a filter, identify the specific field path (JSON or FHIR®) you want to filter on.
To create a filter, select a subscription with async traffic (an event notification that goes one way).
To edit a promoted filter, first edit the staging version of the filter, then re-promote to production.
View filters
Follow these instructions to review all the filters in your environment at once.
Log in to the Redox dashboard.
From the navigation menu, click the Operations drop-down.
The Operations options expand. Click the Filters option.
Filters in the side nav
All existing filters in the environment display.
Editing options
You can’t edit filters on this page. However, you can click the Edit button to open its settings and edit within the Connections page.
If you’re viewing a promoted asset, though, you first have to edit in staging, then re-promote to production.
View filtered logs
On the Logs page of the dashboard, any filtered logs have the Filtered icon.
Filtered status
Selecting the log opens the processing stages, which have a Filtered label and icon if a filter was applied. You can select the processing stage to view the log details, then click the filter label to see the specific filter details. These details include the status of the log and the outcome of each filter rule.
For Block all rules, the filter details show that the message was blocked due to the defined filter rule.
"Block all" outcome
For Send if rules, the log details show an outcome for each rule.
If you have multiple Send if rules, the rules are evaluated in the order they’re defined. If a filter rule isn’t met, any subsequent rules aren’t evaluated.
"Send if" outcomes
Outcome
Notes
Satisfied
The criteria for this filter rule was met. The next filter rule was evaluated.
Unsatisfied
The criteria for the filter rule wasn’t met. Any subsequent filter rules weren’t evaluated.
Skipped
A previous filter rule was unsatisfied, so this rule wasn’t checked at all.
Create a filter
Follow the steps to view filters.
Click the New button.
The create form opens. Enter a human-friendly name for the filter. This name appears on the Filters page.
In the Type field, select either Block all or Send if. Follow the instructions for the relevant type.
Create a filter
Block all restricts any notifications for the given subscription. Only deleting the filter will allow notifications to resume. Blocking is helpful when preparing for a new integration that’s not quite ready for go-live.
From the Type drop-down, select the Block all option.
Click the Create button.
Create a block all filter rule
Your new filter is saved. To apply it to your traffic, follow the instructions for linking a filter.
These conditional filters are the most common, since they allow you to moderate the event notifications you receive from one of your connections.
From the Type drop-down, select the Send if option.
From the Data model drop-down, select the expected data model in the subscription you want to link the filter to.
Under the Rules section, click the Select field path drop-down to view a list of fields and select the field you want to filter on.
A modal opens to test the field path and value. You can change your selection by clicking the Field Path drop-down again to view a list of fields.
Array field paths
Some fields are arrays, meaning there might be multiple values at one field path. You can tell if a field path is an array if it has brackets ([]) in the title. In this case, if any value within the array meets the filter rule, then the filter applies.
Select a field path
(Optional) Once you have the correct path, use the validation tools to test your choice. Keep in mind that Redox doesn’t validate the filter like this. But it does give you an idea of whether you selected the right field path by using an existing log payload.
Copy and paste the log payload into the Test message section.
Paste a log payload to test the field values
On the right side of the modal, under Field values, the value that displays is the one found at the field path you selected.
Click the Select button on the bottom right of the modal.
The modal closes. In the second drop-down, select is in or is not in.
is in: The field path value must equal something in the defined value set. In other words, if the specified value(s) exist, the notification should be sent.
is not in: The field path value must not equal something in the defined value set. In other words, if these value(s) exist, the notification shouldn’t be sent.
Enter the relevant comma-separated values. You can also use null as a string value in the value set if you want to filter by whether the field path is populated.
Comma-delimited value sets
Trailing or leading spaces are ignored, unless you add them within quotation marks. If a value has a comma within it, you must use quotation marks to distinguish it from the other values. For example, you could specify an order code is in the value set 100,200,300. But if one of the codes is 10,000, you have to use quotation marks (e.g., 100,”10,000”,200,300).
Case-sensitive values
Pay attention to case when you enter the value set. Value matching is case-sensitive for both “is in” and “is not in.” For example, New won’t match new.
Create and save a filter
To add a rule for another field, click the Add rule button. Populate the fields for the new rule. Or click the delete icon to remove a rule.
Add or delete filter rules
Once you’ve finished defining all the necessary rules, click the Save button. Alternatively, you can click the Cancel button to discard the filter.
Remember that filters are for async event types. As an example, if you create a filter for the Redox Notes data model, the filter applies to the Notes.New, Notes.Replace, and Notes.Delete event types. But it doesn’t apply to Notes.Query. Learn the difference between async and sync event types.
However, if you want to receive only one event type, you can create a is in filter on the $.Meta.EventType field. For example, if you only want to receive Notes.New event types, set the field path to $.Meta.EventType and the value to New. This filter ensures you won’t receive Notes.Replace or Notes.Delete event types.
Differences for FHIR® field paths
If you’re creating a filter for a subscription that relies on Redox FHIR®, the instructions are the same with a couple of minor differences when selecting the FHIR® field path.
In the Select field path modal, you can click the Switch to Advanced Mode option to directly edit the field path or enter one that doesn’t appear in the drop-down list. We don’t recommend advanced editing for FHIR® beginners.
Switch to template mode for FHIR field paths
In advanced mode, you can click the JSONPath Expressions link to open help text definitions. Switch back to template mode anytime.
JSONPath expressions help option
When validating the FHIR® field path, you have the additional option to toggle between Field values and Output paths to test that you have both correct. The value tells you what value would be filtered, and the path tells you the location in the FHIR® payload.
Toggle between field values and output paths
Edit a filter
Follow the steps to view filters.
Find the filter you want to edit and click anywhere it in its row.
Under Filter details, click the Edit buttonat the top right.
For promoted filters, follow the instructions below these.
The edit form opens. Edit any details or defined rules, or add new ones.
When you’re finished, click the Save button.
In a production environment, select the promoted filter you want to edit.
Under the Filter details, click the Go to staging button.
Go to staging to edit
A confirmation modal appears to acknowledge that you’re switching environments. Click the Proceed button to continue.
The filter opens in the staging environment. Click the Edit button and make any changes.
Click the Save button.
Once changes are successfully made, re-promote the filter to keep the assets in sync across environments.
Previous filter rule settings
Any edits to a filter rule are immediately applied to live traffic. However, when looking at past filtered logs, you’ll still see the old filter rules that were in effect at the time of that log.
Link a filter
A filter can only be linked to one subscription. You have to create one for each subscription you want to filter.
Follow the steps to view filters.
Find the filter you want to edit and click anywhere it in its row.
The Details page opens. Fill out the fields under the Links section.
From the Connection drop-down, select the connection you want to link the filter to.
Click the Subscription drop-down. A modal opens with a list of the selected connection’s subscription(s). Click the radio button of the subscription you want, then click the Select button.
Click the Link button.
Link a filter
The filter automatically applies to the subscription’s traffic. For block all filters, all traffic for the selected subscription is restricted until the filter is removed.
A filter can only be linked to one subscription. You have to create one for each subscription you want to filter.
Also, a subscription can only have one filter link. This means there’s a 1:1 relationship between filters and subscriptions. Learn about subscriptions.
Example scope
Let’s say you have two subscriptions for receiving Order.New notifications from two different healthcare organizations.
The first subscription is with Baylor Hospital. You create a Send if filter with a rule that looks for certain order type(s).
The second subscription is with UT-Southwestern. You want only the same order types as from Baylor, but you can’t link the Baylor filter to UT-Southwestern. This subscription needs its own filter, even if you want the same rule applied.
However, you could add a rule to the Baylor filter if you only want to get orders from a specific facility within the health system. Then your filter would have two rules to conditionally allow new orders (of a specific type) from a specific facility.
Remember that both of your subscriptions now have linked filters. This means you can’t create or link a new Block all filter to either of them.
Follow the steps to view filters.
Find the filter with the link you want to manage and click anywhere it in its row.
The Details page opens. A filter can only be linked to one subscription. To add a new link, you have to delete the existing filter link.
To view an existing link in context, click the link to open related logs.
To delete an existing link, click the three-dots icon to the right of the subscription, then the Delete option. A modal opens to confirm that you want to proceed. Click the Delete button to continue or the Cancel button to discard the changes.
Delete a filter link
To add a new link, you must first delete an existing link. Then, follow the steps to link a filter.
Alternatively, you can see the filter link information on the Details page of the linked subscription. You can click the Manage button to navigate back to the Filters page to edit or remove the link.
Filter links on the subscription Details page
Promote, copy, or restore a filter
To make implementation or maintenance smoother, you might want to copy, promote, or restore a filter. These features save you manual rework when you want to use an existing asset as a base and either reuse or tweak from there. Learn how to copy, promote, or restore assets.
Platform API endpoints
This article describes how to manage filters in the Redox dashboard. To manage destinations via API, use these Redox Platform API endpoints instead:
FHIR® is a registered trademark of Health Level Seven International (HL7) and is used with the permission of HL7. Use of this trademark does not constitute an endorsement of products/services by HL7®.