go to post Eduard Lebedyuk · May 8 Please check this series of articles, it's about git not tfs but the underlying idea is the same.
go to post Eduard Lebedyuk · May 2 There are two formats for LUT: Old one: <?xml version="1.0" encoding="UTF-8"?> <Export generator="IRIS" version="26" zv="IRIS for UNIX (Red Hat Enterprise Linux 7 for x86-64) 2022.1 (Build 209U)" ts="2024-03-03 06:05:36"> <Document name="LUT_NAME.LUT"> <lookupTable> <entry table="LUT_NAME" key="KEY">VALUE</entry> <entry table="LUT_NAME" key="KEY2">VALUE2</entry> </lookupTable> </Document> </Export> New one: <?xml version="1.0"?> <lookupTable> <entry table="LUT_NAME" key="KEY">VALUE</entry> <entry table="LUT_NAME" key="KEY2">NALUE2</entry> </lookupTable> Looks like you're importing old format using new importer. Here's the code to import both versions: ClassMethod ImportLUT(dir) { #include %occErrors write "Lookup Tables import from: " _ dir set rs = ##class(%File).FileSetFunc(dir, "*.xml;*.XML;*.lut;*.LUT") while rs.%Next() { set tablePath = rs.Get("Name") write "Importing: " _ tablePath,! // table is the full path, the last part (denoted by *) is the actual file name set tablePathNoExtension = $PIECE(tablePath, "/", *) // asking for $PIECE with just delimiter asks for the first part, thus ignore anything after the . set tablePathNoExtension = $PIECE(tablePathNoExtension, ".") write "Importing Lookup Table in " _ tablePathNoExtension,! // lookup table should be named the file name (without extension) //do ##class(Ens.Util.LookupTable).%ClearTable(tablePathNoExtension) // Try the new import first. set sc = ..ImportLUTFile(tablePath) // If we got an error, try legacy import if $$$ISERR(sc) { write "New import failed. Trying legacy import",! set sc=##class(Ens.Util.LookupTable).%Import(tablePath) if $$$ISOK(sc) { write "Import successful",! } } // Error remains unfixed. Fail. if $$$ISERR(sc) { write "Lookup Table import failure: ", $System.Status.GetErrorText(sc),! do $system.Process.Terminate(, 1) } } } /// Adapted from EnsPortal.LookupSettings:Import /// Import lookup tables from file <var>Filename</var> ClassMethod ImportLUTFile(Filename As %String) As %String { Set tRS = ##class(%ResultSet).%New("%RoutineMgr:ImportItemList") Set tSC = tRS.Execute(Filename) Quit:$$$ISERR(tSC) tSC Set tSC = $$$OK Kill Select For { Quit:'tRS.Next(.tSC) Set Name = tRS.Get("Name") If $E(Name,*-3,*)=".LUT" { Lock +^Ens.LookupTable(Name):2 If '$T Set tSC = $$$ERROR($$$LockFailedToAcquireRead,$Name(^Ens.LookupTable(Name))) Quit Set Select($E(Name,1,*-4)) = "" } } Quit:$$$ISERR(tSC) tSC Quit:'$D(Select) $$$ERROR($$$GeneralError,"This file does not contain any lookup tables") Set tSC = $system.OBJ.Load(Filename,"-d", .Err, .Loaded, 0) Set Name = "" For { Set Name = $O(Select(Name)) Quit:Name="" Lock -^Ens.LookupTable(Name) } Quit tSC }
go to post Eduard Lebedyuk · Apr 27 IRIS supports multiple inheritance for methods, so create an abstract class which holds the methods and add it to a list of superclasses of your production class.
go to post Eduard Lebedyuk · Apr 17 You need to iterate on value: // extract json content from the request: set dynRequestJsonPayload = {}.%FromJSON(%request.Content) #dim JsonIterator As %Iterator.AbstractIterator set JsonIterator = dynRequestJsonPayload.%GetIterator() // iterate on json structure: if dynRequestJsonPayload '= "" { while JsonIterator.%GetNext(.key, .value, .NodeType) { if NodeType = "string" { do GlobalTrace("NodeType: " _ NodeType _ "; key: " _ key _ "; value: " _ value) } elseif NodeType = "array" { // i want to iterate on this array... // the following line throws the exeception "ERREUR #5002: Erreur ObjectScript: <INVALID OREF>traitementUFI+34^common.REST.1" set JsonIteratorSecondary = value.%GetIterator() } else { // Do something } } }
go to post Eduard Lebedyuk · Apr 16 Do you have Stay Connected setting equal to -1? Try setting it to a lower value, i.e. 30.
go to post Eduard Lebedyuk · Dec 29, 2023 The most secure approach is to use Privileged Routine Application.
go to post Eduard Lebedyuk · Dec 19, 2023 You can set it programmatically: set package = ##class(%PackageDefinition).%OpenId("User",,.sc) zw package package=2@%Library.PackageDefinition ; <OREF> +----------------- general information --------------- | oref value: 2 | class name: %Library.PackageDefinition | %%OID: $lb("User","%Library.PackageDefinition") | reference count: 2 +----------------- attribute values ------------------ | %Concurrency = 1 <Set> | ClientName = "" | Description = "" | GlobalPrefix = "" | Name = "User" | OwnerName = "" | RtnPrefix = "" | SQLName = "" +----------------- swizzled references --------------- | i%list = "" <Set> | r%list = "" <Set> +-----------------------------------------------------
go to post Eduard Lebedyuk · Dec 12, 2023 Are you getting Ens.StreamContainer? It would be OriginalFilename property in that case.
go to post Eduard Lebedyuk · Nov 30, 2023 Add %JSONIGNOREINVALIDFIELD param to your class and don't add Messages/SharedRelations properties. Parameter %JSONIGNOREINVALIDFIELD As BOOLEAN = 1;
go to post Eduard Lebedyuk · Nov 28, 2023 Why not just use %JSONFIELDNAME? Anyway, this works: Property "@name" As %String; Property "😋_are_you_sure_😋" As %String;
go to post Eduard Lebedyuk · Nov 5, 2023 What's "RO" stand for? ReadOnly. After the customer deployment, if there is any change made on the production settings (e.g. changing an AE Title on the DICOM service), those settings are stored in the APPCODE, and the settings will be lost after a container PODS restart (kubernetes recreating the PODS). Two ways to avoid that: Use System Default Settings Map only Production class to a third ReadWrite database, usually APPCONFIG
go to post Eduard Lebedyuk · Oct 25, 2023 Set ..%SessionId= "" before each SendSync/SendAsync should force a new session for each message sent.
go to post Eduard Lebedyuk · Oct 4, 2023 Sure, use indirection: >s ^ABC(1,2)=3 >s TEMP = "^ABC(1,2)" >w @TEMP 3