General Information

  • Dependencies are created using JavaScript.  Dependencies within a variable group/form are entered on the Dependencies tab of the Variable Group Update page
  • Dependencies across encounter variable groups are entered on the Interval Expression tab of the Interval Update page
  • Dependencies across project variable groups are entered on the Update Project Expression page accessed from the Edit Expression toolbar button on the Project Overview page
  • Universal and Project variables can be directly referenced in an encounter variable group's dependency
  • Universal variables can be directly referenced in a project variable group's dependency
  • Variables are referenced by prefacing the variable's code with a #
  • Methods available in StudyTRAX:
    • .enable()
    • .disable()
    • .show()
    • .hide()
    • age(#birth)
    • ageAsOf(#birth, #diagnosis_date)
    • calculateBmi(true, #height_cm, #weight_kg)
    • calculateBMI(false, #height_in, #weight_lbs)
    • roundValue(value, numberOfDecimalPlaces)
  • Additional methods that can be used in an Interval Expression or Project Expression:
    • .showVariableGroup()
    • .hideVariableGroup()

 Examples:

Syntax

Meaning

#var2.enable(#var1 >= 5);

Enable data entry into "var2" if the value of "var1" is greater than or equal to 5

#var4.show(#var3 < 5);

Show "var4" if the value of "var3" is less than 5

#myVar.showVariableGroup(#sex==1);

Show the variable group that contains variable code "myVar" is the subject's sex is a female (where female is a value of 1)


Add a dependency into a variable group
  1. From the Project Overview page, select the Variable Groups tab
  2. Click on the name of a variable group to navigate to the Variable Group Update page
  3. Select the Dependencies tab
  4. Enter JavaScript in the User Defined Functions section
    1. The JavaScript can be directly typed in the User Defined Functions section
    2. Select the Expression Tool in the toolbar

Project Variables can be directly referenced in an Encounter Variable Group's Dependency

Add a dependency across encounter variable groups or specific to an interval
  1. From the Project Overview page, select the Intervals tab
  2. Click on the name of the interval into which the dependency is to be added
  3. Select the Interval Expression tab
  4. Enter JavaScript in the User Defined Functions section
Add a dependency across project variable groups
  1. From the Project Overview page, select Edit Expression in the toolbar
  2. Enter JavaScript in the User Defined Functions section