Procedure Variables

There are several different kinds of variables available for use in Procedures. Some are automatically created by the system (see Question Variables and System Variables). You can create others as necessary (see User Variables).

To use a variable in a Procedure, you must first add it to the Procedure. See Defining User Variables and Using Variables in V3.1-Style Procedures. You then add it to a Procedure Detail Expression or custom code by selecting it from the list of values in the appropriate field. To see the list of values, press F9.

When you use a variable in a detail expression, you must also define various settings for the variable. Click the Variables button and specify whether or not you want to report its value to the Discrepancy Database. For Question variables, you can also specify whether or not the system should run the Procedure if the response value for the Question is null or discrepant (see Using Variables in V3.1-Style Procedures).

For more information, see:

Question Variables

Use Question variables to compare Question response values in detail expressions, custom code, or qualifying expressions.

The system automatically creates a Question variable for each Question you include for each Question Group in the Procedure, and populates it with the value for the current patient record during Procedure execution.

The cursor retrieves NULL if the conversion fails, or if no response for the Question can be found for the current DCM.

The system creates Question variables using the following naming convention:

alias.question_name

Aggregate and Lab Attribute Variables

When you define a Procedure as including aggregation processing, the system automatically creates the variable necessary to hold the aggregate value. Similarly, when you define a Question as lab-related, the system creates several lab attribute variables.

All these variables are displayed with Question variables in the list of values for detail variables.

For more information, see:

Aggregate Variables

The system creates aggregate variables using the following naming convention:

alias.question_name[occurrence#]$suffix

The suffixes are: mn, mx, sm, av, and ct for the five functions available. The occurrence number is present only when there is more than one occurrence of the Question in the DCM Question Group.

Lab Attribute Variables

The system creates lab attribute variables using the following naming convention:

question_group_alias$question_name[occurrence#]$suffix

The occurrence number is present only when there is more than one occurrence of the Question in the DCM Question Group.

The four two-letter suffixes are:

  • hi (high value) Contains the value at the high end of the range for the Question defined in Lab Ranges. The high value variable is data type Number (13,5).

  • lo (low value) Contains the value at the low end of the range for the Question defined in Lab Ranges. The low value variable is data type Number (13,5).

  • un (unit) Contains the name of the unit used to define the range in Lab Ranges. The unit variable is data type Varchar2 (10).

  • nf (Not Found) The system sets this flag to Y if no lab range is found for the age and sex of a patient. If the lab range is not gender- or age-specific, the patient's sex or age is not taken into account. The "not found" variable is data type Varchar2 (1).

System Variables

There are several types of system variables: Standard Variables, Question Group Variables, and DVG Variables. To see them, you must press F9 in either the Detail Expression field or the Custom Code field, which opens the System Variable window. This window displays any user or Question variables you have already created for use in the Procedure. There are buttons for DVG, QG, and Std variables below. When you click one of these buttons, you see the system variables of that type related to the highlighted user or Question variable. You can then select the system variables you want to use in that detail expression or custom code location.

For more information, see:

Standard Variables

The system generates a fixed set of variables for each Procedure. The patient cursor fetches the values for the following patient information fields in the outermost loop of the generated Procedure:

  • patient_position_id Internal ID of the patient.

  • clinical_study_id Internal ID of the study.

  • reported_sex Sex (M or F), from enrollment.

  • reported_birth_date Birthdate, from enrollment.

  • patient Patient number.

  • Site_id Internal ID of site.

  • Investigator_id Internal ID of Investigator.

  • early_termination_flag *If checked, patient has left study ahead of schedule.

  • patient_enrollment_date *Date the patient was allocated this patient position.

  • clinical_subject_id Internal ID of clinical subject.

  • inclusion_exclusion_date Date of decision to include or exclude the patient from the final analysis.

  • reported_death_date I*Date of patient's death.

  • reported_patient_reference *Code the patient was known by in a previous study; according to patient (not validated).

  • reported_initials * Patient's initials, from enrollment.

  • reported_date_last_pregnancy *Date of patients's last pregnancy, from enrollment.

  • first_screening_date Patient's first screening date.

  • termination_date *Date patient position was terminated.

An asterisk (*) indicates that the variable is available in 3.1-style Procedures only.

The naming convention for standard patient-related variables is rxcpdstd.patients_rec.question name; for example, the Question variable name for the Question REPORTED_BIRTH_DATE would be rxcpdstd.patients_rec.reported_birth_date.

Note:

Pre-V3.1-style Procedures use the prefix patients_rec, so that the variable name for the same Question would be patients_rec.reported_birth_date.

Question Group Variables

Three types of automatically generated variables appear when you click the QG Vars button from the System Variables window that you display by pressing F9 from the Expressions field in the Details window, or in the Custom Code window:

DCM Key Variables

The Procedure QG Cursor fetches DCM key (login) information for each Question Group as follows:

  • received_dcm_id Internal ID of Received DCM

  • received_dcm_entry_ts Timestamp of Received DCM

  • Investigator_id Internal ID of Investigator

  • Site_id Internal ID of site

  • dcm_id Internal ID of DCM Definition

  • dcm_subset_sn DCM Subset Number

  • dcm_date DCM Date (YYYYMMDD)

  • dcm_time DCM Time (if Time Collected)

  • actual_event_id Internal ID of Actual Event

  • lab_id Internal ID of Lab (if Lab Data)

  • qualifying_value Value for Qualifying Question

  • subevent_number Subevent (0 for Planned Visits)

  • clin_plan_eve_id Internal ID for Planned Event

  • visit_number Visit Number for Planned Event

  • repeat_sn Repeat Sequence Number

  • lab.* Name of the Lab

  • clin_planned_eve_name.* Event (CPE) Name

  • lab_range_subset_num.* Lab Range Subset Number

*V3.1-style Procedures only

Question Group Standard Variables

The system generates a fixed set of variables for each Procedure Question Group. They may not all be applicable to a particular Question Group. For example, there are lab-related variables regardless of whether the Question is lab-related or not.

Response-Related Variables

The DCM cursor creates Question variables to hold the actual response value for each Question you specify. However, it also fetches information about the response as Question Group variables, as follows:

  • resp_id Internal Unique ID for the Response.

  • ent_ts Response Timestamp.

  • exc_val Response Exception Value Text; contains text entered during data entry, usually if there was a problem with the actual response, including alpha DVG codes.

Other Question Group Variables

In addition, the system generates the variable alias$has_data if you select the Procedure Question Group's Create Placeholder? box. The system sets the variable's value to Y if any data is collected for that Question Group. The default is N. You can use this variable to help track missing DCMs.

DVG Variables

Discrete Value Groups (DVGs) are assigned to Questions to define the acceptable responses to the Question. There are three types: Internal, Alpha, and Thesaurus. The system creates variables based on the values of internal and thesaurus DVGs. See Creating and Using DVGs for further information.

To see DVG variables, open the System Variables window by pressing F9 from the Expressions field in the Details window, or in the Custom Code window, select a Question variable based on a Question with a DVG, and click the DVG button. The DVG button is grayed out when the selected Question variable is based on a Question that does not have a DVG.

Internal DVG Variables - Internal DVG variables are not true variables, but a set of fixed values determined by the DVG, not the Question response. The system creates a variable for each value in the DVG. The variable is simply the short DVG value text surrounded by single quotation marks; for example, if the DVG associated with a Question is YES_NO and the short value for YES is Y, the corresponding variable is 'Y'.

Thesaurus DVG Variables - If you select the Include Thesaurus Terms box in the Procedure Questions window for a Question with a thesaurus DVG, the system creates a variable for each of the (up to) three columns specified in the DVG to provide supplementary information about the term (response) from the external decode table specified in the DVG definition. The naming convention is: alias$question_nameoccurrence#$suffix where the suffix corresponds to the Short Label defined for each column. The occurrence number is present only when there is more than one occurrence of the Question in the DCM Question Group.

See Thesaurus DVGs for further information.

User Variables

You can create variables as necessary for use in internal processing and for reporting values you want to see associated with the discrepancy in the Discrepancy Database and in discrepancy reports.

You reach the User Variables window by clicking the User Variables button in the main Procedure Definitions window.

You can use user variables in Detail Expressions and Custom Code. From either field, press F9 to see the list of values and select a variable.

When you use a user variable in a detail expression, click the Variables button and specify whether or not you want to report its value to the Discrepancy Database.