#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 Robert Hildebrand · Oct 30, 2025

Hello,
I am currently facing the task of retrieving or sending HL7 messages from a web API. Since we only send HL7 messages via internal sockets, web APIs are relatively new to me.
The following is my plan for the new interface:
I have created a new custom business service that periodically sends requests to a business process. In this business process, the HTTP request (HTTP.GenericMessage) is then created from scratch. The special feature is the "Authorisation" header field, where a signature is inserted, which consists of a base64-encoded hash value.

4
0 163
Question Colin Brough · Apr 10, 2025

InterSystems ObjectScript extension for VS Code, version 3.0.1

Am also asking this question on the extension's GitHub page: Request textDocument/documentSymbol failed. Error: name must not be falsy · intersystems-community/vscode-objectscript · Discussion #1530 - but suspect more eyes will see it here, which might help gather additional information.

Tried to compile some legacy ObjectScript code via Import/Compile in VS Code using the vscode-objectscript extension. Getting an error, and the content of the file is left changed on the filesystem simply by being compiled.

6
0 440
Question Nimisha Joseph · Oct 27, 2025

Hi,

I’m working in Ensemble and trying to resend a message from the Message Viewer. The message is in XML format.

When I try to edit the XML before resending,

  • I open the message in the Message Viewer.
  • I click Resend or Edit & Resend.

I’m looking for guidance on:

  1. How to make a message editable in Message Viewer.
  2. The proper way to modify an XML message before resending in Ensemble/IRIS.

Any suggestions or examples would be very helpful.

1
1 100
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 148
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 178
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 276
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 142
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 311
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 217
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.

1
2 263
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 119
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
2 291
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 147
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 132
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 114
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 1771
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 111
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 831
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 636
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 357
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 171
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 127
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 131
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 1558
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 255