Hello,
We have been reasearching how could we parse a string with a JSON structure like the following:
{"code":200,"type":"Consulta","message":"Operacion correcta","result":[{"id":38802130,"paciente":null,"prestacion":{"codigo":"1.
InterSystems ObjectScript is a scripting language to operate with data using any data model of InterSystems Data Platform (Objects, Relational, Key-Value, Document, Globals) and to develop business logic for serverside applications on InterSystems Data Platform.
Hello,
We have been reasearching how could we parse a string with a JSON structure like the following:
{"code":200,"type":"Consulta","message":"Operacion correcta","result":[{"id":38802130,"paciente":null,"prestacion":{"codigo":"1.
The common requirement in many applications is logging of data changes in a database - which data has changed, who changed them and when (audit logging). There are many articles about this question and there are different approaches on how to do that in Caché.
I'm sharing a mechanism that can help you implement your framework to track and record data changes. This mechanism creates a trigger through an "objectgenarator" method once your persistent class inherits from the "Audit Abstract Class" (Sample.AuditBase). Since your persistent class inherits Sample.
Hello,
We are developing a method to take two messages which have a list of data types. It is being defined as:
{
Property informacion As EsquemasDatos.HistoriaClinica.Informacion;
Property datos As list Of EsquemasDatos.HistoriaClinica.ConsultaCitas;
Property error As EsquemasDatos.HistoriaClinica.Error;
}
Inside datos we have:
Hello,
We are developing a Transformation and we are wondering: how could we debug and show a XML message which is being an output from a transformation, without storing it into request/response/callrequest/callresponse? We mean, how could we show a context variable in the production?
For example, let's have a transformation which stores an appointment in a variable called: context.especializadasConFormatoPrimarias
How could we show in the Production?
Hello,
We have a tranformation where we would like to convert a date from the following format:
"'dd/mm/yyyy' 'hh:mm'" (double quotes are just visual to indicate this is a string)
to date and time separated:
date: dd/mm/yyyy
time: hh:mm
We have already splitted the datetime into date and hour as follows:
set fechaHora = source.result.GetAt(indice).We have a data transformation where source is object collection (populated from a json file) and target is EnsLib.EDI.XML.Document.
If source file is large enough, transformation fails and we get <store> error and I quickly found this:
https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=EBPLR_DTL_foreach which at the bottom in "Avoiding <STORE> Errors with Large Messages" section tells to:
"As you loop over segments in a message or object collections, they are brought into memory.
Hey Developers,
New "Coding Talk" video was specially recorded by @Evgeny.Shvarovfor the IRIS Programming Contest:
⏯ How to Create and Submit an Application for InterSystems IRIS Online Programming Contest 2020
Hi Developers!
In March we are starting our first InterSystems IRIS Programming Contest! It's a competition in creating open-source solutions using InterSystems IRIS Data Platform.
The topic for the first contest is InterSystems IRIS, Docker and ObjectScript!
The contest will last three weeks: March 9-31, 2020.
There will be money prizes for Experts Nomination - winners will be determined by a specially selected jury:
🥇 1st place - $2,000
🥈 2nd place - $1,000
🥉 3rd place - $500
Also, there will be Community Nomination - an application that will receive the most votes in total:
🏆 1st place - $1,000
And we provide winners with high-level badges on Global Masters.
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.
The client part of the code for this game is on the MS Excel sheet and consists of:
The server part of the code (vmx.ro) is installed onсе, it not change depending on the task, is the same for IRIS, CACHE, 16, 8-bit encoding, any applications, games, reports. The server side creates and maintains ‘virtual excel’ in M.
Looks like the $get is actually trying to use the property getter instead of evaluating the GetAt as a method first.
Should this be considered a bug?.png)
The Trace value gives 32,000. But the Read() method of the %Stream.Object class specifies 32,656 by default.
Why ?
Best Regards.
Hi developers!
Suppose you have a Github repository with ObjectScript classes but without a Docker environment.
Recently I published a repository with a set of files that form a universal Docker and VSCode environment to let you either import and run your repository in InterSystems IRIS Community Edition on Docker or turn your repository into Docker and VSCode environment for InterSystems IRIS Community Edition.
So in one sentence:
Unpack these files in your folder and you have the Docker and VSCode environment for your InterSystems IRIS ObjectScript application!
See the details below.
Hi Community!
New "Coding Talk" video is already on InterSystems Developers YouTube:
⏯ How to Enable Docker and VSCode to Your InterSystems IRIS Solution
There does not seem to be any separation between the error code and error text in a %Status object. For custom errors, I simply want to display the message and not Error #5001: Some error text.
We would like to be able to store accented characters into an API.
Currently our Rest Operation is the following:
{ Parameter INVOCATION = "Queue"; Method CrearNotificacion(pRequest As Mensajes.Request.NotificacionesPUSH.CrearNotificacion, pResponse As Mensajes.Response.NotificacionesPUSH.CrearNotificacion) As %Library.Status
{
Set body = {
"app_id": (pRequest.idApp),
"headings": {"en":(pRequest.notificacion.titulo),"es":(pRequest.notificacion.titulo)},
"subtitle": {"en":(pRequest.notificacion.
We need to get service's both source and target names. We have checked that we could obtain them in the service:
However we would like to get it directly from the BPL. We have tried:
$$$LOGINFO("SourceConfigName "_SourceConfigName)
And the compiler outputs:
How could we access to %PrimaryRequestHeader property inside
I am new to Intersystems cache COS scripts (cache is a client system). ThoughCOS scripts basically appear to be straight forward, I am having issues with the logon credentials. From what I have found in the documentation, the first 2 lines of the script contain the U/P. When running the script, the username is picked up correctly but the password is not. Granted, having U/P in a script is not ideal but will suffice as a matter of learning if I can figure out the formatting/syntax required. Any help on this would be appreciated.
Kevin McGinn
Hello,
we are trying to figure out if there's a way to create a SOAP Envelope by using SOAP classes.
Right now we use a string to define the envelope element.
The string looks like :
Ladies and gentlemen, good news for our town.
It finally happened - M was put in the cell.
And feels great there. Maybe it not a prison but an Excel cell.
Being there, he leads the whole M-gang. As well as conditional formatting in EXCEL.
Close integration of excel with the database provides a new convenient design tool.
Interactive reports, input forms, diagrams are generated only by m-commands in cells, without classical programming.
More detailed on https://github.com/mx-alex/MX
We will monitor the development of the situation and answer your questions.
best wishes
Alex
There is a special Query for reporting, it takes one cell of Excel. Example :
?$$omQuery 113^oPeat | Country Country:Province Date Product:Date Date:Product:-zr | tn EURO | zrzr| | if Date'<%XD81,Date'>%XD82 | set zrzr=zr,EURO=summa
The omQuery sets the structure and content of the required documents as well as filters and data processing procedures.
In one request, up to 9 reports are created, with subtotals by group.
If you had the opportunity to change something in the IRIS Interoperability Message Viewer, what would you do?
Our company is in the process of converting our software for use in Intersystems IRIS and one of the major sections of the software makes use of a custom statically-linked C library using the $ZF("function-name") functionality. During this, I found out that the process for setting up the C library to be used within the database platform has changed significantly between Cache and IRIS.
Hi developers!
Just want to check with you on best practices for that.
You collaborate for InterSystems IRIS repository. You fork it, then make changes, commit, push, pull request, discuss(if any), your PR is accepted.
What's next?
Do you delete the repository you forked in?
try{
....
....
....
Set tSC = method_invocation()
If $$$ISERR(tSC) {
Quit tSC
}
....
....
....
}On compiling the above, I get an error saying "QUIT argument not allowed : 'tSC' ".
I need to convert an array with an unknown number of indices to a JSON string for transmission (which is why it isn't possible to iterate through it using $ORDER). Does ObjectScript provide functionality to convert an array to a JSON string?
Hello,
We have the following code:
{
set ..MTOMRequired = 1 set ..SecurityOut.actor = "http://www.gobiernodecanarias.org/Platino/Authentication/1.0"
set ..SecurityOut.mustUnderstand = "1"
set ..SecurityNamespace = "http://docs.oasis-open.
In a HTTP operation, which extends Ens.BusinessOperation, EnsLib.REST.Operation, one can read the component's AlertGroups property by simply referring to it with "..":
.png)
set AlertGroup = ..AlertGroups //Do something with AlertGroup
"AlertGroups" is a property of Ens.Host. The above however does not work in a business process which Extends Ens.BusinessProcessBPL which extends Ens.BusinessProcess which extends Ens.Host. Can this property be read from inside the business process and what would the syntax
First,
Forgive me if this is a rather low-level question - I am a physician informaticist who is learning cache/mumps for the first time. I am sure this probably relates to some setting but I can't find a similar issue anywhere.
When I create a list, and then try and return that list - I get a bunch of symbols back along with my results, or sometimes I just get symbols.
I pasted a screenshot below. Thank is advance for the help!
Anthony

Hi Developers!
Another way to start using InterSystems ObjectScript Package Manager is to use prebuilt container images of InterSystems IRIS Community Edition and InterSystems IRIS for Health Community Edition.
We deploy this IRIS images on DockerHub and you can run it with the following command:
docker run --rm -p 52773:52773 --init --name my-iris -d intersystemsdc/iris-community:2019.4.0.383.0-zpm
Launch a terminal with:
docker exec -it my-iris iris session IRIS
And install zpm-module as:
USER>zpm zpm: USER>install objectscript-math [objectscript-math] Reload START [objectscript-math] Reload SUCCESS [objectscript-math] Module object refreshed. [objectscript-math] Validate START [objectscript-math] Validate SUCCESS [objectscript-math] Compile START [objectscript-math] Compile SUCCESS [objectscript-math] Activate START [objectscript-math] Configure START [objectscript-math] Configure SUCCESS [objectscript-math] Activate SUCCESS zpm: USER>
And use same commands for InterSystems IRIS for Health using the tag: intersystemsdc/irishealth-community:2019.4.0.383.0-zpm
The images are being published on IRIS Community Edition and IRIS Community Edition for Health repositories of Docker Hub.
We will update tags with every new release of IRIS and ZPM.
Happy coding!