InputFileProcessed |
Top Previous Next |
Object: EHL7.CommandoProcessor FileName: EHL7.dll
EVENT
Name: InputFileProcessed Parameters:
Description: When a file has been completely processed and MessageIN events have been generated for each HL7 message, AND all HL7 messages have been passed to the processor script for handling this event fires. After processing is completed the processor will delete the file from the InboundPath. Before this happens you can use this event to copy the original file to a backup folder or you can set the strArchiveToFileName to a full path and filename and the processor will do it for you.
Note: For archival purposes this method can be ignored if the profiles ArchiveMessages and ArchivePath property are set to do it automatically.
Example: 'Declare the object Private WithEvents oProcessor As EHL7.CommandoProcessor
Private Sub oProcessor_InputFileProcessed(strFileName As String, strArchiveToFileName As String) Const MyFolder = "C:\Backup\" 'Remember the processor is going to delete strfilename after this event. 'So I want the processor to put a copy of this file into another folder. strArchiveToFileName = MyFolder & FileNameOnly(strFileName) End Sub
Private Function FileNameOnly(strPathFile As String) As String Dim retValue As String Dim i As Long i = InstrRev(strPathFile,"\") If i > 0 Then retValue = mid$(strPathFile,i+1) Else retValue = strPathFile End If FileNameOnly = retValue End Function
Related Items: EasyHL7 Events in VB
|