How to build a Segment/Field rule validating a specific field repetition has an expected value
In this example, let’s validate the following:
- the first repetition of PID.3.4 = R
- the second repetition of PID.3.4 = M
- the third repetition = L
- also, let’s assume the third repetition is optional and might not be provided
- First set up your suite, scenario, and action.
- In the inbound HL7 task, select the Validation tab
- Select the Segment/Field Validation tab
- Click Advanced Mode. It reveals a few new columns. The column FIELD # is where you set which repetition the rule applies to.
- Add the first rule: PID.3.4 (Field #1) is = R
- Add a second rule: PID.3.4 (Field #2) is = M
- Now, let’s add 2 rules for the 3rd repetition. Remember that we need to account for cases where the 3rd repetition is not provided.
- Add the rule PID.3.4 (Field #3) is = L
- Add a last rule PID.3 (Field #3) is not present
- Either rule must be true so we add parentheses around the rules and use the OR logical operator
Learn more about how to import validation rules into an inbound HL7 task.