Duplicate values check

Check for duplicate data in a repeating form.

Rule description: we do not want any duplicates for Follow-up 'RECIST Evaluation Number' to be recorded on the TARGET form.

Rule expression

if(FindDuplicateRepeatingForm(TLFEVAL)) 
{
 return false;                   //System sends query when return false condition is met
} 
else 
{
 return true;
}

Query message: A duplicate RECIST Evaluation Number has been recorded. Please verify and correct.

TLFEVAL

Corresponds to the RECIST Evaluation Number from rule description.

FindDuplicateRepeatingForm( )
Helper function to detect duplicate data in a repeating form for search keys passed in as parameters (TLFEVAL)

Note:

This is an aggregation function. The rule will be run for each form instance in the case where the target is on a repeating form.

Return value

Boolean

Returns either true or false. System raises query when return false condition is met.

Usage tips

Use this when the item is not a choice control.

Verification steps

  1. Using a subject for testing, go to the given visit and form containing the iems to check, in this example the RECIST evaluation number <TLFEVAL> in the specified repeating form instance.
  2. Update the form item TLFEVAL as in the following table and verify the result is as listed:
    Step Notes Result

    a. In the first repeating form (1RF) instance enter the TLFEVAL item as value 1 (input value is as per item type i.e. Text/Date/Number).

    Only one repeating form instance.

    No query.

    b. Go to a second repeating form (2RF) instance and enter the TLFEVAL item as value 1 (same as in previous step).

    Matching values in 1RF and 2RF:
    • 1RF - value 1
    • 2RF -value 1

    Query in 1RF and 2RF.

    c. Update TLFEVAL item in 2RF instance as value 2 (different to value 1).

    Different values in 1RF and 2RF:
    • 1RF - value 1
    • 2RF -value 2

    No queries.

    d. Update TLFEVAL item in 1RF instance as value 2 (same as in previous step).

    Matching values in 1RF and 2RF:
    • 1RF - value 2
    • 2RF -value 2

    Query in 1RF and 2RF.

    e. Clear TLFEVAL item in 2RF.

    Different values in 1RF and 2RF:
    • 1RF - value 2
    • 2RF -Null

    No queries.

    f. Enter TLFEVAL item in 2RF as value 3 (different to those entere before).

    Different values in 1RF and 2RF:
    • 1RF - value 2
    • 2RF -value 3

    No queries.

    g. Go to a third repeating form (3RF) instance and enter the TLFEVAL item as value 2.

    Matching values in 1RF and 3RF:
    • 1RF - value 2
    • 2RF -value 3
    • 3RF - value 2

    Query in 1RF and 3RF.

    No query in 2RF.

    h. Update the TLFEVAL item in 3RF as value 1.

    Different values in 1RF, 2RF and 3RF:
    • 1RF - value 2
    • 2RF -value 3
    • 3RF - value 1

    No queries.

    i. Update the TLFEVAL item in 3RF as value 3.

    Matching values in 2RF and 3RF:
    • 1RF - value 2
    • 2RF -value 3
    • 3RF - value 3

    Query in 2RF and 3RF.

    No query in 1RF.

    j. Delete the 2RF instance.

    Different values in 1RF and 3RF, and no 2RF present:
    • 1RF - value 2
    • 3RF - value 3

    No queries.

Note:

Repeat the above steps if the form is present in multiple visits.

Other examples

Example 4-27 If more than one AE Term exists with the same start date, issue a query

if(FindDuplicateRepeatingForm(aetrm,onstdt)) {
  return false;
} else {
  return true;
}

Query message: An adverse event term with the same start date is reported more than once. Please correct.