go to post Enrico Parisi · Nov 20, 2023 Difficult to tell from the limited info provided. What I can guess is that it seems you are trying to use a serial class (HS.FHIRServer.API.Data.Request) as message. But I might be wrong, please provide more context. Enrico
go to post Enrico Parisi · Nov 20, 2023 My guess/bet is that they need/want to include the specimen label(s) in PDF format. I think that crating a custom schema with custom Z segment, possibly a repeating segment, is an option. Enrico
go to post Enrico Parisi · Nov 18, 2023 The documentation includes a lot of info about INSERT OR UPDATE Sql command, including: "An existing row is one in which the value being inserted already exists in a column that contains a unique constraint. For more details, see Uniqueness Checks." "When using INSERT OR UPDATE, you can only insert IDKEY column values, not update them. If the table has an IDKEY index and another UNIQUE constraint, INSERT OR UPDATE matches these columns to determine whether to perform an insert or an update. If the other key constraint fails, this forces INSERT OR UPDATE to perform an update rather than an insert. However, if the specified IDKEY column values do not match the existing IDKEY column values, this update fails and generates an SQLCODE -107 error, because the update is attempting to modify the IDKEY columns." I suggest to read carefully the relevant documentation page. Enrico
go to post Enrico Parisi · Nov 14, 2023 It seems that character 8211 (en dash) is not utf-8 but utf-16, google is your best friend and I'm not an expert in unicode, utf-8, utf-16 etc.! 😊 Set xml="<?xml version=""1.0"" encoding=""UTF-8""?>"Set xml=xml_"<Text>This is n-dash "_$wc(8211)_" in xml</Text>"Set xml=$ZCONVERT(xml,"O","UTF8")Set sc=##class(%XML.XPATH.Document).CreateFromString(xml, .xmlDoc)Write scSet sc=xmlDoc.EvaluateExpression("/Text","text()",.result)Write result.GetAt(1).Value,! Result: This is n-dash – in xml Enrico
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 · 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 · May 16, 2023 It's an issue of the jTDS, using the connection the second time and IRIS try to reuse the connection there is an error: ERROR #5023: Remote Gateway Error: java.lang.AbstractMethodError at net.sourceforge.jtds.jdbc.JtdsConnection.isValid(JtdsConnection.java:2833) at com.intersystems.jdbcgateway.JDBCGateway.isValid(JDBCGateway.java:1982) at com.intersystems.jdbcgateway.JDBCGatewayHelper.processMessage(JDBCGatewayHelper.java:642) at com.intersystems.gateway.JavaGateway.getJDBCGatewayMessage(JavaGateway.java:2015) at com.intersystems.gateway.JavaGateway.processMessage(JavaGateway.java:519) at com.intersystems.gateway.JavaGateway.run(JavaGateway.java:458) at com.intersystems.gateway.JavaGateway.run(JavaGateway.java:421) My guess is that for IRIS the connection "is not valid" therefore open a new connection. It's a known issue already reported. If you search for "jTDS AbstractMethodError isValid()" you will find many entries.. Enrico
go to post Enrico Parisi · May 16, 2023 I know this is old, but recently I found a new way to export/import a package to a global, this may simplify the solution. 1) create a studio project with all the classes that need to me exported. This can be done programmatically, create an instance of %Studio.Project, use AddItem()...etc. 2) Export the project to a global like ^IRIS.Temp("myProjExport"). Open %Studio.Project, export ot global using DeployToGbl() method 3) in target namespace import calling ##class(%Studio.Project).InstallFromGbl() Using ^IRIS.Temp has the advantage of easy/shared access from all namespaces. Enrico
go to post Enrico Parisi · May 10, 2023 Create a new class, say myCSP.WebSocket, that extends %CSP.WebSocket. Add your instance method to myCSP.WebSocket class and use it as superclass of your CSP page(s). Enrico
go to post Enrico Parisi · Feb 23, 2023 Personally I'd rather use a default numeric ID and if needed an additional UUID/GUID unique property. To implement what you asked you can use something like: Class My.TestClass Extends %Persistent { Property PrimaryUUID As %String [ InitialExpression = {$system.Util.CreateGUID()} ]; Property MyOtherData As %String; Index PrimaryUUIDIndex On PrimaryUUID [ IdKey, Unique ]; } In this way the primary key (PrimaryUUID) is automatically assigned, no need to set it manually, in SQL is mapped as ID (as well as PrimaryUUID). Enrico
go to post Enrico Parisi · Feb 7, 2023 I would send the message to a Business Operation and set state as deferred, then "later" (when? what trigger? from where?) using some logic, choose the message(es) and send response to that BO from somewhere (Business Service? Any other Business Host? ...to little info to know) to continue the process. Not enough info to elaborate it further. Enrico
go to post Enrico Parisi · Feb 2, 2023 There are plenty of options, as discussed in the thread linked above. Personally, a little more than 10 years ago I've used a (commercial) .NET library called hiqpdf and wrote a very tiny .NET wrapper. Works great and since then it's still running fine. Enrico
go to post Enrico Parisi · Jan 16, 2023 Single character greater than or equal symbol is $c(8805), so: .......set text=^||TestProfile("Table",p,"PostInfo",r)set text=$replace(text,">=",$c(8805))....... Try and let us know. Enrico
go to post Enrico Parisi · Jan 12, 2023 You can change the port from 57772 to 80 in System Managment Portal: System Administrtion -> Configuration -> Additional Settings -> Startup -> WebServerPort Or cache.cpf configurtion file: WebServerPort=57772 to WebServerPort=80 Better, proper and suggested solution: install a properly configured web server using port 80, don't use the little web server installed by Ensemble. Enrico
go to post Enrico Parisi · Jan 11, 2023 Exactly for that situation I use: If ##class(Ens.Job).ShouldBeQuiescent() || ##class(Ens.Job).ShouldTerminate() { ; do your closing housekeeping or...whatever.. Quit } In your case maybe only ShouldTerminate() would be sufficient. Enrico
go to post Enrico Parisi · Dec 22, 2022 I haven't seen a database corruption for many years, I literally forgot the last time I saw it, it may be 15+ years or more. And in the past (last millennium) I've seen and dealt db corruption. Out of curiosity, what are the symptoms or your corruption? How did it happened?