Home > Class Reference > ENSLIB namespace > EnsLib.HL7.MsgRouter.RoutingEngine


persistent class EnsLib.HL7.MsgRouter.RoutingEngine extends EnsLib.MsgRouter.VDocRoutingEngine

SQL Table Name: EnsLib_HL7_MsgRouter.RoutingEngine

Property Inventory

Method Inventory


parameter SETTINGS = LocalFacilityApplication,AckType,NackCode,AddNackERR;
Inherited description: List of properties can be set as settings in the configuration file format is a comma separated list of property names
parameter UseOriginalControlId = 1;
In Reply/ACK messages, use the ControlId of the message we are replying to, rather than constructing a new unique one


property AckType as %String (VALUELIST = ",Application,Commit") [ InitialExpression = "Application" ];
Determines the ACK type (e.g. AA vs. CA) if constructing an ACK or NACK reply message locally.

'A' is the default code.

Property methods: AckTypeDisplayToLogical(), AckTypeGet(), AckTypeGetStored(), AckTypeIsValid(), AckTypeLogicalToDisplay(), AckTypeLogicalToOdbc(), AckTypeNormalize(), AckTypeSet()
property AddNackERR as %Boolean;
Add ERR error code segment when generating NACK messages; otherwise do not embed internal error state information in NACK messages
Property methods: AddNackERRDisplayToLogical(), AddNackERRGet(), AddNackERRGetStored(), AddNackERRIsValid(), AddNackERRLogicalToDisplay(), AddNackERRNormalize(), AddNackERRSet()
property HL7 as EnsLib.HL7.Message [ Calculated , Transient , ReadOnly ];
we need this property for EvaluateRules to get access to the HL7 message
Property methods: HL7Get()
property LocalFacilityApplication as %String [ InitialExpression = "ISC:EnsembleHL7" ];
Colon-separated LocalFacility:LocalApplication codes representing this (receiving) facility and application.

This value is used as SendingFacility:SendApplication if constructing an ACK or NACK reply message locally.

Property methods: LocalFacilityApplicationDisplayToLogical(), LocalFacilityApplicationGet(), LocalFacilityApplicationGetStored(), LocalFacilityApplicationIsValid(), LocalFacilityApplicationLogicalToDisplay(), LocalFacilityApplicationLogicalToOdbc(), LocalFacilityApplicationNormalize(), LocalFacilityApplicationSet()
property NackCode as %String (VALUELIST = ",Error,Reject") [ InitialExpression = "Error" ];
Determines the NACK code type (e.g. AE vs. AR) if constructing a NACK reply message locally to report an error.

'E' is the default code.

Property methods: NackCodeDisplayToLogical(), NackCodeGet(), NackCodeGetStored(), NackCodeIsValid(), NackCodeLogicalToDisplay(), NackCodeLogicalToOdbc(), NackCodeNormalize(), NackCodeSet()
property ResponseFrom as %String (MAXLEN = 1000) [ Transient ];
Names the target(s) from which an ACK response should be forwarded back to the caller, if the caller requested a response. If this value is empty, no reply will be requested from any target and this router will generate an ACK response if needed.

Otherwise, this value is a comma-separated list of target config names. The response returned will be the first one that arrives back from any target in the list. A value of '*' will match any target, so the first response received will be the one returned.

If none of the listed targets gets called or the replying target does not return a document, this router will generate an ACK response if needed.

If the list of targets begins with a '+' character, the responses from all the targets called will be returned in a new HL7 batch document, or a new ACK response if no responses appear before the timeout expires.

If the list of targets begins with a '-' character, all error responses only from any of the targets called will be returned in a new HL7 batch document, or a new ACK response if no error responses appear before the timeout expires.

Property methods: ResponseFromDisplayToLogical(), ResponseFromGet(), ResponseFromIsValid(), ResponseFromLogicalToDisplay(), ResponseFromLogicalToOdbc(), ResponseFromNormalize(), ResponseFromSet()
property Validation as %String (MAXLEN = 20) [ InitialExpression = "dm-z" , Transient ];
String specifying types of Validation to perform

Set to 1 to block documents that don't pass default validation. Default validation requires a DocType, allows messages with unmapped Z-segments, and blocks messages with any other error encountered while mapping the document's sequence of segments using the HL7 schema structure specified by the document's DocType. This is equivalent to 'dm-z'.

(The '-z' means 'the opposite of z', i.e. do tolerate unrecognized trailing Z-segments, which is the customary HL7 behavior.)

'd' - require DocType
'm' - don't tolerate BuildMap segment mapping errors (includes 'z' by default; specify '-z' to tolerate unrecognized trailing Z-segments)
'z' - don't tolerate unrecognized trailing Z-segments
'n' - enforce segment structures
'r' - enforce required fields being present
'l' - enforce field size restrictions
'a' - enforce field array repetition limits
't' - enforce code tables
'b' - permit values not explicitly listed in a code table to pass validation when the code table uses "..." to indicate that any other values are also allowed.
'u' - ignore code tables that do not list any permissible values; permit any value in fields that use such a code table.
'y' - enforce data types
'p' - enforce component data structures
'j' - enforce optionality at the subcomponent level
'w' - enforce subcomponent size restrictions
's' - perform all available subcomponent-level validations. Equivalent to 'pjw'.
'g' - enforce field data structures
'o' - enforce optionality at the component level
'i' - enforce component size restrictions
'c' - perform all available component - level validations. Equivalent to 'gois'.
'f' - perform all validations available within an individual segment. Equivalent to 'nrlatbuyc'.
'e' - perform every available validation. Equivalent to 'dmf'.
'x' - stop validating when an error is encountered. This is the default behavior. Specify '-x' to scan the entire document and report all errors.

Property methods: ValidationDisplayToLogical(), ValidationGet(), ValidationIsValid(), ValidationLogicalToDisplay(), ValidationLogicalToOdbc(), ValidationNormalize(), ValidationSet()


method HL7Get() as EnsLib.HL7.Message
method IsErrorResponse(request As EnsLib.HL7.Message, response As EnsLib.HL7.Message) as %Boolean
method OnConstructReply(Output pReplyDoc As EnsLib.HL7.Message, pOriginalDoc As EnsLib.HL7.Message, ByRef pSC As %Status) as %Status
Override this method to construct a customized reply document. Inputs are the original document and the status code that the framework produced in processing the original document. If you change the status code but do not construct a reply document, the framework will use the new value to construct a standard reply document.
method OnPrepareReply(request As EnsLib.HL7.Message, ByRef response As EnsLib.HL7.Message)
method OnValidate(pDoc As EnsLib.HL7.Message, pValSpec As %String, Output pStatus As %Status = $$$OK) as %Boolean
Override this method to implement your own method for validating a Document. Return non-zero to prevent default validation of the message; return an error code in pStatus to indicate a validation failure.
method constructReply(pOriginalDoc As EnsLib.EDI.Document, pSC As %Status, pHeaderId As %String = "") as EnsLib.EDI.Document

Inherited Members

Inherited Properties