Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I've shared this macro with a few individuals before, but thought it might be worth sharing to the whole group.
The macro is a reusable function to hit Epic's Interconnect server in VB Script during a QV reload. It would in theory work with any of the SOAP web services provided with Epic. GetCurrentCensus and GetWaitTimes are the only two I've played with. I'm sure there's certainly ways to streamline this or make it better, so let me know!
The function at the top of the text file should be loaded into the Macro module. Everything below the function is a sample QV script for GetCurrentCensus that loops through and gets the current census for each department in our hospital. For each record it will create an XML file of the web service response from Interconnect and then immediately load it into the application.
In the load script, the variable vGetCensusSoap is populated with the frame of the XML request, with in my case one parameter for the department id.
Inside of each loop, I create a unique XML request with SET vSOAPRequest = $(vGetCensusSOAP($(vDeptID))) and then fire off the request to Interconnect
RESPONSE:
LOAD EpicInterconnect('$(vSOAPRequest)','$(vSOAPURL)','$(vSOAPAction)','$(vSOAPURN)','$(vSOAPURNAction)','$(vDeptID)','$(vFileLocation)','$(vFileNamingConvention)','$(vFileExtension)') as RESPONSE
AUTOGENERATE 1
;
Everything below that loads the xml files and connects the data to get a single census table.
Prerequisites:
Resulting Table (Rename fields as needed in the script)
