#Ensemble

23 Followers · 2.4K Posts

InterSystems Ensemble is a complete and easy-to-use integration platform that enables users to connect people, processes, and applications in record

time.

Learn more

Documentation

Question Thomas Haig · Oct 21, 2025

Hi all,
Recently we were experimenting with having a variable target on a routing rule and noticed some interesting behaviour, code below.

<rulename<</<


This code compiles and works. If SendingFacility is "TOM" the message will rout to ToTOMFromServiceTCPOpr, and if it is "BOB" it will route to ToBOBFromServiceTCPOpr.
However - if we remove the space between the first &quot; and the first underscore as in below this rule will not compile with error

Invalid target name: To"_(pContext.Document.GetValueAt("MSH:SendingFacility"))_"FromServiceTCPOpr. Target name should not contain "_ and _"
1
1 134
Article Sanjib Pandey · Oct 17, 2025 13m read

Overview

This web interface is designed to facilitate the management of Data Lookup Tables via a user-friendly web page. It is particularly useful when your lookup table values are large, dynamic, and frequently changing. By granting end-users controlled access to this web interface (read, write, and delete permissions limited to this page), they can efficiently manage lookup table data according to their needs.

The data managed through this interface can be seamlessly utilized in HealthConnect rules or data transformations, eliminating the need for constant manual monitoring and management of the lookup tables and thereby saving significant time.

Note:
If the standard Data Lookup Table does not meet your mapping requirements, you can create a custom table and adapt this web interface along with its supporting class with minimal modifications. Sample class code is available upon request.

0
1 159
Question Matheus Augusto · Sep 23, 2025

Some languages ​​have the concept of a garbage collector for automatic memory management. I'd like to know if something like this exists in InterSystems Caché in the context of routines, %CSP.REST, or %CSP.Page.

The question arises from the %Close() method of the %RegisteredObject class. This indicates that I need to manually clear the object from memory if it's no longer in use, or in the web context, if the request has completed. Is this correct? Or am I completely wrong?

Thank you!

8
0 268
Article Cecilia Yang · Oct 10, 2025 2m read

To manage the accumulation of production data, InterSystems IRIS enables users to manage the database size by periodically purging the data. This purge can apply to messages, logs, business processes, and managed alerts.

Please check the documentation for more details on the settings of the purge task:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EGMG_purge#EGMG_purge_settings

An issue that many users ran into is still finding old messages after running the purge task for messages. For example, a user has a purge task for messages that has NumberOfDaysToKeep=45.

0
0 122
Article Prasanth Annamreddy · Jan 29, 2025 1m read

This code provide the configured production items with enabled or disabled status.

Include (Ensemble, EnsUI, EnsUtil)

Class Test.ProductionConfig
{

ClassMethod GetConfigItems() As %Status
{
Set tStatement = ##class(%SQL.Statement).%New()
Set tSC = tStatement.%PrepareClassQuery("Ens.Config.Production","EnumerateConfigItems")
Write tSC,!
Write "ConfigItemName"," ","Enabled",!
#Dim exp As %Exception.SystemException
#Dim rset As %SQL.StatementResult
Set rset = tStatement.%Execute()
Write rset,!
Write rset.%SQLCODE,!
While rset.%Next() {
Try {
Set tConfigName = rset.%GetData(1)
Set tEnabled = rset.

2
2 292
Article John Murray · Oct 9, 2025 3m read

UPDATE: since version 0.0.4 of the extension was published on 2025-11-23 it is now possible to use gj :: configExplorer directly in VS Code on Windows.

In my previous article introducing gj :: configExplorer I flagged up how an apparent bug in the Windows elements of the Native API for Node.js means it's not currently available to run in VS Code on a Windows desktop. In a comment on that article I offered a workaround, but this requires a Docker-equipped Linux host you can SSH to.

If you don't have a suitable target it's now possible to leverage your local Windows Docker Desktop.

1
0 111
Question Colin Brough · Sep 16, 2025

For historic reasons we've got a mix of ADT feeds coming out of our PAS (TrakCare) to a wide range of downstream systems. In particular, there are some that are direct from TrakCare to the downstream systems, and many more that pass through Ensemble as our integration engine.

This is complicating management of the integrations, and so we'd like everything to go through the integration engine.

6
0 203
Article Guilherme Tonelotti · Sep 25, 2025 2m read

When we need to integrate Caché/IRIS with other relational databases, one common question arises: “How do I set up the JDBC connection?”.
The official documentation doesn’t always provide a straightforward step-by-step guide, which can be frustrating, especially for beginners.

In this article, I’ll walk you through the entire process of configuring a JDBC connection with MySQL, from downloading the connector to linking tables in Caché/IRIS.

Note: JDBC connections in Caché/IRIS have some limitations, especially regarding caching and the use of ResultSet

1
0 157
Article Megumi Kakechi · Oct 2, 2025 2m read

InterSystems FAQ rubric

The ^%GCMP utility can be used to compare the contents of two globals.

For example, to compare ^test and ^test in the USER and SAMPLES namespaces, it would look like this:
*In the example below, 700 identical globals are created in the two namespaces, and the contents of one of them is changed to make it the detection target.

0
1 137
Question Abdul Majeed · Oct 1, 2025

I'm trying to access the Bearer token from the Authorization header in my REST service class, but I'm getting a 500 Internal Server Error when I try to use %request.GetCgiEnv("HTTP_AUTHORIZATION").

My Environment:

  • InterSystems ensemble 2018
  • Using EnsLib.REST.Service with HTTP Inbound Adapter
  • REST API URL: http://ip:port/api-kiosk/patientData

My Code:

objectscript

Class CIS.PATIENT.ReadPatientData Extends EnsLib.REST.Service
{
Parameter ADAPTER = "EnsLib.HTTP.InboundAdapter";
Parameter HandleCorsRequest = 1;

XData UrlMap [ XMLNamespace = "http://www.intersystems.com/urlmap" ]
{
<Routes>
    <Route Url="/patientData" Method="POST" Call="getPatientData"/>
</Routes>
}

Parameter EnsServicePrefix = "|api-kiosk";

Method getPatientData(pInput As %Library.AbstractStream, Output pOutput As %Stream.Object, 
                     pPersonType As %String, pKeyField As %String, pKeyVal As %String, 
                     pGetField As %String = "") As %Status
{
    Set tSC = $$$OK
    Try {
        Set reqData = pInput.Read(,.tSC)
        
        // This line causes 500 Internal Server Error
        Set authHeader = %request.GetCgiEnv("HTTP_AUTHORIZATION")
        
        // ... rest of my logic
        
    } Catch ex {
        Set tSC = ex.AsStatus()
    }
    Quit tSC
}
}
4
0 111
Article Sanjib Pandey · Sep 26, 2025 18m read

Introduction

HL7 messages often contain multiple repeating segments such as NTE, AL1, OBX, ZTX, DG1, and others. These segments sometimes require individual processing and routing to different downstream systems. This technical paper introduces a configurable template designed to automate the splitting of these repeating HL7 segments, improving message handling and integration efficiency.

3
0 172
Article Megumi Kakechi · Sep 25, 2025 2m read

InterSystems FAQ rubric

One way to optimize query performance is to use query parallelism on a per-query or system-wide basis (a standard feature).

This is a technique for dividing the execution of a particular query among processors on a multi-processor system. The query optimizer will execute parallel processing only if there is a possibility of benefiting from parallel processing. Parallel processing is only applicable to SELECT statements.

Note that the number of parallel processes cannot be specified, as it is automatically adjusted according to the number of CPUs.

0
0 133
Question Saju Abraham · Sep 24, 2025

Our vendor is developing an interface API on their end to capture HL7 data on a Server Port, and they require us to send a pre-defined HL7 Order message for testing every hour until the API is completely operational.

Is it possible to accomplish that in a Business Operation automatically without utilizing a service or process? The BO is a standard TCP/IP connection.

I'm manually sending the message again from the Operations right now. I do not have access to the System Operation to use the Task Manager feature.

3
0 125
Question Virat Sharma · Sep 13, 2025

Hi Team,

I've basic learning in Ensemble. I want to create a code as per following request. Please help in clearing following questions

We have a business process-AA. In this business process, we have onRequest method, here after performing some logic, I have to call a method ProcessAAlogic. 

In ProcessAAlogic method, after initial processing, we have to call a business operation BB asynchronously (which will give a flag "AACompleted" having value 1 or 0) in pResponse object.
Now based on this AACompleted flag, I have to call other methods which are part of onRequest method  i.e.

2
0 106
Question Tom Philippi · Jan 17, 2018

We are trying to make an ODBC connection via our intersystems ensemble (2016.2 running on ubuntu). However, when I am testing the connection I receive a pop-up that: "Http object response incomplete or invalid.0,#R". Note that the iodbctrace.log remains empty (and it is working because on the first try it registered a 459 error that I should activate kerberos, which I did). Any advise where I should look?
I have taken the following actions:

1. Expand the cacheodbc.

5
0 1749
Question Gigi La Course · Sep 9, 2025

I have a vendor that only wants results on patients that arrive to the ED via EMS/Ambulance.  The value I need for filtering is in the PV2;38. Some of the results requested do not allow the PV2 segment to be added to the schema in the EMR.  I was told that other orgs have used a lookup table that is populated with the PV1;19 value when an ADT messages that meets the criteria is sent in.  This table is then referenced in the business rule for the results that do not have PV2;38 and if Encounter number from result message exists on the Table, the result is sent.  Has anyone done this before?

1
0 106
Article Victoria Castillo · Mar 19, 2024 5m read

I have been walking through this with a few team members and as such I thought there might be others out there who could use it, especially if you work with HL7 & Ensemble/HealthConnect/HealthShare and never venture out past the Interoperability section. 

First, I would like to establish that this is an extension of the already established documentation on importing and exporting SQL data found here: https://docs.intersystems.com/iris20241/csp/docbook/DocBook.UI.Page.cls?KEY=GSQL_impexp#GSQL_impexp_import

2
1 799
Article Megumi Kakechi · Dec 5, 2024 1m read

InterSystems FAQ rubric

If you want to raise an arbitrary custom error in a TRY block, you can pass an exception with a throw as follows. In the following example, a custom error is raised if Stcount is less than 1.

ClassClassMethodtry

In the above example, if Stcount is less than 1, an error like the following will be output:

USER>

For more information, see the following documentation:
ObjectScript command _THROW

If you want to create an arbitrary status code, do the following:

1
2 598
Article Hiroshi Sato · Nov 21, 2024 1m read

InterSystems FAQ rubric

Mirroring only synchronizes database files.

To synchronize other files required for your application (CSP files, images, documents, etc.) between the two servers that make up the mirror set follow one of the approaches:

  1. Place those files on a shared disk by introducing a NAS or similar device
  2. Or use file sync software to synchronize files between two servers.
2
1 341
Question Matheus Augusto · Sep 4, 2025

Dear, Community!

I have a concern about using %Stream.TmpCharacter for storage purposes. Reading the class's source code, I can understand a bit about how it works. But I'd like to know from the community how it actually works. Is it necessary to use the .Clear() method to clear this buffer, or is it done automatically upon disposal?

Note: Please forgive my poor English.

6
0 157
Question Anna Golitsyna · Aug 28, 2025

Studio's Find In Files finds nothing if CLS routines are included. The error is WIDE CHAR. After using ##class(%Studio.Project).FindInFiles programmatically and then ZW after the same error I strongly suspect that CodeWalkopdatecopyopt in EnsLib.InteropTools.HL7.Cloverleaf.Parser.cls  is to blame. I cannot even open this class, unlike other classes from EnsLib.InteropTools.HL7. This error prevents searching even if System Items are excluded and I would peg EnsLib as System. Any remedy besides updating IRIS? Assuming this is fixed in later IRIS versions.

2
0 116
Question Chris Lambert · Aug 21, 2025

Hello,

I'm trying to get the Reply Action Code to work with the error message text.

I have this ACK:

MSH|^~\&|APP|FACIL|||20250821143621||ACK|CUEACK_20250821143621|P|2.4
MSA|AE||Failed to queue message

This is some of the Action Codes I've tried:

  • E*Failed to queue message=S
  • E*Failed=S
  • E*"Failed to queue message"=S
  • :E*Failed to queue message=S
  • :?E*Failed to queue message=S

It's not suspending the message however.

What am I doing wrong?

Thank you

2
0 119
Question Jenna Makin · Nov 3, 2017

Hi-  I have a HL7 message ADT_A01 (Admit) that contains several Z segments, which don't necessarily all appear at the end of the document, like normal.  See below...

  1    MSH ^ ~|\& ^ VAFC PIMS ^ 500 ^ HEALTHSHARE ^ 500 ^ 20171103154747-0500 ^  · ^ ADT ~ A01 ^ 50019000 ^ T ^ 2.3 ^  · ^  · ^  · ^ NE ^ USA 
 
  2    EVN ^ A01 ^ 20171103154701-0500 ^  · ^ 05 
 
  3    PID ^ 1 ^ 5000000351V802052 ^ 100853 ~ 1 ~ M10 ^ 3333 ^ POINDEXTER ~ KENNETH ^ "" ^ 19690117 ^ M ^  · ^ "" ~  · ~ 0005 ~ "" ~  · ~ CDC ^ "" ~ "" ~ "" ~ "" ~ "" ~  · ~ P ~ "" ~ "" | "" ~ "" ~ "" ~ "" ~ "" ~  · ~ VACAE ~ "" ~ "" ~  · ~  · ~ "" & "" | "" ~ "" ~ "" ~ "" ~ "" ~  · ~ VACAA ~ "" ~ "" ~  · ~  · ~ "" & "" | "" ~ "" ~ "" ~ "" ~ "" ~  · ~ VACAC ~ "" ~ "" ~  · ~  · ~ "" & "" | "" ~ "" ~ "" ~ "" ~ "" ~  · ~ VACAM ~ "" ~ "" ~  · ~  · ~ "" & "" | "" ~ "" ~ "" ~ "" ~ "" ~  · ~ VACAO ~ "" ~ "" ~  · ~  · ~ "" & "" ^  · ^ "" ^ "" ^  · ^ "" ^ 29 ^  · ^ 555443333 ^  · ^  · ^ "" ~  · ~ 0189 ~ "" ~  · ~ CDC ^   
 
  4    PD1 ^  · ^  · ^ CAMP MASTER ~  · ~ 500 ^ "" 
 
  5    ZPD ^ 1 ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ 0 ^ "" ^ "" ^ "" ^ "" ^ 0 ^ "" ^ 0 ^ "" ^ "" ^ "" 
 
  6    PV1 ^ 1 ^ I ^ 7B ~ "" ~ "" ^  · ^  · ^  · ^ 1002 ~ PROVIDER ~ EIGHTEEN ^  · ^  · ^ 94 ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^ EMPLOYEE ^  · ^  · ^ 1 ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^  · ^ 20171103154701-0500 ^ "" ^  · ^  · ^  · ^  · ^ 13976 
 
  7    ROL ^ 13976-1002*1 ^ CO ^ V110000 ~ Physicians (M.D. and D.O.) & Physician/Osteopath & "" ~ VA8932.1 ~ T ~ "" ~ VA01 ^ 1002 & 500 ~ PROVIDER ~ EIGHTEEN ~ "" ~ "" ~ "" ~ "" ~ VA200 | "" ~ "" ~ "" ~ "" ~ "" ~ "" ~ "" ~ "" ~ SSA 
 
  8    ROL ^ 13976-991*2 ^ CO ^ V110000 ~ Physicians (M.D. and D.O.) & Physician/Osteopath & "" ~ VA8932.1 ~ A ~ "" ~ VA01 ^ 991 & 500 ~ PROVIDER ~ EIGHT ~ "" ~ "" ~ "" ~ "" ~ VA200 | "" ~ "" ~ "" ~ "" ~ "" ~ "" ~ "" ~ "" ~ SSA 
 
  9    DG1 ^ 1 ^  · ^  · ^ PSYCHOSIS 
 
  10    ZSP ^ 1 ^ 0 ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^  · ^ "" ^ "" 
 
  11    ZEL ^ 1 ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ 0 ^ EMPLOYEE ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" 
 
  12    ZCT ^ 1 ^ 1 ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" 
 
  13    ZEM ^ 1 ^ 1 ^ "" ^ "" ^ "" ^ "" ^ "" ^ "" ^  · 
 
  14    ZIR ^  · 
 
  15    ZEN ^ 1 
 
3
0 1546
Article Henry Pereira · Jul 31, 2025 5m read

artisan cover

If you’ve ever watched a true artisan—whether a potter turning mud into a masterpiece or a luthier bringing raw wood to life as a marvelous guitar—you know that magic isn’t in the materials, but in care, craft, and process. I know this firsthand: my handmade electric guitar is a daily inspiration, but I’ll admit—creating something like that is a talent I don’t have.

Yet, in the digital world, I often see people hoping for “magic” from generative AI by typing vague, context-free prompts like “build an app.” The results are usually frustratingly shallow—no artistry, no finesse.

2
0 239
Article Robert Cemper · Jul 23, 2025 1m read

If you are investigating complex structured Globals this can become
a rather boring typing exercise. Different from Global Explorer in
System Management Portal Global-Inspector allows a kind of drill-down
to dig deeper and deeper by subscript levels.
You also have the option to see the stored content or to show only
the subscript structures.
Globals storing SQL Tables are probably not so thrilling, but in SYSTEM
space you find real trees with completely different branches and twigs.

Global-Inspector can run in browser or from terminal command line.

1
0 230
Question Dustin Knudsen · Jun 7, 2021

One of the business operations recently errored out, and keeps spitting this message:

ERROR <Ens>ErrFailureTimeout: FailureTimeout of 15 seconds exceeded in EnsLib.FTP.PassthroughOperation; status from last attempt was 
ERROR <Ens>ErrOutConnectFailed: SFTP Connect failed for ftp.[censored].com:2222/[censored]/SSL='!SFTP'/PubKey='C:\InterSystems\HealthShare\Keys\pub\[censored]'/PrivKey='C:\InterSystems\HealthShare\Keys\priv\[censored].pem'
with error ERROR #7500: SSH Connect Error '-2146430963': SSH Error [8010100D]: Failed getting banner [8010100d] at Session.

2
0 464