Question Andrew Aiston · Mar 18, 2022

HL7 in general business rules

I'm trying to create a general business rule, not an HL7 message router. (This is because i want to return values from the rules and message routing rules don't appear to be able to return values.) But, I want the business rules to be able to look at HL7 messages; I've copied a simple when condition from an HL7 message router but the error log throws up <PROPERTY DOES NOT EXIST> ...... *HL7

I'm guessing that because it's a general business rule the 'HL7.' syntatic shortcuts aren't available. Is there a way to switch these shortcuts on in a general business rule? I've tried setting the context class to EnsLib.HL7.MsgRouter.RoutingEngine, no luck.

Thanks

Product version: Caché 2018.1

Comments

Jeffrey Drumm · Mar 19, 2022

If you need to both route and take other actions based on data extracted in an HL7 message flow, you'll be better off doing it using a Business Process/BPL than a routing rule.

0
Andrew Aiston  Mar 24, 2022 to Jeffrey Drumm

Thanks Jeffrey, these general business rules are to be used from a couple of BPLs, I already have the other actions and routing happening in these BPLs, it's just a case of getting the shared rules to inspect HL7

0
Shamus Clifford · Mar 21, 2022

Replace HL7.{propertypath} with Document.{propertypath}. For example,

Document.{MSH:9}

You will not have virtual property completion to refer to the segments/fields in an HL7 message, but you can continue to build your conditions in your HL7 message router and paste them in.

0
Andrew Aiston  Mar 24, 2022 to Shamus Clifford

Thanks Shamus, I have tried Document.{etc} and get the same error as for HL7.{etc} :

ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zevaluateRuleDefinition+26 ^ full name of rule class.1 *Document, etc etc

0
Andrew Aiston · Mar 24, 2022

my current workaround (which I'm somewhat uncomfortable with) requires an assign statement in those BPLs which reference the rules:

set context.HL7 = request

0