go to post Scott Roth · Jan 24, 2018 When calling a SQL call, I normally return the value in a Snapshot. You can do this 1 of two ways...1. Set two variables....One for the Outbound HL7 Message, and one for the structure of your snapshot. Set your source equal to your snapshot variable and your target being the Outbound HL7 context variable. Use a Data transformation to take the information from the Snapshot and insert it into the HL7.2. Create a variable for your ID variable, and loop through the Snapshot to set that ID variable. Then create a dummy data transformation that you can use to set your HL7 field to your context.ID variable.I have plenty of examples of doing this in either way. There might be others that have a better solution, its just what I have used in the past.Scott RothThe Ohio State University Wexner Medical Center
go to post Scott Roth · Jan 12, 2018 No luck but thanks.I took the query from $$$LOGINFO(select) and executed it fine in SQL Server. It showed Ensemble should of returned 185 rows.For every database pull Ensemble stores either that whole message or a key value so it knows that record has already been read. I can't figure out how to get around that when I do a ExecuteQuery() call inside my Operation.
go to post Scott Roth · Nov 3, 2017 Simplifying the query to just the select statement worked, however is there a good way to convert date/time from GMT to EST?
go to post Scott Roth · Oct 20, 2017 thanks...the documentation isn't took clear on how to at %ListOfObjects to a snapshot.
go to post Scott Roth · Oct 19, 2017 I found my answer, but the question now is how do we set MaxRowsToGet within the Studio Operation for EnsLib.SQL.Snapshot.ThanksScott
go to post Scott Roth · Oct 17, 2017 We found the Ensemble Scheduler single threaded, so If you had schedules that would overlap some instances would not be started correctly. One of my colleagues created two simple command line scripts to start and stop interfaces. We are using those scripts along with the cron scheduler on AIX.
go to post Scott Roth · Aug 7, 2017 In working with WRC, I think I am going to have to go down the route of creating a Custom Service to send a tickler to a BPL to begin selecting the data. In theory it makes sense but I am having an issue trying to grasp my head around to code it. Without having to build a message structure to send the request to the BPL is there an easier way?
go to post Scott Roth · Jul 20, 2017 The SQL Inbound Service has a set start and stop time. I give it about a 1/2 hr to run before closing the connection. This is because I am treating it like a job, it doesn't need to be up all the time, just once a night.I have used SQL Outbound Adapters in many other Operations I have built. What do you use as the Trigger, to say yes go ahead and process these records? In this case I use the records to send to a BPL to then use an Outbound SQL Adapter Operation I have created to get what ever else data wasn't in the record but I need in the outbound file.
go to post Scott Roth · Jul 20, 2017 Wonder if you add the following to your OnInit() would help... Kill $$$EnsRuntimeAppData(..%ConfigName)
go to post Scott Roth · Jun 29, 2017 Have you attempted to use LENGTH?Say LENGTH(HL7.{MRG. PriorPatientIdentifierList }) > 0We have never been successful in using the field numbers within our routing rules. Normally we just use the name of the field, or that's at least how we were taught.I would also think you want to check the message type before you check the MRG.1. So it would be if Message Type is A18 and LENGTH(HL7.{MRG. PriorPatientIdentifierList }) > 0 then return
go to post Scott Roth · Jun 20, 2017 I am looking more for a function that I can call in a Business Rule or Data Transformation to compare the dates.For exampleIn a Business Rule I might want to say only send messages that have an Admit Date after 7/1/2017.In a Data transformation I might want to say only populate certain fields if Admit Date is after 7/1/2017Thanks
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.