Message Comparison

Use Cases

Message comparison helps you compare 2 sets of messages at the data level.  This is useful in several cases, such as:

  • In a conversion project, you want to identify the transformations performed on messages without looking at the transformation code.  In this case, you compare input and output messages and look for changed messages.  The highlighted differences will show you what transformations were performed.  It’s a quick and easy way to gather requirements.
  • During the validation phase, you compare transformed messages with another set of messages you already know are valid (golden message set).  The highlighted differences will indicate any issues in your code or any missing transformations.  This is a quick and easy way to validate that your code fulfills the requirements.

 

Comparing Messages

To compare a set of HL7 messages:

  1. Go to GAP ANALYSIS, Message Comparison…
  2. Click the Select messages to compare… zone
  3. Add the messages you want to compare.  Messages can come from:
      File:  Click Add… to add one or several files containing messages
      Database:  Select a database to query and from which to retrieve messages.
      Integration Engine:  Select an integration engine data depot (Ensemble, Rhapsody, Iguana, Mirth and others) to retrieve messages directly from the integration engine (connector required).
  4. Do the same for the other message set, clicking the other Select messages to compare… zone on the right.

Once the comparison is complete, differences are highlighted in red and the total number of differences between messages is displayed. 

 

1-on-1 Comparison

For a more detailed view of a message pair or message differences, double-click the message pair you want to compare.  Navigate through the tree view, field by field, to see the differences.

Click on the gray zone at the bottom of the screen to view more details about each difference.  Double-clicking on a grid row helps you navigate through the differences.

 

Matching Fields

By default, messages will be compared based on their position.  The first message on the left is compared with the first message on the right, the second with the second and so on. 

Since message files don’t always contain the same amount of messages and/or messages are not necessarily always sorted in the same order, you can configure the application to match messages based on field values.  To configure the message matching criteria:

  1. Move your mouse pointer over the field you want to use for message matching
  2. Right-click and select Match Messages Using this Field

Alternatively, you can:

  1. Go to TOOLS, Options
  2. Select the Message Comparisons tab
  3. Select Field values. Add a list of fields used to match messages
  4. Click Add…
  5. Change the new line that appears to the field needed to match messages
  6. Repeat step #4 and #5 with the next field if you want to use more than one matching field

 

Include/Exclude Fields from comparison

You may want to exclude fields from the comparison so they are simply not considered in the comparison.  This allows you to ignore differences in fields you don’t need to consider.

To exclude fields from comparison:

  1. Move your mouse pointer over the field you want to exclude
  2. Right-click and select Add to Exclude Filters

 Alternatively, you can:

  1. Go to TOOLS, Options
  2. Select the Filters tab (the Filters tab is also accessible from the Message Comparison screen clicking on the FilterEmpty icon on the upper-right corner)
  3. Make sure Exclude is selected
  4. Click Add…
  5. Change the new line that appears to the field to be excluded
  6. Repeat step #4 and #5 to exclude more fields

It can be easier to provide a list of fields to include instead of excluding a large number of fields.  The procedure is similar.  In the Filter  tab, be sure Include (instead of Exclude) is selected.

To set a large number of fields in one operation,  use the 1-on-1 message comparison screen.  For example, if you want to compare fields PID.2 to PID.13:

  1. Go to the 1-on-1 message comparison by double-clicking on a message pair
  2. Expand the PID segment so you can view all fields
  3. Select PID.2 to PID.13 holding down the SHIFT key
  4. Right-click on the selection zone and select Switch to Include Filter and Set Only This Field
  5. Close the window

The comparison will refresh using the new field set.

 

 Hide/Show what matters

After the comparison is completed, message pairs can have one of the following statuses:

  • Changed:  Matching message found and one or more differences were found
  • Unmatched:  No matching message found
  • Identical:  Matching message found and no differences was found

On the bottom left of the screen, the  message pair count for each status is listed. 

Message pairs can be shown/hidden based on their status.  For instance, to hide identical messages:

  1. On the bottom left of the screen, select the identical message status
  2. Select Hide identical messages

Identical messages are filtered so only changed and unmatched messages are listed. 

 

Difference Report

An Excel or PDF report can be generated to document the status of all messages.  This report can be used, for instance, to document that the transformation code met all requirements at some point in time.

 To generate this report:

  1. Go to FILE, Create Report
    1. To Excel…
    2. To PDF…

 The report contains:

  • Timestamp comparison
  • Files compared
  • Number of messages for each status
  • Message matching details
  • Field filters details
  • Differences

Settings

Automatically apply changes If checked, the differences will be calculated each time a significant setting has changed. 
Treat missing and empty fields as equivalent

If checked, the algorithm will consider missing and empty fields as equivalent.

Ex:

‘OBX||AD|||||’ and ‘OBX||AD’ will not be flagged as different.

‘PID|||||Smith^John^’ and ‘PID|||||Smith^John’ will not be flagged as different.