Field/Component/Sub-component Statistic
Sub-Component, Component, Repeat, and Field
When configuring, or troubleshooting, HL7 interfaces it is often useful (if not always) to know what values to expect in particular field, what are the minimum and maximum lengths expected, how often the value is null, etc. The “Statistics Tool” tab provides high-level statistics for all messages and fields, whereas the Sub-Component, Component, Repeat, Field, and Advanced Statistics UI displays more detailed statistics for an individual Sub-Component, Component, Repeat, or Field. The Sub-Component, Component, Repeat, and Field feature share the same UI since they have identical functionality. The difference being that the Sub-Component, Component, Repeat, Field provide statistics at each respective level. If you are integrating two systems together this is invaluable information.
The figure above are the statistics for field PID-8. A description of fields and capabilities of this window follows:
- Title Bar - The title bar of this window has the following information. HL7 Field Path, Name of HL7 Field – Message Collection.
- Not Null - Shows the number of messages in the active Message Tab where the selected field was not empty. In the figure, all 10028 messages had a value set for PID-8.
- Null - Shows the number of messages in the Message Tab that had an empty field. In this example, no messages had an empty value for PID-8.
Note: If there are fields with Null values, you can click on the text “Null” and the Message Editor will find the next Null value. Holding down the Control key and clicking on the text “Null” will move the Message Editor to the previous message with that field being NULL.
- Unique - Shows the number of unique values found for the selected field in the active message collection. In the above example, there are only 3 unique values “M”, “F”, and “U”.
- No "SEG" - Where SEG represents the segment name of the selected field. This number describes how many messages in the active message collection were missing the segment of the requested field. This is, of course, slightly different then what is tracked in the “Null” field since having a segment and the value being NULL is different than not having the segment at all.
- Field Value Grid - These are the unique values for all messages in the active Message Tab, for the specified field. As can be seen from the figure, each value has a count (labeled as Num), and a length (labeled as Len). The default order of the grid is from most common to least common value, however; this can be changed by clicking on one of the columns of the grid. In the example above, there are 5149 messages for female patients, 4863 messages for male patients, and 16 messages where the technologist couldn't determine the patients sex. All fields have a length of 1 as you would expect for this field.
- All Button - Clicking the “All” button will cause HL7Spy to create a new Message Tab containing all messages where the selected field equals the row selected in the Field Value Grid (6). In the example above, clicking the “All” button would cause a new Message Tab to be created with all the messages where PID-8 has the value of “U”.
- Field Value Navigation - Clicking the left and right arrows buttons cause the message Editor to move to the previous and next message that have a field matching the value selected in the Field Value Grid (6), respectively.
- Right Click Menu - Right-clicking on a row in the Field Value Grid (6) displays a menu with search criteria available for the selected value.
Advanced Statistics
The "Advanced Statistics" dialog can be activated by clicking on the button in the Toolbar, or selecting the "Tools/Calculate Advanced Statistics" from the main menu. As a result, the following dialog will be displayed.
- HL7 Path - Specify the path and piece of the message (Sub-Component, Component, Repeat, or Field). Also, you have the option to include segment and field repeats.
- Constraint - Opt to "Only include repeated segments that match the following criteria" to further filter statistics.