Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 21 Next »

 

The Message Editor is the focal point of HL7Spy application. It is an enhanced, context aware HL7 editor that parses, and interprets HL7 messages. It provides details on the currently selected field, component, and subcomponent. Most other tools within the application interact, or are coupled in some way to the Message Editor window.

Sorting

The first question you might ask is “why would you want to sort messages?” Let's consider the scenarios below:

  1. Messages in a given file have been saved in a different order from how they were received.
  2. You have opened several files into a single Message Tab using the “Open Folder” feature (see “Opening More than 1 File” on page 12). In this case the files are not likely to be opened in the correct order and the messages in the Message Tab will be out-of-order.
  3. You have “Merged” to Message Collections into a new collection and wish to order the messages in the new message collection by the Control ID (MSH-10) so that they are in time sequence order.
  4. You want to find the largest message in a Message Collection.

The search dialog can be displayed by clicking on the "Sort Order" button, and the following dialog is displayed.

The radio button options provide some of the more common sort orders that one might want to use. Please see below for descriptions of each:

Message Sort Order

  • Default (MSH-7, MSH-13, MSH-10) - This option sorts all messages in a Message Collection by “Message Control ID,” then by “Message Sequence Number”, then by “Date/Time of the Message” This is usually a pretty robust option to sort messages in their natural, or received order provided that they come from the same HL7 source.
  • Control ID (MSH-10) - This option sorts all messages in a Message Collection by “Message Control ID."
  • Sequence Number (MSH-13) - This option sorts all messages in a Message Collection by “Sequence Number."
  • Patient ID (PID-3) - This option sorts all messages in a Message Collection by “Patient ID."
  • Patient Name (PID-5.1.1, PID-5.2.1) - This option sorts all messages in a Message Collection by “Patient Last Name," then by "Patient First Name."
  • Message Offset – This option will allow you to sort messages in a Message collection in the original order that they appear within a given file. This is useful to revert a previous sort performed on a Message Collection.
  • Message Size – This option is useful if you want to find the largest or smallest message in a Message Collection. (After sorting the smallest message will be the first message, and the largest will be the last.)
  • Custom Sort – If the predefined “field” sort options do not have the sort criteria you are looking for, you can always define your own. The syntax of a custom sort is: Field1 [ASC|DESC], Field2 [ASC|DESC]... You will notice that if you select any of the other radio buttons (except Message Size and Message Offset) that the “Sort Expression” dialog is updated with the proper syntax, so you have some examples to follow.
  • Don't Sort - This option will not perform a sort.
  • Open results in new tab – If this option is selected, the sorted collection is placed in a new Message Tab, and the existing tab is left unchanged.

Merging Message Collections

The “Merge Message Collections” dialog can be activated by clicking on the button in the Message Editor toolbar, or selecting the “Tools/Merge” from the main menu. As a result, the following dialog will be displayed.

Message Tab Selection – The top portion of the dialog displays the currently loaded Collections. To include, or excluded, a specific Message Collection, just toggle the “Select” checkbox adjacent to the Message Collection. For example, in the figure above, the messages from “SampleHl7.zip::Data.hl7” and “Anonymize.txt” will be included in the newly created Message Collection, “Data.hl7” will not.

Sort Order – This set of options control how messages will be sorted in the newly created Message Collection. Only the most common sort criteria are available here. To perform more complex sorting, just click “OK” and use the more feature rich “Sort Message” dialog (see section “Sorting” on page 23.

  • No labels