Thanks for the suggestion, Jeffrey.

I did try this out before, but this causes the messages to get caught in a loop. That is because after the router receives the response (#7 below), it will send a response to a new target specified by the rule set (new target = boHL7FileOut). But because Response From has some value, the router will generate a local response after some time and then send that response to itself...going on and on.

From the Response From property documentation: 

"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."

Is there some other way to control when the router should generate a local response? 

Thanks for putting in all this work, Dmitriy! I've been using this plugin for a few months and enjoying it.

Posting question here about the UDL preview from XML exported classes. I'm not  sure I've been able to get this to work. My project has a legacy repo that only uses XML exports (current repos are using UDL format). I've pointed my working directory to the root  location of these XML export files. When I have the "automatic preview" setting enabled, I expected the plugin to translate the XML to a UDL form in the editor. Is this how it works? 

Also, would I be able to modify the UDL content or is this a read-only feature?

Thanks for the reply Sean!

I've thought about putting something together like this. Question on your approach though - I thought it wasn't entirely safe to loop over the "RawContent" property in EnsLib.HL7.Message because it doesn't always contain the entire HL7 V2 message. I was thinking of exploring the HL7 segment globals where the data is stored, but that might be getting too far in the weeds.

Thanks for the reply Sean!

I've thought about putting something together like this. Question on your approach though - I thought it wasn't entirely safe to loop over the "RawContent" property in EnsLib.HL7.Message because it doesn't always contain the entire HL7 V2 message. I was thinking of exploring the HL7 segment globals where the data is stored, but that might be getting to far in the weeds.

I'm not exactly sure how your transform is calling the base64 encoding function, but the Base64Encode method from the %System.Encryption class does this by default.

classmethod Base64Encode(Text As %String, Flags As %Integer = 0) as %String

Input parameter: 
Text - String to be encoded
Flags - 0 - Insert CR/LF after every 76 characters (Default)
Flags - 1 - Do not insert CR/LF after every 76 characters.

You would need to override the default flag to not insert line breaks.

Helpful post! 

Just wanted to clarify that if you attempt to access any OBX fields after OBX:5 downstream in some code (not necessarily in a DTL) you'll need to use the remainder of the GetFieldStreamRaw() method. GetValueAt() will not work in this case because of the large stream object in OBX:5.

 set tSC = tMessage.GetFieldStreamRaw(.tObx5Stream,"OBX:5",.tObxRemainder)
 set tObx11Value = $piece(tObxRemainder,"|",7)

Thanks for the quick response, Dave.

I'm basically messing around with collecting custom stats. I was trying to use the example in the "Writing Custom Code to Record Activity" section in my own code, but it seemed like StatsStarted() wasn't returning what I expected(essentially saying that stats collection has never been started). It was conflicting with what ReportItemsEnabledForStats() was showing.

I'll play around with this some more with your suggestions. Thanks again!

Hi Dave,

I have started playing around with Activity Volume Statistics and Monitoring and I think the capability is great. This could potentially remove a lot of custom stat capturing involved with my project.

I do have a couple questions though.  I'm a little confused on how these three class methods should be used from the Ens.Util.Statistics class (the documentation reads very similar for all three):

  • StatsStarted()
  • StatsActive()
  • InitStats()

I have enabled stats gathering for specific business hosts in a namespace and I can see that the ReportItemsEnabledForStats() class method returns an array indicating the hosts are enabled. However, all of the above class methods return a value of 0. 

I have read through the custom code  documentation on this and I'm wondering how the conditional example (using the StatsStarted() method) gets evaluated to True. I am basically trying to add a custom Site Dimension, but can only get one to show in the dashboard if I remove the conditional in the example.