go to post Enrico Parisi · Nov 8, 2023 I was surprised that overriding the OnFailureTimeout() in the custom BO class did not work! According to the description that was definitely the way to go. But it indeed does not work(ed). I opened a WRC and it turned out that there is a bug "around" the OnFailureTimeout() implementation in Ens.BusinessOperation. So, if anyone need to implement OnFailureTimeout() with Set ..Retry=1, first it requires to contact WRC, explain the problem and reference DP-426250 to get the fix. Enrico
go to post Enrico Parisi · Nov 8, 2023 Sorry, forgot the namespace, try this: do ##class(%XML.XPATH.Document).CreateFromStream(pResponse.ContentStream, .tPnRXML) Set tPnRXML.PrefixMappings="ns urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" Set sc=tPnRXML.EvaluateExpression("/XMLMessage/ContentStream/ns:RegistryResponse/ns:RegistryErrorList/ns:RegistryError","@errorCode",.tPnRResult) Set tPnRResult.GetAt(1).Value ; Value=XDSRegistryDeprecatedDocumentError
go to post Enrico Parisi · Nov 7, 2023 do ##class(%XML.XPATH.Document).CreateFromStream(pResponse.ContentStream, .tPnRXML) Set sc=tPnRXML.EvaluateExpression("/XMLMessage/ContentStream/RegistryResponse/RegistryErrorList/RegistryError","@errorCode",.tPnRResult) Set errorCode=tPnRResult.GetAt(1).Value ; errorCode=XDSRegistryDeprecatedDocumentError Enrico
go to post Enrico Parisi · Nov 7, 2023 Hi Dan! I'm please you are listening 😊 "I am listening! $system.external does not replace the old Java Gateway but the old Java and JDBC Gateways should still be available." I know it's "still there" and works, however all the documentation for the old Java and .NET Gateway has been removed since long time (starting from IRIS?), so implementing it today it's difficult for any developer without previous experience.In addition, I'm not sure if it would be a good idea to implement today external calls using the old Gateway, I assume that using the new $system.external is preferred.In fact the documentation contains some info for converting from old gateway to new $system.external: "...upgrading your code is a simple matter of replacing certain class and method references..." Assuming that upgrading is "simple matter of replacing certain class and method references", unfortunately for MANY use cases there is no documentation of what to replace with what. The problem is that now we have no documentation of the (still available) old gateway and "scarce" documentation for the new one.I don't remember the details of the old gateway documentation, however it offered two GREAT code samples where most (if not all) the functionality was implemented: %Net.Remote.DotNet.Test%Net.Remote.Java.Test Using only documented feature/methods of $system.external is not possible to convert the old samples to use $system.external. So, my idea was to encourage the implementation of two samples (maybe Phyton as well?) with all the features. That's the issue at hand. Ciao,Enrico
go to post Enrico Parisi · Nov 7, 2023 Try this: Class Community.HL7.Laboratorio.ORUToCUPv1 Extends Ens.DataTransformDTL [ ClassType = "", DependsOn = EnsLib.HL7.Message, ProcedureBlock ] { Parameter IGNOREMISSINGSOURCE = 0; Parameter REPORTERRORS = 0; Parameter TREATEMPTYREPEATINGFIELDASNULL = 0; XData DTL [ XMLNamespace = "http://www.intersystems.com/dtl" ] { <transform sourceClass='EnsLib.HL7.Message' targetClass='EnsLib.HL7.Message' sourceDocType='2.5:ORU_R01' targetDocType='2.5:ORU_R01' create='new' language='objectscript' > <assign value='source.{MSH}' property='target.{MSH}' action='set' /> <assign value='source.{PIDgrpgrp().PIDgrp.PID}' property='target.{PIDgrpgrp().PIDgrp.PID}' action='set' /> <assign value='source.{PIDgrpgrp().PIDgrp.PV1grp}' property='target.{PIDgrpgrp().PIDgrp.PV1grp}' action='set' /> <assign value='source.{PIDgrpgrp().PIDgrp.NTE()}' property='target.{PIDgrpgrp().PIDgrp.NTE()}' action='set' /> <assign value='0' property='ORCCounter' action='set' /> <foreach property='source.{PIDgrpgrp(1).ORCgrp()}' key='ORC' > <assign value='source.{PIDgrpgrp().ORCgrp(ORC).ORC}' property='target.{PIDgrpgrp(1).ORCgrp(ORC).ORC}' action='set' /> <assign value='source.{PIDgrpgrp().ORCgrp(ORC).OBR}' property='target.{PIDgrpgrp(1).ORCgrp(ORC).OBR}' action='set' /> <assign value='source.{PIDgrpgrp(1).ORCgrp(1).TQ1grp(ORC)}' property='target.{PIDgrpgrp(1).ORCgrp(ORC).TQ1grp(ORC)}' action='set' /> <foreach property='source.{PIDgrpgrp(1).ORCgrp(ORC).OBXgrp()}' key='OBX' > <if condition='1=0' > <true> <assign value='source.{PIDgrpgrp(1).ORCgrp(ORC).OBXgrp(OBX)}' property='target.{PIDgrpgrp(1).ORCgrp(OBX).OBXgrp(OBX)}' action='set' /> </true> <false> <assign value='ORCCounter+1' property='ORCCounter' action='set' /> <assign value='source.{PIDgrpgrp(1).ORCgrp(ORC).OBR}' property='target.{PIDgrpgrp(1).ORCgrp(ORCCounter).OBR}' action='set' /> <assign value='source.{PIDgrpgrp(1).ORCgrp(ORC).ORC}' property='target.{PIDgrpgrp(1).ORCgrp(ORCCounter).ORC}' action='set' /> <assign value='source.{PIDgrpgrp(1).ORCgrp(ORC).TQ1grp()}' property='target.{PIDgrpgrp(1).ORCgrp(ORCCounter).TQ1grp()}' action='set' /> <assign value='source.{PIDgrpgrp(1).ORCgrp(ORC).OBXgrp(OBX)}' property='target.{PIDgrpgrp(1).ORCgrp(ORCCounter).OBXgrp(OBX)}' action='set' /> </false> </if> </foreach> </foreach> </transform> } } Ciao, Enrico P.S.: I changed the IF condition for testing
go to post Enrico Parisi · Nov 7, 2023 Sorry, I mixed things up! Classes in the package HS.FHIR.vSTU3.* are deprecated but HS.FHIR.DTL.vSTU3.* classes are not deprecated. At least to my knowledge. Why do you think they are deprecated? When I read your post I assumed you referred to the deprecated HS.FHIR.vSTU3.* classes, in fact you mentioned HS.FHIR.DTL.vSTU3.Model.Resource.Bundle, so I got confused. Using:Set payload=##class(HS.FHIR.DTL.vSTU3.Model.Resource.Bundle).FromJSON(pHttpResponse.Data,"vSTU3") You should be able to "convert" (import) the stream bundle to the corresponding classes and then "navigate" the bundle, including the resources within it, as a classic IRIS class. Enrico
go to post Enrico Parisi · Nov 6, 2023 To better understand the requirements, can you post at least one sample source message and a (manually transformed message? Enrico
go to post Enrico Parisi · Nov 3, 2023 "Do you mean we have to compile those changed codes in the final deployment environment, at customer site?" Yes, at least only for the production class extending Ens.Production. Enrico
go to post Enrico Parisi · Nov 3, 2023 "we find that the new codes are not visible in the management portal" Are you sure that your code is from APPCODE database? Regarding the production settings, replacing the production class only is not sufficient, you need to compile the production class in the final environment. When a production is compiled "some data" is saved in the (APPDATA in your case) database. Enrico
go to post Enrico Parisi · Nov 2, 2023 Two alternatives comes to my mind: Use not deprecated HS.FHIR.DTL.vSTU3.* classes, something like: Set payload=##class(HS.FHIR.DTL.vSTU3.Model.Resource.Bundle).FromJSON(pHttpResponse.Data,"vSTU3") And then "navigate" the payload instance as a classic IRIS class. Other option, use FHIRPath Enrico
go to post Enrico Parisi · Nov 2, 2023 OK, I've created an idea: Implement samples of $system.external interface (aka "InterSystems External Servers") Now the problem is finding someone ABLE to implement it, not WILLING.... Enrico
go to post Enrico Parisi · Nov 2, 2023 The idea is simple and I'm not sure it can be considered "documentation improvement" or it make sense in the "open exchange". The idea is: add all the missing documentation for $system.external!! The problem in not poor documentation, the problem is the MISSING DOCUMENTATION. And in case you wonder, yes, I have reported this to WRC and sent a feedback to the ISC documentation team. Nothing has happened. On the same topic: Using arrays in $system.external .NET gateway Enrico
go to post Enrico Parisi · Oct 24, 2023 For some unknown reason I was convinced he was using version 2018, I probably mixed up with a differente question! Since it's IRIS version 2020, using the new External Language Server is definitely the way to go, I apologize for my confusion. Enrico
go to post Enrico Parisi · Oct 23, 2023 Hi, before using the Java class/method you need to import/create the proxy classes within Caché using ##class(%Net.Remote.Gateway).%ExpressImport() (or method %Import). Have a look to the documentation here: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY... Enrico
go to post Enrico Parisi · Oct 3, 2023 Converting the Base64 stream to a pdf is trivial, extracting and searching text inside a pdf....can be hard to (almost) impossible. Enrico
go to post Enrico Parisi · Oct 3, 2023 When a new task is created in System Management Portal (SMP) there is a field:"Namespace to run task in" The task will run in that namespace, to find what database it corresponds to check the namespace definition. Enrico
go to post Enrico Parisi · Sep 15, 2023 Ciao Pietro, I'm afraid you cannot change FailureTimeout "at the first iteration", however, for the specific case you describe, in the Business Operation you can override the method OnFailureTimeout() and there programmatically change the default behavior when the FailureTimeout has been reached. Something like: /// Override this method to provide custom handling of retry / failure timeout.<p/> /// Set ..Retry=1 to override normal error return and re-evaluate flag properties.<p/> /// Return 0 to skip further (default) FailureTimeout processing, 1 to perform default processing. Method OnFailureTimeout(pRequest As %Library.Persistent, Output pResponse As %Library.Persistent, ByRef pSC As %Status) As %Boolean { If pRequest.severity = "high" { Set ..Retry=1 Quit 0 } Else { Quit 1 } } This is just a simple example, you may want to test/check pSC.... Give it a try and let us know. Ciao, Enrico
go to post Enrico Parisi · Aug 1, 2023 What type of messages? In general, a message is an instance of a persistent class, so "size" is a vague term. Enrico
go to post Enrico Parisi · May 19, 2023 What's the class/type of test.document property? sendstream.OriginalFilename is replaced/modified by the StreamSet() method
go to post Enrico Parisi · May 16, 2023 Why not use the latest jdbc driver version? https://learn.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jd...