This tutorial explains how to build a Segment/Field rule validating that a field contains a valid phone number.
In this example, we’ll validate that PID.13 (Phone Number – Home) contains a phone number.
- In the inbound HL7 task, select the Validation tab
- Select the Segment/Field Validation tab
- Add the rule: PID.13 is matching regex (\d\d\d) \d\d\d-\d\d\d\d
This rule means that:
- Area code (\d\d\d): 3 digits between parentheses
- Phone number (\d\d\d-\d\d\d\d): 3 digits followed by a dash and 4 digits
Download the rules file (Field is a valid phone number)
Learn more about how to import validation rules into an inbound HL7 task.