This article will describe and include an example of how to embed an external PDF file into an HL7 segment, specifically ADT_A01:2.3.1 OBX(). This can be useful when attempting to insert pictures or other external data into an HL7 message. In this example, the name of the PDF file to be embedded is provided in the incoming HL7 message in OBX(1):ObservationValue field.

12 4
5 13.7K
Question
· Jun 2, 2017
Decoding Base64 PDF File

Hello, I am writing some cache code that will pick up a PDF file, Base64 encode the contents and then send on to a third party system within a Long String (via their API). I have been testing this and discovered that the PDFs do not open within the supplier system (I get an error saying that it hasn't been decoded correctly). I wanted to prove that the issue does not lie with the way that I have Base64 encoded it within Ensemble, and therefore as a test wanted to Encode the PDF stream, then decode the stream and write out to a new file.

0 13
0 5.6K
Question
· Mar 29, 2017
Count Number of Pages?

Hello,

We are working on creating a metadata file to accompany PDF documents produced by one of our third party systems for ingestion into our DMS. One of the pieces of data that the metadata file must contain is the number of pages of the PDF document.

In Cache ObjectScript does anybody know if there is currently a way of counting the number of pages within a file (specifically a PDF) without invoking a non-Caché ObjectScript program/function from within Caché ObjectScript?

0 3
0 2.1K

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
Question
· 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.6K
Article
· Sep 6, 2017 4m read
Polling an External REST API with Ensemble

Preface

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

Folks

1) What's the correct way to check for an existence of a segment? So far I have been doing this by checking to see if a required field is non-null, and this seems to work but is a bit clumsy. In this case, it’s an X12 message being checked in an IF action in BPL:

request.GetValueAt("NTE(1):Description")'=""

Or in a DTL, to see if a Z segment exists:

source.{ZEF:Counter}=1

0 3
0 1.3K

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
Question
· Mar 31, 2017
Atelier BPL editor

Is there a way to graphically edit BPL processes, or do we still need to use Studio for doing that?

Looking at the documentation, it appear there should be an Atelier BPL editor option available under Open With, but all I have is Atelier Class, HTML, INT, and MAC editors.

There is a BPL editor in the list, but it throws a "Bad editor input" error when trying to open the class file.

0 9
1 1.1K

I have an XML I am sending to an operation from a BPL. This is a query for Patient information from Epic using a web service. I created the operation using the add-in in Studio. I setup the BPL to do a Call and send whatever data I receive from the client. I get a response back from Epic with a list of matching Patients. In the BPL I am trying to use the Response Builder to pass the response ID, name, DOB, etc. to matching context items to then pass to the client as a response. I get the following error within the call:

0 4
0 1K

I have a batch record mapper that reads a csv file and passes the message to a process that uses the EnsLib.MsgRouter.RoutingEngine and would like to pass the message to an operation that will output that as a XML file but so far been unlucky as the operation that I use , uses the EnsLib.EDI.XML.Operation.FileOperation which only works with the messages("BusinessOperation class for writing XML messages to a file.

0 2
0 911

Hi All

I have a BP which has a transformation.

when I run the process I end up with the following error:

----

ERROR <Ens>ErrBPTerminated: Terminating BP Propirion.BP.GetServices # due to error: ERROR <Ens>ErrGeneral: Object is immutable
+
ERROR <Ens>ErrGeneral: Object is immutable

----

I have created a context named : HL7Message type of: EnsLib.HL7.Message and in the start of the BP assigned the request to it (using set in assigned activity)

What did I miss ?

Thanks

Gadi

0 2
0 873

Hi,

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 836

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 814

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 807

We are trying to convert some of our SQL Service Integration Service jobs from Visual Studio to Ensemble. If we execute a Stored Procedure within SQL Server Management Studio it is returning approx 12,000 rows. However when Ensemble executes the same Stored Procedure it is only returning 250 rows.

Is there a limitation to EnsLib.SQL.Snapshot?

This is how we are calling the Stored procedure

0 4
0 787

There has been some confusion about how to edit Business Process Language (BPL) and Data Transformation Language (DTL) files in Atelier using the graphical editor. The following steps describe how to do this with Atelier version 1.0:

Copy the file you want to edit from the server to an Ensemble-enabled project in your Atelier workspace. To do this, find the file in the Server Explorer, right click and select Copy to project.

Open the file in the Atelier class editor just as you would any other class file.

5 2
1 787

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 736
Question
· 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 721