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.

1 0
0 13

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.

4 1
1 33

Why This Matters

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.

2 0
2 28

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:

  • Resource Repository – IRIS Native FHIR server can effortlessly store the FHIR bundles/resources directly in the FHIR repository.
  • FHIR Facade - the FHIR facade layer is a software architecture pattern used to expose a FHIR-compliant API on top of an existing one (often non-FHIR). It also streamlines the healthcare data system, including an electronic health record (EHR), legacy database, or HL7 v2 message store, without requiring the migration of all data into a FHIR-native system.

What is FHIR?

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.

4 0
3 165

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

In the body...

2 15
1 160

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
}

3 0
1 58

I have defined a class with a dynamic object property:

My class

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.1

Is 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.

5 8
0 1.2K

What are best practices for JSON transformation in IRIS interoperability? This is for a non-healthcare use case, so any tools we happen to have around FHIR might not be available. The motivating use case is trimming down a verbose and needlessly complex REST API response to feed to an LLM - trying to reduce token usage and maybe get better results from less noisy data.

0 5
0 89

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.

3 8
0 145

While starting with Intersystems IRIS or Cache, developers often encounter three core concepts: Dynamic Objects, Globals & Relational Table. Each has its role in building scalable and maintainable solutions. In this article, we'll walk through practical code examples, highlight best practices, and show how these concepts tie together.

1. Working with Dynamic Objects:

2 2
4 118

Dynamic Entities (objects and arrays) in IRIS are incredibly useful in situations where you are having to transform JSON data into an Object Model for storage to the database, such as in REST API endpoints hosted within IRIS. This is because these dynamic objects and arrays can easily serve as a point of conversion from one data structure to the other.

Dynamic Objects

Dynamic Objects are very similar to the standard ObjectScript object model you get when you create a new instance of a class object, but with some key differences:

4 1
2 107

Hey Developers,

Watch this video from our Tech Video Challenge to discover how to connect a FHIR Server and transform a batch file into SDA and then to FHIR JSON:

Mapping a Custom File to SDA

https://www.youtube.com/embed/O8xtGbAOgPE
[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]

0 0
0 48

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.

  • How do I extract the name from HS.FHIRModel.R4.SeqOfHumanName?
  • Do I have to then do another "fromDao" to pull the list into string format?
  • How do I navigate around the lists that are in a FHIRModel response, to extract the string values?
1 9
0 108

I have been struggling sometime with trying to take a FHIR Bundle Response, extract the "entry.resourceType", extract the MRN and Name from the Patient FHIR Response...

Going through learning.intersystems.com, it suggested that I try using fhirPathAPI to parse and search my response for certain values, however I am not sure my syntax is correct. Using the AI code, it suggested to set my tree = "Bundle.entry.resource.resourceType"

1 0
0 54

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.

0 2
0 44

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?

1 6
0 86

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.

0 0
0 54

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

}

0 1
0 51

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", 

surname: "Doe"}

will have issues while saving the dynamic object to a class Sample.Person with:

0 15
0 172

Introduction

InterSystems IRIS allows you to build REST APIs using ObjectScript classes and the %CSP.REST framework. This enables the development of modern services to expose data for web apps, mobile apps, or system integrations.

In this article, you'll learn how to create a basic REST API in InterSystems IRIS, including:

4 3
3 123