I am creating an import tool to convert a client's JSON data into IRIS classes. The sample file is over half a gig. I am copying the data into an instance of %Stream.FileCharacter;. My first few attempts worked fine. However I started getting an error thrown when I try to create a DynamicAbstractObject using the %FromJSON method. See the code below. The error code given is not in the documentation, at least not the doc that I was searching.
I had a challenge recently where I was asked to parse and iterate JSON to find a patient that has a forename = "Bill" and try to make the function that iterates through the code re-usable.
Being working in Healthcare there isn't much experience or demand for parsing JSON, as most of my work is HL7.
I took this on using the documentation and worked out a way to parse the JSON (see posts below for code and source data).
I thought i would share a little method I knocked together to traverse and compare 2 JSON objects for basic equivilance. I'm currently working on some data migration, and wanted a basic sanity check to validate that the JSON output is basically equivliant between the old and new, excluding a few things like timestamps.
It's a basic little recurvsive method, that will bubble up any differences over a nested structure. It's very low tech, as that's all I need it to do, but I thought it might be useful for others?
I am trying to write a REST consumer the API that I am talking to expects a file to be sent over and in response I will get a file back if anyone out there has ever had a similar use case please could you kindly guide us or share some sample code please
I would like to offer my services as an Intersystems Professional and am available to work on projects.
I have more than a decade experience into Intersystems stack of technologies including IRIS, Ensemble, Healthshare, Healthconnect, Cache Objectscript, Mumps, Zen, Analytics etc. with companies spread over US and UK involved in multiple domains.
Has anyone used the ##class(HS.JSON.Path).%Evaluate() classmethod interrogate JSON and return a specific object value? I need to extract the MessageHeader.destination.endpoint value from a FHIR bundle and can't seem to get that XPath-like method to work.
There's been quite a bit of discussion lately in this forum on the tools available in IRIS for using both XML and JSON, and debate on cross-conversion between the two formats.
We are working with a vendor who only accepts JSON as payload. We are currently still on Cache/HealthShare, not IRIS. Since we have to send Continuity of Care Documents, this raises issues with Long Strings (some CCDs can be quite large and in addition to that, they have to be b64-encoded which increases their size even more).
My question is: if we were to go on IRIS and use %JSON.Adapter, storing the encoded Stream in an object's Stream property, would calling %JSONExport() on this object produce the desired JSON? Or would we have to call %JSONExportToStream()?
QEWD is assumed by most people to only integrate with IRIS (or Cache) via a connection through IRIS's high-performance C interface. This requires QEWD (and its Node.js environment) to be installed and configured on the same machine as IRIS.
I'm frequently asked if QEWD can run on a separate server (or servers), and access IRIS (or Cache) over a network connection. The answer is yes it can, but the information on how to set it up in this way has been admittedly a bit tricky to discover.
What is the best way to create an HL7 message from JSON input file?
We have JSON file available with data required for building the HL7 message . I am trying to use a standard file/FTP Business service to pick up the file and convert the input %FileCharacterStream into a dynamic Object and use the stand JSON features to read /process the data and build the HL7 message.
Is there any other better way to do this? or any standard built-in functionality available in HealthShare?
I have a Problem with the Session Handling in .csp.
I wrote all my Web Services in .csp-Pages and do the work for example in the OnPreHttp Method for to get some data.
After that the Web Service response is in JSON.
I call These Web Services via fetch in my react Single Page application, also Many request parallel. The react App is Rolled out as index.html. Everything Works Fine with the session Handling via Cookie.
Let's imagine if you would like to write some real web application, for instance, some simple clone of medium.com. Such sort of application can be written using any different language on the backend side, or with any framework on the frontend side. So many ways to do the same application, and you can look at this project. Which offers a bunch of frontends and backends realizations for exactly the same application. And you can easily mix them, any chosen frontend should work with any backend.
Let me introduce the same application realization for InterSystems IRIS on a backend side.
Doing a new project with %JSON.Adaptor, unexpectedly realized that %JSON.Adaptor does not support export to native JSON. %JSONExport just outputs directly to the current device, and there are two more methods %JSONExportToString, and %JSONExportToStream.
In conjunction with generating REST from swagger specification, where any generated method accepts as a result %DynamicObject, which is good.
I have multiple places in my REST where I have to return JSON for an object, but I have to modify the result a bit, just extend it with some other way.
I build an API and there I use $order to get the Data from my Globals. When I first time use that API it's get an error (504 Gateway-Timout > 60 Sec.).
After 2 reloads it works with a loading time of 2 Sec.! Sounds for me like the $order is cached and it works faster. Is it true $order will be cached?
When it works, I only get the error at the next day. So it's very hard to reproduce that error. Is it possible to delete the cache for $order?
This is a coding example working on Caché 2018.1.3 and IRIS 2020.2
It will not be kept in sync with new versions
It is also NOT serviced by InterSystems Support !
This an example of a customized SystemFunction extension (ZZISJSON) in Caché & IRIS This time it is to be included in %ZLANGF00.mac
A JSON string is mostly imported from a file or over REST. You rely on a clean and compatible structure. This is the check.
This is a coding example working on Caché 2018.1.3 and IRIS 2020.2
It will not be kept in sync with new versions
It is also NOT serviced by InterSystems Support !
It is also an example of a customized command extension (ZZJSN) in Caché / Ensemble & IRIS
This is the Caché version for fast JSON formatting. But iIt also works in IRIS . To allow parallel existence in IRIS with the previous example this is named ZZJSN