Opening/Loading HL7 Messages
Opening a File
For your convenience, there are many ways to open a file in HL7Spy. These are enumerated below:
- Using the File/Open menu option, Ctrl-O, or clicking on the “Open File” button in the Message Editor window. These three options cause the standard Windows File Open dialog to be displayed. Multiple files can be opened by (a) holding down the Control key and selecting 1 or more files, or by (b) holding down the Shift key clicking on a file in the list, then while still holding the Shift key, clicking on a file further down in the list, to select a range of files.
- Dragging and dropping files from Windows Explorer to the HL7Spy title bar.
- Using the “Open Folder” menu option, or clicking on the "Open Folder" button. This option displays the following dialog. Which allows some specificity over which files in a particular directory are opened. It is recommend to use “Open Folder” over options (1) or (2) if the number of files is over 100. Windows File Open dialog has some limitations on the number of files which can be opened whereas Open Folder can open thousands of files.
The options in this dialog are described here:
- Directory - Specify the path of the folder where the HL7 message files are located, or click on the folder icon to select a path.
- File Search - Specify the extension of the files to be opened. More than one extension can be specified by separating extensions with a semicolon.
- Content Search - Allows you to specify a regular expression or text that will be run on the text of each file. Please refer to the following wiki article to get things rolling, http://en.wikipedia.org/wiki/Regular_expression#Character_classes.
- Use - Only works with a regular expression, if Content Search finds a match the file will be included, otherwise it will be ignored.
- Match Case - Only works with text, if Content Search finds a case-sensitive match the file will be included, otherwise it will be ignored.
- Merge Files into a single file before loading - If you know the files are text, i.e. not gzip, bzip2, or zip format, then using this option will dramatically decrease the time it takes HL7Spy to open thousands of files.
- Recurse Subdirectories - If selected, files files in subdirectories of the selected directory will be included; otherwise, only files in the directory will be included.
By default, tabs are displayed in the order of the first message in the tab. This behavior can be disabled from the “Options/Order Tabs by MSH-7”.
Opening More than 1 File
If you are opening multiple files at a time, HL7Spy displays the following dialog. This dialog allows you to control whether you want the files to be loaded into a single message tab, or whether a tab should be created for each file.
If you choose to load the messages into a single tab, then the options for controlling how the messages should be sorted are enabled.
Note: HL7Spy automatically disables the “Tab Per File” option if more than 20 files are loaded at a time.
Opening Large Files
To use this functionality you must manually enable the "Partial File Load Dialog" under Options/File Settings.
If you open a file that is more than 50MB in size, HL7Spy gives you the opportunity to reduce the amount of data that is read using the following dialog. By dragging the scrollers, you can control which section of the file will be read in. HL7Spy will indicate the offset and size of the section of the file that will be read, as well as the date range. If the “Continuous” option is selected, the data range is displayed while the scrollers are dragged, otherwise the data range is displayed when the scrollers are released. Having “Continuous” selected may perform poorly on a busy system. It is also possible to limit the number of messages that are read in by setting a value other than zero in the Load First TextBox.
If you do not wish to limit the data that is being loaded, just click continue and HL7Spy will operate as normal.
File Types Supported
HL7Spy will detect and open the following files types:
- Standard 0x0bMSH...0x1c0x1d
- Single message in the file with no framing bytes
- Carriage return separated messages
- Carriage return with Line Feed separated messages
- Japanese framing (omits the 0x0b character at the beginning of the message)
- EGate log file format
- Pyxis log file format
- STC Datagate formats (several flavors)
- IDX ConnectR log format
- Messages encoded in UTF16 format
Message streams that have been compressed in ZIP, GZIP, or BZIP2 will be automatically uncompressed before loading.
If HL7Spy does not correctly open your HL7 file format, please see the Advanced Topics section entitled “Message Framing” for details on how to configure HL7Spy to open more unconventional formats.