You may have heard about our mg-dbx-napi interface for IRIS which provides insanely fast access from Node.js. If you've been following recent developments in the server-side JavaScript world, you'll be excited to know that mg-dbx-napi also works with Bun.js, the latter proving to be significantly faster than Node.js for many/most purposes.
Of course, if you're a Node.js user, you'll probably wonder how mg-dbx-napi compares with the Native API for Node.js that is included with IRIS.
This is a full example how to use a %ScrollableResultSet for results pagination using %DynamicQuery:SQL and build a JSON response including page details.
In the next few weeks, my coworkers are planning to start using VSCode to code with InterSystems' products. Among the many advantages of that, I would emphasize being able to connect with other technologies, such as GitHub, with ease. Besides, VSCode also offers an extensive extensions store, where you can find many free add-ons that make coding faster and more efficient. Last but not least, to conquer the heart of every developer, it is open source.
I'm trying to configure a new interface that reads HL7, transform them into FHIR messages and then send POST or PUT or DELETE depending on HL7 doc type.
1-I added an HL7 TCP service that reads ADTs messages
2a-Send ADTs to a process to transform them into SDA (using the following command: do ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(request,.con))
2b-Extract the patient MRN and add it to the AdditionalInfo property (using the following request message class: HS.Message.XMLMessage)
JSON is a lightweight data interchange formatfor representing and exchanging data between a server and a web application. Its popularity has led to its widespread use in applications based on InterSystems technology, as well as demand for a converter that transforms globals to JSON and back. Therefore, @Evgeny Shvarov suggested developing Global->JSON->Global converter. Implementing such a converter is important to ensure interoperability, simplify data exchange, support web services, and provide a standardized approach to data representation across different software ecosystems. This article, the second in the "Implemented Ideas" series, focuses on several projects created by the legend of InterSystems Developer Community @Robert Cemper that deal with this task:
I would like to share with you a little trick to customize how messages are displayed in the Message Viewer. In particular, how you can display messages as JSON (instead of the default XML representation).
Hello everyone! So, I am supposed to receive a REST-request into my production, and I need to send it, exactly as I received it, to another server. I am struggling to find any good info on this, and have a hard time coming up with a good approach. What would be the easiest way to do this? - I have so far thought about possibly doing it with an EnsLib.REST.GenericService and then sending it with an EnsLib.REST.GenericOperation.
I have a scenario where I recognize that I have a duplicate patient in FHIR , both have a different set of data attached to them (Specimens / Observations / Conditions) and I want to transfer all the data from patient X to patient Y, and maybe mark patient X as not relevant or delete it IDK yet.
since Patch currently supports only single patch,
"The Conditional Patch query identified more than one resource."
There is an interesting new feature in the recently announced 2024.1 preview, JSON_TABLE. JSON_TABLE is one of a family of functions introduced by the 2016 version of the SQL Standard (ISO Standard, published in early 2017). It allows for JSON values to be mapped to columns and queried using SQL. JSON_TABLE is valid in the FROM clause of some SQL statements.
The syntax of JSON_TABLE is quite large, allowing for exceptional conditions where the provided JSON values don't match expectations, nested structures and so on.
I want to parse large JSON object and store data into persistent tables. Is there any other way besides pre-defining persistent classes including typing each property name? Maybe parse it and store properties into a global so that I know what properties need to be defined for each class...
In this article we are going to see how we can use the WhatsApp instant messaging service from InterSystems IRIS to send messages to different recipients. To do this we must create and configure an account in Meta and configure a Business Operation to send the messages we want.
Let's look at each of these steps in more detail.
Setting up an account on Meta
This is possibly the most complicated point of the entire configuration, since we will have to configure a series of accounts until we can have the messaging functionality.
Did you know that you can get JSON data directly from your SQL tables?
Let me introduce you to 2 useful SQL functions that are used to retrieve JSON data from SQL queries - JSON_ARRAY and JSON_OBJECT. You can use those functions in the SELECT statement with other types of select items, and they can be specified in other locations where an SQL function can be used, such as in a WHERE clause
The JSON_ARRAY function takes a comma-separated list of expressions and returns a JSON array containing those values.
The architect of the JSON schema (MS) asked if IRIS could perform schema validation. I asked on Discord objectscript channel how we could validate a Dynamic Object against a JSON schema. Dmitry Maslennikov replied that probably the easiest way would be to use python, but it would require converting ObjectScript JSON to Python dict.
Say I have an ObjectScript object called Book. It has 2 properties title and author. It extends JSON.%Adaptor, so I can call book.%JSONExport() and get this output:
{ "title": "For Whom the Bell Tolls", "author": "Hemmingway" }
In my web service I want to have a search function that returns an array of Books along with the total number of responses, like this:
An App that converts HL7 messages to JSON objects. About a year ago I started a GitHub repo for collecting stuff related to HL7. Recently my team added an HL7 interface to our Interoperability Production and we were asked to persist HL7 messages. We created a Kafka topic to receive HL7 messages. We use Kafka Bridges to send messages to Kafka topics. Kafka messages are sent to the Kafka Bridge in JSON format.
Imagine the scene. You are working happily at Widgets Direct, the internet's premier retailer of Widgets and Widget Accessories. Your boss has some devastating news, some customers might not be fully happy with their widgets, and we need a helpdesk application to track these complaints. To makes things interesting, he wants this with a very small code footprint and challenges you to deliver an application in less than 150 lines of code using InterSystems IRIS. Is this even possible?
We have a yummy dataset with recipes written by multiple Reddit users, however most of the information is free text as the title or description of a post. Let's find out how we can very easily load the dataset, extract some features and analyze it using features from OpenAI large language model within Embedded Python and the Langchain framework.
Hello, I tried to convert HL7 message to JSON in a business process and I got errors. Has anybody converted HL7 to JSON? Are certain characters not allowed in JSON?
I just tried to set a property to quote request.RAWContent and quote. I will try to put example in GitHub and share here later.
I've extended the a class %JSON.Adaptor in my class definition and it contains the xData block MimeType of application/json. I got the error while compiling. Why this error occurs and how to resolve it
How to clone dynamic objects more efficiently than using a serialization/desserialization approach (eg. Set objectB = {}.%FromJSON(objectA.%ToJSON()) ) ?
Why %DynamicObject could not extend %RegisteredObject and its %ConstructClone method (if not inherit it)?