ScriptEvent |
Top Previous Next |
Object: EHL7.CommandoProcessor FileName: EHL7.dll
EVENT
Name: ScriptEvent Parameters:
Description: Built into the CommandoScript objects is the SMEvent object. Authors of CommandoScript projects may use this object to raise events to the framework running the processor. In the Commando HL7 workbench there are only 3 values in the eventName parameter that mean anything, they are:
In Commando, all other values are ignored.
In the CommandoProcessor object this event is raised to you for ANY value passed in <eventName>. If the <eventName> parameter is "CANCEL" or "ERROR", the object will automatically handle the situation and processing will be cancelled after the event is raised. But any other value is yours to use as you see fit.
Example:
CommandoScript Code Snippet:
With oMSG If Ucase(.GetFieldValue(sPID, 5, 1)) = "SMITH" Then 'The patient's last name is smith SMEvent.Raise "FOUNDSMITH", "The processor found someone named Smith" End If End With
Your Code Snippet for the processor's ScriptEvent handler
Private Sub oProcessor_ScriptEvent(eventName, eventParms) If eventName = "FOUNDSMITH" Then MsgBox eventParms, vbInformation, "Alert" End If End Sub
Related Items: EasyHL7 Events in VB, ProcessorUnloaded
|