Hey Community!
We're happy to share a new video from our InterSystems Developers YouTube:
⏯ Document Server: Improving Performance While Reducing Stored Data @ Ready 2025
JSON (JavaScript Object Notation) is a lightweight data-interchange format. It is easy for humans to read and write.
Hey Community!
We're happy to share a new video from our InterSystems Developers YouTube:
⏯ Document Server: Improving Performance While Reducing Stored Data @ Ready 2025
What is XML?
XML(eXtensible Markup Language) is a flexible, text-based, andplatform-independentformat used to store and transport data in a well-structured way that is both human- and machine-readable. XML permits users to define custom tags to describe the meaning and organization of their data. For example: <book><title>The Hitchhiker's Guide</title></book>.
An XML document is self-descriptive and structured as a hierarchical tree of elements. Every document has a single root element that encapsulates all other content.
ObjectScript doesn't include any built-in method for appending one JSON dynamic array to another. Here's a code snippet I use that's equivalent to the JavaScript concat() method.
Call it with any number of arguments to concatenate them into a new array. If an argument is a dynamic array, its elements will be added. Otherwise the argument itself will be added.
ClassMethod ConcatArrays(pArgs...) As %DynamicArray
{
set outArray = ##class(%DynamicArray).%New()
for i=1:1:pArgs {
set arg = pArgs(i)
if ($IsObject(arg) && arg.%IsA("%DynamicArray")) {
set iter = arg.%GetIterator()
while iter.%GetNext(.key, .value) {
do outArray.%Push(value)
}
} else {
do outArray.%Push(arg)
}
}
return outArray
}
For one of our customers I had to integrate with the AFAS imageconnector endpoint /imageconnector/{imageId}?format={format}. This endpoint returns in a json message with the image as a base64-encoded string property, in addition to the mimetype for the image:
/// Image Object
Class Mycustomer.Model.AfasGet.Image Extends (%SerialObject, %XML.Adaptor, %JSON.Adaptor)
{
/// file data (base64 encoded)
Property Filedata As %String(%JSONFIELDNAME = "filedata");
/// MimeType e.g. "image/jpeg"
Property MimeType As %String(%JSONFIELDNAME = "mimetype");
}
IRIS offers a dedicated feature for storing and retrieving JSON documents using DocDB, without requiring a predefined schema.
Developers often need a quick and intuitive way to browse, create, and edit documents without switching between multiple tools or writing repetitive code. To solve this, I created iris-docdb-ui — a CSP-based open-source application that provides a clean, responsive interface for interacting with DocDB effortlessly.
Hi all,
Let's do some more work about the testing data generation and export the result by REST API.😁
Here, I would like to reuse the datagen.restservice class which built in the pervious article Writing a REST api service for exporting the generated patient data in .csv
This time, we are planning to generate a FHIR bundle include multiple resources for testing the FHIR repository.
Here is some reference for you, if you want to know mare about FHIR The Concept of FHIR: A Healthcare Data Standard Designed for the Future
OK... Let's start😆
1. Create a new utility class datagen.utli.
Hello community,
I wanted to share my experience about working on Large Data projects. Over the years, I have had the opportunity to handle massive patient data, payor data and transactional logs while working in an hospital industry. I have had the chance to build huge reports which had to be written using advanced logics fetching data across multiple tables whose indexing was not helping me write efficient code.
Here is what I have learned about managing large data efficiently.
Choosing the right data access method.
As we all here in the community are aware of, IRIS provides multiple ways to access data. Choosing the right method, depends on the requirement.
Set ToDate=+H
Set FromDate=+$H-1 For Set FromDate=$O(^PatientD("Date",FromDate)) Quit:FromDate>ToDate Do
. Set PatId="" For Set PatId=$Order(^PatientD("Date",FromDate,PatID)) Quit:PatId="" Do
. . Write $Get(^PatientD("Date",FromDate,PatID)),!Hi all,
It's me again 😁. In the pervious article Writing a REST api service for exporting the generated FHIR bundle in JSON, we actually generated a resource DocumentReference, with the content data encoded in Base64
.png)
Question!! Is it possible to write a REST service for decoding it? Because I am very curious what is the message data talking about🤔🤔🤔
OK, Let's start!
1. Create a new utility class datagen.utli.decodefhirjson.cls for decoding the data inside the DocumentReference
ClassExtends%RegisteredObject2. Write a Python function decodebase64docref to
a. loop through the FHIR bundle
b.
The ObjectScript language has incredible JSON support through classes like %DynamicObject and %JSON.Adaptor. This support is due to the JSON format's immense popularity over the previous dominance of XML. JSON brought less verbosity to data representation and increased readability for humans who needed to interpret JSON content. To further reduce verbosity and increase readability, the YAML format was created. The very easy-to-read YAML format quickly became the most popular format for representing configurations and parameterizations, due to its readability and minimal verbosity.
I was really surprised that such a flexible integration platform with a rich toolset specifically for app connections has no out-of-the-box Enterprise Service Bus solution. Like Apache ServiceMix, Mule ESB, SAP PI/PO, etc, what’s the reason? What do you think? Has this pattern lost its relevance completely nowadays? And everybody moved to message brokers, maybe?
Wiki time: An enterprise service bus (ESB) implements a communication system between mutually interacting software applications in a service-oriented architecture (SOA) .
Managing IAM can be tedious when done manually — especially when your APIs are already well-documented using OpenAPI (Swagger) specs. Wouldn't it be great if you could automatically generate Kong services and routes directly from your OpenAPI spec?
That's exactly what this ObjectScript method does: it reads an OpenAPI 2.0 spec stored in the XData block of your spec class and generates a decK-compatible YAML file that can be used to sync your IAM configuration.
One of the most common kinds of integration we are asked to do is emailing. One of the most typical email services our customers use is Microsoft’s Office 365. After setting up the right configuration on the Microsoft side, we can email from IRIS with two HTTP requests. By the end of this article, we will be able to send an email with an attachment through our Microsoft 365 service!
Microsoft’s REST API, called Graph, allows you to do a lot of things within Microsoft’s various apps, and it is precisely what we will employ to send our email.
I am struggling in understanding how FDN works within Health Share, in particular those that are related to Provider Directory within Health Share. Does anyone have examples of using FDN that they would be able share?
FHIR Server
A FHIR Server is a software application that implements the FHIR (Fast Healthcare Interoperability Resources) standard, enabling healthcare systems to store, access, exchange, and manage healthcare data in a standardized manner.
Intersystems IRIS can store and retrieve the following FHIR resources:
Fast Healthcare Interoperability Resources (FHIR) is a standardized framework created by HL7 International to facilitate the exchange of healthcare data in a flexible, developer-friendly, and modern way. It leverages contemporary web technologies to ensure seamless integration and communication across various healthcare systems.
I am trying to help another group within our organization access a SQL Table that I have created to populate Epic Department Data within our environment and came across the ability to use SQL Seach REST Interface using iKnow.
However, I am having issues trying to get it to work via POSTMAN before I hand off the solution...
the POST URL... https://<servername>/api/iKnow/latest/TESTCLIN/table/osuwmc_Epic_Clarity.DepartmentMaster/search
where osuwmc_Epic_Clarity.DepartmentMaster is the table
Hi folks!
Sometimes, when designing a class method and feeding it with more and more useful features, very soon the number of parameters can reach 10 and even more.
It becomes pretty difficult for users of useful methods to remember the position of the important parameter, and it is very easy to misuse the position and transfer the wrong value to the wrong parameter.
Here is an example of such a method (I asked GPT to create a method with 20 params):
ClassMethod GenerateReportWith20Params(
pTitle As %String = "",
pAuthor As %String = "",
pDate As %String = "", // e.g. 2025-09-03
pCompany As %String = "",
pDepartment As %String = "",
pVersion As %String = "1.0",
pFormat As %String = "pdf", // pdf|html|docx
pIncludeCharts As %Boolean = 1,
pIncludeSummary As %Boolean = 1,
pIncludeAppendix As %Boolean = 0,
pConfidentiality As %String = "Public",
pLanguage As %String = "en",
pReviewers As %String = "", // CSV, e.g. "Alice,Bob"
pApprover As %String = "",
pLogoPath As %String = "",
pWatermarkText As %String = "",
pColorScheme As %String = "default",
pPageSize As %String = "A4",
pOrientation As %String = "Portrait",
pOutputPath As %String = "report.pdf"
) As %Status
{
// implementation
}I have defined a class with a dynamic object property:
My class
Class test.Dyn Extends %Persistent
{
Property json As %DynamicObject;
/// do ##class(test.Dyn).test()
ClassMethod test()
{
do ..%KillExtent()
for len = 100, $$$MaxStringLength - 1, $$$MaxStringLength, $$$MaxStringLength+1, $$$MaxStringLength *2 {
set sc = ..save(len)
write "Len: ",len, " Result: ",$case($$$ISERR(sc), $$$YES: $System.Status.GetErrorText(sc), : "OK"),!
}
}
ClassMethod save(len)
{
set json = {}
set stream = ..getStream(len-8) // -8 because {"a":""}
do json.%Set("a", stream, "stream")
set obj = ..%New()
set obj.json = json
quit obj.%Save()
}
ClassMethod getStream(len)
{
set stream = ##class(%Stream.TmpCharacter).%New()
if len<$$$MaxStringLength {
do stream.Write($tr($j("",len)," ","A"))
} else {
for i=1:$$$MaxStringLength:len {
do stream.Write($tr($j("",$$$MaxStringLength)," ","A"))
}
do stream.Write($tr($j("",len-i)," ","A"))
}
quit stream
}
}The issue I encounter is that if a length of a serialized json property is more than 3641144 symbols, the object fails to save with the following error (either MAXSTRING or STRINGSTACK):
Length: 100 Result: OK
Length: 3641143 Result: OK
Length: 3641144 Result: OK
Length: 3641145 Result: ERROR #5002: ObjectScript error: <MAXSTRING>%GetSerial+1^%Library.DynamicAbstractObject.1
Length: 7282288 Result: ERROR #5002: ObjectScript error: <STRINGSTACK>%GetSerial+1^%Library.DynamicAbstractObject.1Is there a workaround? I need to store moderately large jsons (10-15 Mb) and dynamic object properties allow for a very convenient access.
$ZSTORAGE is set to -1.
I would like to know which are the best practices of using Streams in Interoperability messages.
I have always use %Stream.GlobalCharacter properties to hold a JSON, or a base64 document, when creating messages. This is fine and I can see the content in Visual Trace without doing anything, so I can check what is happening and resolve issues if I have, or reprocess messages if something went wrong, because I have the content.
But I think this is not the best way of using Streams.
This article is a continuation of the IRIS JSON project and features additional methods and insights.
Let's continue with the instance methods
This instance method is used to determine the JSON data type of the %DynamicObject or %DynamicArray.
It returns one of the following strings:
|
|
USER>Set1
In this section, we will explore how to use Python as the primary language in IRIS, allowing you to write your application logic in Python while still leveraging the power of IRIS.

Now that we have a good understanding of Python and its features, let's explore how we can leverage Python within IRIS.
Hey Developers,
Watch this video from our Tech Video Challengeto discover how to connect a FHIR Server and transform a batch file into SDA and then to FHIR JSON:
Dear community, I have a confession to make. I have not gotten over Zen yet. Alas, all good things must come to an EOF, so I am currently learning about Angular. I am working on proving to myself that with the right back end and Angular components, I can deliver to myself and my team a very Zen-like experience in this environment. Since this is my first attempt, here is a fair warning: I will be providing some rather large code samples before discussing them. Please warm up your mouse and hand for extensive upcoming scrolling!
I am making a FHIR request against Epic, in when I get the Response back using "fromDao" I am extracting the stream into HS.FHIRModel.R4.Patient. However, the patient's name comes back as name within a list that references HS.FHIRModel.R4.SeqOfHumanName.
So I have been working in Healthcare Interops for about a month now and in IRIS. I am looking to implement SMART on FHIR and I am currently working to make an endpoint that works as the discovery endpoint. It is a custom dispatch class and unauthenticated is selected for access. I am trying to make a simple get request from Postman to test that the proper JSON is sent, but I receive a 403 Forbidden error. It is reaching IRIS it seems so I know its not a reverse proxy error. Here is an example of my custom Dispatch Class.
I am receiving a FHIR response bundle back with a resource of patient. Using fromDao, I attempted to take the stream and put it into FHIRModel.R4.Patient but it is not mapping correctly. When I attempt to take FHIRModel.R4.Patient and write it out using toString(), all I am seeing is the resource
{"resourceType":"Patient"}
so the response is not mapping correctly to FHIRModel.R4.Patient. How have others handled this? Do I need to translate it to an SDA since it does fit the model format?
I have built a REST operation to submit a JSON Request Body, and in the JSON Response Object, I need to pull out certain values like pureID, portalURL, and under the identifiers array the ClassifiedID that has a term."en_US" = "Scopus Author ID"
{
"count"1My REST Operation looks like...
Method PostSearchPerson(pRequest But when I execute I am getting...
| ERROR <Ens>ErrGeneral: Retrying Message body 9@osuwmc.COM.Request.SearchPerson / 3858480 because response 94@osuwmc.COM.Response. |
I am seeking work with InterSystems HealthConnect/Cache. My experience is working with Rules and DTLs, plus message search, and export of components.With 10 years of dedicated expertise in SOA and ESB platform development, I have successfully designed and implemented enterprise-level integration solutions for large organizations, driving significant improvements in system interoperability and business efficiency.I have actively developed and supported HL7 V2/V3 、FHIR、XML/JSON interfaces.I reside in China. Available for full-time or contract positions, with remote work options preferred.
The below code is not working. its unable retrieve Record count and merge files
Class Util
{
ClassMethod zPyRecordCount(inputfile) As %Integer [ Language = python ]
{
import pandas as pd
import iris
import io
try:
df = pd.read_csv(inputfile, sep='|')
recordcount=len(df.index)
sys.stdout.write(len(df.index))
return recordcount
except Exception as e:
return 0
}
ClassMethod zPymergefiles(file1, file2, outputfilename) As %Boolean [ Language = python ]
{
import pandas as pd
import iris
import io
try:
dataframe1=pd.
Hi noble devs!
Just building a simple frontend->JSON->IRIS backend story, and figured that IRIS while importing via %JSON.Adaptor wants JSON fields to match property names, meaning even should match the case. Like:
{ name: "John""Doe"will have issues while saving the dynamic object to a class Sample.Person with:
%Persistent%StringAs soon as the case is not the same...
Is there any setting to fix this?