go to post Enrico Parisi · Apr 1, 2024 Well...in OnProcessInput method timeProcessed is current date/time! No message or session has been created yet your (your code will do that).
go to post Enrico Parisi · Apr 1, 2024 I don't think that long string support is the issue. Can you provide details on when/where you get the <MAXSTRING> error?
go to post Enrico Parisi · Apr 1, 2024 Where in a Business Service you need this? ..%RequestHeader is the header of a received request, a BS does not receive a "production request", it SEND a request to other business host (BP or BO).
go to post Enrico Parisi · Apr 1, 2024 For DEFLATE use: open tmpFile:("WNS":::/COMPRESS="DEFLATE"):0 set original = "my very long string which needs to be deflated" zwrite original write !,"using $system.Util.Compress",! set compressed = $system.Util.Compress(original, "zlib") set compressed=$e(compressed,4,*-5) zwrite compressed zzdump compressed write ! set deflated = $system.Encryption.Base64Encode(compressed, 1) zwrite deflated set tmpFile = ##class(%File).TempFilename("bin") set io = $io open tmpFile:("WNS":::/COMPRESS="DEFLATE"):0 use tmpFile write original use io close tmpFile set stream = ##class(%Stream.FileBinary).%New() set stream.Filename = tmpFile set stream.RemoveOnClose = 1 set compressed = stream.Read(stream.Size) write !,"using open file",! zwrite compressed zzdump compressed write ! set deflated = $system.Encryption.Base64Encode(compressed, 1) zwrite deflated write !,"Expected",! set base64 = "y61UKEstqlTIyc9LVyguKcoEUuUZmckZCnmpqSnFCiX5CkmpCimpaTmJJakpAA==" set compressed = $system.Encryption.Base64Decode(base64) zwrite compressed zzdump compressed write ! Result: original="my very long string which needs to be deflated" using $system.Util.Compress compressed="ËT(K-ªTÈÉÏKW(.)Ê"_$c(4)_"Rå"_$c(25,153)_"É"_$c(25,10)_"y©©)Å"_$c(10)_"%ù"_$c(10)_"I©"_$c(10)_")©i9"_$c(137)_"%©)"_$c(0) 0000: CB AD 54 28 4B 2D AA 54 C8 C9 CF 4B 57 28 2E 29 ËT(K-ªTÈÉÏKW(.) 0010: CA 04 52 E5 19 99 C9 19 0A 79 A9 A9 29 C5 0A 25 Ê.Rå..É..y©©)Å.% 0020: F9 0A 49 A9 0A 29 A9 69 39 89 25 A9 29 00 ù.I©.)©i9.%©). deflated="y61UKEstqlTIyc9LVyguKcoEUuUZmckZCnmpqSnFCiX5CkmpCimpaTmJJakpAA==" using open file compressed="ËT(K-ªTÈÉÏKW(.)Ê"_$c(4)_"Rå"_$c(25,153)_"É"_$c(25,10)_"y©©)Å"_$c(10)_"%ù"_$c(10)_"I©"_$c(10)_")©i9"_$c(137)_"%©)"_$c(0) 0000: CB AD 54 28 4B 2D AA 54 C8 C9 CF 4B 57 28 2E 29 ËT(K-ªTÈÉÏKW(.) 0010: CA 04 52 E5 19 99 C9 19 0A 79 A9 A9 29 C5 0A 25 Ê.Rå..É..y©©)Å.% 0020: F9 0A 49 A9 0A 29 A9 69 39 89 25 A9 29 00 ù.I©.)©i9.%©). deflated="y61UKEstqlTIyc9LVyguKcoEUuUZmckZCnmpqSnFCiX5CkmpCimpaTmJJakpAA==" Expected compressed="ËT(K-ªTÈÉÏKW(.)Ê"_$c(4)_"Rå"_$c(25,153)_"É"_$c(25,10)_"y©©)Å"_$c(10)_"%ù"_$c(10)_"I©"_$c(10)_")©i9"_$c(137)_"%©)"_$c(0) 0000: CB AD 54 28 4B 2D AA 54 C8 C9 CF 4B 57 28 2E 29 ËT(K-ªTÈÉÏKW(.) 0010: CA 04 52 E5 19 99 C9 19 0A 79 A9 A9 29 C5 0A 25 Ê.Rå..É..y©©)Å.% 0020: F9 0A 49 A9 0A 29 A9 69 39 89 25 A9 29 00 ù.I©.)©i9.%©).
go to post Enrico Parisi · Mar 31, 2024 I've been there before on IRIS zlib compression library.... The problem is explained in Compress(), from Class Reference %SYSTEM.Util, Compress() method (emphasis mine): Returns the compressed form of a given string.When Type is specified, it is the compress algorithm used to compress the data. Its value can be "zlib", "zstd" or "lz4". If Type is not specified then the "zlib" compression algorithm is used. A compressed string is a compressed data block with a customized wrapper. Use Decompress() to decompress it. So, after Compress() you need to remove the "customized wrapper": set compressed=$e(compressed,4,*-5) Unfortunately Decompress() needs the custom wrapper, and I don't know how to make it up, however, as in your sample, I/O can be used, using file in your sample. Regarding the file I/O, note that form Open command documentation: "zlib" — Use the zlib compression library. /COMPRESS="zlib" is equivalent to /GZIP=1 So, if you change: open tmpFile:("WNS":::/COMPRESS="zlib":/GZIP=0):0 With: open tmpFile:("WNS":::/GZIP=0):0 It will then work just fine. I fully agree that it's a pity to have zilib compress/uncompress utility "custimized" with proprietary wrapper that makes it unusable for any "standard use". However in that case you can use I/O, file or other devices. Personally I use XDEV for compress/decompress and leave the silly %SYSTEM.Util.Compress()/Decompress() alone.
go to post Enrico Parisi · Mar 29, 2024 First I'd suggest to test the DSN from linux, assumung you are using unixODBC ODBC driver manager: isql -v HL7Interface2 myusername mypassword
go to post Enrico Parisi · Mar 27, 2024 I'm no expert in vectors so I might be wrong, however it seems to me that the problem is not in the VECTOR_COSINE() function, instead it seems to me the problem is in the TO_VECTOR() function inside VECTOR_COSINE(). The documentation for the TO_VECTOR() function for the first argument (data) says: If you are using TO_VECTOR in Dynamic SQL, other data types are accepted. The allowed data types are determined by the SelectMode. If the SelectMode is ODBC or Display, the data argument may be passed in as a DynamicArray, as well as a string. If the SelectMode is Logical, the data argument must be entered as a $vector. In this case the SelectMode is Logical and it does not seems to me that the TO_VECTOR() first argument is passed as $vector.
go to post Enrico Parisi · Mar 26, 2024 What do you mean by "I concatenated them into one file, all.gz."?How did you do that?
go to post Enrico Parisi · Mar 26, 2024 You may have already fond this in this community, maybe not: Caché ObjectScript Quick Reference (aka "the Cheat Sheet")
go to post Enrico Parisi · Mar 23, 2024 You can use/reference %SYS.Journal.Record class and method from Python to work with journal files, what's your problem with that? What do you need to achieve? I don't think that implementing %SYS.Journal.Record functionality in Python from scratch would be easy and I miss a good reason why anyone would want to do that. To work with journal files IRIS provide an API implemented in %SYS.Journal.Record class and that's what we are supposed to use.
go to post Enrico Parisi · Mar 23, 2024 If the target of your transformation is an HL7 message you should not unescape HL7 content, if you do it your HL7 message will be invalid. In your example \T\ is the escape of the "&" character that is a field separator. If the target of your transformation is not an HL7 message then you do need to unescape your fields. Instead of using $translate or $replace I suggest using the Unescape() method in the EnsLib.HL7.Segment class, this assure you are unescaping all possible escaped character.The Unescape() method is in the segment class, so first you need to reference a segment (any segment), then the Unescape() method. I'd use the MSH segment, so your method call will be:source.GetSegmentAt("MSH").Unescape() Then all you need is to pass the field reference, for exaple: source.GetSegmentAt("MSH").Unescape(source.{AIS:UniversalServiceIdentifier.Identifier})or/and:source.GetSegmentAt("MSH").Unescape(source.{AIS:UniversalServiceIdentifier.Text})
go to post Enrico Parisi · Mar 23, 2024 Documentation for your product/version is here:https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls Note that Caché 2018.1 supports .NET up to 4.5, it seems you are using 4.8, I'm not sure it works with 4.8. In Caché Management Portal, go to System Administration -> Security -> Users, in the _SYSTEM user row click the "Profile" link (last column), after the .NET error, what's the content of "Last Reason for Failing to Login"?
go to post Enrico Parisi · Mar 23, 2024 Almost impossible to help without details on the .NET code you are using to connect and call Caché. I think examples use very old version of Visual Studio You are using an old version/product too, Caché 2018.1.
go to post Enrico Parisi · Mar 21, 2024 I think the product IS fully released since more than a week now: InterSystems announces General Availability of InterSystems IRIS 2024.1 Or I'm missing something? You even posted in the announce!
go to post Enrico Parisi · Mar 21, 2024 found no documentation on how to set a VECTOR Datetype on pure object level Maybe you can have a look to the documentation of $vector, $vectorop, $vectordefined and $isvector intrinsic functions.
go to post Enrico Parisi · Mar 19, 2024 The prerequisites for the InterSystems HL7 Interface Specialist certification include the training course and "At least 6 months - 1 year designing, building, and performing basic troubleshooting of HL7 interfaces with InterSystems products version 2019.1 or higher." Actual/real experience will definitely help in passing the certification, theoretical study and some exercise may not be enough to gain the knowledge required. In the exam description page you can find a list of "Exam Topics and Content". All questions in the exam belong to those topics. Last but not least, everything is contained in the documentation.
go to post Enrico Parisi · Mar 19, 2024 It contains the sender of the current request message being processed by the BO.
go to post Enrico Parisi · Mar 19, 2024 Within your BO method ..%RequestHeader.SourceConfigName contains the name of the "sender" Business Host.
go to post Enrico Parisi · Mar 19, 2024 Where/when do you want to know it? Usually you get this information looking at the trace of the session/message. Or you need to know the sender from within your BO code/method?