File Reader device
This page contains information about the File Reader device. This device reads files from a directory and creates either HL7 or string messages that are then passed to the queue.
To configure the device, complete the following options.
Reader Type: From the drop-down, choose the type of reader you want the device to be. Choices include:
- File Reader: Read variable-width files.
- Fixed-width Reader: Read fixed-width files.
- Delimited Reader: Read files that use a delimiter (such as a comma or a pipe) to separate values.
Output Message Type: From the drop-down, choose the type of message that Connexion should create after reading the input. Choices include:
- HL7 message
- String
Source Path: The path to the directory where the input file is located (e.g., c:/files/connexion).
Impersonate: If the Source Path directory requires the credentials of a specific user or group, select the box and then enter the username and password in the appropriate fields.
Read File Order: If multiple files exist in the Source Path, this is the order in which they should be read.
Minimum file age: Set how old the file must be (based on creation date) before it can be read. This value is specified in seconds.
Polling interval: The time interval, in seconds, at which Connexion will look in the Source Path directory for new files.
Test Mode: When this box is selected, files will not be automatically deleted after the device finishes reading them. This is useful if you are configuring the device or channel. Once the device goes to production, you may choose to uncheck this option.
For the File Reader type
File Filter: The file extension/filter that is used to identify the primary message file. You can use wildcards in a file name (foo*.* will look for any file that starts with "foo") or extension (*.foo will look for any files with the FOO extension). If you do not want to read in a primary file, only attachments, leave this field blank.
Attachment Extensions: These are the extensions of any file that should be added as attachments. Each extension should be listed on its own line. One file per specified extension will be added once a file exists. For example, if you specify *.rtf and *.xml as the attachment extensions, once a pair of files with matching names and extensions (e.g., foo.rtf and foo.xml) exist, they will be added as attachments.
Encoding: Set the encoding for the files to be read. The default is Western European (ISO), but you can choose a different encoding system (such as Unicode).
Messages Are Framed: If the message is set off by a beginning and an ending character (framed), check this option.
Detect Framing: Check this option if the device should automatically detect the framing characters specified. This is only applicable for HL7 messages.
Start of Message Character: The character (or character string) that indicates the start of a message.
End of Message Character: The character (or character string) that indicates the end of a message.
For the Fixed Width Reader type
In the table at the bottom of the screen, enter the file layout specifications by double-clicking in each column. You will enter the name of the field, the length (in characters), and the start position (the character number where the field begins. For example, a field name might be Patient Name. A Field Length of 15 and a Start Position of "7" means that the field that contains the Patient Name starts at character 7 and continues for the next 15 characters. To reorder the Field Names as desired, use the arrows in the Field Name column header of the table.
For the Delimited Reader type
Underneath the standard fields are a set of options to specify:
- The Field Delimiter: this is the character that separates individual fields, such as a comma ( , ) or a pipe ( | ).
- The Quote Character: values inside this character are read literally.
- The Escape Character: some systems consider certain characters (such as a $ or a \) to have special meaning. However, you may want to use these characters literally in your messages. The Escape Character is used to indicate that any special characters that follow should be read literally. For example, if you use quotation marks as your escape character (the default), when the device encounters "$ it will read the dollar sign literally and not assign it any special meaning. The list of special-meaning characters varies from language and system; consult the guidelines for your environment.
- Trimming Options: specify how the device should handle any trimming in the file. You can:
- Trim nothing (None).
- Trim only text outside of quotation marks (UnquotedOnly).
- Trim only text inside quotation marks (QuotedOnly).
- Trim all text (All).
- Skip Empty Lines: Select this option if the device should pass over any empty lines in the file being read.
- Support Line Spanning: Select this option if field values may span multiple lines in the file.
- File Contains Headers: If the file being read contains a header row, select this option. In the table underneath, list all of the relevant header names used in the file.