Article José Pereira · Dec 9, 2025 11m read

The previous article introduced IrisOASTestGen, a tool designed to generate REST API test code for InterSystems IRIS based on OpenAPI 2.0 specifications. It demonstrated how to scaffold test cases using the default templates bundled with OpenAPI Generator.

This follow-up focuses on the next natural step: customizing the generated test code. By extending the code generation logic with Mustache templates, it becomes possible to express richer semantics, implement CRUD-aware tests, and create more meaningful test suites.

The example in this article will modify IrisOASTestGen to generate tests for

0
0 68
Article José Pereira · Dec 7, 2025 16m read

Project Overview / Introduction

Developing and testing REST APIs in InterSystems IRIS often requires a significant amount of boilerplate code. While ObjectScript provides powerful tools for building APIs, writing consistent and repeatable tests can be time‑consuming. This is where IrisOASTestGen comes in.

IrisOASTestGen is a utility designed to generate the structure of test classes and the supporting utility code directly from an OpenAPI 2.0 specification. It leverages the OpenAPITools openapi‑generator under the hood to scaffold test stubs and helper methods that make it easier to interact

2
0 114
Article José Pereira · Dec 2, 2025 12m read

In this final part of our introduction to Window Functions, we will explore the remaining functions that have not been covered yet. You will also discover performance tips and a practical guide to help you decide when (and when not) to use window functions effectively.


1. Offset and Positional Value Functions

Overview

These functions reference values are calculated from other rows relative to the current row, or they are extracted from the first, last, or nth values within a window.

  • LAG(column, offset, default) — retrieves the value offset from the preceding row.
  • LEAD(column, offset, default) —
0
1 195
Article José Pereira · Nov 26, 2025 11m read

In Part 1, we explored how window functions operate. We learned the logic behind PARTITION BY, ORDER BY, and such functions as ROW_NUMBER() and RANK(). Now, in Part 2, let's delve into more window functions with practical examples.


1. Aggregate-over-Window Functions

Overview

These functions compute an aggregate (e.g., sum, average, min, max, count, etc.) over the defined window frame but don’t collapse rows.
Each row remains visible, augmented with aggregated values for its partition.

Supported functions include the following:

  • AVG() — average of values in the window frame.
  • SUM() — total of values
0
1 268
Article José Pereira · Nov 7, 2025 8m read

Window functions in InterSystems IRIS let you perform powerful analytics — like running totals, rankings, and moving averages — directly in SQL.
They operate over a "window" of rows related to the current row, without collapsing results like GROUP BY.
This means you can write cleaner, faster, and more maintainable queries — no loops, no joins, no temp tables.

In this article let's understand the mechanics of window functions by addressing some common data analisys tasks.


Introduction to SQL Window Functions in InterSystems IRIS

SQL window functions are a powerful tool for data analysis.
They

0
3 307
Question José Pereira · Oct 27, 2025

Hi everyone,

I'm dealing with a situation where LOAD DATA operations — especially large batches with data inconsistencies — are consuming a lot of disk space. I've noticed that the same error messages are being repeatedly logged in the %SQL_Diag.Result and %SQL_Diag.Message tables, which is significantly increasing the size of the database.

One idea was to move these diagnostic tables to a separate database with a configured size limit, but before going down that path, I'd like to ask:

Is there a simpler or more efficient way to handle this?
For example:

  • Can we limit the number of repeated logs?
3
0 92
Question José Pereira · Sep 3, 2024

Hi,

I'm getting an unexpected behavior when using pandas function to_sql(), which uses sqlalchemy-iris. After the first execution, a transaction seems to be opened and all rows inserted are lost after closing the connection:

engine = create_engine(f"iris://{args['username']}:{args['password']}@{args['hostname']}:{args['port']}/{args['namespace']}")
conn = engine.connect()

# rows are kept after close connection
train_df.to_sql(name='table1', con=conn, if_exists='replace', index=False)

# rows **aren't** kept after close connection
train_df.to_sql(name='table2', con=conn, if_exists='replac
2
0 203
Article José Pereira · Aug 2, 2024 28m read

An experiment on how to use the LangChain framework, IRIS Vector Search, and LLMs to generate IRIS-compatible SQL from user prompts.

This article was based in this notebook. You can run it with a ready to use environment with this application in OpenExchange.

Setup

First, we need to install the necessary libraries:

!pip install --upgrade --quiet langchain langchain-openai langchain-iris pandas

Next, we import the required modules and set up the environment:

import os
import datetime
import hashlib
from copy import deepcopy
from sqlalchemy import create_engine
import getpass
import pandas as pd
9
5 714
Article José Pereira · May 14, 2024 11m read

TL;DR

This article introduces using the langchain framework supported by IRIS for implementing a Q&A chatbot, focusing on Retrieval Augmented Generation (RAG). It explores how IRIS Vector Search within langchain-iris facilitates storage, retrieval, and semantic search of data, enabling precise and up-to-date responses to user queries. Through seamless integration and processes like indexing and retrieval/generation, RAG applications powered by IRIS enable the capabilities of GenAI systems for InterSystems developers.

A notebook and a complete Q&A chatbot application using the topics discussed

3
3 563
Article José Pereira · Jan 30, 2024 5m read

Background

In 2021, I participated as an InterSystems mentor in a hackathon, where a newcomer to FHIR asked me if there was a tool to transform generic JSON data containing basic patient information into FHIR format. I informed her that I didn't know anything like that, unfortunately.

But that idea stays in my mind...

Several months later, in 2022, I came up with an idea to experiment: to train a named entity recognition (NER) to identify FHIR elements into generic texts. The training involved synthetic FHIR data generated by Synthea and the spaCy Python library.

While I achieved good initial

2
0 523
Article José Pereira · Jul 9, 2023 3m read

As said in the previous article about the iris-fhir-generative-ai experiment, the project logs all events for analysis. Here we are going to discuss two types of analysis covered by analytics embedded in the project:

  • Users prompts
  • Execution errors

In order to extract useful data to apply analytics, we used the iknowpy library - an opensource library for Natural Language Processing based in the iKnow for IRIS Data Platform. It makes possible identifies entities (phrases) and their semantic context in natural language text in several languages.

Here it's used to extract concepts from data of

0
1 340
Article José Pereira · Jul 3, 2023 11m read

This project is an experiment to use OpenAI API to answer to user prompts in the healthcare domain using FHIR resources and Python code.

<iframe width="560" height="315" src="https://www.youtube.com/embed/WDTG5_SVvTg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

Project idea

Generative AIs, like the LLM models available on OpenAI, has been demonstrated remarkable power to understand and answer high level questions.

11
0 2036
Question José Pereira · Dec 11, 2022

Hi!

I'm playing with OAuth2 with FHIR Server, but returned tokens cause 401 or 403 errors when trying to get FHIR resources.

I tried using fhir-client.js and Postman. Access tokens returned have been failing for both, with a 401 when trying through fhir-client.js and a 403 using Postman.

Here are my settings:

 

OAuth2 server

 

OAuth2 user

 

OAuth2 application

 

fhir-client.js launch page

<!DOCTYPE html><html><head><scriptsrc="https://cdn.jsdelivr.net/npm/fhirclient@2.5.2/build/fhir-client.js"></script></head><body>Loading...</body><script>
  FHIR.o
0
0 421
Article José Pereira · Nov 29, 2022 12m read

In this article, I’d like to present details of which technologies we had been using to develop our application for the IRIS for Health Contest:

  • REST API generation from OpenAPI specification
  • Role Based Access Control (RBAC) to protect API and Web Pages
  • InterSystems FHIR Server

ToC:

Application overview

First let me quickly introduce the application supported by those

0
0 357
Article José Pereira · Sep 13, 2022 10m read

TL;DR: you can try the chatbot created with IRIS Flow here; if you'd like to understand how it was created, read this article.

If you prefer, you can follow the tutorial within this article in this video:

IRIS Flow - Simple Climatiq API Bot

Introduction

Sometime ago, Henrique, Henry and I started the IRIS-Megazord project to join several of our projects and introduce IRIS Flow - a tool for creation of automation flows supported by the IRIS Interoperability framework.

Following the current contest subject - Sustainable Solutions, we decided to increment the automation features in IRIS Flow by adding a new adapter for use the Climatiq

0
0 278
Article José Pereira · Jun 5, 2022 6m read

IRIS Megazord

In the first article about IRIS Megazord, Henrique explains what drove us to create such an application. It basic is a composition of these previous project which we did:

But we also started the development of a new feature, called Flow Editor. In this article we are going to know more about it.

IRIS Flow Editor

The aim of this feature is to test a new way to create IRIS Interoperability productions, as Henrique explained in the previous article.

In this way, users are presented to a graphical editor in which they can express information

0
0 416
Article José Pereira · May 2, 2022 16m read

Introduction

This article aims to give an introduction to what gRPC is and an example of how to play with the official Hello World using IRIS Embedded Python.

You can find all the code exposed here, in this project repo.

gRPC

The gRPC (gRPC remote procedure call) is an API architectural style based on the RPC protocol. The project was created by Google in 2015 and is licensed under Apache 2.0. Currently, the project is supported by the Cloud Native Computing Foundation (CNCF).

Successful cases of its use are related to connecting services between backends, such as services in microservices style

5
0 2113
Question José Pereira · Apr 7, 2022

Hi!

I'd like to know if there are any issues if an index is inserted into a table without running the %BuildIndices() method.

It's important to note that data inserted before the index is not important for retrieval, so it's not a problem data inserted before the index don't show up in queries.

The reason why I'm asking this is that I'd like to avoid index reconstruction on big tables which I need to inser such index.

I'm using Cache 2018.1.

Thanks,

José

8
0 499
Article José Pereira · Apr 5, 2022 4m read

Motivation

This project was thought of when I was thinking of how to let Python code deal naturally with the scalable storage and efficient retrieving mechanism given by IRIS globals, through Embedded Python.

My initial idea was to create a kind of Python dictionary implementation using globals, but soon I realized that I should deal with object abstraction first.

So, I started creating some Python classes that could wrap Python objects, storing and retrieving their data in globals, i.e., serializing and deserializing Python objects in IRIS globals.

How does it work?

Like ObjectScript%DispatchGetP

1
1 2373
Article José Pereira · Jan 13, 2022 2m read

I'd like to share an example on how the new Embedded Python feature in IRIS helped me in my daily routines.

While I’m participating in the iris-kaggle-socrata-generator project with Henrique Dias, I got to unzip datasets from Kaggle in order to import them.

Such a task was easily achieved by using the zipfile lib in Python (this code was copied from this stackoverflow):

Method UnZip(pZipFileName As %String, pExtractToDir As %String) As %DynamicArray [ Language = python ]
{
    import zipfile
    import iris
    with zipfile.ZipFile(pZipFileName, 'r') as zip_ref:
2
0 1008
Article José Pereira · Dec 27, 2021 12m read

In the previous articles, we learned the basics of using IMAP protocol to handle messages from mailboxes in an e-mail server. That was cool and interesting, but you could take advantage of implementations created by other ones, available in libraries ready to use.

One of the improvements to the IRIS data platform is the ability to write Python code alongside ObjectScript in the same IRIS process. This new feature is called Embedded Python. Embedded Python lets us bring to our ObjectScript code the power of the huge Python ecosystem’s libraries.

In this article, we’ll use one of those libraries,

1
1 744
Article José Pereira · Dec 22, 2021 5m read

What about having your IRIS REST APIs scanned every push you did and being reported on possible vulnerabilities? This is what I am going to show you in this article.

Recently, we had the Security Contest with amazing applications and examples showing how to improve security on your IRIS solutions. One of such examples was the zap-api-scan-sample, made by me and my colleague Henrique Dias. Our application shows how to use the OWASP ZAP API scanner to perform security tests on your REST APIs OpenAPI definitions generated by IRIS.

Now, we did an improvement on such example, using ZAP GitHub Action

0
0 1620
Article José Pereira · Dec 21, 2021 8m read

Have you tried the InterSystems learning platform lab for IRIS IntegratedML? In that lab you can train and test a model on a readmission dataset and be able to predict when a patient will be readmitted or not, or calculate its probability of being readmitted.

You can try it without any installation on your system, all you have to do is start a virtual lab environment (Zeppelin) and play it around!

In this article we’ll use this lab to briefly introduce you to IntegratedML, presenting you the problem to be handled, how to use IntegratedML to create a readmission prediction model, as well as some

2
2 692
Article José Pereira · Oct 23, 2021 4m read

Hello everyone!

Me and @Henrique.GonçalvesDias proposed a new way to visualize messages in IRIS Interoperability in a recent update of MessageViewer. In such an update, we tried to give users a visualization based on a UML sequence diagram. You could get more information on the previous article.

In order to get all the hard geometry calculations needed to draw such a diagram done, we used the amazing mermaid JS open source library.And what I’d like to share with you in this article, is how to use this library.

0
0 1617
Article José Pereira · Sep 15, 2021 10m read

In the first part we got a quick introduction on the IMAP protocol commands, now it's time to use IRIS and implement them and create our own IMAP client!

IRIS Email Framework

The IRIS platform has default interfaces and classes for working with email. Developers originally designed those artifacts for POP3 implementation. However, this doesn’t mean that we can’t use and extend these interfaces and classes to implement an IMAP client. So let’s talk about them:

  • %Net.FetchMailProtocol: This is the base class for email retrieval. The IMAP client extends it.
  • %Net.MailMessage: This is the MIME
0
1 829
Article José Pereira · Sep 1, 2021 6m read

This article explains how to use the InterSystems IRIS platform to write a basic IMAP client. First, we present an overview of IMAP, then we discuss the main IMAP commands and client implementation. Finally, we offer a simple use of this IMAP client on the IRIS interoperability application.

Note that this article isn’t a detailed IMAP explanation. For more detailed information, please check the references of this article.

IMAP Overview

The Internet Message Access Protocol (IMAP) lets users retrieve emails.

0
1 786
Article José Pereira · Jun 5, 2021 6m read

Introduction

In the first article, a simple tutorial helped you to set up your FHIRaaS deployment.

Now, let's move forward and introduce a JS library to access the FHIR resource.

In the end, two examples of usage of this library will be presented, exploring the Appointment FHIR resource type.

SMART on FHIR JavaScript Library

FHIR is a REST API, so you can use any HTTP client in order to use it. But, it’s always a good idea to have help.

Furthermore, there is a cool initiative called SMART which aims to provide standards for easy access to health data stored over health systems.

0
0 1648
Article José Pereira · Jun 5, 2021 8m read

Introduction

This article aims to provide an overview of InterSystems IRIS FHIR Accelerator Service (FHIRaaS) driven by the implementation of application iris-on-fhir, available in OEX developed for the FHIRaaS contest.

A basic tutorial will guide you in configuring a function FHIRaaS deployment, including an API key and an OAuth 2.0 server.

A library to use FHIR resources through FHIRaaS also is briefly discussed.

Finally, some features of the iris-on-fhir application are shown in separted articles. You can check out the full code at the application’s github repository.

This content will be

0
0 514