go to post Eduard Lebedyuk · Dec 14, 2022 I'll start from the simplier one: and also the use or DISPLAYLIST & VALUELIST does this brings any advantage vs defining a standard property (eg.fast access!), so instead of have to do Valuetist "H" and Dispay "Hot" why just a standard property as string containing "Hot"? More effective storage. If you can replace Cold with 1, Medium with 2 and Hot with 3 you can save some space. Another reason is that VALUELIST turns a string into a enum, which changes the logic considerably.
go to post Eduard Lebedyuk · Dec 13, 2022 Disable breaks for a current process by calling $system.Process.BreakMode(0). Docs. To disable breaks system-wide set the BreakMode property in the Config.Miscellaneous class.
go to post Eduard Lebedyuk · Dec 7, 2022 This is probably a question to raise in the WRC. What's the MD5 hash of your InterSystems IRIS Community 2022.2.0.368.0 installation file (original exe, not the unpacked msi)?
go to post Eduard Lebedyuk · Dec 2, 2022 I think you need to use SOAP or REST APIs. Docs: https://api.sap.com/products/SAPS4HANACloud/apis/all Postman example: https://blogs.sap.com/2020/12/23/using-postman-call-sap-s-4hana-cloud-so...
go to post Eduard Lebedyuk · Nov 24, 2022 InterSystems is aware of the issue, it will be fixed soon. UPD: Should be working now.
go to post Eduard Lebedyuk · Nov 18, 2022 2016.1 to anything System Methods! Search your codebase for ".$from" and ".$to". You'll have to change your application code if there are System Methods present present. Other than that, you might want to update to 2017.1 to take an advantage of Frozen Plans. Is it possible to test update procedures on dev/test deployment first?
go to post Eduard Lebedyuk · Nov 8, 2022 Adapters cannot exist outside of BHs so you can use ##class(Ens.Director).IsItemEnabled(component) on the BH adapter belongs to.
go to post Eduard Lebedyuk · Nov 2, 2022 Sure: set db = ##Class(SYS.Database).%OpenId(dir,,.sc) write db.Mirrored where dir is a directory with IRIS.DAT.
go to post Eduard Lebedyuk · Oct 14, 2022 I do see Database class in intersystems-binding-3.2.1. Update to 2022.1?
go to post Eduard Lebedyuk · Oct 13, 2022 Use LibreOffice from IRIS or (if you only need the data) Apache POI.
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 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()
go to post Eduard Lebedyuk · Sep 22, 2022 If there's a text layer use LibreOffice to convert to txt (InterSystems IRIS wrapper), for OCR you'll need some thirdparty tool, for example Tesseract can be easily used with Embedded Python. UPD: LibreOffice can't extract text from PDFs unfortunately. Here's Embedded Python solution: Class User.PDF { /// zw ##class(User.PDF).GetText("/tmp/example.pdf", .text) ClassMethod GetText(file, Output text) As %Status { try { #dim sc As %Status = $$$OK kill text set dir = $system.Util.ManagerDirectory()_ "python" do ##class(%File).CreateDirectoryChain(dir) // pip3 install --target /data/db/mgr/python --ignore-requires-python typing==3.10.0.0 try { set pypdf2 = $system.Python.Import("PyPDF2") } catch { set cmd = "pip3" set args($i(args)) = "install" set args($i(args)) = "--target" set args($i(args)) = dir set args($i(args)) = "PyPDF2==2.10.0" set args($i(args)) = "dataclasses" set args($i(args)) = "typing-extensions==3.10.0.1" set args($i(args)) = "--upgrade" set sc = $ZF(-100,"", cmd, .args) set pypdf2 = $system.Python.Import("PyPDF2") } return:'$d(pypdf2) $$$ERROR($$$GeneralError, "Unable to load PyPDF2") kill pypdf2 set text = ..GetTextPy(file) } catch ex { set sc = ex.AsStatus() } quit sc } ClassMethod GetTextPy(file) [ Language = python ] { from PyPDF2 import PdfReader reader = PdfReader(file) text = "" for page in reader.pages: text += page.extract_text() + "\n" return text } }
go to post Eduard Lebedyuk · Sep 16, 2022 Try to reload like this: set importlib = ##class(%SYS.Python).Import("importlib") do importlib.reload(helloWorld) Also, it not an IRIS-specific behavior, you'll get the same results in any python interpreter: import helloWorld helloWorld.helloWorld() >'Hello world' del helloWorld # modify helloWorld.py in text editor import helloWorld helloWorld.helloWorld() >'Hello world'
go to post Eduard Lebedyuk · Sep 13, 2022 Check this example. In short: Create class extending %SYS.Task.Definition Add properties - that's task settings Implement OnTask method, which returns %Status Set TaskName parameter After that you can add a task of TaskName type from the SMP.
go to post Eduard Lebedyuk · Sep 6, 2022 Assuming you have an EnsLib.HL7.Message object, call OutputHTMLZen method for it.