# Setting Up the Study Person Object

Using the [_Study Person_ object](/en/lr/61542/) lets you leverage the flexibility of Dynamic Access Control (DAC) for documents without manually creating hundreds or thousands of User Role Setup records. This feature automates the creation of _User Role Setup_ records according to rules specific to your Vault. Using this feature, you can configure a system where Site or Country Managers easily maintain their own team rosters, supporting a quicker study startup process and easier upkeep.

To set up the feature:

  * [Enable DAC](/en/lr/31824/) for any roles with which you'll use this feature.
  * Verify that the _Study Team Role_ and _Role Dependency_ objects include any [fields used for matching][3] on the _User Role Setup_ object.
  * Create [_Study Team Role_ object records][4].
  * Optional: Create [Role Dependency object records][5] within each _Study Team Role_ record.
  * Set up [access control][6] for Study or Country Managers.
  * Optional: If your study personnel are site personnel, [add the _Study Person Responsibilities_ section](/en/lr/26387/#add-edit-move-sections) to the _Study Person_ object layout. Vault is prepopulated with several common Responsibilities, matching those in CDMS.

## Matching Object Field Setup

When setting up _Study Person_, the _Study Team Role_ and _Role Dependency_ objects must include any fields that the _User Role Setup_ object uses for matching. If this isn't the case, create new fields on these objects.

<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>: You should not create new fields referencing <em>Study</em>, <em>Study Country</em>, and <em>Study Site</em>.</p>
    </div>
  </div>
</div>



### How to Set Up Matching Fields {#matching-fields}

To define matching fields:

  1. Find fields on the _User Role Setup_ object.
  2. Note the field names, for example, `product__c` and `document_type_group__v.`
  3. Navigate to the _Study Team Role_ object configuration.
  4. Create new object fields corresponding to the fields on _User Role Setup_. Vault maps fields to each other using the field name, so the first part of the name (before the `__c` or `__v` suffix) must match, for example, `document_type_group__v` on _User Role Setup_ corresponds to `document_type_group__c` on _Study Team Role_.
  5. If you're using role dependencies, repeat this process on the _Role Dependency_ object.

Note that you can edit some _Study Team Role_ record fields (_Name_, _Description_, _Monitoring Visit Participant_, and _Link_) even when they are referenced by a _User Role Setup_ record.

## Setting Up Study Team Roles & Role Dependencies {#study-team}

The _Study Team Role_ object records define the business role's primary document role, while _Role Dependency_ records define one or more secondary document roles. For example, Site CRA's primary document role is _Editor on documents for a specific study site_. Site CRA has two role dependencies: (1) _Viewer on documents for that site's parent country_ and (2) _Viewer on documents for that site's parent study_.

You can restrict the assignment of _Study Team Roles_ based on _Person Type_ and/or _Security Profile_. When you attempt to save a record, Vault performs validation checks to prevent users from creating _Study Person_ records with disallowed combinations.

### How to Set Up Study Team Roles

To set up records for _Study Team Role_:

  1. Navigate to the _Study Team Roles_ record list page, usually from **Admin** > **Business Admin**.
  2. Click **Create**.
  3. Define a name for the **Study Team Role**.
  4. Select a **Level** for the role: _Study_, _Country_, or _Site_. When users create study team assignments, they'll define a specific value at this level. For example, Site CRA uses Level = Site, so users setting up an assignment would select a study, study country, and site.
  5. Select an **Application Role**. When creating study team assignments, the user in the assignment would have the corresponding document role on documents that match at the defined level. For example, Site CRA uses Application Role = Editor, so users with that assignment would have Editor access on documents with the same site as their assignment.
  6. Optional: Select an **Allowed Person Type** for this role. If entered, Vault only allows users with this _Person Type_ to be added to this role. 
  7. Click **Save**.

<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>: For security reasons, the maximum number of <em>Study Team Roles</em> allowed in a Vault is 300. If you attempt to create an additional <em>Study Team Role</em> and there are already 300 records in your Vault, Vault issues an error message and does not allow you to continue.</p>
    </div>
  </div>
</div>



### How to Set Up Role Dependencies {#role-dependencies}

To set up records for _Role Dependency_:

  1. Under **Role Dependencies**, click **Create**. You should still be within the _Study Team Role_ record that you just set up.
  2. Select a **Level** for the secondary role: _Study_, _Country_, or _Site_. When users create study team assignments, define a specific value at this level. Rather, Vault will use the related records. For example, Site CRA uses Level = Country for one of its role dependencies, so users setting up an assignment would select a site and Vault automatically knows the related country.
  3. Select a **Target Application Role**. When creating study team assignments, the user in the assignment would have the corresponding document role on documents that match at the defined level. For example, Site CRA's role dependency uses Level = Country and Application Role = Viewer, so users with that assignment would have Viewer access on documents with the parent country of the selected site from their assignment.
  4. Click **Save**.

### How to Set Up _Security Profile_ Role Constraints

To set up constraints for a role based on a user's _Security Profile_:

1. Under **Study Team Role Constraints**, click **Create**. You should still be within the _Study Team Role_ record that you just set up.
2. Enter a **Name**.
3. Select the desired **Security Profile**.
4. Click **Save**.

### Syncing Study Person with Principal Investigator

Optionally, you can **Enable Sync PI Field with Study Person** under **Admin > Settings > Application Settings > eTMF Features**. This feature allows Vault to update the _Principal Investigator_ field of a _Study Site_ record when a user creates a new _Study Person_ for that _Study Site_ with the _Principal Investigator_ role. Likewise, it allows Vault to automatically create a new _Study Person_ record for a _Study Site_ if a user updates the _Principal Investigator_ field to a _Person_ for whom the _Study Site_ does not already have a _Study Person_ record.


## How to Set Up Access for Study or Country Managers {#set-up-access}

If your organization wants Study or Country Managers to handle team assignments in Vault, those users need to be able to manage the _Study Person_ records. In Vaults that don't use custom security profiles, these users will need the standard _Business Admin_ profile to create any object records, but we recommend using [custom security profiles](/en/lr/23647/) to provide more granular access control.

### Security Profile

Start by copying the **Document User** profile and permission set to create a new Study Manager profile. Edit the new permission set to grant the following permissions:

  * _Object: Study Person: Create_
  * _Object: Study Person: Edit_
  * _Object: Study Person: Delete_

### Object Record Sharing

If you want to ensure that Study Managers can only create and edit assignments for their own studies, you can enable [Dynamic Access Control](/en/lr/33946/) on the _Study Person_ and _Study_ objects.

 [3]: #matching-fields
 [4]: #study-team
 [5]: #role-dependencies
 [6]: #set-up-access
