A testable rule to which HL7 messages (at least certain specific message) should conform. This is the central interface of the new HAPI validation model (as of HAPI 0.4). Previously, the only run-time message validation HAPI performs is within the setValue() methods of the Primitive datatype classes. For example when you called setValue() on a DT an exception was thrown if the String arg was not in the correct DT format. This method served well initially but left us with the following limitations:
Thus the new validation model is broader in scope, and is based on validation rules implemented as Rule objects, which can be configured to run or not, as needed, depending on run-time configuration.
There are three kinds of rules:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|