Home » Validate Field is in profile code set
This tutorial explains how to build a Segment/Field rule validating that a field value is in a predefined code set.
In this example, we’ll validate that PID.8 (Administrative Sex) is equal to one of the codes in the following table. The table is preset in a conformance profile.
Label | Code |
Male | M |
Female | F |
Unknown | U |
To learn more about how to add or customize a table in a conformance profile, refer to the profile documentation
The rule returns a pass (success) if it can find the PID.8 field value in the conformance profile table. If it doesn’t, the validation fails.
Download the rules file (Field value is in table.cxf)
Learn more about how to import validation rules into an inbound HL7 task.
NORTH AMERICA: +1 (877)-872-0027
WORLD: 1-418-872-4000
EMAIL: info@caristix.com
ASIA-PACIFIC
DENIS CANTIN
T: +61418441388
denis.cantin@caristix.com
NORTH AMERICA & EUROPE
JEAN-LUC MORIN
T: 418 872-4000
jeanluc.morin@caristix.com
HL7® / FHIR® are a registered trademarks of Health Level Seven International. The use of this trademark does not constitute an endorsement by HL7.