go to post Nigel Salm · Nov 17, 2019 Hi I certainly concur that you do not want to go changing names in any InterSystems Library or System Classes. To be quite honest in my experience export the classes or project that contain all of the classes you want to manipulate and then open that XML export file in NotePad ++ . Bear in mind that classnames, property names, method names, and storage definitions will all be modified and you should be certain that that is acceptable and desirable otherwise you will need to go through the painful task of working your way through the XML file instance by instance and confirm each replace. Also bear in mind that if your Class Export references other IRIS classes other than your own application classes then you need to be careful that you don't change an IRIS classname/property name etc... as you may well find that your system no longer works. Having done the search and replace I suggest that you create a blank database/namespace and import the modified xml file and check any error messages thrown up by the import process before attempting to import into your proper DEV/UAT database/namespace(s) Nigel
go to post Nigel Salm · Nov 17, 2019 Hi Follow this link to the InterSystems Documentation. It details many utilities that can be run from the Cache Terminal. Those that start with a '%' character can be run from any NameSpace. Those without will typically only run in the %SYS NameSpace https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GSTU Bear in mind that many command line utilities have been encapsulated in the %SYS, %SYSTEM, %SQL, %Dictionary and other system Packages. Most of the functionality of the Management Portal is linked to underlying classes and most of them have Methods that can be called programmatically; for example creating resources, roles and users in the security module. Most database and Namespace functionality can be accessed through the %SYS and %SYSTEM packages If you are looking for specific functions that you would like (if they exist) please list them and I'll see if I can point you in the right direction Yours Nigel Salm
go to post Nigel Salm · Sep 29, 2019 Here is a solution I have knocked up that uses the functionality of the Ensemble File Adapter and the HL7 File Operation class Class User.ExampleHL7FileOperation Extends (Ens.BusinessOperation, EnsLib.HL7.Operation.FileOperation) [ Language = objectscript ]{ Parameter ADAPTER = "EnsLib.File.OutboundAdapter"; Property Adapter As EnsLib.File.OutboundAdapter; Parameter INVOCATION = "Queue"; Method WriteMessage(pRequest As EnsLib.HL7.Message, Output pResponse As EnsLib.HL7.Message) As %Status{ // Initialise your return status variable and a variable called file // I use $ztrap to trap code errors though TRY/CATCH would be the more modern approach set tSC=$$$OK,$ztrap="Error",file="" // Create your file name and append to the Adapter Attribute 'FilePath' // if working with UNIX change the next line of code accordingly if $e(..Adapter.FlePath,*)'="\" set ..Adapter.FilePath=..Adapter.FilePath_"\" set file=..Adapter.FilePath_"ZLOG_FILE_"_pRequest.GetValueAt("MSH::MessageType.MessageStructure",,tSC)_$tr($zdt($h,3),"-: ","")_".txt" if 'tSC quit tSC // You can use the appropriate method in the File Outbound Adapter though I have used the OPEN // command open file:("WNS"):0 else set tSC=$system.Status.Error(5001,"Cannot create File: "_file) goto End // Invoke the outputDocument method inherited from the class 'EnsLib.HL7.Operation.FileOperation' set tSC=..outputDocument(file,pRequest) if 'tSC goto EndEnd ; // Close the file if it exists if file'="" close file set pResponse=##class(EnsLib.HL7.Message).%New() // Populate the response HL7 message as you see fit. Either send back an HL7 ACK or NACK would be // the most appropriate quit tSCError ; set $ztrap="",tSC=$system.Status.Error($$$GeneralError,"Code Error: "_$ze) goto End} XData MessageMap { <MapItems> <MapItem MessageType="EnsLib.HL7.Message"> <Method>WriteMessage</Method> </MapItem> </MapItems> } } I have not trested the code but hopefully my coments will set you on the right path to this solution
go to post Nigel Salm · Sep 29, 2019 Many of the terminal based utilities use '^' <enter> to return to the previous field. In older versions of the Cache utilities it really depends on who the developer was who wrote the program as well as which area of the product the program was writtren for. There isn't necessarily consistancy between the developers or functionality of the programs. Most interactive utilities are now accessed through the %SYSTEM package which is accessed using the notation $system.... e.g. set status=$system.Status.Error(5001,"This is a general Error") Various configuration items can be accessed through this package and the classes therein. Another package worth noting is %Dictionary that gives you access to all aspects of class definitions, methods, properties, compiled classes etc... and finally the package %SYS contains may more system related classes The only other comment is that many system functions require you to be in the %SYS namespace in order to execute the function you require and will also require that you have sufficient roles assigned to your user account to perform such actions.
go to post Nigel Salm · Jun 5, 2019 You can't use $get or $data on an object property. What you should do is as follows, If $IsObject(ref) {set ^AK(1)=ref.Title} Else {set ^AK(1)=""} // or whatever you want to do if ref is not an object You could also do this: If $IsObject(ref),$l(ref.Title) {set ^AK(1)=ref.Title}Else {set ^AK(1)=""} // or whatever you want to do if ref is not an object or ref is an object but the property title is null
go to post Nigel Salm · Oct 3, 2017 Hi WRC helped answer this: Here is the code to build into your TablePane form: ClientMethod onloadHandler() [ Language = javascript ]{zenPage.IntervalRefresh();myVar1 = setInterval(zenPage.IntervalRefresh,1000);}ClientMethod IntervalRefresh() [ Language = javascript ]{var table = zenPage.getComponentById('TableName');//Optional if Snapshot is usedtable.executeQuery()table.refreshContents()}Note that the line table.executeQuery() is only required if your TablePane uses snapshot mode Nigel
go to post Nigel Salm · May 19, 2017 If you specifically wanted to make use of the Sample Classes in an Ensemble context then I would suggest one of two approches:1) Export the Sample Classes and Data and import them into the ENSDEMO namespace though bear in mind that were you to reinstall Ensemble the ENSDEMO database might be replaced2) The better approach would be to create a new database/namespace which will automatically inherit the Ensembele mappings and then import the SAMPLES classes and data into that new namespace/database