Call to business operation dinamically from HL7 Router
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.
.png)
is it possible to call to a BO by a text variable instead of seleccting the BO from the production?
Our prodution will have more laboratories and we want to create a rule common for all of them
Best regards,
Kurro Lopez
Comments
I don't think dynamic return value is possible.
As a workaround you can write the desired destination value in context and redefine doOneAction in your custom router engine to replace i.e. @destino value with a value from a context before calling ##super.
@Eduard Lebedyuk is correct (yeah, he's always correct 😁), you can't use a variable for the target in a business rule.
You can do this in a custom BP (COS or Python) or a BPL-based BP, though. The BPL <call> action specifically supports a context variable as a destination:
.png)
The variable would be assigned the name of the BH to send to prior to invoking the call.
Thanks, it is our Plan B... we're going to create a BP that calls to the provider and uses the variable.
Great answer, thanks mates