iNTERFACEWARE Products Manual > Learning Center > Tutorials and Sample Scenarios > Routing and Processing Messages > Data Validation > Example Problem - Making Sure The Admit Date is Valid |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The previous example illustrates how much easier it is to use Chameleon's built-in Python database functionality to perform validation than it is to use your database's trigger/constraint functionality. Since it is so powerful, another example is in order. Suppose, whenever we receive an A01 message (Patient Visit), we want to ensure that the information we receive as far as their Admit Date is greater than or equal to the value already in our database for this patient (it should be in most cases). To enforce this constraint, we might write the following Python validation rule into the PV1 segment's 44th field.
|