Hi,

I'm trying to figure out why I'm unable to iterate through a dynamic array and access the nested objects.

Using the NHS PDS FHIR API in the NHS sandbox environment, I'm querying the PDS endpoint using a sample NHS Number to retrieve a patient's demographics. My Business Operation reads the response data and passes it back to my Business Process where I intend on iterating through certain nested objects. The data present in these nested objects will decide what happens next in the process.

0 4
0 435

Okay, we've got a quite useful way to very easily Import and export our objects as JSON, similar to what we already had before for XML.

So, It's a %JSON.Adaptor. But the issue here I faced with, working with Stream properties.

I have an example, when I generate an object, with stream binary stream properties. Export and Import the same, but getting the different resulting objects, depends on the original size of streams.

0 6
1 1.2K

How many times do we find ourselves rebuilding, copy-pasting, adapting, Business Operations that make calls to REST services, and only adapting one or another part of the final code. This is annoying a lot. To resolve this our inconvenience, I present to you Interopway REST, a set of classes (a micro framework) that allows us to just add Business Operation to Production and use it.

1 0
1 184

Programming and languages

Being a programmer nowadays is basically the geek version of being a polyglot. Of course, most of us here, in the InterSystems Community, “speak ObjectScript”. Howeever, I believe this wasn’t the first language for many people. For instance, I had never heard about it prior to getting the appropriate training at Innovatium.

8 8
3 642

Methods written in ObjectScript can use pass-by-reference arguments to return information to the caller. Python doesn’t support pass-by-reference arguments, so Embedded Python in IRIS doesn’t support them either. That's it, that's the end of the post, hope you liked it. 😉 But wait, what about the Classic Rock & Roll?

7 1
1 248

Good morning:


Thank you very much for reading the doubt and above all thank you very much for answering.

Given the following use case:

If we have a Destination Service that through a HTTP GET by REST gives us a certain JSON response, where it should be noted that it is a list of objects where each object in the list does NOT have a key:

0 3
0 182
Question
· May 2, 2023
JWS/JWT Header X5C

Hello All,

I'm trying to sign some custom JWT with x.509 certs but running into a problem with the signed JWT containing some information I need in the JOSE header.

Is there a way to get the "X5C:[]" header included in the signed JTW? IS this as easy as setting something like the following

Set JOSE("x5c") = "public key"

Thanks

John

0 1
0 162
Question
· Mar 27, 2023
JSON Validation Errors

When using %JSONImport it seems to only report a single error, is there a way to report all the errors with out having to do multiple requests?

{

"errors": [

{

"code": 9406,

"domain": "%ObjectErrors",

"error": "ERROR #9406: Unexpected format for value of field, CurrencyCode, using Update mapping",

"id": "JSONImportError",

"params": [

"CurrencyCode",

"Update"

0 1
0 258

Hello, I want to show a fellow DC member how to convert JSON file into HL7 message. I personally do not work with HL7. I set up a production with EnsLib.File.PassthroughService. It passes Ens.StreamContainer to BPL process. I call a DTL to transform StreamContainer to HL7 message. I run into an error:

ERROR <Ens>ErrBPTerminated: Terminating BP JSON2HL7 # due to error: ERROR #5035: General exception Name 'Parsing error' Code '3' Data ''
> ERROR #5035: General exception Name 'Parsing error' Code '3' Data ''

The code is in this GitHub repo:

0 2
0 406

Foreword

InterSystems IRIS versions 2022.2 and newer feature the ability to authenticate to a REST API using JSON web tokens (JWTs). This feature enhances security by limiting where and how often passwords transfer over the network in addition to setting an expiration time on access.

The goal of this article is to serve as a tutorial on how to implement a mock REST API using InterSystems IRIS and lock access to it behind JWTs.

10 0
6 982
Article
· Mar 7, 2023 10m read
Reference for the JSON Web Classes

Foreword

InterSystems IRIS versions 2022.2 and newer feature a redesigned functionality for JSON web tokens (JWTs). Once housed under the %OAuth2 class package, the JWT class, along with other JSON web classes (JWCs), now live under %Net.JSON. This migration occured in order to modularize the JWCs. Before, they were closely intertwined with the implementation for the OAuth 2.0 framework. Now, they can be maintained and used separately from OAuth2.

2 0
0 356

Hi folks!

Researching FHIR bundle transactions.

The idea is that you can post a bundle to a FHIR server with a set of resources. And you can send it as a transaction, so only all the resources will be published or neither.

E.g. I send a bundle of two resources: patient and its observation.

The observation resource should reference an existing patient. But it probably doesn't exist yet on the server and goes within the same bundle.

For this purpose there is a way to have a temporary id in the bundle, to let resources reference ids.

0 5
0 141

Why I've decided to write this

Once again I had a challenge that costed me some time and a lot of testing to reach the best solution. And now that I've managed to solve it, I'd like to share a little bit of my knowledge.

What happened?

In a namespace there were a lot of similar classes, so to make them simpler there were a superclass with comon properties. Also, there are relationships between them. I had to export one of them to JSON, but I couldn't change the superclasses, or I would break down the flow of many other integrations.

4 0
1 287

Recently i've been using Restforms2 to create a CRUD API for a project. But it lacks some advanced functionality that we need, so we have created a production with a REST WS which handles those advanced methods. That works great but there's a drawback, it does not have authentication.

I would want to use the same authentication method as Restforms2 which is a basic auth using IRIS users and passwords.

0 4
0 451