I am creating a BPL using the Management Portal instead of creating a custom class.

As per the documentations 'request object' contains properties those were in the original request message object or primary request and can be reference using the dot syntax.

So if the primary request was an HL7 message, i should be able to pull the value MSH:9.2 as follow

request.{MSH:9.2} and assign it to a context property

0 5
0 1.6K
· Sep 6, 2017 4m read
Polling an External REST API with Ensemble


Before we begin, I'd like to mention that I am by no means an Ensemble expert, so take this with a grain of salt and please feel free to offer any suggestions for improvement. That being said, I have enjoyed working with Ensemble and wanted to share the approach I took to poll an external REST API for patient data in the hopes that it might help others with a similar goal.

2 5
0 1.5K
· Feb 28, 2020
SQLCODE Error -400

I have a code block in a BPL. I have the below SQL and code. All variables have been declared and set. When I run the SQL, if there are no values returned, I get 100 for the value of SQLCODE when I perform the FETCH, which is correct. If values are returned, I get a -400 error when I perform the first FETCH. I've investigated, but cannot find the reason for a -400 error. Hoping someone out here understands this and knows what's wrong.

0 2
0 1.4K

Suppose I have an image and need to convert that image into a PDF for inclusion in an HL7.

I know that Zen Reports can display an image in a PDF but I do not want to view the image in a web page. I just need to convert the image to PDF in a Process and then include that PDF in an HL7. The workflow would be like this:

Get image -> Convert image into PDF -> Include PDF in HL7 OBX.

I know how to do the last part to include PDF in HL7 OBX. Just need ideas on the first part.

0 2
0 1.1K


I am sending a request message to Business Process which has one property as Dynamic Object type. So i get the JSON in my REST service and convert that as a dynamic object and set that in the request message and calling the business process from the business service. But the request is not getting sent to the Business Process. Is it possible to send dynamic object input to the business process.

0 18
0 796

I am trying to transform an Enlib.EDI.XML.Document through aXLT I know how to trans form the xml document through a xlt stylesheet but been trying to get an Enlib.EDI.XML. Document from a procees by creating aoperation that will do the transformation of this to file if this can be done in a process all ideas welcome so far I have come to this and I keep getting an error

0 7
0 780

I'm looking for a way to get the message header ID for the current message in a Request to a Business Process.

I've located some code that gives me what I need, but it runs the risk of violating the "abstraction layer" ISC has in place around such things. And while I very much appreciate their efforts at keeping things simple for me ... well, sometimes you just have to dig through the guts to get what you want.

Is there a documented, deprecation-resistant method for getting at %Ensemble("%Process").%PrimaryRequestHeader.%Id() from within a BP?

0 6
0 770

I have a vendor that is sending me an Abbreviation in FT1:16.4.2 that I need to look up against a table to find the correct ID for.

FT1|1|||20180523161501|20180523161503|CG|1906551^Lipid Profile|||1||||||^^^ LAB&06CL|||Z00.00||00410^Knerr^Joel||721410||30100001^Lipid Profile|

But in my Business Process when I refer to request.GetValueAt("FT1:16.4.2") its not recognizing that this field contains information. Is my syntax wrong?

0 5
0 711
· Nov 26, 2018
BPL - Foreach IF statement

As part of a BPL I am building I need to foreach over a some repeating elements and look for a certain value, if said value is present I need to forward the message to another operation.

I can't seem to get the if statement inside the foreach loop to work and I think I am doing something wrong?

The error message I am getting:

ERROR <Ens>ErrException: <UNDEFINED>zS2+2^GWH.Messages.Eobs.AKISegmentCheck.Thread1.1 *k1 -- logged as '-' number - @' Set k1=request.GetNextIndex("PIDgrpgrp("_(1)_").ORCgrp()",k1,.tSCTrans)'

Can anyone explain that error to me?

0 3
0 656

I created a DTL to do HL7 mapping. The test function in the tools works the DTL perfectly but when used by the rule in my business process, the OBX segments are stripped and the MRN is gone. The assigning authority and ID type are added into the PID but the actual patient MRN is blank (3.1 value).

Here is the source code.

0 8
0 653
· Jan 13, 2021
Handling Errors

I have a case where our EMR is sending data, but not all the values needed for the Ancillary are valued properly and causes that message to error/halt processing on the Ancillary system, not ideal but its what they do. I would expect them to still process the message except that 1 field, but they don't.

I want to add validation to make sure certain fields are valued correctly for the Vendor.

So I add some statements to take those items that don't pass this validation out to a batch file with headers.

0 9
0 653

I created a custom class for a process that does some basic manipulation to an HL7 message. I'd like to be able to write some debugging to the process event log. How would I do that?

I've tried ##class(Ens.Util.Trace).WriteTrace("system","HOSP.IHE.PDQProcess","MessageHeaderHandler","Discarding input message")

but I get a runtime error when I try that. I know this is pretty basic stuff, but any help would be appreciated.

0 2
0 645
· Oct 27, 2017
Recordmap within a BPL

I have a text file that is fixed width delimited and am using a BPL to process this file, ultimately performing a transform from the text file to an HL7 message. I created a DTL, mapping from the recordmap to the HL7. In my BPL, I am performing some loops and other logic (that all is working). My issue is what to do when I perform the Transform.

0 1
0 619

maybe I am not looking in the correct spots, but how should one handle an Exception from a SOAP web service within the Business Process Language? For example I am sending a request to a Web Service to try to get information, but the response I am getting is an Exception like "Patient Not Found".

Is there a function I can call to check the response similar to what I do to check a SQL Snapshot to see if it is valued?


Scott Roth

0 2
0 618

Hi ,

Still a newbie for ensemble, I am trying to convert XML message to HL7 Message. I am using Custom schema for XML structure which includes MSH and PID segments from HL7 Message.

These are the service, process, Operation classes i am using

Business service-EnsLib.EDI.XML.Service.FileService

Business Process-EnsLib.MsgRouter.RoutingEngine

Business operation -EnsLib.HL7.Operation.FileOperation

0 8
0 577

I am working on a BPL to take data from a MS SQL database and create an HL7 Materials Message for our EMR. I have done this plenty of times in the past however I am running into an error.

"Remote Gateway Error: JDBC Gateway SP execute(0) error 0: Access to the remote server is denied because no login-mapping exists."

What is confusing is that this BPL doesn't differ from any of my other BPLs in connecting to MS SQL Server. I know I am missing something..

0 3
0 553

Does anyone know how to disable the auto-refresh in Healthshare, especially for Message viewer , Business process designer, DTL editor pages?

These pages in management portal refresh every 15min( i.e. as per the session time out setting) . I tried to set the following two configs to disable the auto refresh but both had no impact.

set ^EnsPortal("DisableInactivityTimeout","Portal") = 1
set ^%SYS("Portal","EnableAutoRefresh") = 1

Thank you for your help.


1 8
0 543

Morning guys I have a SQL operation that I use to read data and results to a record map. But seems to have trouble saving the objects to a record map as I get this message

ERROR ErrException: zInsertObject+2^%Library.RelationshipObject.1 -- logged as '-' number - @''

please help here is my code let me know if I missing anything thank you in advance

0 2
0 532