docs.intersystems.com
Ensemble HL7 Message Routing Tutorial
Routing Rule Sets
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Search:    

Click the ruleSet tab.

A Routing Rule Set contains a series of rules and/or actions. Individual rules can contain actions, but they must be embedded in when blocks. The actions inside a when block execute only if a message matches the rule's constraint and the when block's condition. A constraint specifies meta-data criteria for a message, including the HL7 schema and message structure for the HL7 data carried by the message and the source of the message (component that sent the message to the router). A condition usually specifies specific details about the message or its HL7 content.
The above Rule Set contains only a single rule. Its constraint is blank. This means that all incoming messages match the constraint. The rule contains a single when block. Its condition is set to 1, meaning always true (a condition can never be blank). All incoming messages thus match the condition as well as the constraint.
The when block contains two actions:
When a router receives a message, it begins executing its Rule Set. The router executes the rules and actions in the order (top to bottom) that they are listed in the Rule Editor. Execution stops when either a return action is executed or the last rule or action in the set executes.
An individual rule can contain multiple when blocks. A sequence of when blocks behaves like an if..elseif structure. Only the actions of the first when block with a condition matching the current message execute. A series of when blocks can end with an otherwise (analogous to an else structure). The actions of the otherwise block execute if the message fails to match the conditions of any of the preceding when blocks.
Note:
For more information about Routing Rule sets, read Defining Routing Rule Sets for HL7 in the Ensemble HL7 Version 2 Development Guide.


Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA