How to build a Segment/Field rule validating that a field does not contain a set of characters
We’ll validate that PID.19 (SSN Number) doesn’t contain any letters or dashes.
- In the inbound HL7 task, select the Validation tab
- Select the Segment/Field Validation tab
- Add the rule: PID.19 is matching regex ^[^a-zA-Z-]+$
The rule means that from the beginning of the field value (^) up to the end ($), there are no characters (^) found in the following ranges:
- from a to z (lower case letters),
- from A to Z (upper case letters) and
- the dash (“-”) character.
You can download the rule file for use in Caristix Workgroup or Test software.
Learn more about how to import validation rules into an inbound HL7 task.