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.

2 3 7,098

Mirroring 101

Caché mirroring is a reliable, inexpensive, and easy to implement high availability and disaster recovery solution for Caché and Ensemble-based applications. Mirroring provides automatic failover under a broad range of planned and unplanned outage scenarios, with application recovery time typically limited to seconds. Logical data replication eliminates storage as a single point of failure and a source of data corruption. Upgrades can be executed with little or no downtime.

2 21 5,019

Hi, I was hoping that someone could point me to the error in my ways.  I am trying to follow the examples to setup Ensemble 2017.1 in a docker container on an Ubuntu 16.04 virtual machine.

I have a directory that contains


When I execute:

docker build -t ensemble-simple .

I am getting the following error:

0 2 4,928


This article is a small overview of a tool that helps to understand classes and their structure inside the InterSystems products: from IRIS to Caché, Ensemble, HealthShare.

In short, it visualizes a class or an entire package, shows the relations between classes and provides all the possible information to developers and team leads without making them go to Studio and examine the code there.

If you are learning InterSystems products, reviewing projects a lot or just interested in something new in InterSystems Technology solutions — you are more than welcome to read the overview of ObjectScript Class Explorer!

2 35 4,370
Istvan Hahn · Oct 5, 2016 13m read
RESTful way of data transfer

This article gives a brief introduction how a RESTful service consumer and a RESTful service provider exchange data. It is a beginner’s guide. Data is transferred from a consumer to a provider as parameters of the service. Parameters are part of a service request. The result of the service action a response is returned from a provider to a consumer. Both the service request and response are standard HTTP messages. Since HTTP is a flexible standard regarding to the message contents, RESTful services also enjoy the versatility of data transfer methods.

0 0 3,539

Created by Daniel Kutac, Sales Engineer, InterSystems

Warning: if you get confused by URLs used: the original series used screens from machine called dk-gs2016. The new screenshots are taken from a different machine. You can safely treat url WIN-U9J96QBJSAG as if it was dk-gs2016.

Part 2. Authorization server, OpenID Connect server

1 11 3,533
Bill McCormick · Feb 19, 2016 4m read
Why Atelier? And what about Studio?

I have been meaning to make a post about this topic for a few weeks and the other day an issue came in through the WRC about it so it seems this is a conversation we should be having. I want to begin by taking a few moments to explain "Why Atelier" then we can talk about what this means in the general sense for Studio and Atelier and Caché developers. We have wrestled with what to do with Studio for years. When I moved to Product Management in 2008 this was already a "thing". At the time we could not reach a consensus. Some felt Studio was fine as is.

0 2 3,352
John Flippance · 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 7 3,201
Arya S · Jan 5, 2018
UPS - SOAP WebServices Not Working

Hi all,

I have started using the UPS in my application for shipment and cancellation.

I have the WSDL from the UPS.

I have imported the WSDL via Studio->Tools->addins and finish the process to get the Package implemeted in my studio.

Now the SOAP method contains a URL which is for their live system so i manually changed the URL with their Testing URL.

They are also providing the sample shipment numbers which we can use to test the cancellation process.

I am trying that shipment number to void(cancel) the shipment by call the method.

0 3 2,987
Tani Frankel · Feb 17, 2016 3m read
Listing files in folder


How do I get a list of files residing in a certain folder/directory, according to some wildcard/filter.

For example all '*.txt' files in 'C:\Temp'.



You can use the %Library.File's FileSet class query.

Here's some sample code using it (also attached):


0 2 2,672

This article will provide tips and tricks on customizing Ensemble business hosts with configurable settings.

Ensemble production Settings are configurable values that control the behavior of a production and its hosts.

The documentation for adding and removing Settings and specifying categories and controls for Settings is provided at the link:

2 6 2,636
Istvan Hahn · Oct 12, 2016 12m read

Beginner’s guide to RESTful Application Program Interface (API) design and documentation. Through the example you will learn some common pattern for RESTful API.

Before you read

You need to know

0 0 2,555

Configuring an Ensemble production can be a challenging task involving a thorough understanding of the system and production functionality and a detailed understanding towards each configuration item. After successfully configured an Ensemble production, you might need to set up an identical production on the mirror environment, or deploy the production on a development system to a live system, or send a copy for diagnostic/debug purposes. Other times you might have spent some time designing a BPL/DTL and some other productions can use the same logic.

0 0 2,534

Hi dev community,

I am currently working on a project to send documents to a RESTful based API that supports bearer 
Token Authorization.

When we try to fire a JSON request from our EnsLib.Rest.Operation towards the 3rd party API with a 
valid Token we keep receiving Authorization Error codes HTTP 401 back.

If we use the same request and same Token from a test utility such as Postman the request is 
successful and we are able to move past the authorization stage.

2 4 2,424

I have an imported WSDL from SalesForce and I am trying to send a login-request to the SalesForce-servers via InterSystems. The login requires a username and a password in the body, and an organizationId in the header. I am having trouble filling the organizationId in the header.

Via SoapUI I can send a successfull message to the SalesForce-servers. The message should look like this:

0 4 2,368

Hi All -

I was wondering if the below query could be enhanced to automatically look back 24 hours from the current datetime the query is run. As is now I, of course, have to update the date range in the WHERE clause manually.

The query is just getting all MessageBodyClassNames, counting them and then doing an AVG on TimeCreated and TimeProcessed. Nothing too complex.


SELECT MessageBodyClassName, count(ID) as Count_Of_Messages, avg(datediff(ss, TimeCreated, TimeProcessed)) as avg_processing_time_in_seconds

FROM %PARALLEL Ens.MessageHeader

0 1 2,341

The %Net.SSH.Session class lets you connect to servers using SSH. It's most commonly used with SFTP, especially in the FTP inbound and outbound adaptors.

In this article, I'm going to give a quick example of how to connect to an SSH server using the class, describe your options for authenticating, and how to debug when things go wrong.

Here's an example of making the connection:

0 3 2,321


Can anyone  point me to an example of a DTL & Class method that can pull a base64 encoded PDF out of a MDMT02 message?

This is really asking for two things;

- how to make a DTL that extracts a specific subfield of an HL7 2.3 message into a message of its own,


- how to transform an base64 encoded document into its original binary form for writing to a file.

I'd also love to see an example of an HL7 2.n MDM^T02 ==> HL73.ITK2 non-coded CDA

0 3 2,228

Two fairly common requests we receive from HL7 customers are (1) how to remove all trailing delimiters for fields and segments in HL7 messages and (2) how to "find and replace" for an entire HL7 message (as opposed to one segment/field at a time).  The code sample below shows a custom function that solves for item 1 and by extension item 2 above.  In other words the same approach can be used for finding/replacing any sequence of chars in an entire HL7 message, with some tweaks to the custom function.

0 6 2,153

I'll be doing my first xml transform soon and I'm hoping to find a good graphical mapping tool to generate the XSLT.  Does anyone have any recommendations?  I've tried the demo of Altova MapForce and it's exactly what I want but it's super expensive.  Working for a non-profit it would be nice if I could find a free or cheap solution.

0 5 2,123