In this article I will demonstrate the following :

  • Update ReferencesRange(OBX:7) against ObservationIdentifier(OBX:3.1)[TestCode] from database by using custom utility function
  • Update Abnormal Flag(OBX:8) against ObservationIdentifier(OBX:3.1)[TestCode] and ObservationValue(OBX:5)[Result] from database utility function
  • Route Message based on Abnormal Flag(OBX:8)

Below is the primary and transformed HL7 2.5 ORU_R01 message:

1 4
0 648

When creating custom Business Hosts, it's often necessary to add properties to the class for additional settings that will be used in the initialization or operation of the host. The property name itself isn't always very descriptive, so it's an advantage to have a custom caption display with the field.

In Caché, it was fairly straightforward:

8 4
3 225

InterSystems FAQ rubric

Migrating data to another system takes two steps.

1. Migrating class definitions

To migrate the class definition to another system, export it to a file in XML format or UDL format (extension .cls).

The export procedure in Studio is as follows.

Tools > Export

> Select multiple classes you want to migrate with the [Add] button

> Check [Export to local file]

2 4
0 177
· Feb 8, 2018 1m read
Atelier security quirk

When defining a server connection in Atelier we are required to enter a username and password because these are mandatory fields in the dialog. However, if the /api/atelier web application definition on that server has only the "Unauthenticated" checkbox set in the section titled "Allowed Authentication Methods", then our Atelier connection will succeed even if we supply an invalid username and/or password.

2 4
0 565

Now the Classes/Rutines/DeepSee files will be automatically exported to the working directory after saving or compiling and files will be automatically deleted .
[This is an embedded link, but you cannot view embedded content directly on the site because you have declined the cookies necessary to access it. To view embedded content, you would need to accept all cookies in your Cookies Settings]


To install isc-dev , you just need to download and import the file isc-dev.xml from last release.
Some ways to import isc-dev .xml file:

  • Go to Management Portal -> System Explorer -> Classes -> Import and select the XML file.
  • Drag the file over Studio.
  • Terminal command:
NS>do $system.OBJ.Load("yourpath/isc-dev.xml","ck")
zpm: NS>install isc-dev

How to enable this feature:

  • After importing the class in the target namespace, run the following method to set up the working directory:
NS>do ##class(dev.code).workdir("/path/to/your/working/directory/src/")
  • Go to Management Portal -> System Administration -> Configuration -> Additional Settings -> Source Control.
  • Select the target namespace and set the dev.FileManExtension class as the main one and save it.
  • Try to create a new class in the studio and save/compile it
  • Enjoy!
4 4
2 412

The title of the contest subject is not quite precise but addresses the %Library.classes involved.
What is meant is officially named Class Query and is dating back to the early days of Caché.
CLASS is used because it is embedded in a COS class.
Though there is a precise description in the official documentation it remains rather abstract.
My tutorial should guide you step-by-step through a simple example in COS to make it tangible to you

8 4
1 461

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:

10 3
0 5.2K

(Originally posted by @Ben Spead on June 25, 2014)

This code snippet generates a list of Ensemble Lookup Tables and Schema documents in the user's current namespace. Run the code by running the class method "test":

Class benspead.EnsTablesSchema
    classmethod test() {
        If ##class(%Dictionary.CompiledClass).%ExistsId("Ens.Util.LookupTableDocument") {
            // only supported in Ensemble 2012.1+
            Write !,!,"Exporting Ensemble Lookup Tables..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("Ens.Util.LookupTableDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            Do rs.Close()
            Set rs=""
        If ##class(%Dictionary.CompiledClass).%ExistsId("EnsLib.HL7.SchemaDocument") {
            Write !,!,"Exporting Ensemble HL7 Schemas..."
            Set sc = $$$OK
            Set rs = ##class(%ResultSet).%New("EnsLib.HL7.SchemaDocument:List")
            Do rs.Execute()
            While rs.Next() {
                Set item=rs.Data("name")
                Write "document found: "_ item,!
            Do rs.Close()
            Set rs=""

Here's a link to the code on GitHub:

1 3
0 725

​Keywords: ChatGPT, COS, Lookup Table, IRIS, AI


Here is another quick note before we move on to GPT-4 assisted automation journey. Below are some "little" helps ChatGPT had already been offering, here and there, during daily works.

And what could be the perceived gaps, risks and traps to LLMs assisted automation, if you happen to explore this path too. I'd also love to hear anyone's use cases and experiences on this front too.

5 3
1 447

The cdirectmgr utility will no longer be included with product distributions beginning with the Caché 2016.2 release . This was an older VB application (predating the Caché cube) which allowed users to define server connections for Visual M/Caché Direct applications. As VB 6 is no longer supported by Microsoft, we will no longer ship this component. The same functionality is already available from the cube utility.

It is also posted in Compatibility blog.

0 3
0 379
· Feb 14, 2017 1m read
Portal tip: Use the search box

User interfaces such as Portal often give us multiple ways of doing a task. Sometimes we stick with habits and don't realize that another way might save us time.

Here's one that I learned by watching someone else using Portal.

Use the Search box to get quickly to a page that may otherwise be several layers deep in the Portal hierarchy. For example, suppose I want to check the status of the ECP networking:

2 3
0 277

InterSystems FAQ rubric

To resolve the error <PROTECT>, remove the read-only attribute of the system-wide library database (IRISLIB for InterSystems IRIS, CACHELIB for Caché/Ensemble/HealthShare (Caché-based))

Once you have finished importing the routine, remember to change it back to read-only.

[Version 2013.1 and above]
[Management Portal] > [System Administration] > [Configuration] > [System Configuration] > [Local Database] Uncheck "Mount read-only" from the database name link.

2 3
0 72

InterSystems FAQ rubric

Using the Config.Configuration class and SYS.Database class methods, you can create and register a namespace database from the terminal.

Below is a series of execution examples that create database file /CacheDB/AAA/cache.dat and register database AAA and namespace AAA in the configuration file (cache.cpf).
* Execute in the %SYS namespace. *

* Make sure that this script runs as the user that is used for all IRIS processes to ensure that the directory has appropriate ownership and permissions *

4 3
0 223
· Apr 26, 2020 5m read
Materialized Views

A VIEW in SQL is basically a prepared SQL statement.
It has to be executed and assembled like any other SQL query.
MATERIALIZED VIEW means that the content is collected before hands and can be retrieved rather fast.
I saw the concept first with my favorite competitor named O* and they made a lot of noise about it.

{ favorite: because I could win every benchmark against them devil }

12 3
1 682

Dynamic PoolSize (DPS) Experiment


Enhance Ensemble or IRIS production so it can dynamically allocate pool size for adapter-based components based on their utilization.

Sometimes, an unexpected traffic volume occurs, and default pool size allocated to production components may become a bottleneck. To avoid such situations, I created a demonstrator project some 2 years ago to see, whether it would be possible and feasible to modify production, so it allowed for dynamically modifying its components per their load.

5 3
0 443

InterSystems FAQ rubric

In the sample below, an image file is encoded into a Base64 string in a class property, saved, decoded again with Base64, and restored to another file.

【Usage class】

Class User.test Extends %Persistent
Property pics As %GlobalBinaryStream;

【When importing】

7 2
1 328


Say you have a receiving system that accepts HL7 and provides error messages in field ERR:3.9 in the ACK it returns. You require a different reply code action depending on the error message, however the Reply Code Actions settings for the operation do not provide this level of granularity. One option could be to create a process that takes the ACK and then completes the action you were expecting, however things can get a bit messy if the action is to retry the message, especially when trying to view a message trace.

8 2
1 389

When you first start working with InterSystems IRIS, it’s a common practice to install a system with only a minimum level of security. You have to enter passwords fewer times and this makes it easier to work with development services and web applications when you're first getting acquainted. And, sometimes, minimal security is more convenient for deploying a developed project or solution.
And yet there comes a moment when you need to move your project out of development, into an Internet environment that’s very likely hostile, and it needs to be tested with the maximum security settings (that is, completely locked down) before being deployed to production. And that’s what we’ll discuss in this article.
For more complete coverage of DBMS security issues in InterSystems Caché, Ensemble, and IRIS, you may want to read my other article, Recommendations on installing the InterSystems Caché DBMS for a production environment.
The security system in InterSystems IRIS is based on the concept of applying different security settings for different categories: users, roles, services, resources, privileges, and applications.

Users can be assigned roles. Users and roles can have privileges on resources — databases, services, and applications — with varying read, write, and use rights. Users and roles can also have SQL privileges on the SQL tables located in databases.

5 2
2 825

In this article I'd like to share with you a phenomena that is best you avoid - something you should be aware of when designing your data model (or building your Business Processes) in Caché or in Ensemble (or older HealthShare Health Connect Ensemble-based versions).

3 2
0 334

InterSystems FAQ rubric

You can programmatically retrieve routine dates and sizes using the RoutineList query of the %Library.Routine (or just %Routine) class.

The RoutineList query has an argument, and the routine name to be searched can be specified by prefix match or middle match. (For wildcards, specify * or ?)

In the example below, *.MAC is specified as an argument.

5 2
0 349

When testing a new routing rule, one frequently encountered problem is that messages that seem like they should be getting routed to a target component are not getting routed. This article aims to describe how to determine why the message didn't get routed.

1. Check the Event Log for the router to make sure there wasn't an error evaluating the rule or running any transformations referenced by the rule. If there was, debug that error first.

2 2
0 927

At least three different ways to process errors (status codes, exceptions, SQLCODE etc is given in ObjectScript. Most systems have status, but for a range of reasons exceptions are more convenient to manage. You spend some time translating between the various techniques dealing with legacy code. For reference, I use several of these excerpts. It is hoped that they will also support others.

4 2
2 1.3K