Hi

I have been experimenting with the creation of a set of REST services for an app. The basic GET operation is set to create a %ZEN.proxyObject instance, and then set an instance of a Persistant class as a property, which gives me all of the values I want to return. However, it also gives me some values that I don't want to return over REST (because they are both private, and large registered objects which will bog down performance)

2 3
0 446

Hi All,

I am working in Heath Share Heath Connect Integration.

I have a requirement to change SOAP call to REST call in integration. For SOAP call already payload is ready in XML string. and Working fine.

Now I need to make REST API call instead of existing SOAP call.

I have created REST Business Operation and ready to Call it from Business Process.

Here I should not change any Transformation in Business Process , only change in Operation invocation

2 5
0 629

Hi!

I am making a request to an API and JSON is coming as follows:

SET %httprequest = ##class(%Net.HttpRequest).%New()
DO %httprequest.Get(URL)
SET %responseBody = %httprequest.HttpResponse.Data.Read()

W %responseBody
{produto:"CHP0001",Local:{IDMV: "000000001",LOTE: "",DtFabric: "null",DtVenc: "null",Atributo06: "0000000002",Atributo07: "",QtdeDisp: "10.00000",QtdeAloc: "0.00000",QtdeSep: "0.00000",QtdeTotal: "10.00000",Status: "OK",Motivo: ""}}

2 9
0 621

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.

2 6
0 766

Hi Community,

I have json equivalent persistent object in pjsonObj variable. Final JSON example below.

{
"Document": {
"FileExtension": "pdf",
"FileContent": "JVBERi0xLjUNCiW1tbW1DQo...(very large bsae64 string)"
}
}

Here FileContent field in json will contain converted base64 string of very large pdf(10pages). I need to submit this json as a payload to REST endpoint.

below code is working fine.

2 1
0 352
Question
· Nov 7, 2016
Binary Support in JSON?

I'm working on a REST service which will include a binary stream as a request property. I'm currently encoding the stream as BASE64 and passing it as a string value, but I was wondering if there is anything in the Caché JSON support that may be a better fit for encoding this data? Thanks Chris

1 3
0 835
 

Hi,

I know there are several alternatives, but I would like to find the easiest & simpler ones to store data coming in Json format from post requests and also allowing me to do SQL queries.

I want to have a property called favouriteColors. I want to store a few colors, and I want to be able to do queries to get top favorite colors, etc... so not handling the list of colors as just a fixed string or fixed object.

1 4
0 467

Is there any way that I can check the native type of an object script variable? (similar to the typeof check in javascript)

I see that the DynamicArray class uses the type of the variable for its output, I would like to do something similar when I receive a value as an argument to my method.

USER>s var1 = 123 //No quotes, number type

USER>s var2 = "123" //quotes, string type

1 3
0 560

How to convert SQL persistent classes to JSON output - I have tried 1 option but appears to be very lengthy process.

I have many other SQL storage's defined and have to expose them as well to JSON. Can anyone please suggest a better approach.

My column names usually match with my Json properties.

My User.TestClass is the class with GetJsonList() as my method to return /output JSON formatted data.

The Code tried and SQL storage structure are as follows -

1 3
0 960
Question
· Dec 19, 2016
HL7 Section to JSON

Hi all,

I'm trying to convert a HL7 section to a XML or JSON string.

We need to save the content of PID section into a SQL Column, therefore we need to convert it into a XML o JSON string

is there any easy way to convert it?

I've tried to convert it directly into a DTL, but all my attempts have been unsuccessful

Best regards,

Francisco Lopez

1 6
0 1.3K

Hi,

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

1 5
0 133
Question
· Apr 19, 2016
MessagePack support

MessagePack is a binary-based efficient object serialization library. It enables to exchange structured objects between many languages like JSON. But unlike JSON, it is very fast and small.

Any chance of adding support for MessagePack?

1 2
0 417

Hi everyone, I have and Zen Mojo application, it's all working but I have some doubts about what is recommended to use: There is some reports of employees, for example, and actually I'm using some plugins : "Excelent export" to generate Excel reports and "jspdf" to generate PDF reports in client side.

I have an REST service, that receives the request, process and returns JSON, after client side receive the response it's processed.

- This can be slow/bad in applications with large data?

- It's better/recommended to use ZenReports even with ZenMojo applications?

1 2
0 359

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.

1 4
0 104

I am using studio 2015 version which does not have dynamic objects and I need to read xml and convert that to a json I have managed to come close to json string but with little difficulties .I need to be able to identify the root element and specify where to put braces between objects anyone with any idea is welcome he is my code so far

1 12
0 1.4K

Dear,

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)

1 5
1 64