go to post Scott Roth · Jun 12, 2017 I was able to figure out what exactly I was doing wrong. Thanks. One last question is it possible to call Ensemble-->Configuration-->Credenitals, into Cache Object Script?
go to post Scott Roth · Jun 9, 2017 I took your suggestion about using %Net.FtpSession to transfer the file back and forth between the two boxes, however I am running into an issue trying to ftp.Store the file. Can I have a second pair of eyes take a look at this to see what I am doing wrong? ClassMethod DecodeBase64HL7ToFileFaxing(base64 As %Stream.GlobalBinary, Ancillary As %String, FileName As %String) As %String{set ftp=##class(%Net.FtpSession).%New()if 'ftp.Connect("xxxxx","xxxxx","xxxxxx") $$$LOGINFO("Unable to connect to inteng11") quitset Oref = ##class(%FileBinaryStream).%New()set Oref.Filename = FileNameDo base64.Rewind()While 'base64.AtEnd { set ln = base64.ReadLine() set lnDecoded = $system.Encryption.Base64Decode(ln)do Oref.Write(lnDecoded)}if 'ftp.SetDirectory("/home/egate/Scott") $$$LOGINFO("Unable to change directory") quitIf 'ftp.Store(Oref,stream) $$$LOGINFO("Unable to write file") quitif 'ftp.Logout() $$$LOGINFO("Failed to logout") quit} Thanks
go to post Scott Roth · Apr 11, 2017 Here is how I am Calling the Method and Returning me the string <transform sourceClass='EnsLib.HL7.Message' targetClass='osuwmc.Visit.DataStructures.InsertVisitAttachmentResult' sourceDocType='ORMORUPDF:OSU_ORMORU_PDF' create='new' language='objectscript' ><assign value='context.TextIDTemp' property='target.TextID' action='set' /><assign value='source.GetFieldStreamRaw(.tStream,"ORCgrp(1).OBRgrp(1).OBXgrp(1).OBX:ObservationValue(1).AlternateText",.tRemainder)' property='tSC' action='set' /><assign value='##class(osuwmc.Functions).DecodeBase64HL7ToFile(tStream,source.{MSH:SendingApplication.NamespaceID},source.{PID:PatientIdentifierList(1).IDNumber}_context.TextIDTemp_".pdf")' property='tSC' action='set' /><assign value='$Get(tSC)' property='target.Text' action='set' /></transform>
go to post Scott Roth · Dec 5, 2016 This is just another one of our servers that we use. We don't necessarily use SFTP to transfer files between our servers, just SCP. I am wondering if it is an issue with our keys that we have saved off, and not in Ensemble but at the OS Level.
go to post Scott Roth · Dec 2, 2016 I am unfamiliar with if we have this and how to go about setting it up. I am following up with John Goodgame.
go to post Scott Roth · Nov 28, 2016 I was just seeing if it was possible at this point, I had not tried to code it. Would I create a custom Service to read in the file or use the EnsLib function and pass it to a BPL to read in the line by line format?
go to post Scott Roth · Nov 22, 2016 I found by using %Library.File it worked better. w ##class(%Library.File).DirectoryExists("/ensemble/")1w ##class(%Library.File).DirectoryExists("/ensemble/Scott/")1w ##class(%Library.File).DirectoryExists("/joe")0w ##class(%Library.File).DirectoryExists("/joe/")0Thanks for your help.
go to post Scott Roth · Nov 22, 2016 if I run it from the command line I was expecting for it to return me a 1. Is that not possible?
go to post Scott Roth · Nov 21, 2016 That was very helpful. Thanks. I just now have to add in code to check the file structure and create a new directory if it does not exist to place the PDF in.
go to post Scott Roth · Nov 21, 2016 Thanks, the issue I am having though is that it will not even save the file I am writing to. I am using GetFieldStreamRaw to get the Base64 into a tSC variable, so do I send that tSC variable to the function that I have created to get it to Decode and Save the file?
go to post Scott Roth · Oct 6, 2016 Is there a way to check the response before doing something to it? So if I get a "Patient Not Found" response, I can then bypass a DTL I have setup for the response?
go to post Scott Roth · Aug 5, 2016 Looking at the Activity Monitor it looks more of a Analytical tool then anything. Has anyone created their own Production Monitor, or modified the existing monitor to only show those Inbound Connections, Outbound Connections, Processes that are having errors? Is there a way to only show those "Red" issues on the current monitor?
go to post Scott Roth · May 10, 2016 We are not on 2016.1 as of yet. We just recently upgraded to 2015.2.2. The activity monitor looks like it is more statical than what I am looking for. I am looking for making the Production Monitor more useful for our group.
go to post Scott Roth · Apr 29, 2016 I just worked with WRC on this same issue. I was able to make copies of %ZEN.Dialog.finderDialog and EnsPortal.LookupSettings. By using these copies I was able to modify some of the methods to limit down the number of tables a end user would have access too by using a filter on the Naming convention. Class osuwmc.DataLookup.testFinderDialog Extends %ZEN.Dialog.finderDialog{Method GetFinderArray(ByRef pParameters, Output pMetaData, Output pData) As %Status{Kill tParms// assemble search parametersSet tParms("sort") = ..currSortModeSet tParms("search") = ..searchKeySet tParms("abstract") = ..includeAbstractif (..mode = "labLookup"){s tSC = ##class(%ZEN.FinderUtils).%GetArrayForQuery("Ens.Util.LookupTable","Enumerate",$LB("{Name}","{Name}_"".lut""","lut",""),".",,.pMetaData,.tData)s k=""for {s k=$order(tData(k))q:k=""s tableName = $li(tData(k),1)if (tableName [ "LABS") {s pData($i(pData)) = tData(k)}}q tSC} else {Quit ##class(%ZEN.FinderUtils).%GetClassListArray(.tParms,.pMetaData,.pData) }}Class osuwmc.DataLookup.testLookupSettings Extends EnsPortal.LookupSettings{/// Handle various dialogs.ClientMethod onPopupAction(popupName, action, value) [ Language = javascript ]{try {if (action != "ok") {return false;}popupName = this.removePopupSuffix(popupName);switch(popupName) {case 'NewLookup':if (value.substring(value.length-4).toUpperCase() != '.LUT') value += '.lut';// note that we fall through to open the page for both NewLookup and LookupOpencase 'LookupOpen':var link = zenLink('osuwmc.DataLookup.testLookupSettings.zen');link += (link.indexOf('?') > -1 ? '&' : '?') + 'LookupTable=' + encodeURIComponent(value); this.setModified(false);this.gotoPage(link);break; case 'switchNamespace':zenPage.changeURLNamespace(value);break;case 'LookupSaveAs':if (value.substring(value.length-4).toUpperCase() == '.LUT') value = value.substring(0,value.length-4);zenPage.checkName(value);break;}} catch (ex) {alert("Error: " + ex); }}/// If the new name is already in use, confirm that the user wishes to overwrite the old table of that name.ClientMethod checkName(newName) [ Language = javascript ]{var duplicateName = zenPage.NameCheck(newName);if (duplicateName !="") {if (!confirm($$$FormatText($$$Text("Lookup table name '%1' is already in use! Are you sure you want to overwrite this table?"),duplicateName))) {return;}zenPage.RemoveTable(duplicateName);}zenPage.renameSave(newName);var link = zenLink('osuwmc.DataLookup.testLookupSettings.zen');link += (link.indexOf('?') > -1 ? '&' : '?') + 'LookupTable=' + encodeURIComponent(newName+".lut");this.setModified(false);this.gotoPage(link);}ClientMethod openTable() [ Language = javascript ]{if (this.pageModified) {var doOpen = confirm($$$Text('The current lookup table has been modified. Do you wish to discard these changes and open a different lookup table?'));if (!doOpen) return;}var parms = { MODE: "labLookup"};zenLaunchPopupWindow(zenLink('osuwmc.DataLookup.testFinderDialog.cls'),this.addPopupSuffix('LookupOpen'),'status,scrollbars,resizable=yes,width=800,height=600',parms);}Method OnGetRibbonInfo(Output pDisplay As %Boolean, Output pViewIcons As %List, Output pSortOptions As %List, Output pSearchBox As %Boolean, Output pRibbonTitle As %String, Output pCommands As %List) As %Status{Set pDisplay = 1Set pRibbonTitle = $$$Text("Lookup Table Viewer")Set pCommands(1) = $LB("btnOpen",$$$Text("Open"),$$$Text("Open an existing lookup table"),"zenPage.openTable();")Set pCommands(2) = $LB("btnSave",$$$Text("Save"),$$$Text("Save the current lookup table"),"zenPage.saveTable();")Set pCommands(3) = $LB("btnSaveAs",$$$Text("Save As"),$$$Text("Save the current lookup table with a different name"),"zenPage.saveTableAs();")Quit $$$OK}}
go to post Scott Roth · Apr 21, 2016 I know most of the Documentation was written years ago, but it would be helpful if there was screen shots on how to do certain things within the Ensemble GUI editors.
go to post Scott Roth · Mar 2, 2016 I have imported this into Studio, but how do we go about using it?