# Using Subject Groups for Complex Trials

Complex trials often require more initial operational planning than standard trials to achieve the desired efficiency and flexibility as the study continues. These trials may require the testing of various treatments across different patient populations with multiple study objectives. Veeva Clinical Operations supports these complex trials by allowing users to track subject groups, subject group enrollment metrics, key subject group milestones, and payments for different subject group populations.  

## Subject Groups

Study managers can use the _Subject Group_ (`arm__v`) object to define and track standard sets of subject groups for a _Study_. Users can track various distinct subject groupings based on study needs by creating _Subject Groups_ with different object types. _Subject Groups_ can have the following object types:
* **Study Arm:** A set of participants with distinct interventions or no intervention.  
* **Study Cohort:** A group of participants to be analyzed.  
* **Study Element**: An open option to group participants based on your study needs.  
* **Study Part**: A group of participants commonly used in sequential trial designs where the outcome of the first study part informs subsequent parts.  
* **Substudy**: A group of participants used for a specific research hypothesis separate from the main study. Substudies are seen in many trial designs such as master protocols and include distinct objectives, a scientific rationale, and a detailed statistical analysis plan.

To create a _Subject Group_, navigate to the **Subject Group** section on the _Study_ record, click **Create**, and select a **Subject Group Type** from the dropdown list.

##  Tracking Products, Countries, and Sites Utilized in a Subject Group {#tracking-products-countries-sites-subject-group}

You can track the [_Study Products_, _Study Countries_, and _Study Sites_](/en/lr/4345/) utilized for a specific subject group within the _Subject Group_ record. Vault creates related records for the current products, countries, and sites for the _Study_ when you click **Seed Subject Groups** in the Subject Group **All Actions** menu. Once taken, Vault also automatically creates new records for new study products, countries, and sites when users add them to the _Study_ object. The _Subject Group_ join objects have standard lifecycle states that match the standard lifecycle states of the related object, such as the _Study Product_, _Study Country_, or _Study Site_ object. You can [configure lifecycle](/en/lr/30683/) state transitions for the *Subject Group* join objects according to your business needs and processes.

## Subject Group Metrics & Recruitment Planning

Vault allows you to track [subject metrics](/en/lr/52876/) and [recruitment planning](/en/lr/55223/) for subject groups in _Enrollment Metrics_ records and _Enrollment Metrics Over Time_ records on _Subject Group_ objects. To allow Vault to calculate metrics and create _Enrollment Metrics_ records for the _Subject Group_ object, select **Yes** for the **Track Enrollment Metrics** field on the **Subject Group** object. Select **Yes** for the **Create Recruitment Plan** field on the **Subject Group** object to allow Vault to calculate metrics over time and create _Metrics Over Time_ records for the _Subject Group_ object. 

When the **Metric Calculation** field on the **Study** is set to **Date-Based** or **Metrics Only**, Vault creates matching _Enrollment Metrics_ records and _Enrollment Metrics Over Time_ records for both the _Subject Group_ and _Study_ when the _Seed Metrics_ entry action runs. You can separately seed Metrics for a Subject Group added after the creation of the initial set of _Metrics_ by using the action on the _Subject Group_ record. Vault notifies you of any errors or duplicate _Metrics_ records it encounters when running the action.  

When calculating metrics, Vault performs the [metric calculations](/en/lr/52876/#metric-calculation) for subject groups and studies independently. When a _Subject_ includes a _Subject Group_, Vault counts the subject for the subject group metrics calculations and study metrics calculations separately. 

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Vault only supports <em>Date-Based</em> and <em>Metrics Only</em> metric calculations for <em>Subject Group</em> metrics.</p>
    </div>
  </div>
</div>



## Subject Group Milestones

Vault allows you to track milestones per _Subject Group_ using the _Subject Group Milestone Schedule_ (`subject_group_milestone_schedule__v`) object.

### Subject Group Milestone Schedules
Vault allows you to create _Subject Group Milestones_ based on the milestones defined in the study's [_Milestone Master Set_](/en/lr/37552/#setting_up_milestone_templates). The _Subject Group Milestone Schedule_ defines the milestones Vault can create for a _Subject Group_.

To create a _Subject Group Milestone Schedule_:

1. Navigate to the **Subject Group** record. 
2. Click **Create** on the _Subject Group Milestone Schedule_ section.
3. Select a [**Milestone Type**](/en/lr/37552/#configuring-milestone-types).
4. Select a [**Rollup Dependency Behavior**](/en/lr/37552/#about-milestone-rollups). This rolls the _Subject Group Milestone_ data up to the version of the _Milestone_ not specific to the _Subject Group_.

When configured on the applicable _Subject Group_ lifecycles, the [_Apply Milestone Template on State Change_ entry action](/en/lr/805329/#subject-group-milestone-template-on-state-change) allows Vault to automatically release the _Subject Group Milestones_ based on the _Subject Group Milestone Schedule_ records.

When Vault releases _Subject Group Milestones,_ it also creates [milestone dependencies](/en/lr/24430/#milestone_dependencies) between them based on the _Template Milestone Dependencies_. _Subject Group Milestones_ do not support _Expected Documents_ or _Tasks_.

### Automated Enrollment Milestones for Subject Groups

Vault can populate _Actual Finish Dates_ for _Subject Group Milestones_ when you enable the [**Automated Enrollment Milestone**](/en/lr/37552/#automated-enrollment-milestones) feature and set the **Metric Calculation** field on the **Study** to **Date-Based**.

When you enable the Automated Enrollment Milestone feature, Vault populates the _Actual Finish Date_ for _Subject Group Milestones_ based on the dates populated for related _Subjects_ within the _Subject Group_. For example, Vault looks for the earliest enrolled date for all _Subjects_ with a specific _Subject Group_ record when populating the _Actual Finish Date_ on the corresponding _Subject Group Milestone_ for _First Subject In_, but looks at all dates on all related _Subjects_ for _non-Subject Group Milestones_.

Vault also populates the _Actual Finish Date_ on [last subject-related milestones](/en/lr/24430/#last-subject-milestones) for _Subject Groups_ when you select **Yes** for the _No New Subjects_ field on the _Study Site Subject Group_ record. This allows you to specify when subject enrollment is complete for a _Subject Group_, even if subject enrollment is not complete for the _Study Site_. Clearing the _No New Subjects_ field on the _Study Site Subject Group_ removes the _Actual Finish Date_ from the corresponding _Subject Group_ last subject-related milestones. 

<div class="note-border alert-info">
  <div class="alert alert-info" role="alert">
    <div><i class="far fa-info-circle"></i></div>
    <div class="alert-text">
      <p><strong>Note</strong>: Veeva does not recommend updating <em>Subject Group</em> values for subjects who participate in multiple instances of the same <em>Subject Group</em> type. We recommend assigning separate subject identifiers for each instance to maintain the corresponding <em>Milestone</em> and <em>Metrics</em> values.</p>
    </div>
  </div>
</div>



## Subject Group Payments

Vault allows you to define [_Fees_ and _Fee Templates_](/en/lr/71912/#fee-schedule) for different _Subject Group_ object types, allowing you to create flexible _Fee Schedules_ with different visit activity amounts based on different populations. 

### Subject Group Fee Matching Criteria

[_Fees_](/en/lr/71912/#fees) with no _Subject Groups_ apply to all _Subjects_. However, _Fees_ with a defined _Subject Group_ only apply to _Subjects_ within the listed _Subject Group_. When a _Fee_ has multiple _Subject Groups_, Vault only creates payable items for _Subjects_ that match the [_Fee_ criteria](/en/lr/71912/#fee-criteria) for all specified _Subject Groups_. For example, a _Fee_ with _Cohort Subject Group_ value of Cohort 1 and a _Study Part_ of Part A will only apply to subjects with both the cohort and study part field populated for the subject.

When the _Automated Adjustments for Payments_ setting is enabled, changes made to _Subject Group_ values on relevant _Subject_ record fields that affect the _Fee_ matching criteria trigger the evaluation of related _Payable Items_. Vault inactivates the _Payable Item_ and creates an [_Adjustment Payable Item_](/en/lr/58941/#how-adjust-payable-items) to indicate what has been paid and/or what still needs to be paid. 