Question
· Mar 14, 2016

Referencing properties in the Header or Body of a message

We have to route messages in a Process Class by their source (using either the SourceConfigName from the Message Header or the Source in the Message Body.  

The inputs are standard HL7 messages from different Services but need to be routed on to different Processes depending on where they come from (not my design & I can't change it now) does any one have any suggestions how I could do this?

Thanks

Discussion (4)1
Log in or sign up to continue

i thought a routing engine was the harder case :-)

If you are in COS called from BPL then you can access the current BP as 'process' as long as either

a)you do not use the ProcedureBlock class keyword,

or

b) you put process in the public list for you method

then you can access properties of the process such as %PrimaryRequestHeader

ClassMethod MyMethod(vale As %String) As %String [ PublicList = process]

{

   ...

  set src=process.%PrimaryRequestHeader.SourceConfigName

   ...

}

If you are calling a COS funciton from a routing rule, you can get similar information form the variable 'context' which is a reference to an object of type EnsLib.HL7.MsgRouter.RoutingEngine