#Business Rules

4 Followers · 128 Posts

Business rules are the part of InterSystems Ensemble production solution which allow nontechnical users to change the behavior of Ensemble business processes at specific decision points.

Question Scott Roth · Jan 19, 2024

Ran into an issue this morning, that I am having a hard time trying to track down what might have caused the issue. We have a Business Rule that sends HL7 ADT to a Business Process that inserts the data into a MS SQL Server using a Custom Business Operation (SQL Outbound Adapter).

Early yesterday morning the Custom Business Operation reset its connection through the Java Gateway Server to the MS SQL Database, when it reconnected to the Java Gateway/MS SQL Database it stopped processing. So, the Business Rule had over 40,000 queued up to process.

2
0 297
Question Scott Roth · Jan 13, 2024

Within a DTL is it possible to access and update the Message Header properties of an EnsLib.HL7.Message?

Currently we have multiple EMR Services for each environment sending to 1 Business Process to Normalize the data, then it is sent to another Business Process to route the data. 

Since the SourceConfigName changes with every send to a Business Process, I am looking for a way to maintain the SourceConfigName of the SessionID so I know how to direct the message.

7
0 689
Question Lewis Houlden · Jun 30, 2023

Hello

We are in the process of upgrading to 2023.1 for InterSystems Health Connect, and the Business Rule Engine editor is very difficult to use compared to 2022.1. It's difficult to scan over the rules as it all looks the same style with barely any distinction between rules, constraints, conditions, whens etc. There's also tonnes of whitespace, and searching on the page is hit and miss (using Ctrl + F) . I can see the previous editor is still available when you modify the URL, but I'm wondering if we can set it to be the default editor, and if this is something supported.

Thanks

Lewis

7
1 676
Question Mary George · Dec 6, 2023

Hi Community, 

We are trying to filter message created using custom xml class in a business rule.  

HL7 ORU Result messages are converted to custom xml messages with a list properties .Result ORU converted to OrderResultMsg , which contains property Orders as list of Order which contains ResultStatus .  Please see below the class extract.  We are trying to access the ResultStatus property to filter non-final results via business rule. 

Class CDM.OrderResultMsg Extends Ens.

5
0 371
Question John Nurmi · Jul 27, 2023

In an HL7 Business rule I am trying to block ONLY ORM messages that have a PV1:3.4 of 105 or 205 and a OBR:4 value of EP22 or CATH01.

I created the logic below but it appears to be evaluating the two fields independently instead of combined?

Here is what I had.

(((HL7.{MSH:SendingApplication.NamespaceID}="Epic_Cupid")&&(HL7.{ORCgrp(1).ORC:OrderControl} IN "NW,CA")))&&(((HL7.{PIDgrp.PV1grp.PV1:AssignedPatientLocation(1).Facility.NamespaceID} NotIn "105,205")&&(HL7.{ORCgrp(1).OBRuniongrp.OBRunion.OBR:UniversalServiceIdentifier.

1
0 272
Question Scott Roth · Jun 20, 2023

Had an issue on Friday where a vendor added an additional field in the middle of a row of one of our record maps. This threw the mapping off when I take the record and try to map it into HL7 and caused massive amounts of errors in our EMR because the data was wrong.

Is there a way that I can add validation on the Business Service to say if the fields are off to fail, stop, and alert on the Business Service?

2
1 325
Question Kurro Lopez · Jun 1, 2023

Hi all,

I'm wondering if is possible to call to a BO from a HL7 Route according to a parameter of the HL7 Message

I mean,

According to the identify of the laboratory, I want to call to other TCP process to retrieve information about blood tests.

We are creating the BO using this partern.

LAB.BO.TCP. + name of the laboratory.

The name of the laboratory is stoted in the lookup table T_LABORATORIOS

I've tried to assign the name into a variable and put it in the "send" instruction, but it doesn't work.

is it possible to call to a BO by a text variable instead of seleccting the BO from the production?

3
0 332
Announcement Shane Nowack · Feb 14, 2023

Hello InterSystems HL7 Community,

InterSystems Certification is developing a certification exam for InterSystems HL7 interface specialists and, if you match the exam candidate description given below, we would like you to beta test the exam. The dates the exam will be available for beta testing are March 28 - April 30, 2023. Interested beta testers should sign up now by emailing certification@intersystems.com (see below for more details)

Note: The InterSystems HL7 Interface Specialist certification exam is version 2.

1
0 1125
Question Smythe Smythee · Jan 9, 2023

Hi Community,

Can anyone explain how to apply early binding and late binding to a transformation.

Example:

I have DOB value as 12/12/2000

In transformation i need to format  DOB value to 20001212-->this value i can achieve by using $E(DOB,7,10)_$E(DOB,4,5)_$E(DOB,1,2)

<assign value='source.{MSH:7}' property='target.{MSH:7}' action='set' />

But how can i apply early binding and late binding to the above Data tranformation?

5
0 374
Question Scott Roth · Oct 3, 2022

I know there is the ability to enable Rule Sets within a Business Rule by dates, but what about Sub-Rules or just Rules in general? We have an upcoming go-live that is at Midnight and I was wondering if there was a way I could script out enabling rules/sub-rules within a Business Rule to save my team some time and headaches. Or is the best practice is just to create another rule for the go-live, then move it over once we are live...

1
0 315
Question Blake Herlick · Oct 21, 2022

Hello ALL!

I am having trouble fining a way to derive (a list, an array, a file doesnt matter yet how it returns) ALL of the targets of a routing rule.

For example lets say I have:

  • a router of class: EnsLib.MsgRouter.RoutingEngine
  • Business Rule: HappyRRN
  • 1 rule set having 5 rules that each send to 1 DTL and 1 Operation (5 targets total)

My intent is to use some utlities we have created to disable all of the target operations of this router if the router errors out.

To do that I need the list of target operations.

I suppose i could load the acutal .

2
0 353
Article Aya Heshmat · Oct 11, 2022 3m read

Watch the session here: HealthShare Health Connect: Tips & Tricks

Enhanced HL7 V2 Productions

1. Review of Interface Settings: Ensure these are set purposefully! (Documentation linked)

Review of Recent Product Features 

(Documentation Linked)

1. HL7 V2 Schema Editor

  • Drag & Drop tooling for faster schema editing!
  • Note: Add-on segments may be made optional if starting from a generic schema.

2.

0
0 320
Question Claude Mourzelas · Aug 12, 2022

Hello,

I try to realize a simple test in a BPL and i have this kind of error message. I don't understand why ! I have a simple CSV file in input with 3 columns (Nom, Prenom, Age) and a rule based on the age

ERROR <Ens>ErrBPTerminated: Terminating BP TestSiJeune # due to error: ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zevaluateRuleDefinition+18 ^User.Person.IsJeune.1 *Age,User.Person.TransfoTest.Context -- logged as '-'
number - @'
if (((pContext.Age)>(25))) {'
> ERROR <Ens>ErrException: <PROPERTY DOES NOT EXIST>zevaluateRuleDefinition+18 ^User.Person.IsJeune.1 *Age,User.Person.

5
0 1157
Question Richard Cawthraw · Jul 27, 2022

I am receiving batched results in an EDIFACT file. I need to debatch and send individual HL7 out. I have built a DTL to read the first instance of a result from EDIFACT and that generates an ORU^R01 as desired, but I have no idea how to make the DTL loop and send multiple HL7 messages outbound.

I did go down the path of stripping the first instance of a result from the EDIFACT, then sending the now truncated EDIFACT data back to itself. This works well in theory but I then need a while loop in the Rule Editor, and I cannot seem to access the source.

1
0 269
Question Ben Webb · Aug 15, 2022

Hi all, 
I have a requirement to periodically poll a URL to fetch some XML data based on a list of query data, lets say every hour, and map what's returned to HL7 then send downstream, I mostly have everything contained within a business process and DTL but I'm lacking a way of invoking the process every X minutes, 
The client has a prefence for as much as possible to be done via out of the box components in the standard HL7 model of  "Service --> Process/Rule/DTL --> Operation" within the Web UI, 
I'm looking for something to act as the Service part that will trigger the  "Process/Rule/DTL -->

5
1 738
Question Jimmy Christian · May 18, 2022

Hello,

I want to access the HL7 Router settings from within the HL7 rule. Goal is to create a New class by extending "EnsLib.HL7.MsgRouter.RoutingEngine".

Then create a PARAMETER ProcessMessage which can be set to an integer value for the HL7 Router.

Create a Rule class and based on the value of this setting ProcessMessage
process/not process the messages.

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

15
0 559
Question Ephraim Malane · May 20, 2022

Hi Team

I have enabled Data Quality manager on InterSystems healthshare Patient Index and the  SSN field holds south african Identity numbers on our system.

I would like to modify the rule to validate according to South African ID number and not SSN. Data quality manager classifies this South African Identity numbers as Invalid because the rule is based on SSN.

Please see the current and default SSN rule below and advise how I can go about accomplishing this  task, if anyone has that rule please share how it's done.

3
0 432
Question Scott Roth · Apr 13, 2022

I have been struggling trying to understand "Response From" and "Response Target Config Names" as I am trying to track down Orphaned messages.  I have noticed that when a Business Rule, or Business Process sends to a File Based Operation, there is always a NULL value response being returned. I am thinking these NULL values are causing some of the orphaned message problems we are seeing.

If the Business Operation is a File based operation, how do I prevent the NULL value from being sent back? Is this because our "Response From" and "Response Target Config Names" is blank?

2
0 524
Question Scott Roth · Mar 22, 2022

I am still trying to track down orphaned messages and have noticed that when we have Business Rules that send to a Business Process that some times there is an orphaned message that is generated as result of that send. 

  • So my question is, is there an issue with the way that we have setup our Business Processes as they are setup with a request class of Ens.Request, and a response class of Ens.Response when the message is truly an HL7 message?
  • Shouldn't the request class and response class be EnsLib.HL7.Message?
6
0 613
Question gerald hanford · Apr 5, 2022

Hello Community,

I am still pretty new to Ensemble, Cashé, or ObjectScript. My question is this how can I tell when a file was finished and read fully? Currently, I have an EnsLib.FilePassthroughService reads a file from a designated file path and moves it to an archive file path. I need to set up an alert or a notification that can tell me once the file has been read in its entirety and has been moved out of its current file path.

Any help you can give me would be greatly appreciated, or if you need further clarification I can do my best to answer any question you have. Thank you. 

3
0 311
Question Andrew Aiston · Mar 18, 2022

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.

5
0 703
Question Kurro Lopez · Feb 17, 2022

Hi all,

I have a rule to throw a message when there is an error. I want to prevent send the email if the origin of the error is the API to send the email

This is my rule

Now, If there is any error in any process, it works, but if there is an error in MyProduct.BO.SendEmail it is trying to send the error again, and it is a infinite loop.

Is there any way to check what is the origin and don't process if the origin is MyProduct.BO.SendEmail?

I've tried to set a condition in when node but it doesn't catch any property of Ens.AlertRequest

It doesn't work.

2
0 398
Question Niklas Thilmont · Dec 13, 2021

Hey InterSystems Community,

I noticed something interesting in regards to business rule editing. Whenever you use the Management Portal or Studio to edit a business rule, the " characters gets escaped to a &quot;.

Which results in the following code:

As long as you are not mixing development styles - as in, sticking to only the UI or only the code, it is not a problem. But as soon as you mix both, the escaping starts to hinder readability of the rules a bit. I noticed that this is not the case with other interoperability features, like data transformations.

0
0 370
Question Mark Franssen · Oct 29, 2021

I am relativly new to this, so excuse me if i am asking a dumb question

HL7 schema is 2.4

When a HL7 message comes in and in the PID segment on spot 4 the word "Relation" is written, i want to filter out those messages through a Router Rule.

I have come up with several rules (when conditions), here are some examples.

HL7.{PID:4} CONTAINS "Relation"

or

HL7.{PID:AlternatePatientIDPID(1).ID} CONTAINS "Relation"

I have tried a lot of different Rules, but no luck yet.

But every time i test a massege what contains the word Relation in de PID segment on spot 4 it states ".....no whens

6
0 486
Question Kurro Lopez · Oct 29, 2021

Hi all.

I'm trying to create a route rule that can call to a web service according to a parameter of a message.

My first attempt is the following:

I have a common class with all information, BuscarHuecoRequest, and check what is the value of property "CodigoProveedor".

The table T_PROVEEDOR contains the list of code with the code of the provider, if is F, calls to WSF, if is C, calls to WSC, etc... Using a transformation to convert the values to this provider.

It raises an error, because the property CodigoProveedor doesn't

1
0 328