Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Mighty Filter Introducing Filter Node Filtering config settings

Similar presentations


Presentation on theme: "The Mighty Filter Introducing Filter Node Filtering config settings"— Presentation transcript:

1 The Mighty Filter Introducing Filter Node Filtering config settings
Value-matching with Regular Expression How to - NOT / AND / OR filtering “Grouped” elements filtering

2 Introducing Filter Node
Selects HL7 messages if they meet the configured filtering rule. Input from the upstream Parent node, and output “filtered” messages to downstream Children nodes.

3 Filtering Config Settings
In “smartie.config”, specify the Filter node-type: I.e. <NodeType>HL7Filter<NodeType> Also specify the filtering-rule(s) parameter: E.g. <Parameter> <Name>filtering-rule</Name> <Value> MSH-6==HOSP_A </Value> </Parameter>

4 Filtering Value-matching Syntax
E.g. MSH-6 == HOSP_C Left-side is the “target-element address” E.g. “PID-3-1”, “OBX-5” Middle is the “operator” E.g. “==” tests matching; “!=” tests not-matching Right-side specifies the “value to match” More precisely, it’s the value pattern.

5 Value-matching Syntax (cont’d)
Pattern-matching syntax is Regular Expression. An Industry Standard for pattern-matching. Wildly used in the programming world. Extremely powerful. E.g. a pattern as “XYZ followed by up to 5 digits” Its syntax can be quirky. E.g. for the above example, it is “XYZ\d{1,5}”

6 Filtering-rule examples
Filter “Lab results” messages I.e. message-type is “R01” MSH-9-2==R01 Get messages from patients by certain suburbs E.g. ZIP code is “21221”, “21222”, or “21223” PID-11-5==21221|21222|21223 Filter messages by pattern in result values E.g. results containing the word ‘HIV’ OBX-5==.*HIV.*

7 Filtering-rule Examples (more)
Filtering messages in a certain month E.g. matching timestamp starts with “201802…” In Regular Expression, ^ means ‘start with’ MSH-7==^201802 Filtering messages by patient’s location E.g. ward name ending with “…ICU” In Regular Expression, $ means ‘end with’ PV1-11-5==ICU$ Google “Regular Expression” for more possible pattern expressions.

8 Logical Conditions in Filtering
E.g. How do we do … “Not matching ABC” “Matching pattern ABC or XYZ” “Matching pattern ABC and XYZ” … and combinations of the above

9 “NOT-matching” filtering
Use the “not matching” operator != E.g. MSH-6!=HOSP_A excludes messages from HOSP_A, but includes messages from all others.

10 Logical “OR” in filtering
First way, thru Regular Expression: E.g. MSH-6==HOSP_C | HOSP_A Second way: Add multiple filter rules in the config file E.g. <Parameter> <Name>filtering-rule</Name> <Value> MSH-6==HOSP_A </Value> </Parameter> <Parameter> <Value> MSH-6==HOSP_C </Value>

11 Logical “AND” filtering
It depends on the type of the “and” condition. For matching the value of the same data element: Use Regular Expression. E.g. OBX-5=^A.*B$  “value starts with A and ends with B ”. For matching the values of different data elements: First way: chain multiple Filter nodes. Second way, use “grouped” element-filtering, e.g. PID-8==M~PID-11-5==21221|  “male patient that has ZIP code or 21222” ORC-10-1==123-45~OBR-25==F  “orders placed by and result status are FINAL”

12 Grouped element-matching
HL7 message can have repeating “segment groups” e.g. there can be multiple OBX segments, each under a different ORC/OBR group. Smartie’s “grouped matching” provides a way to address an element in its segment-group “context”. E.g. in a filtering-rule, for addressing an OBX, you can add extra matching conditions for the “related” ORC/OBR segments. ( … and this is elegant and cool ;-)

13 Grouped element-matching details
Tilde (~) is used for separate each additional matching condition. E.g. OBR-4==081234~OBX-3-2==HIV-1 Each matching condition is qualified in the specified order, so the order is important. for the example above, the matching OBR is followed by an matching OBX. The OBX does not need to be immediately following the OBR, but there cannot be another OBR in-between.

14 Grouped-matching, more example
Filter these messages: orders placed by doctor XYZ, having final OBX of test-id ‘002’, with NTE contains the word “cancel”. ORC-12==XYZ~OBX-11==F~OBX-3-1==002~NTE-3==.*cancel.* PS. How would you do such filtering in your current Integration environment ?

15 The End


Download ppt "The Mighty Filter Introducing Filter Node Filtering config settings"

Similar presentations


Ads by Google