Hello everyone!
I have to build a REST service that receives a POST HTTP-request, collect a file from that request in the Form data and then send it in another HTTP Post request through Form Data. However I can't really seem to send the file, and I do not know where it has gone wrong. All I am getting told is that no file is being received from my HTTP Post request. I am reaching the REST Service I am supposed to send the request to, but nothing is being sent.

0 6
0 282

I'm receiving a JSON payload via a REST API, I'd like to %JSONImport this stream into a class which extends %JSON.Adaptor. The problem is that the JSON is an array whose elements have no key (as you can see in the example JSON below). Right now I'm having to do some manipulations to convert the stream into a dynamic object and do a %Set which inserts a made up key "record" so "thingone" and "thingtwo" have an associated key that I can use when referencing "thingone" and "thingtwo"...such as record.GetAt(1).thingone

0 3
0 156

What changes are to be made while customizing a FHIR server package when adding a new field. As provided in the documentation, we have a sample JSON package of favorite color and it is added in the table, but when we are adding a new field 'Insurance', it does not imports the package and says package already exists. We have three files of JSON

1) Package.JSON

2) SearchParameter.JSON

3) StructureDefination.JSON

What should we have to change for adding new field.

0 2
0 136

Hello,

First of all thanks for your help, time, and answers.

We would like to know what are we doing wrong and how could we improve it and fix it.

We need to convert the Api Monitor Metrics which are a String with this format:

iris_cache_efficiency 13449.122
iris_cpu_pct{id="CSPDMN"} 0
iris_cpu_pct{id="ECPWorker"} 0

[...]

iris_wdwij_time 11
iris_wd_write_time 8
iris_wij_writes_per_sec 0

To JSON.

We would expect them to look like a normal JSON as follows:

0 4
1 110

Overview

In our previous post, we discussed the motivation for developing a chatbot agent with access to FHIR resources. In this post, we will dive into the high-level design aspects of integrating a Streamlit-based chat interface with a Java SpringBoot backend, and enabling a LangChain agent with access to FHIR (Fast Healthcare Interoperability Resources) via APIs.


2 1
0 107
Article
· Nov 24, 2023 4m read
A framework yes, but a suitable framework

How can IRIS productions be deployed more quickly and with greater peace of mind?

The aim of interoperability productions is to enable you to connect systems in order to transform and route messages between them. To connect systems, you develop, configure, deploy and manage productions that integrate several software systems.

2 1
0 189

Hello,

First of all thanks for your time, thoughts, teaching and help:

We wonder how could we get the metrics from http://[Ip]:[Port]/api/monitor/metrics and use them in Kibana to chart statistics.

We would like to ask you how do you use the api monitor metrics, and as a second question, how would you suggest to utilize them in a third party software as Kibana to chart them.

We have thought to do the following:

0 0
1 96
Article
· Mar 31, 2023 3m read
Using JSON in IRIS

Saw the other day an article with the usage of the %ZEN package when working with JSON and decided to write an article describing a more modern approach. At some recent point, there was a big switch from using %ZEN.Auxiliary.* to dedicated JSON classes. This allowed to work with JSONs more organically.

Thus, at this point there are basically 3 main classes to work with JSON:

  • %Library.DynamicObject - provides a simple and efficient way to encapsulate and work with standard JSON documents. Also, there is a possibility instead of writing the usual code for creating an instance of a class like
set obj = ##class(%Library.DynamicObject).%New()

it is possible to use the following syntax

set obj = {}
  • %Library.DynamicArray - provides a simple yet efficient way to encapsulate and work with standard JSON arrays. With arrays you can use the same approach as with objects, meaning that yu can either create an instance of the class
set array = ##class(%DynamicArray).%New()

or you can do it by using brackets []

set array = []
  • %JSON.Adaptor is a means for mapping ObjectScript objects (registered, serial or persistent) to JSON text or dynamic entities.
10 5
2 710

Hi folks!

Examining FHIR profile validation with InterSystems FHIR server. FHIR profiles is a very useful feature of FHIR standard that helps an organization or solution to establish constraints to a very disperse FHIR standards that are relevant to a particular business solution. Learn more on FHIR profiles.

I created a very simple FHIR profile with the following JSON:

0 6
0 390

Hi all,
I am trying to compile my swagger class file with swagger JSON which is a valid JSON as I created it and verified from swagger.io 2.0 spec.
But getting below error. I am not very clear with the error message. Please help me resolve the same.

ObjectScript error: <CLASS DOES NOT EXIST>removeprj+7^%occClass *SwaggerClass

> ERROR #5091: An error has occurred while removing projection SwaggerClass:Reference.

> ERROR #5030: An error occurred while compiling class 'SwaggerClass'

0 1
0 181

Hi community,

I am looking for an implementation strategy to create/update organizations in a local ISC based FHIR server. Thoase organizations do have a certain dependancy to one another. For Organization resources the "partOf" property symbolizes that. It is planned, that a Interoperability Production (supporting FHIR Server) receives a bundle which contains a batch export of all organizations of a customer (Hospital). The task is to bring those data into the FHIR server create and/or update organization.

0 9
1 272

Hello everyone,

Is there a way to prettify the JSON streams in the incoming HTTP messages so that they are more readable in Visual Trace?

The HTTP messages sent by many software aren't prettified and are displayed like this in the Visual Trace:

On the other hand, other software like Postman prettify the messages and they are displayed in this way:

0 3
0 172

Developing a Full-Stack JavaScript web app with Caché requires you to bring together the right building blocks. In the previous part, we created a basic front-end React application. In the second part of this article series I will show how to choose the right back-end technology for your application. You will see Caché allows you to use many different approaches to link your front-end to your Caché server, depending on your application's needs. In this part we will set up a back-end with Node.js/QEWD and CSP/REST. In the next part we will enhance our basic web app and connect it to Caché using these technologies.

5 12
0 3K
Article
· Sep 26, 2023 1m read
Create JSON Objects and Arrays by SQL

The related package avoids adding %JSONAdaptor to each class but uses instead
SQL functions JSON_OBJECT() to create my JSON objects. With this approach, you can
add JSON to any class - even deployed ones - without any need for change or recompiling.

The trigger was the Export of M:N relationships as JSON objects or arrays.

11 0
0 302

I have created a FHIR endpoint and send the FHIR resource to FHIR Interoperability production class which is HS.FHIRServer.Interop.Service through the the created endpoint(/r4). I can able to see/get the HS.SDA3.QuickStream(It use CacheTemp.HS.Stream temporary global) on the fly(In between the process). I'm unable to get the FHIR resource from the QuickStream once the process completed. Is this HS.SDA3.QuickStream is wiped out from the system once process completed?

0 1
0 182

image

Hi Community,
In this article, I will demonstrate below steps to create your own chatbot by using spaCy (spaCy is an open-source software library for advanced natural language processing, written in the programming languages Python and Cython):

  • Step1: Install required libraries

  • Step2: Create patterns and responses file

  • Step3: Train the Model

  • Step4: Create ChatBot Application based on the trained model

So Let us start.

5 0
0 1.2K

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.

1 7
2 745

Still working on my first External REST API call, and I am struggling to find the exact answer I am looking for... I get a JSON response from my API call but I am not quite sure how to dynamically get the JSON response into the Ens.Response Object with its lists of Arrays that I have defined.

set tSC = ..Adapter.SendFormDataArray(.tHTTPResposne,"POST",tHTTPRequest,,,tURL)

0 10
0 343
Article
· Jan 12, 2022 12m read
JSON Schema applied to InterSystems IRIS

The JSON is a data document free of types and validation rules. However, in some scenarios it is important that the JSON document has type and business rules validation, especially in interoperability scenarios. This article demonstrates how you can leverage a market-defined JSONSchema technology that is open for everyone to use and do advanced validations.

8 3
2 891

Hi Community,

Whenever I insert a decimal value with trailing zero(ex:12.0000) value in my JSON object dynamically through %Set method. It truncates the trailing zeros. However If I use literal constructors { } It working as expected. So, In my case the JSON will be generated dynamically. I can't go with "Curly Bracket { } " and the JSON schema not string as well.
Is there any way to fix this?

0 2
0 148
Question
· Jun 1, 2017
Casting JSON

I'm doing a REST service. A method has as body parameter a JSON corresponding to a class A.

In my production I have class A so that I retrieve the parameters using a dynamic object, such that:

Set body = ##class(%DynamicObject).%FromJSON(%request.Content)
Set myObjectA = ##class(A).%New()
Set myObjectA.Id = body.Id
Set myObjectA.Name = body.Name
Set myObjectA.Date = body.Date
Set myObjectA.Salary = body.Salary

I would like to know if I can avoid doing the manual mapping, doing a casting, since I am sure that FromJSON will return a class A. Something like this:

0 9
1 861
Question
· Jul 25, 2023
REST API Request Logging

I am working on my first REST operation to send a API Request to an internal server within our Network. I have finally got past the point of being able to connect using a SSL/TLS Configuration, but I am getting a ERROR <Ens>ErrHTTPStatus: Received non-OK status 403 from remote HTTP server: 'HTTP/1.1 403 Forbidden'.

1 16
1 496

Hi InterSystems Community

We recently had an issue where we weren't able to parse a JSON HTTP request, but the issue went by unnoticed. We also did not have a trace of what the raw HTTP request was that we couldn't parse. I'm looking at improving our this by:
Tracing the raw request using $$$TRACE

Raising an alert which will hit our Ens.Alert router which will compose and send an email

1 0
1 168