This tutorial explains how to build a Segment/Field rule validating that leading 0s were removed from field.
In this example. let’s validate that PID.3.1 (Patient Identifier) has no leading zeros.
- In the inbound HL7 task, select the Validation tab
- Select the Segment/Field Validation tab
- Add the rule: PID.3.1 is matching regex ^[1-9]\d*$
This rule means that:
- The first character must be between 1 and 9 (not 0) (^[1-9])
- The other characters must be digits (between 0 and 9) (\d*$)
Learn more about how to import validation rules into an inbound HL7 task.