go to post Eduard Lebedyuk · Oct 3, 2022 GetSDA method accepts HL7 source in source variable and returns SDA stream in xml variable.
go to post Eduard Lebedyuk · Sep 30, 2022 In your Business Service, assuming you are using EnsLib.HL7.Adapter.TCPInboundAdapter or something based on that as adapter, call: write ..%Adapter.GetAddress()
go to post Eduard Lebedyuk · Sep 29, 2022 Riiight, I thought we had this discussion. Thanks for finding it.
go to post Eduard Lebedyuk · Sep 29, 2022 Does not work with dynamic object class properties unfortunately: Class User.DO Extends %Persistent { Property MyProp As %DynamicObject; /// do ##class(User.DO).Test() ClassMethod Test() { do ..%KillExtent() // 11 = $length({"prop":""}.%ToJSON()) for len = 100, $$$MaxStringLength - 11, $$$MaxStringLength - 11 + 1 { set sc = ..Create(len) write "len: ", len, " result: ", $case($$$ISOK(sc), $$$YES: "OK", : "ERROR: " _ $system.Status.GetErrorText(sc)), ! quit:$$$ISERR(sc) } } ClassMethod Create(len) As %Status { set obj = ..%New() do obj.MyProp.%Set("prop", ..GetStream(len), "stream") set sc = obj.%Save() quit sc } ClassMethod GetStream(len) As %Stream.TmpCharacter { set chunk = 1000000 set stream = ##class(%Stream.TmpCharacter).%New() for i=1:chunk:len-chunk { do stream.Write($tr($j("", chunk)," ", 0)) } do stream.Write($tr($j("", len#chunk)," ", 0)) quit stream } } Results in: len: 100 result: OK len: 3641133 result: OK len: 3641134 result: ERROR: ERROR #5002: ObjectScript error: <MAXSTRING>%GetSerial+1^%Library.DynamicAbstractObject.1 [%GetSerial+1^%Library.DynamicAbstractObject.1:XF] Same issue if there are several short properties in dynamic object with total length > 3641144 characters. We need something like: Property MyProp As %DynamicObject(STORAGE="stream");
go to post Eduard Lebedyuk · Sep 29, 2022 If I define %DynamicObject property and its serialization is longer than 3641144 characters, would that work?
go to post Eduard Lebedyuk · Sep 28, 2022 Yes, well, you explicitly set your error in: do { $$$ASSERT(0) // Subclass Responsibility Set tSC = $$$EnsError($$$EnsErrNotImplemented,$$$CurrentClass,$$$CurrentMethod) } while (0) Exit Quit tSC Trap Set $ZT="",tSC=$$$EnsSystemError Goto Exit } You need to remove that. Also Patient info should be in SDA already, so you can remove: Set target.Patient.Name=source.GetValueAt("PID:5") Set target.Patient.BirthGender=source.GetValueAt("PID:8")
go to post Eduard Lebedyuk · Sep 28, 2022 Code block in my answer is exactly that. What error are you getting with it?
go to post Eduard Lebedyuk · Sep 28, 2022 You need to create HS.SDA3.Container object in Transform method before using it. Something like this: Class Hosiptal.SDA3.DataTrans Extends Ens.DataTransform { ClassMethod Transform(source As EnsLib.HL7.Message, ByRef target As HS.SDA3.Container, aux) As %Status { #Dim sc As %Status = $$$OK Set sc = ##class(HS.Gateway.HL7.HL7ToSDA3).GetSDA(source, .xml) Quit:$$$ISERR(sc) sc Set target = ##class(HS.SDA3.Container).%New() Set sc = target.InitializeXMLParse(.xml) Quit sc } }
go to post Eduard Lebedyuk · Sep 27, 2022 %String as defined by OP (without MAXLEN) only holds 50 characters, %VarString holds 3641144.
go to post Eduard Lebedyuk · Sep 26, 2022 Check the docs from @Marc Mundt, specifically Binary Contains.
go to post Eduard Lebedyuk · Sep 26, 2022 Great! What's the purpose of: C:\InterSystems\IRISHealth\bin>irispip install --target C:\InterSystems\IRISHealth\mgr\python numpy
go to post Eduard Lebedyuk · Sep 23, 2022 You can generate methods using Native API for Python, so technically yes.
go to post Eduard Lebedyuk · Sep 23, 2022 Define a custom class query with Exec/Fetch methods in python, after that call this query from a method with ReturnResultsets enabled. Or just call custom class query from SQL.
go to post Eduard Lebedyuk · Sep 23, 2022 I'd suggest using source control and CI/CD to track changes. Additionally you can add parent commit hash and compile time automatically.
go to post Eduard Lebedyuk · Sep 22, 2022 If I'm using an objectgenerator, is there a way to check the compile flags and have it behave differently based on which flags are set? A very exciting way to introduce some unexpected behavior down the line. What is your use case? And as a tangent, is there a list somewhere of what compile flags there are? Sure: do $system.OBJ.ShowFlags() do $system.OBJ.ShowQualifiers()