Question
William Casey · Aug 16

Fetching Ens.MessageHeader properties starting from an EnsLib.HL7.Message in an Ens.BusinessProcess class

I have a handful of EnsLib.HL7.MessageRouter sending an HL7 message to a single Business Process (Ens.BusinessProcess).

In the OnRequest method, I am declaring pRequest as EnsLib.HL7.Message

What I need to do is determine which HL7 Router sent any given request to my BusinessProcess. 

To do this, I know that I need to fetch the SourceConfigName property from the Ens.MessageHeader of the Request, but I am not sure how (or if) I can fetch this data from within the OnRequest Method.

Does anyone have any pointers?

Bill Casey

Product version: HealthShare 2017.2
$ZV: 2017.2.1 (Build 801U)
00
2 0 2 75
Log in or sign up to continue

Your version is quite a bit older than the one I use but I can say this works for me. I'm not sure if it's technically supported in the sense that a future upgrade might break it but, like you, I needed this at the top of a process instead of having separate classes for each source config (ew) that were otherwise mostly identical.

..%Process.%PrimaryRequestHeader.SourceConfigName

So tread carefully if you use it.

EDIT: Found in our historical documentation that one of the methods I wrote for a Ens.Util.FunctionSet was also able to get to it this way and it was using a version around 2017.1 at the time:

Set SourceConfigName = %Ensemble("%Process").%PrimaryRequestHeader.SourceConfigName

Craig, thank you.  This is fantastic and works like an absolute charm!