The Subject Object

The Subject Object provides access to subject information and other data not collected directly into a form, so you can include it in a rule's processing or as a return value.

Sometimes, a rule's logic may need to reference data that wasn't collected in a form, such as the subject number and status, or site-related information. The Subject Object has different attributes for data that is not included in any form. You can use the Subject Object and its attributes for rule processing or as a result for a calculated value.

Tip:

This last scenario can be useful to run Show Visit, Show Form, and Show Question predefined rules or as a form question included for visit branching.
All of these attributes will always return the current value. This means that, if there is any change to the subject, old data is overwritten and the new data is returned. Also, changes in the values returned by the Subject Object do not trigger a rule to run or re-run. Because rules run on data submission, a form item variable must be referenced to trigger the rule to run whenever it changes to meet the specified criteria.

Usage tips

  • When accessing the object properties using dot notation, it is always a good practice to check if the property is defined to avoid code failure when null. For example:
    if(Subject.SubjectNumber){
        var subnumber = Number(Subject.SubjectNumber.substring(10));
    }
  • A predictive text feature is available as you type, with descriptions of these attributes and all available rule helper functions. See Use predictive text to write rules.

Subject Object attributes

Caution:

Some of these attributes allow access to potentially unblinding information. Use them with caution and along with assigned queries and data classifications, when applicable, to limit access to this information.
Attribute Description
SubjectNumber Indicates the number assigned to a subject.
SubjectStatus
Indicates a subject's current status. The following statuses can be displayed:
  • New
  • Screening_Initiated
  • Screen_Failed (when a site user manually marks a subject as having failed screening)
  • Auto_Screen_Failed (when a subject automatically fails screening in the system)
  • Enrolled
  • Active
  • Withdrawn
  • Complete
ScreeningDate Indicates the date when a subject is screened. By default, all dates are returned with a standard 00:00 GMT time.
ScreenFailureDate Indicates the date when a subject fails screening, whether the screen failure occurs manually or automatically. By default, all dates are returned with a standard 00:00 GMT time.

Note:

If the date of the screen failure is entered manually and differs from the system date, the manually entered value is returned.

Subjects that were automatically screen failed prior to the 24.1 release will not have a date returned for the ScreenFailureDate.

CompletionDate Indicates the date when a subject completed all visits in a study. By default, all dates are returned in GMT time.
WithdrawalDate Indicates the date when a subject is withdrawn from a study. By default, all dates are returned with a standard 00:00 GMT time.
RandomizationDate Indicates the date for any of the following events:
  • When a subject is randomized whether the randomization number subsequently changed.
  • When a subject is re-randomized.

By default, all dates are returned with a standard 00:00 GMT time.

Note:

In the event of a manual randomization outside of Oracle Clinical One Platform, this returns the date the subject was randomized in Oracle Clinical One Platform, not the date of manual randomization that occurred outside of Oracle Clinical One Platform.
TreatmentArm Indicates the ID (also known as the short name) of the treatment arm for the subject.

Caution:

Potentially unblinding.

Note:

Treatment arms containing a backslash ("\") on their IDs, cannot be referenced as text in a rule. You can use logMsg() statements to verify the retrieved string, see Debug a rule.
CohortName Indicates the name of the cohort where a subject belongs to, if applicable.
SiteNumber Indicates a site's ID where a subject is assigned to, as specified on the Create Organization: Institution dialog, in the Institution ID field.
SiteName Indicates a site's name where a subject is assigned to, as specified on the Create Organization: Institution dialog, in the Institution Name field.
Country Indicates the ISO code of a country specified for a site where the subject is assigned to.

This value is defined as indicated in the Geography system code list on the Library page.

Region Indicates the primary region of a country for a site that a subject is assigned to.

A country's region is defined on the Study Settings tab for a study.