go to post Mark OReilly · May 15, 2023 Hi: This is possible . How to quickly open class in VS Code | InterSystems Developer Community |. The answer to this is here: if you are using the server-side editing paradigm, which matches what you're used to with Studio, make sure you follow the instructions in the "Enable Proposed APIs" section of the extension's README (also available here). you can then use Crtl+P to find the item you need. my setup instructions The additional features (and the APIs used) are: Server-side searching across files being accessed using isfs (TextSearchProvider) Quick Open of isfs files (FileSearchProvider). Download and install a beta version from GitHub. This is necessary because Marketplace does not allow publication of extensions that use proposed APIs. Go to https://github.com/intersystems-community/vscode-objectscript/releases Locate the beta immediately above the release you installed from Marketplace. For instance, if you installed 2.4.3, look for 2.4.4-beta.1. This will be functionally identical to the Marketplace version apart from being able to use proposed APIs. Download the VSIX file (for example vscode-objectscript-2.4.4-beta.1.vsix) and install it. One way to install a VSIX is to drag it from your download folder and drop it onto the list of extensions in the Extensions view of VS Code. From Command Palette choose Preferences: Configure Runtime Arguments. In the argv.json file that opens, add this line (required for both Stable and Insiders versions of VS Code): "enable-proposed-api": ["intersystems-community.vscode-objectscript"] Exit VS Code and relaunch it. Verify that the ObjectScript channel of the Output panel reports this: intersystems-community.vscode-objectscript version X.Y.Z-beta.1 activating with proposed APIs available. After a subsequent update of the extension from Marketplace you will only have to download and install the new vscode-objectscript-X.Y.Z-beta.1 VSIX. None of the other steps above are needed again.
go to post Mark OReilly · May 12, 2023 DBs not required. could either be removed or just made non read only
go to post Mark OReilly · Apr 6, 2023 Update has been made to to co-creator version of this project. githubFork . Containing certain Quality of life improvements. These are Banner with server status and key Last message date fixed on all services processes and operations You need to create a global called InterfaceMonitorNotes but if you use html gives you a handy place for notes for your team. N.B. if displayed publically the global edit link/user should only have access to this page queries, if required can post settings if anyone is looking to really use
go to post Mark OReilly · Apr 6, 2023 Class User.Utility.Tasks.PurgeCustomMessages Extends %SYS.Task.Definition { Parameter TaskName = "PurgeCustomMessages"; Property MaxDelete As %String [ InitialExpression = 1 ]; Property MinBodyID As %String [ InitialExpression = 1 ]; Method OnTask() As %Status { //Get The Types of message classes Set sc = $$$OK s tMessagesToOrpahan=0 //open up table of messages types to purge try{ Set rs = ##class(%SQL.Statement).%ExecDirect(,"select Keyname as MessageBodyClassName,Datavalue as ObjectSQLQryName from Ens_Util.LookupTable where tablename='OrpahnedMessagePurging'") } catch err { Set sc = err.AsStatus() //quit st } While rs.%Next() { set msgBodyName=rs.ObjectSQLQryName set className=rs.MessageBodyClassName if msgBodyName="Ens.MessageBody"{ set tMinMsgId=..MinBodyID }else{ set tMinMsgId=..GetMinimumIDForMessage(rs.MessageBodyClassName) } Set tSuccess=0 Set tFailed=0 set dt=$translate($zdatetime($horolog,8,1), " :", "") if tMinMsgId '=-1 { set msgQuery="SELECT top ? ID from "_msgBodyName_" where id <?" set tStatement = ##class(%SQL.Statement).%New() set qStatus = tStatement.%Prepare(.msgQuery) if qStatus '= 1 { s ^OrphanedMsgTask(dt,msgBodyName,"Error") ="Prepare Failed" s sc= $System.Status.DisplayError(qStatus) quit} set tResult = tStatement.%Execute(..MaxDelete,tMinMsgId) While tResult.%Next() { s tMessagesToOrpahan=1 try{ SET tSC1=$CLASSMETHOD(className,"%DeleteId",tResult.ID) if tSC1=$$$OK{ set tSuccess=tSuccess+1 } else{ set tFailed=tFailed+1 s ^OrphanedMsgTaskFailed(className,tResult.ID)=tSC1 } } catch { set tFailed=tFailed+1 set sc = $$$ERROR($$$GeneralError,"DeleteID Failure"_tResult.ID) s ^OrphanedMsgTask(dt,msgBodyName,"Error") ="DeleteID Failure" } } } else { s ^OrphanedMsgTask(dt,msgBodyName,"Status")="No messages in header table for "_msgBodyName } s ^OrphanedMsgTask(dt,msgBodyName,"Status")="Purged for "_msgBodyName _" "_tSuccess_" messages and failed to purge " _tFailed _ " messages" } quit sc } /// Method to return the minimum ID for the message type you are purging ClassMethod GetMinimumIDForMessage(pMessageType As %String) As %String { set MessageID=-1 set minIDQuery="SELECT TOP(1) MessageBodyID FROM Ens.MessageHeader where MessageBodyClassName=?" set tStatement = ##class(%SQL.Statement).%New() set qStatus = tStatement.%Prepare(.minIDQuery) if qStatus '= 1 {write "%Prepare failed:" do $System.Status.DisplayError(qStatus) quit} set tResult = tStatement.%Execute(pMessageType) While tResult.%Next() { set MessageID=tResult.MessageBodyID Write tResult.MessageBodyID, ! } w MessageID return MessageID } ClassMethod StreamPurge() As %Status { set i=1 while (i<200000){ k ^CacheStream(i) s i=i+1 } q $$$OK } ClassMethod Test() As %String { set msgQuery="SELECT top ? ID from EnsLib_HL7.Message where id <?" set tStatement = ##class(%SQL.Statement).%New() set qStatus = tStatement.%Prepare(.msgQuery) s ^OrphanedMsgTask = qStatus if qStatus '= 1 {write "%Prepare failed:" do $System.Status.DisplayError(qStatus) quit} s ^OrphanedMsgTask =tStatement set tResult = tStatement.%Execute(1,..GetMinimumIDForMessage("EnsLib.HL7.Message")) While tResult.%Next() { w tResult.ID } quit qStatus } /// Classmethod to create a list of the message types ClassMethod MessageTypes() As %ListOfDataTypes { Set sc = $$$OK Set rs = ##class(%SQL.Statement).%ExecDirect(,"SELECT DISTINCT (MessageBodyClassName) AS messageType FROM Ens.MessageHeader where MessageBodyClassName Like 'messages%'") set messageTypeList=##class(%ListOfDataTypes).%New() While rs.%Next() { do messageTypeList.Insert(rs.messageType) } w messageTypeList.Count() for i = 1:1:messageTypeList.Count() { write !, messageTypeList.GetAt(i)} } No idea how to upload a file so here is the class
go to post Mark OReilly · Mar 6, 2023 I will be updating this application this week or next and add our branch as have a few additional changes. These are *Improved key *Last Successful Messages added on each service queue and operation *Notes panel for "Known issues"
go to post Mark OReilly · Feb 28, 2023 Thank you, do we get a shiny badge for breakthrough on our profiles? Only just signed up for global masters
go to post Mark OReilly · Feb 20, 2023 Thanks I now understand. I was not looking at the .int Also was testing using SQL trigger delete i.e. from sql Delete from (field) where ID = id. This delete helper uses the objectscript deleteID which is perfectly good as this is what the main Ens.Util.Tasks.Purge will use. Great tool as this was for one message object with 10 embedded xml objects and 2 lists of xml objects, added some manually on before and it is the case this with using this plus doing a test on a single object first is a lot faster than the risks of manual typos for doing this manually. The SQL trigger on delete will not be required in my usecases
go to post Mark OReilly · Feb 17, 2023 I raised a different question but go no reply. I don't understand how you actually use this? Have a class like Class Messages.NonHL7.PMEP.Outbound.PathologyResult Extends (Ens.Request, SRFT.Utility.DeleteHelper.OnDeleteSuper) contains Property freeTextLine As list Of Messages.NonHL7.PMEP.Outbound.FreeTextLine; How do you actually get the ondelete to work or generate? What should you see? i added ClassMethod %OnDelete(oid As %ObjectIdentity) As %Status{ Do ##super()} but did not delete the id 2211269686 listed in the list. Can an implementation example be provided to this? The only step really to use this yourself is "add this class as another Super class for your class." but i don't grasp what we should see if we do this and if indeed this is correct Tried with just Class Messages.NonHL7.PMEP.Outbound.PathologyResult Extends (Ens.Request, SRFT.Utility.DeleteHelper.OnDeleteSuper) without defining an %onDelete as the guide would suggest but again have id 2211269800 which did not delete id 2211269834 of Messages.NonHL7.PMEP.Outbound.Location also did not delete
go to post Mark OReilly · Feb 16, 2023 Thank you, it is a 700gb database, good to know this is ok thought this would be the case so will go with this strategy of truncating
go to post Mark OReilly · Sep 27, 2022 Can the import/export code finally used Mike be shared as a solution for this? Would be useful
go to post Mark OReilly · Aug 24, 2022 Thanks didn't see that have changed to the below which works from your answer Set node = $Query(^FromExtraMed(""),1,nodevalue) while (node '="") { write nodevalue,! Set node = $Query(@node,1,nodevalue) }
go to post Mark OReilly · Jul 27, 2022 Solved by WRC. By pressing enter first on the Search bar then this issue disappeared. Issue presumed browser Caching issue
go to post Mark OReilly · Jun 23, 2022 The example with the @ with this still brought back any other nodes of je1 not just that "not configured" node found the following to do what required from Use a global stored in variable. | InterSystems Developer Community | s global="^je1(""NotConfigured"")"s sub=""f s sub=$o(@global@(sub)) q:sub="" w !,sub
go to post Mark OReilly · Jun 23, 2022 Hi Still not working. Might be my misexplaining Two values from the global veiw page 1: ^je1("NotConfigured","CBB") = "" 2: ^je1("NotConfigured","CH11") = "" Total: 2 [End of global] All i'm getting is the first Set node = $Query(^je1("NotConfigured")) WRITE !,node FOR { SET queryary=$QUERY(node) QUIT:queryary="" WRITE !,queryary SET node=queryary } In terminal we would have used ^%G then je1("NotConfigured", looking the exact same but in code in objectscript queryary is blank after the first query so node is blank
go to post Mark OReilly · May 19, 2022 Thanks Oliver this has been great. I have created a fork of this original code for our own use- i don't use github too much so hope this is an ideal way to keep the information sharing from your initial work done that was great. I have not included on an error section due to trying to keep things simple on a monitor screen but it could be added if others wish. If there are further updates will try keep my code on github for this up to date if possible and still quite non bespoke as seems fair for anyone who wants a better solution.
go to post Mark OReilly · May 13, 2022 I plan to be accessing it via a website saved in intersystems server to be accessed on the server. I have some ideas how it will look/work. Is mainly the finding the current errored services as one of the things I just can't seem to find in existing code how to get the status. I plan to have any suspended and queues or where intersystems has stopped a operation because of E=D but think I know ways to get the rest of this to make a really nice clean clear monitor page