Summary

This article covers creating Conditional Actions that access fields defined in other forms also known as External Variables.

Table of Contents

  • Define External Variables

  • External Fields

  • Define External Fields

    • Name

    • Type

    • Form

    • Field

    • Interval

  • Using External Fields

    • Constants

    • CurrentDate

    • CurrentInterval

    • RandAlloc

    • ICDate

    • EnrollDate

    • TxDate


Define External Variables

External Fields are used to create Conditional Actions that access fields defined in another form and use those fields within a specified expression.  External fields can be any field in the current study and are defined by the User.  Constants are similar to External Fields but are provided by the system.  Therefore they are constant, thus the name.  The following will describe how to define both External Fields and Constants and where to access them within Conditional Actions.


External Fields

External fields are only available at the study level of the system. They can be used with Site or Subject related forms. They allow Users to define fields that exist outside the current form along with the interval that the field should be evaluated in and for use with a conditional action in the current form.


For example:

Warn the Data Coordinator if the subject is female according to the inclusion and exclusion form and yet have answered male in the demography form.


The external variable will pull the subject’s gender from the demographics form.


Define External Fields

External Fields are straightforward to define. To define an external field:


    1) Hover the mouse over the Study menu 

    2) Click the “External Variables…” link as shown in the figure below.  


This will open the Define External Variables application shown below.

1) At the top of the application is the Current Externals Data Table which will display all of the existing external fields once they are defined. Notice the Ext_Gender variable that has been set up for the system from the field sex on the demographics form.

 

2) To define an external field, fill in the fields required, and click the Save External button.


Nam
e

The name designated for the external field can be anything.  However, the name should describe the form and the field itself. This makes it easy to pick out the fields when there are lots of defined external fields.


Type

Currently, the only selection available in the dropdown list is External Fields. However, the ability to add other types of fields in the future is possible. For now, simply select External Field.


Form

Select the form where the external field resides from the list presented.


Field

Once a Form has been selected, all the fields defined in that form will populate the field dropdown. Select the field to use externally.


Interval

The interval tells the system where to retrieve the data for the external field when evaluating the conditional action expression. It is comprised of all existing visit intervals, the most recent visit, or any unscheduled interval. 

The most recent visit interval was used in the example, which means the interval that the external form resides in that is the closest before the current visit interval (only applicable to scheduled visits). 

Any visit interval can be used generically. For example, you may wish to see if a current medication has been prescribed to the subject. This will check all intervals. Any interval with data that matches will cause the condition to be true. (If a field is selected from the Enrollment Form the Interval will need to be Unscheduled).


Using External Fields

The Conditional Action builder is smart enough to know exactly what to compare an external field with. 


For example:  In the figure below:


1) the external gender field can only be compared to the available field choices defined for gender. 


2) External fields can be used on either side of the comparison:

 

Notice that External Fields have their own heading in the comparison dropdown. This makes selecting them very easy. Then, when making the comparison as shown in the following figure, notice the Conditional Action Builder gives the correct comparison choices. Also notice that an external field like any other criteria can be compared to choices, numbers, constants and other external fields and local fields of a similar type.


If you know how to use conditional actions then you already know how to use External Fields. They must be defined first.  Then they can be used like any other field in the current form.


One limitation of External Fields is they cannot be used when creating computed fields. 


Constants

Constants are nearly identical to External Fields. They are used in exactly the same way. However, they are not user-defined. Instead, the system defines constants for Users and automatically populates the criteria dropdown. Currently, Constants can be used in all conditional actions, including computed fields. The following constants are available:


CurrentDate

Use the current date in a comparison or calculation.


CurrentInterval

Compare the current interval. One of its many uses is the ability to use the same form over multiple intervals despite that form having subtle differences for each interval. By comparing the current interval you can hide the fields that are irrelevant to the current interval.


RandAlloc

This is the Randomization Allocation for this subject. Based on how a given subject is randomized, certain forms can add or omit fields that are pertinent to the allocation assigned to the subject. 


ICDate

This is the date the subject signed the informed consent. It was defined when the subject was enrolled and can be used to compare against other dates for validation or compute anniversaries, etc.


EnrollDate

This is the date the subject was enrolled in the study. It can be used like any other date in the system.


TxDate

This is the date the treatment started. It is usually baseline; however, that is determined by the study designer. It too is entered when the subject is enrolled.




Need more help?

Please visit the Datatrak Contact Information page.