InputFileProcessed |
Top Previous Next |
Object: EHL7.EHL7Processor 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 (if configured in the CompleteAction property) all HL7 messages have been written to the OutboundPath 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.
Example: 'Declare the object Private WithEvents oProcessor As EHL7.EHL7Processor
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
|