HL7 v2.x Validation

Definition

HL7 v2.x Validation configures a set of rules that validate message content is as expected. Rules are associated to messages fields or components.

 

Segment/Field Validation Rule

Create

You can create your validation from an existing message, which simplifies the process, or manually.

To create from a message:

  1. Run the Action containing the task. This will add messages to the “Sample Message to Validate” area.
  2. Right-click the desired field in the message and select Add Validation.

To create manually:

  1. Click the Add button in the Validations grid.
  2. Specify the field that the validation will be applied to.

Configure

  • Modify the component or sub-component the validation will be applied to, if needed.
  • Change the operator, if needed.
  • Modify the Field# value if validation needs to occur on a specific field repetition.
  • If several rules are set, modify the and/or logical operator and parenthesis so the rule evaluation is done correctly.

You can edit the criteria by clicking on the cell to set a basic text value. In addition, you have access to the Variable Editor and the Criteria Editor which are opened by right-clicking on the criteria cell. From there you can insert a Variable or a Field Value criteria by specifying its location.

Enabling/Disabling a Validation Rule

It may be necessary to temporarily disable a validation rule so it is no longer evaluated during test execution. To disable a rule, uncheck the check box in the very first column of the Segment-Field Validation table. To re-enable it, recheck the check box to the initial state.

Advanced Mode

Repetition

In Advanced Mode, you can also select a specific field repetition to which the validation will apply.

Conditional Validation

You can use And, Or and Parentheses to perform more advanced conditions for your validations.

 

Next