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
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.
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)
In one of my class, I use Stream.Read() method of the %Stream.Object class.
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:
Class Operaciones.REST.NotificacionesPUSH.CrearNotificacion Extends EnsLib.REST.Operation
{ 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:
set ^sourceName = ..#SERVICENAME
However we would like to get it directly from the BPL. We have tried:
Set SourceConfigName = ..%PrimaryRequestHeader.SourceConfigName
$$$LOGINFO("SourceConfigName "_SourceConfigName)
And the compiler outputs:
ERROR: Procesos.HistoriaClinica.ConsultaDatosHCEPaciente.Thread1.cls(S161+247) : MPP5376 : Method or Property '%PrimaryRequestHeader' does not exist in this class.
How could we access to %PrimaryRequestHeade
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:
Method incorporarDocumento(request As EsquemasDatos.incorporarDocumentoRequest(REQUIRED=1)) As EsquemasDatos.documentoIncorporado(XMLNAME="return") [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
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.
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!
Hello,
We would like to get the XML which is being given by the requested system, directly to our Service output.
We have tried to just output directly the Message Response as follows:
Method findCandidatesXML(mensEntrada As %XML.GlobalCharacterStream(CONTENT="MIXED")) As Mensajes.Response.GestionPacientes.operacionResponse(XMLNAME="mensSalida") [ Final, ProcedureBlock = 1, SoapAction = "http://SCS.Servicios/GestionPacientes/findCandidatesXML", SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{
set ^tipoMensaje="XML"
$$$LOGINFO("El mensaje es de tipo: "_^tipoMensaje)
#dim tSC as %Status
if ('..IsServiceEnabled()){
set tSC = $SYSTEM.Status.Error(60333,"Web Service Not Enabled")
if $$$ISERR(tSC) do ..ReturnMethodStatusFault(tSC)
}
//----
set p = ##class(%GlobalCharacterStream).%New()
while (mensEntrada.AtEnd=0){
//do p.Write(mensEntrada.Read())
do p.Write($zcvt(mensEntrada.Read(),"O","UTF8"))
}
$$$LOGINFO("El mensaje en XML: "_p.Read())
do p.Rewind()
set msgER7 = ##class(EnsLib.HL7.Message).%New()
set msgER7 = ##class(ITB.HL7.Util.Convert).XMLToER7(p,.tSC,"2.5")
$$$LOGINFO(tSC)
//Establece DocType
if (msgER7.GetValueAt("1:9.3") '= "") {
do msgER7.DocTypeSet("2.5"_":"_msgER7.GetValueAt("1:9.3"))
} else {
set tipo = msgER7.GetValueAt("1:9.1")
set evento = msgER7.GetValueAt("1:9.2")
do msgER7.DocTypeSet("2.5"_":"_tipo_"_"_evento)
}
set pPesponse = ##Class(Mensajes.Response.GestionPacientes.operacionResponse).%New()
//proceso el mensaje
set tSC = ..SendRequestSync("EnrutadorConsultaPaciente",msgER7, .pPesponse)
//set tSC = ..SendRequestAsync("EnrutadorConsultaPaciente",p, .pPesponse)
if $$$ISERR(tSC){ $$$TRACE("Error en la llamada al destino"_$system.Status.GetErrorText(tSC))}
Quit pPesponse
}Hello,
We would like to store a list into a global. The need is to get the full Web Service's Response Message, because of currently, our Operation sends the message to the Process, whith an empty list:

We have created a copyList which is a clone of the list which is being returned from the web service client:
set copyList = ##class(%ListOfObjects).%New()
set copyList = pResponse.RSPK21QUERYRESPONSE.%ConstructClone(1)
$$$LOGINFO("copyList: "_copyList)
$$$LOGINFO("copyList count: "_copyList.Count())
$$$LOGINFO("copyList.GetAt(1): "_copyList.GetAt(1))
$$$LOGINFO("copyList.PID8: "_copyList.
How can I get the current date and time in the destination file when I'm using Stream.CopyFrom because Stream.CopyFrom preserves the date and time of the source file.
I am looking to run some analysis on existing software to quickly identify global variable references. Ideally you would feed in a "starting routine" and after going through all referenced routines you would end up with a finite set of global variables. So the primary purpose is to take say 10,000 lines of code and map out the referenced global structures without relying on a programmers eye. I found the post on Object Script equivalent to Studio "Find in Files" interesting but the downside is that output is too verbose and would require parsing to extract the global structures. How would you override writing to the terminal so that you could parse the data?
I'm looking into finding ways to fetch data from cache efficiently and work with it with python - specially pandas.
i tried the following but i'm wondering if this is the most efficient way?
to run the stored procedure as %ResultSet inside cache in a classmethod and serialize the data to JSON
and then call that class method from python
Class User.RegObj %RegisteredObject
call from Python
>>> import irisnative as iris
>>> conn=iris.createConnection("127.0.0.1", 51773, "USER", "_SYSTEM","SYS")
>>> wrk=iris.createIris(conn)
>>> print(wrk.classMethodValue("User.RegObj","runAlpha"))
Hello,
We would like to submit a JSON using Ensemble. Here we have the JSON structure:
{
"app_id": "e47322de-64c8-43c5-a1b7-42aa6409eb48",
"headings": {"en":"Cita Atencion Primaria","es":"Cita Atencion Primaria"},
"subtitle": {"en":"C.P. ISORA","es":"C.P. ISORA"},
"contents": {"en": "Next appointment", "es": "Siguiente cita"},
"data":{
"centro": "C.P.