%ErrorStatus property is working on IRIS For Health but not working for HealthShare, for HS what was old property?

Primary tabs

Getting routingrules compiling error message. same code works fine for IRIS For Health


Class Training.HL7Validation.RoutingRule Extends Ens.Rule.Definition
Parameter RuleAssistClass = "EnsLib.HL7.MsgRouter.RuleAssist";
XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule]
<ruleDefinition alias="" context="EnsLib.HL7.MsgRouter.RoutingEngine" production="Training.HL7Validation">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<rule name="Valid Sending Facility Code Required">
<when condition="Lookup(&quot;OnboardedFacilities&quot;,HL7.{MSH:SendingFacility.NamespaceID},&quot;No&quot;,&quot;No&quot;)!=&quot;Yes&quot;">
<assign property="%ErrorStatus" value="GenerateNACK(&quot;Invalid Sending Facility Code&quot;,%ErrorStatus)"></assign>
<rule name="">
<constraint name="source" value="HL7FileService"></constraint>
<when condition="1">
<send transform="" target="HL7FileOperation"></send>
} }

Compiling class Training.HL7Validation.RoutingRule
ERROR <Ens>ErrParsingExpression: Error parsing expression 'GenerateNACK("Invalid Sending Facility Code",%ErrorStatus)': ERROR <Ens>ErrInvalidName: Invalid name at offset 46
  > ERROR #5490: Error running generator for method 'evaluateRuleDefinition:Training.HL7Validation.RoutingRule'
ERROR: Ens.Rule.Definition.cls(evaluateRuleDefinition) of generated code compiling subclass 'Training.HL7Validation.RoutingRule'
    > ERROR #5030: An error occurred while compiling class 'Training.HL7Validation.RoutingRule'
Detected 1 errors during compilation in 0.056s.


@Jeffrey Drumm  any advice on this error,  the same code is working fine on IRIS for Health but on HealthShare giving error.

Class Training.HL7Validation.RoutingRule Extends Ens.Rule.Definition

If i change above statement with below, it compile in studio and error disappears but when i open rule editor  Ens.Rule.Definition comes back and the same error

Class Training.HL7Validation.RoutingRule Extends EnsLib.HL7.MsgRouter.RoutingEngine

I'm not finding any significant differences in the supporting classes between HS and I4H 2020.1. You might want to open an incident with the WRC to see why you're successful in I4H and not HS.

I'm also thinking that you might be better off developing your NACK logic in a BPL, though. Routing Rules aren't really designed for this sort of thing.

Hi thanks, with routing rules it was easy to enable/disable a validation rule by end users, also the onboarding systems are huge list so better to validate inbound feed before routing msg to the edges productions. 

Response from WRC is 2020 version was HS yet to be updated with parsing mechanism thats why its working for I4H but not on HS.

can you please give some link where i can study building validation & NACK logic in BPL ?