Question Yone Moreno · Aug 18, 2020

Hello,

We would need help.

We have used the following commands:

set fecha = "2021-08-18T07:44:14.180+0000"

set nuevaFecha = ##class(Ens.Util.Time).ConvertDateTime(fecha,"%Y-%m-%d%T%H:%M:%S","%d/%m/%Y")

 

And when we write it to the terminal:

w nuevaFecha

 

It outputs nothing

 

Could you help us?

 

We have read:

 

https://cedocs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.c…

https://community.intersystems.com/post/string-date

3
0 502
Question Yone Moreno · Jul 21, 2020

It would be interesting if there is some recommended documentation about best practices using Healthshare for interoperability.

Also, some how-tos or frequently asked questions about ObjectScript.

Or event better, if there are experienced developers who would like to share some common habits on their work with Studio / ObjectScript, which are valuable to do the developing work better.

For example, How to get the XML of a class and write it into a REST operation:

 

...

Method X(pRequest As Mensajes.ServiciosGeneralRequest, ...){

set writer=##class(%XML.Writer).%New()
set status=wri

1
0 272
Question Yone Moreno · Jul 15, 2020

Hello,

 

We would need to know the Ens.Response SourceConfigName to identify which Operation has raised an exception.

We have tried:

$$$LOGINFO("..%Process.%PrimaryResponseHeader.SourceConfigName..: "_..%Process.%PrimaryResponseHeader.SourceConfigName) //It outputs an empty string
 
$$$LOGINFO("response.SourceConfigName: "_response.SourceConfigName) //It generates an exception

 

We would need to get from an Ens.Response which body is null, its SourceConfigName:

 

How could we know it? 📛

2
0 493
Question Yone Moreno · Jul 7, 2020

Hello,

We wonder how could we get the following attribute:

Which is found in the response Header being sent from a Operation to a Process, when there is an exeptionWwe would need to access the Response ErrorStatus text in the Process

We have already tried:

$$$LOGINFO("..%Process.%PrimaryRequestHeader.ErrorStatus: "_..%Process.%PrimaryRequestHeader.ErrorStatus) //It shows "1"

$$$LOGINFO("$System.Status.GetErrorText(..%Process.%PrimaryRequestHeader.ErrorStatus): "_$System.Status.GetErrorText(..%Process.%PrimaryRequestHeader.ErrorStatus))  //It shows an empty string
1
0 234
Question Yone Moreno · Jun 24, 2020

Hello,

 

We wonder how could we send an HL7 message to a service to test it.

For example, we have a service, at localhost port 19111

 

We have tried to use SoapUI to send a REST POST request as follows:

At the event log we see the following trace:

Then, if we try with POSTMAN as follows:

We observe:

 

 

Would it be the only way to test services, pointing a TCP HL7 operation to the service, and send messages using the Test Action?

We mean that we are testing manually sending messages from the operation "ProbarADTs" to "Servicios.TCP.GeneralHospitalADT":

 

How could we do it from SoapUI or Postman?

3
0 3645
Question Yone Moreno · Jun 16, 2020

Hello,

We would like to learn how would you approach this task.

We would need to check every day a set of folders which are outside our server (in fact we could see them as if they were "inside" the server), then we need to check for modified or created files in the last day, and move all the ones which match the criteria to just one folder in our server.

 

We have thought about doing the following:

1) Create a task to run it each day:

Class Tareas.SaludPublica.EjecutarComando Extends %SYS.Task.Definition
{ Method OnTask() As %Status
{
 set tSC = ##class(Ens.Director).CreateBusinessService("Servicios.

5
0 787
Question Yone Moreno · Jun 15, 2020

Hello,

 

We would need to iterate all over the OBXs list and get their OBX3 CE1 to determine if it is the lab result we need to send to the output system.

 

We wonder how could we achieve this in a foreach component inside a Bussiness Process.

 

We think we would need to use a foreach because of it is needed to generate a message, for each one of the OBX which have the OBX3 CE1 that the output systems uses for the lab results.

1
0 697
Question Yone Moreno · Jun 1, 2020

Hello,

 

We are wondering how could we iterate over a segments list,

 

The use case is that we are sending from Process X to process Y a message, only if at the OBR4 CE1 there is a certain code.  We were getting this field as follows:

set context.studyReason = request.GetValueAt("ORCgrp(1).OBRuniongrp.OBRunion.OBR:UniversalServiceIdentifier.Identifier")

 

How could we iterate over the following message and get both OBR4 CE1 (1 and 2):

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.
2
0 827
Question Yone Moreno · May 19, 2020

Hello,

 

We are trying to connect to a database through a JavaGateway.

 

We observe that the JavaGateway reports:

Failed to start the Java Gateway server: ERROR #5002: Error de cache: <UNDEFINED>zGetJavaVersion+22^%Net.Remote.Service.1 *versionWithPrefix

 

We have checked that we do have the Java Home set:

/usr/java/jdk1.8.0_65

 

And we have seen the java files in the server:

 

We have read the code where the exceptions being raised:

 

/// Returns the numeric part of the Java version string (e.g. 1.8.0.1)
/// Rules of how the complete version string is formatted can be found here:
/// http://www.oracle.

2
0 739
Question Yone Moreno · May 13, 2020

Hello,

We have read the installation guide to get started with zpm package manager:

https://openexchange.intersystems.com/package/ObjectScript-Package-Mana…

 

We wonder what means the second step:

"Import the zpm.xml into IRIS and compile via any desired way (Management Portal, Studio or Terminal)"

 

We have thought that it means to place the zpm-0.2.2.xml file inside "C:\InterSystems\HealthShare_2\opt\contenedor"

Then in the terminal, go inside one namespace:

zn "esbsscc"

After that we load and compile the .xml:

write $SYSTEM.OBJ.Load("C:\InterSystems\HealthShare_2\opt\contenedor\zpm-0.2.2.

7
1 1791
Question Yone Moreno · May 11, 2020

Hello,

 

We would like to know if Ensemble could generate a CADES sign from a string and a certificate.

 

We have read:

https://cedocs.intersystems.com/latest/csp/docbook/Doc.View.cls?KEY=GXM…

 

So we have seen that we could create a class, to sign a document, and store the sign inside that new class. We have also seen that there are some different algorithms to choose from, like sha1.

 

In addition we have also consulted the CADES sign definition:

https://tools.ietf.org/html/rfc5126

 

The use case is to avoid being dependant of an external web service, and be able to generate it.

1
0 228
Question Yone Moreno · Apr 30, 2020

Hello,

 

We would need to convert a message from the following class:

Class Mensajes.Request.Laboratorio.HL7Request Extends Ens.Request [ ClassType = persistent, ProcedureBlock ]
{ Parameter RESPONSECLASSNAME = "Mensajes.Response.Laboratorio.ACKResponse";

Property mensaje As %XML.GlobalCharacterStream(CONTENT = "MIXED");

Property idPeticion As %String(MAXLEN = "");

Property ExpedienteUsuario As %String(MAXLEN = "");

Property MessageId As %String(MAXLEN = ""); Property ContentType As %String(MAXLEN = "");

 

to a Request message which is composed by hl7 segments:

Class Mensajes.Request.Laboratorio.

1
0 1026
Question Yone Moreno · Mar 27, 2020

Hello,

We are developing a BP where we would need to call at the same time to get appointments in two external systems. So then, we would need two threads, one for primary care appointments, and other for specialist appointments . We need to paralelize both calls because of both of them require some time and we would need to shorten it as much as possible.

3
0 391
Question Yone Moreno · Mar 26, 2020

Hello,

 

We are developing a method to take two messages which have a list of data types. It is being defined as:

 

Class Mensajes.Response.HistoriaClinica.ConsultaCitasResponse Extends Ens.Response [ ProcedureBlock ]
{

Property informacion As EsquemasDatos.HistoriaClinica.Informacion;

Property datos As list Of EsquemasDatos.HistoriaClinica.ConsultaCitas;

Property error As EsquemasDatos.HistoriaClinica.Error;

}

 

Inside datos we have:

Class EsquemasDatos.HistoriaClinica.ConsultaCitas Extends (%Persistent, %XML.

1
0 763
Question Yone Moreno · Mar 26, 2020

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?

1
0 288
Question Yone Moreno · Mar 26, 2020

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).
1
0 498
Question Yone Moreno · Mar 16, 2020

Hello,

 

We have a Service which behaves differently even though two equal Soap UI XML requests are being sent, from different systems.

 

When it is being sent from the other system, our Service's log shows:


ERROR <Ens>ErrGeneral: invalid HTTP version'xmlns:ges="http://XXX.XXXXXXXXX/GestionPacientes">'  

 

When we send the same XML message from SoapUI, it is being processed by our system.

 

We have checked that the service's NAMESPACE is: "http://XXX.XXXXXXXXX/GestionPacientes"

 

How could we debug further this behaviour?

 

We have read:

 

https://stackoverflow.

1
0 532
Question Yone Moreno · Mar 5, 2020

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 %PrimaryRequestHeader property inside

2
0 884
Question Yone Moreno · Feb 18, 2020

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.
2
0 946
Question Yone Moreno · Feb 13, 2020

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.

2
0 316
Question Yone Moreno · Feb 12, 2020

Hello,

 

We would like to convert a string which represents a dynamic JSON object, to a JSON.

 

We have:


linea: {"app_id":"5cf57b56-c3b4-4a0d-8938-4ac4466f93af","headings":{"en":"Cita Atención Primaria","es":"Cita Atención Primaria"},"subtitle":{"en":"C.P. ISORA","es":"C.P. ISORA"},"contents":{"en":"Aqui el contenido del mensaje si aplicase","es":"Aqui el contenido del mensaje si aplicase"},"data":"{\"centro\":\"C.P.

2
0 1939
Question Yone Moreno · Feb 11, 2020

Hello,

 

We would like some help:

We have found that in the following code:

 

Class Operaciones.SOAP.Gasometros.GestionPacientes.SeleneHL7Service Extends Ens.BusinessOperation [ ProcedureBlock ]
{

Method operacion(pRequest As Mensajes.Request.GestionPacientes.operacionRequest, Output pResponse As Mensajes.Response.GestionPacientes.operacionResponse) As %Library.Status
{
 Set .Adapter.WebServiceClientClass = "WSCLIENTE.GestionPacientes.ConsultaCandidatos"
 Set MSH=pRequest.MSH,SFT=pRequest.SFT,QPD=pRequest.QPD,DSC=pRequest.DSC
 Set tSC = .Adapter.InvokeMethod("operacion",,.MSH,.SFT,.
6
0 386
Question Yone Moreno · Feb 10, 2020

Hello,

 

We would like help to know why our web service which gets Patient's ID number, does not accept messages?

 

We observe its Event Log, and it contains the following pattern:

 

 

We detail each log to give info to discover what's happening:

First there is a new connection:

 

Then it suddenly disconnects

 

After that it looks like the service restarts:

The next one is interesting: it outputs that UTF-8 encoding is invalid, inside EnsLib.SOAP.InboundAdapter

We have searched for UTF-8 inside SOAP.

3
0 800
Question Yone Moreno · Feb 6, 2020

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.

1
1 452
Question Yone Moreno · Feb 6, 2020

Hello,

I would like to change signature's algorithm to be sha1.

I share the current code:

 

(BINARY SECURITY TOKEN and USERNAME TOKEN CODE omitted)

//SIGNATURE TOKEN
    set signSha1=##class(%XML.Security.Signature).%New()
    do signSha1.SetSignatureMethod($$$SOAPWSrsasha1)
    //..SetSignatureMethod($$$SOAPWSrsasha1)
    //$method(signSha1,"SetSignatureMethod",$$$SOAPWSrsasha1)
    //signSha1.SetSignatureMethod($$$SOAPWSrsasha1)
   set sig=signSha1.CreateX509(cert)

I have tried to use SetSignatureMethod, however in the Message Viewer we see:

 

As you see I have tried every other way I could

1
0 178
Question Yone Moreno · Feb 4, 2020

Hello,

 

I have created my first table in Ensemble:

 

 

And I have added a row using the Production:

 

 

We would like to query it, and we would expect to get a row wih all the previous' image data.

 

I have tried, inside a code block in a Bussiness Process:

  set statement=##class(%SQL.Statement).%New()
 
  set status = statement.%PrepareClassQuery("TablasBBDD.NotificacionesPUSH.RelacionAplicacionNotificacion","seleccionarTodo")
 
  set result = statement.%Execute()
  do result.%Display()
 
  $$$LOGINFO("filas result: "_result.%ROWCOUNT)
 
  $$$LOGINFO("result: "_result)
 
  //$$$LOGINFO("clave: "_result.

3
0 383