Enhancements to rule helper functions
Access data from forms in other
visits using getValues()
You are now able to create variables referencing items that do not exist within the same visit as the rule target. Previously, you could reference all of the visits where the rule target form exist. Now, when defining rule variables, you have a new option in the visit selection drop-down that allows you to declare variables for Any Visit. This allows referencing data collected in any other form at different visits, regardless if the target rule form is present or not.
By using getValues()
you can fetch these values and use
them in comparisons and other logical operations with data in the current form. For
example, you can get the sample collection date from a previous visit and compare it
with the infusion date in the current form, to make sure the sample collection date
is prior to the infusion date. This example considers that sample collection date
question exists within a form present in a first visit but not present in a second
visit in which infusion is performed.
Refer to values in different table rows
A new helper function now allows you to fetch the immediate previous
not-null value from previous rows in repeating forms and repeating sections on
two-section forms. The introduction of getPrevRepeatValue()
facilitates logical operations between values in different rows, whether it is the
same or a different question, while reducing programming efforts. For example, you
can get the end date of a dose on the immediate previous row and compare it with the
start date of a dose in the current row.
You can find additional details about this new helper function in the Rules Developer Guide after the Release Assessment Environment upgrade.
Reuse variables passed into helper functions
- Repeating forms helper functions:
- FindMinInRepeatingForms()
- FindMaxInRepeatingForms()
- FindMatchingRepeatingForm()
- FindMatchingRepeatingFormWithinRange()
- FindDuplicateRepeatingForm()
- FindDuplicateRepeatingFormWithinRange()
- FindRFInstance()
- ListRFInstances()
- getRFValues()
- FindMinDateInRFs()
- FindMaxDateInRFs()
- GetMatchingRepeatingFormsCount()
- Two-section forms helper functions:
- FindMatching2SForm()
- list2SInstances()
- findDuplicate2SForm()
- getCurrent2STableInstance()
- get2SValues()
- findMinDateIn2SForm()
- findMaxDateIn2SForm()
- find2SFormInstance()
- getMatching2SFormsCount()
- findMinIn2SForms()
- findMaxIn2SForms()
- findDuplicate2SFormWithinRange()
- findMatching2SFormWithinRange()
Enhancement to use helper functions with codelists
When working with code lists in choice questions, you can now specify
whether to get the code or the label value. To do this, you can use the
getArrayFromChoice()
and getStringFromChoice()
helper functions, which now have a new optional parameter that allows you to define
which value to return.
You can find additional information on these and other Helper function reference in the Rules Developer Guide after the Release Assessment Environment upgrade.