go to post Eduard Lebedyuk · Jun 3 Timings heavily depend on your setup. You can always start by collecting the data for an hour.
go to post Eduard Lebedyuk · May 28 Check this example. It iterates all JSON elements, and also outputs the corresponding paths to access them.
go to post Eduard Lebedyuk · May 28 You can also use defaults for that: w responseData.%Get("items",[]).%Get(0,{}).%Get("titles",[]).%Get(0, {}).%Get("value",{}).%Get("en_US")
go to post Eduard Lebedyuk · May 27 %SQLConnection inherits %XML.Adaptor, so you can also use xml export/import.
go to post Eduard Lebedyuk · May 23 There are three property types which result in custom selectors: %Boolean %Integer %SYS.Task.Password None of them are a directory unfortunately. Path datatype would be nice to have. Please submit a WRC request for it.
go to post Eduard Lebedyuk · May 20 Are both instances running under a system service account (or user account)? Try to raise process priority before executing your script with: w $SYSTEM.Util.SetPrio(7) - does it change anything?
go to post Eduard Lebedyuk · May 20 You're welcome. Here's a bit more info about how BPL BPs work. After you compile a BPL BP, two classes get created into the package with the same name as a full BPL class name: Thread1 class contains methods S1, S2, ... SN, which correspond to activities within BPL Context class has all context variables and also the next state which BPL would execute (i.e., S5) Also BPL class is persistent and stores requests currently being processed. BPL works by executing S methods in a Thread class and correspondingly updating the BPL class table, Context table, and Thread1 table where one message "being processed" is one row in a BPL table. After the request is processed, BPL deletes the BPL, Context, and Thread entries. Since BPL BPs are asynchronous, one BPL job can simultaneously process many requests by saving information between S calls and switching between different requests.For example, BPL processed one request till it got to a sync activity - waiting for an answer from BO. It would save the current context to disk, with %NextState property (in Thread1 class) set to response activity S method, and work on other requests until BO answers. After BO answers, BPL would load Context into memory and execute the method corresponding to a state saved in %NextState property. That's why registered objects as context properties can (and would) be lost between states - as they are not persisted.
go to post Eduard Lebedyuk · May 19 HS.FHIR.DTL.vR4.Model.Resource.Patient is a registered object and not a persistent object, so there's no guarantee it will exist beyond a current BP State. You set context.patient in "Transform 1", so it will be gone from process memory after "Send to FHIR Repo 1" sends the request, but before it gets the reply back. As a solution you can serialize FHIR resource to json and persist that.
go to post Eduard Lebedyuk · May 16 Can you provide a minimal example, please? I assume you do not mutate/reuse objects.
go to post Eduard Lebedyuk · May 16 Is it possible to search all globals within a namespace/db or at least to do a full text search on a list of globals?
go to post Eduard Lebedyuk · May 8 Can't reproduce in IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT: But can reproduce on IRIS for Windows (x86-64) 2025.1 (Build 223U) Tue Mar 11 2025 18:14:42 EDT Please file a WRC. Looks like something changed between 2022.1 and 2024.1.1
go to post Eduard Lebedyuk · May 8 %Stream.Dynamic* are read-only pointers to DAO data. %Stream.Tmp* are full-fledged (r/w) in-memory streams.
go to post Eduard Lebedyuk · May 8 You can still use classes, just add %JSONIGNOREINVALIDFIELD to ignore unknown properties: Parameter %JSONIGNOREINVALIDFIELD As BOOLEAN = 1; Here's how your example can look like: Class dc.Item Extends (%RegisteredObject, %JSON.Adaptor) { Parameter %JSONIGNOREINVALIDFIELD As BOOLEAN = 1; Property pureId As %Integer; Property portalUrl As %VarString; } and the main class: Class dc.Response Extends (%RegisteredObject, %JSON.Adaptor) { Parameter %JSONIGNOREINVALIDFIELD As BOOLEAN = 1; Property items As list Of Item; /// do ##class(dc.Response).Test() ClassMethod Test() { set json = ..Sample() set obj = ..%New() $$$TOE(sc, obj.%JSONImport(json)) do obj.DisplayItems() } Method DisplayItems() { for i=1:1:..items.Count() { set item = ..items.GetAt(i) zw item } } ClassMethod Sample() As %String [ CodeMode = expression ] { { "count": 0, "pageInformation": { "offset": 0, "size": 0 }, "items": [ { "pureId": 0, "uuid": "196ab1c9-6e60-4000-88cb-4b1795761180", "createdBy": "string", "createdDate": "1970-01-01T00:00:00.000Z", "modifiedBy": "string", "modifiedDate": "1970-01-01T00:00:00.000Z", "portalUrl": "string", "prettyUrlIdentifiers": [ "string" ], "previousUuids": [ "string" ], "version": "string", "startDateAsResearcher": "1970-01-01", "affiliationNote": "string", "dateOfBirth": "1970-01-01", "employeeStartDate": "1970-01-01", "employeeEndDate": "1970-01-01", "externalPositions": [ { "pureId": 0, "appointment": { "uri": "string", "term": { "en_GB": "Some text" } }, "appointmentString": { "en_GB": "Some text" }, "period": { "startDate": { "year": 0, "month": 1, "day": 1 }, "endDate": { "year": 0, "month": 1, "day": 1 } }, "externalOrganization": { "uuid": "196ab1c9-6e60-4000-8b89-29269178a480", "systemName": "string" } } ] } ] }.%ToJSON() } }
go to post Eduard Lebedyuk · May 8 Iris session can do it (assumes OS auth is enabled): irissession <INSTANCE> -U<NAMESPACE> '##class(%SYSTEM.OBJ).Load("<file from linux folder>","ck")' Note that there must be no whitespaces in the command arg. More on automated deploy.
go to post Eduard Lebedyuk · May 8 Something along these lines should work. ClassMethod ToEnsStream(obj As %RegisteredObject, Output req As Ens.StreamContainer) As %Status { #dim sc As %Status = $$$OK try { set stream = ##class(%Stream.GlobalCharacter).%New() if obj.%Extends("%JSON.Adaptor") { $$$TOE(sc, obj.%JSONExportToStream(.stream)) } elseif obj.%Extends(##class(%DynamicAbstractObject).%ClassName(1)) { do obj.%ToJSON(.stream) } else { /// try %ZEN.Auxiliary.altJSONProvider:%ObjectToAET? throw ##class(%Exception.General).%New("<JSON>") } set req = ##class(Ens.StreamContainer).%New(stream) } catch ex { set sc = ex.AsStatus() } quit sc }
go to post Eduard Lebedyuk · May 6 set obj = ##class(YourPackage.YourClass).%New() set sc = obj.%JSONImport(jsonstring)
go to post Eduard Lebedyuk · May 6 Starting 2025.1InterSystems adds support for two alternative syntax flavors: LIMIT ... OFFSET ..., which is commonly used in other database platforms, and OFFSET ... FETCH ..., which is the official ANSI standard. Documentation.
go to post Eduard Lebedyuk · May 6 Well, I have great news for you, Otto! Starting from 2025.1, we have automatic database download from mirror member. Documentation. No copying required.
go to post Eduard Lebedyuk · May 5 Use io operations like write, zwrite, zzdump - they would be written to an output file automatically, if set.
go to post Eduard Lebedyuk · May 2 Would canonicalization work for you? Also consider storing your xmls as gzipped streams (%Stream.GblChrCompress) or compressed strings ($system.Util.Compress). I think it will be more effective as a storage space saving strategy.