<$keywords Events, Script Events, Languages%>



HL7Connect Scripts are executed in response to events in the kernel. For each type of kernel event, there is a matching event class that holds all the information for the event. This table summarises the events, and the matching event classes:
Event    Class    Description    Languages
Kernel Events
OnInterfaceStart    IInterfaceStartEvent    This event is called after an interface transport layer starts, but before any messages flow.    Javascript, VBScript
OnInterfaceStop    IInterfaceStopEvent    This event is called after an interface transport layer stops. No other interface events will be called after this event is called.    Javascript, VBScript
OnKernelStart    IKernelStartEvent    This event is called once the kernel is fully initialised, just before the interfaces are started.    Javascript, VBScript
OnKernelStop    IKernelStopEvent    This event is called once all interfaces are stopped, before the kernel is shut down.    Javascript, VBScript
OnReceiveSms    IReceiveSmsEvent    This event is called when an incoming sms message is received. The event will keep being called until the event call doesn't return an error.    Javascript, VBScript
OnConvert    IConversionEvent    This event is called when a conversion is invoked (when associated with a scripted incoming interface attached to a queue, or directly through the web interface).    Javascript, VBScript, XSLT
Messaging Events
OnHL7Build    IHL7BuildEvent    This event is called when a Text File Interface needs to convert an HL7 Message to a line of text.    Javascript, VBScript
OnHL7Convert    IHL7ConvertEvent    This event is called when a Text File Interface needs to convert a line of text to an HL7 Message.    Javascript, VBScript
OnReceiveMessage    IReceiveMessageEvent    This event is called when a message is received on an Incoming Interface. It is called after the message is logged, but before the message is handled by the kernel.    Javascript, VBScript, XSLT
OnReceiveReply    IReceiveReplyEvent    This event is called when an Outgoing Interface receives a reply to a message. The reply will be logged prior to this event.    Javascript, VBScript, XSLT
OnScriptCheck    ICheckMessageEvent    This event is executed by an incoming scripted interface on a regular basis to look for new messages to build.    Javascript, VBScript, KScript
OnScriptSend    ISendScriptMessageEvent    This event is executed by an outgoing scripted interface when a outgoing message is to be handled.    Javascript, VBScript
OnSendMessage    ISendMessageEvent    This event is called when a message is about to be sent to an Outgoing interface. It is called before the message is logged.    Javascript, VBScript, XSLT
OnSendReply    ISendReplyEvent    This event is called when a reply is about to be sent back to an Incoming Interface. The event is called prior to logging the message.    Javascript, VBScript, XSLT
Validation    IValidationEvent    This event is executed whenever a validation process invokes an WSH Script    Javascript, VBScript
Document Events
OnReceiveDocument    IReceiveDocumentEvent    This event is called when a document is received on an Incoming Interface. It is called after the docuementis logged, but before the document is handled by the kernel.    Javascript, VBScript, XSLT
OnScriptCheckDocument    ICheckDocumentEvent    This event is executed by an incoming scripted interface on a regular basis to look for new documents to build.    Javascript, VBScript, KScript
OnScriptSendDocument    ISendScriptDocumentEvent    This event is executed by an outgoing scripted interface when a outgoing document is to be handled.    Javascript, VBScript
OnSendDocument    ISendDocumentEvent    This event is called when a document is about to be sent to an Outgoing interface. It is called before the document is logged.    Javascript, VBScript, XSLT
Validation    ICDAValidationEvent    This event is executed whenever a CDA validation process invokes an WSH Script    Javascript, VBScript
COM-Initiated Events
OnExecuteHL7    IExecuteHL7Event    This event is called when a COM client uses IHL7Manager.HL7.ExecuteScript.    Javascript, VBScript, XSLT
OnExecuteCDA    IExecuteCDAEvent    This event is called when a COM client uses ICDAManager.CDA.ExecuteScript.    Javascript, VBScript, XSLT
OnExecuteScript    IExecuteKScriptEvent    This event is called when a COM Client uses IHL7Connect.ExecuteKScript or IHL7ConnectServices.ExecuteKScript    KScript

Languages

HL7Connect supports multiple languages for script events. The different languages function quite differently so not all script events support with all languages.

Language    Implementation    Comments
COM    Any COM capable language (C#, C++, Delphi, etc)    Supported fully for all events
Javascript    Windows Script Host JScript    Supported fully for all events
VBScript    Windows Script Host    Supported fully for all events
XSLT    MSXML 4.0+    See also the W3C standard and XSLT Page
KScript    Kestral Script Engine    KScript is a scripting language originally developed for use internally in Kestral. It works somewhat like PHP, and is a most convenient way to build new content. See KScript documentation for further information and examples

Both XSLT and KScript are page generation languages rather then procedural programming languages, so they are only supported where this functionality is useful


© Kestral Computing P/L 2000-2010.