Filter Host (FilterHostSetting)
FilterHostSetting is the reusable JSON object referenced by Filters GUID fields in receivers and activities.
It contains:
- a list of filter conditions (
Filters) - an optional pre-filter transformer chain (
Transformers)
This page describes the JSON contract and runtime behavior only.
What it does at runtime
Execution order:
- Run
Transformersin order (if present). - Evaluate
Filtersas a condition expression. - Mark the current activity/workflow as filtered when the condition expression evaluates to false.
Important non-obvious outcome:
- Filter conditions are treated as pass criteria.
- If criteria evaluate to false, the message/activity is filtered out.
JSON shape
Typical object shape:
{
"$type": "HL7Soup.Functions.Settings.Filters.FilterHostSetting, HL7SoupWorkflow",
"Id": "c27f2d6d-f8b5-4f0f-9fb2-7c3e0f66cb3b",
"Name": "Primary Filters",
"Filters": [
{
"$type": "HL7Soup.MessageFilters.StringMessageFilter, HL7SoupWorkflow",
"Path": "MSH-9.2",
"Comparer": 0,
"Value": "A01",
"Not": false,
"Conjunction": 0,
"FromSetting": "11111111-1111-1111-1111-111111111111",
"FromType": 8,
"FromDirection": 0
}
],
"Transformers": [],
"Version": 3
}
Top-level fields
| Field | Type | Required | Meaning |
|---|---|---|---|
Id |
GUID string | yes | Filter-setting identity referenced by other settings. |
Name |
string | recommended | Display name for the filter set. |
Filters |
array | recommended | Ordered condition/group list. |
Transformers |
array | optional | Transformer actions run before filter evaluation. |
Version |
integer | optional | Setting version metadata. |
Filters element types
Filters is a polymorphic array. Common types:
HL7Soup.MessageFilters.StringMessageFilter, HL7SoupWorkflowHL7Soup.MessageFilters.DateMessageFilter, HL7SoupWorkflowHL7Soup.MessageFilters.ValidMessageFilter, HL7SoupWorkflowHL7Soup.MessageFilters.FilterGroup, HL7SoupWorkflow
Shared fields across filter items
| Field | Meaning |
|---|---|
Path |
Source path/text expression to evaluate. |
Conjunction |
How this item combines with the next item (0=And, 1=Or). |
Not |
Inverts the comparison result when true. |
FromSetting |
Source activity/receiver GUID. |
FromDirection |
Source side (0=inbound, 1=outbound, 2=variable). |
FromType |
Source interpretation mode (TextWithVariables, HL7 path, XPath, CSV path, JSON path). |
Optional shared-to-target fields (used by comparers that require a second operand):
| Field | Meaning |
|---|---|
ToPath |
Second operand path/text expression. |
ToSetting |
Second operand source setting GUID. |
ToDirection |
Second operand source direction. |
ToType |
Second operand interpretation type. |
StringMessageFilter specific fields
| Field | Meaning |
|---|---|
Comparer |
String comparer enum value. |
Value |
Comparison value (or auxiliary comparer value). |
CaseSensitive |
Case-sensitive comparison toggle. |
IncludesRepeatFields |
Repeat-field handling hint for HL7 paths. |
StringMessageFilterComparers values:
0=Equals1=Contains2=StartsWith3=EndsWith4=LengthGreaterThan5=LengthLessThan6=Empty7=InMessage8=InDataTable9=IsTitleCase10=IsUpperCase11=IsLowerCase12=InList
DateMessageFilter specific fields
| Field | Meaning |
|---|---|
Comparer |
Date comparer enum value. |
Value |
Date comparison value (ISO-like date string). |
DateMessageFilterComparers values:
0=Equals1=GreaterThan2=LessThan3=GreaterThanOrEqualTo4=LessThanOrEqualTo5=Empty6=InMessage7=InvalidDate
ValidMessageFilter specific fields
| Field | Meaning |
|---|---|
Comparer |
Message validity comparer enum value. |
ValidMessageFilterComparers values:
0=Valid1=Invalid
FilterGroup
Group boundary marker used to structure multi-condition expressions with conjunction transitions.
Important authoring constraints:
- Do not place
FilterGroupas first or last item. - Do not place two
FilterGroupitems consecutively.
Transformers field
Transformers is the same transformer-action array contract used by TransformerSetting.
See Transformer Setting (TransformerSetting) for the full action schema.
Non-obvious outcomes
- Empty
Filterslist means no filtering (message passes). FilterGroupmisuse (first/last/double group) can create invalid or brittle filter behavior.InDataTablestring comparer requires correct target data-table binding; incorrect usage can error.- Filter transformers run before conditions and can modify variables/message data that conditions consume.
FromTypeandFromDirectionmust match the source kind; mismatches produce silent no-value comparisons or failed logic.
Minimal example
{
"$type": "HL7Soup.Functions.Settings.Filters.FilterHostSetting, HL7SoupWorkflow",
"Id": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"Name": "ADT A01 Only",
"Filters": [
{
"$type": "HL7Soup.MessageFilters.StringMessageFilter, HL7SoupWorkflow",
"Path": "MSH-9.2",
"Comparer": 0,
"Value": "A01",
"Conjunction": 0,
"Not": false,
"FromSetting": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb",
"FromType": 8,
"FromDirection": 0
}
],
"Transformers": []
}