Scripting may be applied to any interfaces, but each of these interfaces also
has an additional transport implementation. Script interfaces are provided
for when there is no other tasks because all the messaging handling is
performed in the script. Think of scripted interfaces as a means to run a script at a pre-determined time interval (e.g.. run script every 5 seconds). They are extremely useful for extraordinary tasks that HL7Connect on its own may not handle.
For example, you may have a system that is sending through a custom file format, which is not HL7.
HL7Connect normally wouldn't be able to process such a file.
But the scripted interface allows you to use a VB Script to manually poll a directory (using fileSystem objects), read the file line by line and manually parse it using your an appropriate algorithm.
Content can then be built into a message using the HL7Connect scripting kernel in conjunction with VB Script and then sent to an outgoing interface - effectively it allows you to build an HL7 message from any custom format, providing you can work out an algorithm to process your custom file etc.
That is only one way a scripted interface may help, there are many more things you could achieve with a scripted interface for specific problems.
In addition to a primary Script for the actual interface, Script Interfaces also have the same events as normal interfaces, though they have little use.
The following settings configure a DLL to be loaded and used by HL7Connect. Refer to Technical Specifications for greater detail.
Scripts are read from files as they are executed.
The file must be specified, and must be in the same local system in which HL7Connect is running.
The token $scripts$ points to a sub directory "scripts" in the HL7Connect root directory, a good place in which to put all production scripts.
The name of the procedure executed in the specified script file. This routine must be specified, and provided.
NOTE: The procedure name is case sensitive in some script languages.
This is an optional field. If provided, it is passed to the script in the event.parameter property. HL7Connect does not use this value, even though the script may.
|Debug||When selected, the Microsoft Debugger will be able to debug the script. Before the Microsoft Debugger can actually debug the script, there must be an error in the script, or the script must call the "breakpoint" routine which will start the script debugger.|
|How frequently, in seconds, to execute the script. Outgoing scripts are executed when ever required.|
Errors in these scripts are handled differently to errors in script events. If an incoming script causes an exception, this is logged as an internal error on the interface, and if an outgoing interface causes an error, this will generate an AE response back to the kernel.