go to post Eduard Lebedyuk · Apr 8, 2020 String limit is 3 641 144 so 40 000 symbols is quite okay for a string.
go to post Eduard Lebedyuk · Apr 6, 2020 How do you import an HL7 Schema from ObjectScript? You can call any method with Invoke. I'm not aware of anything HL7 specific in %Installer, but maybe HealthShare has something.
go to post Eduard Lebedyuk · Apr 1, 2020 I suppose I can have one Id column and several col1, col2 ..., colN columns, so losing the names.
go to post Eduard Lebedyuk · Apr 1, 2020 Interesting! Tank you! I can also use PPG for runtime storage.
go to post Eduard Lebedyuk · Apr 1, 2020 Thank you for the info, Daniel! Can I implement %GetProperty instead of specifying the list of properties explicitly? I don't want to compile a new class for each new table-object.
go to post Eduard Lebedyuk · Mar 31, 2020 Alternatively, %Dictionary package macros can be used: ClassMethod Values(class = {$classname()}, property) As %Status [ CodeMode = expression] { $$$defMemberArrayGet(class,$$$cCLASSproperty,property,$$$cPROPparameter,"VALUELIST") } Also, you can find object from list without explicitly iterating the whole thing: set i = %class.Properties.FindObjectId(%class.Name _ "||" _ "Status") instead of: for i=%class.Properties.Count():-1:0 if i,%class.Properties.GetAt(i).Name="Status" quit
go to post Eduard Lebedyuk · Mar 30, 2020 %Net.WebSocket.Client is available and provides WebSocket client.
go to post Eduard Lebedyuk · Mar 30, 2020 %Net.WebSocket.Client is available and provides WebSocket client.
go to post Eduard Lebedyuk · Mar 29, 2020 Do not specify a timeout or specify a longer timeout. In your example if the response is taking more than 15 seconds the sync activity will complete Here's a minimal example for you. BP sends 2 async calls and waits for them in sync activity: And Visual Trace looks like this: To test: Download code here. Import and compile. Open and start production. Send Ens.Request test request to BP.
go to post Eduard Lebedyuk · Mar 28, 2020 How about the topic: Interoperability Adapter for InterSystems IRIS?
go to post Eduard Lebedyuk · Mar 27, 2020 July - InterSystems IRIS IntegratedML. Is only IntegratedML based apps applicable? Or can participants use apps based on a whole stack of technologies available for orchestrating AI/ML solutions on InterSystems IRIS Data Platform, such as PythonGateway, RGateway, JuliaGateway, Spark, Native API for Python and PMML?
go to post Eduard Lebedyuk · Mar 27, 2020 Send async calls. Wait for response from one or both calls.
go to post Eduard Lebedyuk · Mar 27, 2020 My preferred approach is using a Query class element. Here's how it can look like: Class Sample.Person Extends %Persistent { Property Name As %String; Query ByName(name As %String = "") As %SQLQuery { SELECT ID, Name FROM Sample.Person WHERE (Name %STARTSWITH :name) ORDER BY Name } ClassMethod Try(name) { set rset = ..ByNameFunc(name) do rset.%Display() } } Short and concise.
go to post Eduard Lebedyuk · Mar 27, 2020 Easy to do that. Here's how. First of all let's find out where we do the iteration. If we open UtilExpGlobalView.csp we see that it's essentially a wrapper over %CSP.UI.System.GlobalViewPane. In %CSP.UI.System.GlobalViewPane there's a LoadGlobal method which has this promising line: Set tRS = ##class(%ResultSet).%New("%Global:Get") Next we follow the trail to %Library.Global class implementing Get query, which has GetFetch method, which actually iterates over the global here: Set idx=$Order($$$ISCQUERYTEMP(Index,idx),1,Row) So now we wrap it up back. We need a new query (GetFetch is copied as is with one change - inverse iteration order, bolded): Test.Global class Class Test.Global Extends %Global { ClassMethod GetFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) As %Status [ Internal, PlaceAfter = GetExecute ] { Set $zt="ERROR" Set idx=$p(qHandle,"^",2) Set Index=$p(qHandle,"^") Set idx=$Order($$$ISCQUERYTEMP(Index,idx),-1,Row) If idx="" { Set Namespace=qHandle("Namespace") Set SearchMask=qHandle("SearchMask") Set LastNode=qHandle("LastNode") Set NameFormat=qHandle("NameFormat") Set ValueFormat=qHandle("ValueFormat") Set OldNsp=$zu(5),%UI="CHUI",Count=100 If Namespace'=OldNsp ZN Namespace Set data=$$page^%Wgdisp(SearchMask,LastNode,.Count,0,"","",1,NameFormat,ValueFormat) If $zu(5)'=OldNsp ZN OldNsp If 'Count Set AtEnd=1,Row="" Quit $$$OK ; Kill $$$ISCQUERYTEMP(Index) For i=1:1:Count { Set rec=$p(data,$$$del1,i),subs=$p(rec,$$$del2),val=$p(rec,$$$del2,2) Set nf=$p(rec,$$$del2,3),vf=$p(rec,$$$del2,4) #;SML618+ #;Setup ^CacheTemp with a subroutine in case it overflows the $LB() list. d BuildCacheTemp #;SML618- } Set qHandle("LastNode")=..Unquote(subs,1) Set qHandle=Index_"^" Quit ..GetFetch(.qHandle,.Row,.AtEnd) } Else { #;SML618+ #;If there is extension of data then set them to Row array for %ResultSet to get them. if $d($$$ISCQUERYTEMP(Index,idx,1)) { Set Row(1)=$$$ISCQUERYTEMP(Index,idx,1) if $d($$$ISCQUERYTEMP(Index,idx,2)) { Set Row(2)=$$$ISCQUERYTEMP(Index,idx,2) } } #;SML618- Set qHandle=Index_"^"_idx } Quit $$$OK ERROR Set $zt="" If $g(OldNsp)'="",$zu(5)'=$g(OldNsp) ZN OldNsp Quit $$$ERROR($$$CacheError,$ze) #;SML618+ #;Set the data extension to two or three pieces if it could not fit in one piece. BuildCacheTemp s $zt="BuildErr1" i subs["(" { s sub1="("_$p(subs,"(",2,999) } else { s sub1="" } s Perm=$s(qHandle("GetPermissions")=0:"",1:$$GetGlobalPermission^%SYS.SECURITY(Namespace,$p(subs,"(",1),sub1,1)) Set $$$ISCQUERYTEMP(Index,i)=$lb(subs,val,nf,vf,Perm) Q BuildErr1 s $zt="BuildErr2" Set $$$ISCQUERYTEMP(Index,i)=$lb(subs,$e(val,1,$l(val)\2),nf,vf,$g(Perm)) Set $$$ISCQUERYTEMP(Index,i,1)=$lb("",$e(val,$l(val)\2+1,$l(val)),"","","") Q BuildErr2 s $zt="" Set $$$ISCQUERYTEMP(Index,i)=$lb(subs,$e(val,1,$l(val)\3),nf,vf,$g(Perm)) Set $$$ISCQUERYTEMP(Index,i,1)=$lb("",$e(val,$l(val)\3+1,$l(val)\3*2),"","","") Set $$$ISCQUERYTEMP(Index,i,2)=$lb("",$e(val,$l(val)\3*2+1,$l(val)),"","","") Q #;SML618- } } Now we wrap it into a pane Test.GlobalViewPane Class Test.GlobalViewPane Extends %CSP.UI.System.GlobalViewPane{ /// Load global dataMethod LoadGlobal(Namespace As %String, Mask As %String, LastSub As %String, NodeCount As %Integer, TotalCount As %Integer, chkEdit As %Boolean) As %Boolean{ Set $ZT = "Trap" Set AtEnd = 0 Set msgTruncate = $$$Text("...Warning: string truncated!") Do { //If $G(Namespace) '= "" Set defaultNS = Namespace //Else Set defaultNS = $G(%request.Data("$NAMESPACE",1)) Set tRS = ##class(%ResultSet).%New("Test.Global:Get") Set tSC = tRS.Execute(Namespace,$G(Mask),"",2,2,chkEdit) Set TotalCount = 0 While (tRS.Next() & (TotalCount < NodeCount)) { Set TotalCount = TotalCount + 1 Set sSubs = tRS.GetData(1) Set sData = tRS.GetData(2) If sSubs '= "" { Set LastSub = sSubs If $L(sData) > 8000 Set sData = $E(sData,1,8000)_msgTruncate Set espSub = $ZCVT(sSubs,"O","HTML") Set espData = $ZCVT(sData,"O","HTML") Set tClass = $S(TotalCount#2:"EvenRow",1:"OddRow") &html<<tr class="#(tClass)#"><td class="idstyle">#(TotalCount)#: </td>> &html<<td id="nid_#(TotalCount)#" style="" nowrap>#(espSub)#</td><td>=</td>> If chkEdit,tRS.Data("Permissions")["WRITE" { &html<<td style="" nowrap><a class="nodelink" href="javascript:selectNode('#(TotalCount)#',1)">#(espData)#</a>> } Else { &html<<td style="" nowrap>#(espData)#</td></tr>> } } } Set EventDesc = "View Global" Set EventData = "View global node: "_Mask_$$$CRLF_"Allow edit: "_chkEdit_$$$CRLF_"Total subscript: "_TotalCount $$$SMPAuditView If 'tRS.Next() Set AtEnd = 1 } While (0) Done Quit AtEndTrap Set $ZT="" Write "Error loading global ",$ZE,! Goto Done} } And finally create a csp page UtilExpGlobalViewR.csp <AutoPage pagename="View Global Data" parentpage="UtilExpGlobalList.csp" stylesheet="intersystems.css" USENAMESPACE="1"> <Pane name="Title" type="%CSP.Util.SMTitlePane"> <Text>View Global Data</Text></Pane> <Pane name="Detail" type="Test.GlobalViewPane"></Pane> </AutoPage> And done, add R to URL and see the global in reverse in SMP:
go to post Eduard Lebedyuk · Mar 23, 2020 During delay activity the process is unloaded from memory, so you can't kill it. What are you trying to do?