Thank you Alex.

I just ran a HL7 Message with bad characters. But i do not see string "BAD" in the message which is sent to the HL7 Router.

I am looking for the Built map status, but it says nothing. But when i open the contents it gives an error.

If i can detect in some way that the sent message could not parse, then i can shutdown the service.

Hello Alex,

Sorry for late response.

I see this approach is very interesting. So in the router, i am checking if it is a bad message. If yes, then i shutdown the service. Right?

Sounds very applicable. I will try and see. Just a question. When the router receives the message, if it is bad, the rawcontent has "BAD" in it?


Jimmy Christian.

Hey Andy,

So reason i am using Comment Setting because ProcessMessage Setting is not coming up in the Settings section.

I am using the 

<ruleDefinition alias="" context="EnsLib.HL7.MsgRouter.RoutingEngine"...

Would be glad to have the ProcessMessage Settings  come up using the standard Rule definition class.


Jimmy Christian.

I have found another way around. Not perfect but can solve the problem i am having for the Settings valuesmiley

So i am thinking to use the Comment section of the Config Item. Then using the below function i can grab the value of it in my Standard Rule Class. Also i can change the value during downtime. Tested it and its working. If i dont find a way to create a CUSTOM Settings, i can use the "Comment" settings. !!

ClassMethod ShowComment(ConfigItem As %String) As %String
Set tSC=$$$OK Try{
     &sql(SELECT Comment INTO :tComment FROM Ens_Config.Item WHERE Name = :ConfigItem)
        If (SQLCODE = 0)
Set tSC=$$$OK   
  } Catch(ex){
Set tSC = ex.AsStatus()
$$$LOGERROR("Error in function ShowComment: "_tStatus)  }

Hey Andy,

So i tried to run this class method and was able to get some setting values. But problem is when i try to get the CATEGORY setting value , it is erroring out saying, there is no such setting as "Category".

Is there a way to grab the CATEGORY value setting via function?



Hey Craig,

Thanks for your response. Yes, that is a good alternate . I had initially thought about it but the only reason i am not planning to use a table is to avoid extra step to import this updated table in the prod environment. We cannot just make direct changes to the table because of some source control reasons also. So having a setting in the router which i can use just to flip it from 0 to 1 or vice versa would be very handy .

Thank you Craig.

My mistake. I think i did not explain correctly.

So i want a setting in my HL7 Router something like below. I included it in my rule definition, but the SETTING is not showing in the Router in the management portal. Once i can have the SETTINGS  available in my Router, i can access its value. Let me know.

Property RouteToDowntimeRouter As %Boolean;

Parameter SETTINGS = "RouteToDowntimeRouter";

Thank you Heloisa. The article you mentioned is very helpful. 

I am trying to add a PARAMETER settings to the rule definition as mentioned above. Is there a way without creating a CUSTOM Process.


Jimmy Christian

Thank you Andy.

I am but not able to add a PARAMETER "RouteToDowntimeRouter
to my standard RULE Definition class. Once set i want to access it when the message goes through. Is there a way to add it in standard definition as below?

Class XYZRules Extends Ens.Rule.Definition CompileAfter CUSTOM.Util.Rules.FunctionSet ]
{ Parameter RuleAssistClass = "EnsLib.HL7.MsgRouter.RuleAssist"; XData RuleDefinition [ XMLNamespace "]

Parameter SETTINGS = "RouteToDowntimeRouter";
Property  RouteToDowntimeRouter as %Boolean;

<ruleDefinition alias="" context="EnsLib.HL7.MsgRouter.RoutingEngine" production="HL7Production">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<rule name="Discard" disabled="false">
<when condition="ProcessMessage=0">