Hi Scott, need another help.  I have code that check a value in HL7 msg and send NACK msg. the code works fine for IRIS For Health but not for HealthShare as %ErrorStatus property not available in HealthShare. Any guidance to fix in the code 

Error coming in compiling the below rules.

Class Hospital.HospitalProd.RoutingRule Extends Ens.Rule.Definition
Parameter RuleAssistClass = "EnsLib.MsgRouter.RuleAssist";
XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule]
<ruleDefinition alias="" context="EnsLib.MsgRouter.RoutingEngine" production="Hospital.HospitalProd">
<ruleSet name="" effectiveBegin="" effectiveEnd="">
<rule name="Valid 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>

Below class compiling on HealthShare

Class Hospital.DHARule Extends Ens.Rule.FunctionSet

ClassMethod GenerateNACK(text As %String, status As %Status) As %Status [ CodeMode = expression, Final ]


Error Msg

@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

Hi thanks actually we don’t want to create multiple instance but on the same instance we will be creating multiple edges where some external systems sending data will have dedicated single edge where some systems will be combined together into a single edge. Not much documentation or best practices available so I reached to this community. So the question is how to design when discussing with external systems that we should create separate edge (SysEdgeA) for System A but for System B & C we should create combined edge (CombinedEdge1).

then later system C comes how we decide CombinedEdge1 is sufficient so include system C in this edge or create another CombinedEdge2, then system D comes we link it to also with CombinedEdge2. Then system E comes we link it to CombinedEdge2, but System F we create again dedicated edge SysEdgeF

so what parameters we use to take these decisions , any help will be appreciated 

Thanks, it worked. Actually i am putting all rules from the specs doc, and generating custom NACK msgs, for example here i have rule, for newborn mother identifier value should not be empty, so 1) DOB is valid,  2) Age is less than 3 days , 3) Mother MRN not empty, then process else send NACK ("For NewBorn Encounters, PID.21 Mother Identifier should not be empty"). Similarly I  have like  30 + rules from specs doc, so adding one by one, learning and getting help from community.  These rules I will put in Edge router before message routes to multiple edges.