9.5.4      Manage Validation Edit Checks

Validation edit checks can exist at any object level except CodeLists. These edit checks are used to assess whether data entered by the user meets certain defined criteria/expectations.

Development Timing and Scope

Anju recommends completing study object build before beginning edit check programming (Forms created and assigned to Visits, Visits assigned to Subject, etc.). However, you can start to create edit checks as soon as the objects they reference are created at the correct levels. If an edit check does not refer to anything outside of the Form, and is not dependent on something like which Visit the Form is in, then you can program that check as soon as the Form is complete

Valid Edit Checks

This type of edit check is applied only to an item object. When a Validation fires (executes) (indicating that the data does not meet the expectations/criteria), the form cannot be saved in Complete status. It can be saved in Incomplete status for further data entry or correction at a later time (this is useful when testing Validation checks).

A Valid edit check considers the values of one or more items, and may also consider the current visit, form, or group instance number as part of the check. The validation check must return a Boolean (True or False) value as its last statement. Edit checks do NOT use the Return JavaScript keyword. The final statement in a check is the value that is returned (this can be a variable or a comparison, etc.), for example:

[Item] == ‘EXPECTED VALUE’ 

res;

!_isEmpty(val)

When writing a Valid edit check, the check should return True if the entered values meet the criteria, and False if they do not. Unlike some other systems, this means that you need to think in terms of all of the valid combinations of value. This can look like:

·        Comparing dates – valid conditions are Date1 is empty, Date2 is empty, or Date1 < = Date2

·        Checking a second value when a first meets a criteria – valid conditions are Val1 is Empty, Val2 is Empty, Val1 does not equal specified value, or Val2 is the expected value

Anju recommends to start writing out all of the conditions in which the check should NOT fire, then translate those cases to code.

 

Note: Refer to Add a New Edit Check to an Object for guidance when entering/selecting information for an edit check.

The following provides examples of validation edit checks.

Example 1: Screening visit date should be prior to Week 1 visit date.

Example 2: If AEOUT = Death, AESER should be Yes.