Testing X12 configurations

Tests X12 record format configurations. This test reads, parses, and displays messages, ensuring that configurations match the input data.

hcix12test handles X12 messages that contain:

  • Any number of interchanges (ISA..IEA).

    or

  • A single group (GS..GE).

    or

  • A single transaction set (ST..SE).

hcix12test accepts interchanges, groups, or transaction sets.

If the message starts with ST or GS, then it is treated as an individual transaction set or an individual group, respectively. For ST and GS messages, use default separator characters (*, ~ and \).

If the message does not start with ST or GS, then it is treated as an interchange. hcix12test handles a message with any number of interchanges, each containing any number of groups, which can contain any number of transaction sets. For interchanges, the separator characters are extracted from the ISA segments.

If using group messages (GS to GE), then create a variant that defines the transaction sets in terms of groups and specify such a variant for the test. The path names for a group are different from the transaction set. This is because the GS becomes group zero and the first ST is 1(0).0(0).ST(0).

The group message variant uses this structure:

GS
{
         ST
         . . .
         SE
}
GE
  • If an envelope is used, then it extracts the transaction sets and parses the individual transaction sets.
  • If transaction sets are used, then hcix12test processes the message without extracting the transaction sets.
  1. For X12 Version, click the arrow to open a list of available versions.
  2. For Variant, click the arrow to open a list of available variants.
  3. Specify the testing data file in Choose Data File. You can also click the folder button to open a file browser to select the data file. By default, the file browser locates on the $HCISITEDIR/formats/ folder.
  4. Select Show Field Names to show the field names.
  5. Open the Detail level menu to select from a list of detail levels for the test output that is reported in the Result pane. Detail levels go from 0 (raw, unparsed data) to 4 (most detail).
  6. Select the line termination format in which to save the test messages. Click the arrow to open a list of formats.
    Newline Terminated reads the data in the file until it finds a newline character, making all that data one message, and sends that to the parser. It then reads until it finds the next newline character, makes a second message, and sends that to the parser.
    Length Encoded reads the first 10 characters to determine how long the first message is, reads that many characters into a message, and then sends it to the parser.
    EOF Terminated reads the file until it gets to the end-of-file character, takes that as a message, and sends it to the parser.
  7. Specify the encoding in the Encoding field. You can also click the arrow to open a list of different encodings that identify the encoding of messages in the selected data file. The command converts the messages from the identified encoding to UTF-8 to perform the test. When you select an encoding from the list, an -e encoding option is added to the corresponding command line.
  8. Select how to process records.
    process all records reads the selected data file and processes all the records in it.
    process one record reads the selected data file and processes only the first record in the file.
  9. Select Test Parser (default) or Test Numbers.
    Test Parser parses each message.
    Test Numbers tests the number conversion.
  10. In Separator Options, specify the separator characters for parsing messages.
  11. If required, then select Grep to filter the output.
  12. Click Run Command to run the command shown in Preview Command to Issue.
    As the test is being configured, a command-line command and the requisite parameters are generated in Preview Command to Issue. This is for display only. A command cannot be manually entered.