Feature #24070 – Validation Rules with conditions that are based on the same database table as the main rule will now be enforced only if the condition is for the same table row as the main rule
If a validation rule and its condition refer to the same database table, validation will only be enforced for the specific row. For example, if the main rule looks for c_patient_insurance.carrier_code and the condition looks for c_patient_insurance.policy_number, the condition will only consider insurance entries that have failed the parent rule.
This change will make it possible to create rules where there are multiple possible entries, but the rule should only be applied to specific entries. For example, if Carrier Code 1150 requires a certain format for the Policy Number, a validation rule with condition can be created. When a patient has a primary and secondary insurance where only one of those carriers is Carrier 1150 (and thus only one of two policies needs the specified Policy Number format), the validation rule will now ignore the Policy Number format for the patient’s policy for the other carrier.