# Enable Study Site Reporter

This feature allows Admins to set up Study Contact records, which users can then select as Site Reporters during Case intake. Upon Case promotion, all required details of the Site Reporter are automatically populated on the Case, increasing data entry efficiency and accuracy.

In 23R1, support for study site reporters on Inbox Items was added to Safety. You must first contact your Veeva Representative to enable this feature in your Vault. Then, perform the  <a href="#23r1-site-reporter-inbox-item">23R1 configuration</a>. 

<a href="/en/gr/01216/#about-study-contacts">Manage Studies: Set Up Study Site Reporters</a> describes how to set up Study Site Reporters, once you enable this feature. 

## <a id="23r1-site-reporter-inbox-item"></a>(23R1) Add the Site Reporter Field to the Inbox Item Layout

Perform the following steps to add the **Site Reporter** field to the Inbox Item **Details** section: 
1. In Admin, go to **Configuration > Objects > Inbox Item > Layouts > Inbox Item Detail Page Layout**.
2. In the **Details** section, select the **Edit** icon.
3. Add the **Site Reporter** field
4. Select **Done**.
5. Save the page.

## Update the Study Detail Page Layout

To edit the Study object, in the Admin area, go to **Configuration > Objects > Study**.

On the **Study > Layouts** tab, open the **Study Detail Page Layout**, and then make the following updates:

### Study Sites Section

Update the **Study Sites** section with the following settings:
* Remove the **Study** field
* Add the following fields:
    * Study Site Number
    * Site Name
    * Registration

### Study Contacts Section

Insert a **Study Contacts** related object section with the following settings:

<table>
    <thead>
        <tr>
            <th>Label</th>
            <th>Type</th>
            <th>Creation Option</th>
            <th>Columns</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Study Contacts</td>
            <td>Related Object: Study Person</td>
            <td>New Page</td>
            <td>
                <ul>
                    <li>Name</li>
                    <li>Study Site</li>
                    <li>Person > Country</li>
                    <li>Person > Qualification</li>
                    <li>Person > Name (added automatically)</li>
                </ul>
            </td>
        </tr>
    </tbody>
</table>

## Configure the Study Site Object

The Study Site object is new for this feature. You must configure layouts, layout rules, and validation rules. To edit the Study Site object, in the Admin area, go to **Configuration > Objects > Study Site**.

### Layout

On the **Study Site > Layouts** tab, open the **Study Site Detail Page Layout**, and then make the following updates:

#### Details Section

Update the **Details** section with the following settings:
* Change the **Section Layout** to **One Column**.
* Add the following fields:
    * Organization
    * Study
    * Study Site Number
    * Registration
    * Site
    * Site Name
    * Country
    * _space_

#### Study Contacts Section

Insert a new **Study Contacts** related object section with the following settings:

<table>
    <thead>
        <tr>
            <th>Label</th>
            <th>Type</th>
            <th>Creation Option</th>
            <th>Columns</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Study Contacts</td>
            <td>Related Object: Study Person</td>
            <td>New Page</td>
            <td>Name</td>
        </tr>
    </tbody>
</table>

### Layout Rules

Go to **Study Site > Layouts > Study Site Detail Page Layout > Layout Rules**, and then add the following layout rules:

<table>
    <thead>
        <tr>
            <th>Rule Label</th>
            <th>Hide the following Page Layout Items</th>
            <th>IF this Layout Rule Expression is TRUE</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>New Record</td>
            <td><ul>
                <li><strong>Type</strong>: Fields</li>
                <li><strong>Value</strong>: Site Name</li>
            </ul>
            </td>
            <td><code>status__v != 'active__v' && status__v != 'inactive__v'</code></td>
        </tr>
        <tr>
            <td>Workflow Timeline</td>
            <td>
            <ul>
                <li><strong>Type</strong>: Sections</li>
                <li><strong>Value</strong>: Workflow Timeline</li>
            </ul>
            </td>
            <td><code>not(isBlank(name__v))</code></td>
        </tr>
    </tbody>
</table>

### Validation Rules

On the **Study Site > Validation Rule** tab, add the following validation rule:

<table>
    <thead>
        <tr>
            <th>Label</th>
            <th>Error Message</th>
            <th>Location</th>
            <th>Validation Expression</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Site is Mandatory</td>
            <td>Please enter a Site.</td>
            <td>Site</td>
            <td><code>not(isBlank(site__vr.name__v))</code>
            </td>
        </tr>
    </tbody>
</table>

## Configure the Study Person Object

The Study Person object is new for this feature. You must configure field criteria VQL, layouts, and layout rules. To edit the Study Person object, in the Admin area, go to **Configuration > Objects > Study Person**.

### Person Field VQL

On the **Study Person > Fields** tab, locate the **Person** field, and then modify the **Criteria VQL** as follows: 

<code>
object_type__vr.api_name__v = 'study_person__v' and organization__v = {{this.organization__v}} and country__v = {{this.study_site__vr.country__v}}
</code>

### Layout

Go to **Case > Layouts > Study Person Detail Page Layout**, and then update the **Details** section to include the following fields:
* Change the **Section Layout** to **One Column**
* Add the following fields:
    * Organization
    * Study
    * Study Site
    * Person
    * Name

### Layout Rules

On the **Study Person** object, configure the **Study Person Detail Page Layout** to add the following layout rules:

<table>
    <thead>
        <tr>
            <th>Rule Label</th>
            <th>Hide the following Page Layout Items</th>
            <th>IF this Layout Rule Expression is TRUE</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Workflow Timeline</td>
            <td>Section: Workflow Timeline</td>
            <td><code>not(isBlank(name__v))</code></td>
        </tr>
    </tbody>
</table>

## Update the Person Object

You must update layouts, layout rules, and validation rules on the Person object. To edit the Person object, in the Admin area, go to **Configuration > Objects > Person**.

### Layout

On the **Person > Layouts** tab, open the **Person Detail Page Layout**, and then edit the layout to insert the following sections:

#### Details

Insert a One Column **Details** section with the following fields: 
* Qualification
* Title
* First Name
* Middle Name
* Last Name
* Organization
* Department
* Email
* Telephone
* Mobile
* Fax
* Language
* _space_

#### Address 

Insert a One Column **Address** section with the following fields:
* Street Address
* City
* State/Province
* Country
* Postal Code
* _space_

#### System Information

Insert a Two Column **System Information** section with the following fields:
* Last Modified Date
* Last Modified By
* Status
* Created Date
* Created By
* Name

### Layout Rules

Go to **Person > Layouts > Study Person Detail Page Layout > Layout Rules**, and then add the following layout rule:

<table>
    <thead>
        <tr>
            <th>Rule Label</th>
            <th>Hide the following Page Layout Items</th>
            <th>IF this Layout Rule Expression is TRUE</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>New Record</td>
            <td><ul>
                <li><strong>Type</strong>: Sections</li>
                <li><strong>Value</strong>: System Information, Address</li>
            </ul></td>
            <td><code>status__v != 'active__v' && status__v != 'inactive__v'</code></td>
        </tr>
    </tbody>
</table>

### Validation Rules

Go to **Person > Validation Rules**, and then delete the **Country is Mandatory** validation rule.

## Update the Case Object

You must add the **Study Site** and **Site Reporter** fields to the **Case** layout:
1. Go to **Admin > Configuration > Objects > Case > Layouts > Case Page Layout**. 
2. In the **Study** section, add the following fields: 
    * **Study Site**
    * **Site Reporter**
3. Select **Save**.

## Update Permission Sets

On the **Users & Groups > Permission Sets** page, configure the following Object Permissions:

### Case Field Permissions

1. Go to the **Case Intake Actions** permission set, and then go to **Objects > Case**.
2. Under **Object Level Permissions**, grant **Edit** access to the following fields:
    * Study Site
    * Site Reporter

### Study Person Object Permissions

1. Enable the permission to **Read** both the **Study Person** object and the **Person > Study Person** object type for the following permission sets:
    * Case Distribution Actions
    * Case Entry Actions
    * Case Intake Actions
    * Case Review Actions
    * Safety Operations Actions
    * Safety Writer
    * Submission Actions

2. Enable the permissions to **Read**, **Create**, **Edit**, and **Delete** for both the **Study Person** object and the **Person > Study Person** object type for the following permission set: 
* Administration Actions

[1]: #23r1-site-reporter-inbox-item
