Ancestor: HL7Connect.Events.Base

Called by an incoming scripted message interface basis. If the script determines that a message is to be generated, then it should create one (using Kernel.CreateHL7Message or one of it's variants) and send it using the Event's SendMessage method

The script is called under two different circumstances (as configured). Either it is called on a regular schedule, or it is called when there are items in the virtual queue to be processed. If the event is called because there is a message or document in a virtual queue, then one of the IncomingMessage, IncomingDocument or IncomingDicom properties will be non-null, and the script must set IncomingHandled to true - or else the same item will be processed repeatedly

Note that this is the one place in HL7Connect where documents, messages and DICOM Images can mix - this event requires an outgoing message, but one of documents, messages or images will come in, depending on the configuration of the interface

KScript: the generated content is sent to the kernel as a v2.xml message (One message per execution). IncomingHandled is set to true if the script executes and the message is accepted. Note: KScript is not configured to work usefully with incoming dicom messages at this time.

Properties

HL7Connect.Exchange.Message IncomingMessage;
   The message that is being handled, if the event is being called because a message has been queued to a virtual queue that the incoming scripted interface is triggered on.

HL7Connect.Exchange.Document IncomingDocument;
   The Document that is being handled, if the event is being called because a Document has been queued to a virtual queue that the incoming scripted interface is triggered on.

HL7Connect.Exchange.DicomMessage IncomingDicom;
   The Dicom Message that is being handled, if the event is being called because a Dicom Message has been queued to a virtual queue that the incoming scripted interface is triggered on.

bool IncomingHandled;
   If the event is being called in response to a message or document in a virtual queue, this must be set to true to tell the kernel to remove the message from the virtual queue - else the script will be called again indefinitely.

You can safely leave IncomingHandled = false; there is always a short break (at least 1 second) before repeating the script after IncomingHandled is false to keep the load on the system down


Methods

HL7Connect.V2.Message SendMessage(HL7Connect.V2.Message AMessage);
   Send the message to the kernel as a new incoming message. The return value of the function is the Kernel's HL7 response

HL7Connect.V2.Message SendMessageEx(HL7Connect.V2.Message AMessage, string ASourceParameter);
   Send the message to the kernel as a new incoming message. The second parameter is passed to any incoming scripts as the source parameter on the event The return value of the function is the Kernel's HL7 response


© Kestral Computing P/L 2000 - 2003. HL7Connect v2.00-063 generated on 30-Nov 2015.
Keywords: SendMessage, IncomingDicom, IncomingDocument, IncomingHandled, IncomingMessage, SendMessageEx, HL7Connect.Events.CheckMessage, CheckMessage