# Enable Advanced (EBGM) Calculation for Safety Data

Learn how to configure your Vault to support Empirical Bayes Geometric Mean (EBGM) signal detection calculations.

## About the Feature

With the 24R3 release, users can now run advanced EBGM calculations on Safety data in addition to simple SQL calculations. EBGM is an advanced statistical method that allows users to measure the frequency of an adverse event occurring for a specific _Product_ compared to the frequency of occurrence in other _Products_ in the Safety database.

After you have configured this feature, see the following articles for more information:
* <a href="/en/lr/753144/#create-signal-calculations-settings--signal-calculations">Configure Signal Calculation Objects</a>
* <a href="/en/lr/752951/#empirical-bayes-geometric-mean-ebgm">Signal Detection Calculations</a>

## Update the Signal Calculation Mapping Object

To update the _Signal Calculation Mapping_ object, navigate to **Admin > Configuration > Objects > Signal Calculation Mapping** and update the [object layout][1] and [list layout][2].

### Update the Object Layout {#signal-calc-mapping-object-layout}

To update the _Signal Calculation Mapping_ object layout:
1. Navigate to **Layouts > Signal Calculation Mapping Detail Page Layout**.
2. Ensure the _Details_ section includes the following fields:
    * _Signal Calculations Setting_
    * _Signal Calculation_
    * _Calculation Output Value_
    * _Target Field Name_
3. Select **Save**.

### Update the List Layout {#signal-calc-mapping-list-layout}

To update the _Signal Calculation Mapping_ list layout:

1. Navigate to the **List Layout** tab and select **Reorder**.

2. Drag field names so the list layout appears in the following order:
    * _Name_
    * _Signal Calculation Setting_
    * _Signal Calculation_
    * _Calculation Output Value_
    * _Target Field Name_
3. Select **Save**.

## Update the Signal Calculation Object

To update the _Signal Calculation_ object, navigate to **Admin > Configuration > Objects > Signal Calculation** and perform the following configuration:
* [Set the _Calculation_ field to display in default lists and hovercards.][3]
* [Insert a _Signal Calculation Mapping_ section to the layout.][4]
* [Add a layout rule.][5]
* [Update the list layout.][6]

### Update the Calculation Field

Update the _Calculation_ field to display in default lists and hovercards:
1. Select the **Fields** tab.
2. Select **Calculation**.
3. Select **Edit**.
4. Select the **Display in default lists and hovercards** checkbox.
5. Select **Save**.

### Update the Signal Calculation Layout

Update the _Signal Calculation_ object layout with the _Signal Calculation Mapping_ related object section:
1. Navigate to **Layouts > Signal Calculation Detail Page Layout**.
2. Select **Edit**.
3. After the _Details_ section, <a href="/en/lr/26387/#how-to-add-sections">insert a related object section</a> with the following information:
    * **Related Object**: From the drop-down, select **Signal Calculation Mapping**.
    * **Section Label**: Enter `Signal Calculation Mapping`.
    * **Creation Option**: Select **Create record in new page**.
4. Select **Done**.
5. Select **Save**.

### Add a Layout Rule {#signal-calc-layout-rule}

Add a layout rule to hide certain fields when the _Query Type_ is not set to _Advanced_:
1. Navigate to **Layouts > Signal Calculation Detail Page Layout**.
2. Select **Layout Rules**.
3. Select **Create**.
4. On the _Create Layout Rule_ page, complete the following information and then select **Save**:
    * **Label**: Enter `Hide if not Advanced`.
    * **Description**: (Optional) Enter `Hide fields only applicable to advanced calculations`.
    * **If this Layout Rule Expression is TRUE**: Enter `Not(query_type__v = 'advanced__v')`.
    * **Apply the following display effects**: 

    | Effect | Type     | Values                     |
    | ------ | -------- | -------------------------- |
    | Hide   | Sections | Calculation Output Mapping |
    | Hide   | Fields   | Calculation                |

### Update the List Layout {#signal-calc-list-layout}

To update the _Signal Calculation_ list layout:
1. Navigate to the **List Layout** tab.
2. Select **Reorder**.
3. Drag field names so the list layout appears in the following order:
    * _Name_
    * _Signal Calculation Setting_
    * _Signal View_
    * _Query Type_
    * _Calculation_
4. Select **Save**.

## Update the Statistical Data Object

To update the _Statistical Data_ object, navigate to **Admin > Configuration > Objects > Statistical Data** and perform the following configuration:
* [Set the fields to display in default lists and hovercards.][7]
* [Update the layout.][8]
* [Update the list layout.][9]

### Update Fields {#statistical-data-fields}

Update the _EB05_ and _EB95_ fields to display in default lists and hovercards:
1. Select the **Fields** tab.
2. Select **EB05**.
3. Select **Edit**.
4. Select the **Display in default lists and hovercards** checkbox.
5. Select **Save**.
6. Repeat the above steps for the _EB95_ field.

### Update the Layout {#statistical-data-layout}

To update the _Statistical Data_ object layout:
1. Navigate to **Layouts > Statistical Data Detail Page Layout**.
2. In the _Data_ section, add the following fields:
    * _EBGM_
    * _EB05_
    * _EB95_
3. Select **Save**.

### Update the List Layout {#statistical-data-list-layout}

To update the _Statistical Data_ list layout:
1. Navigate to the **List Layout** tab and select **Reorder**.
2. Drag field names so the list layout appears in the following order:
    * _Statistical Data Unique Name_
    * _Product Family_
    * _MedDRA Term_
    * _Alert_
    * _Listed_
    * _New All_
    * _Cumulative All_
    * _New Fatal_
    * _Cumulative Fatal_
    * _New Serious_
    * _Cumulative Serious_
    * _New Spontaneous_
    * _Cumulative Spontaneous_
    * _EB05_
    * _EB95_
    * _EBGM_
    * _Current Disposition_
    * _Current Disposition Date_
    * _Previous Period Disposition_
    * _Previous Period Disposition Date_
    * _Detection Date_
    * _Detection Type_
    * _Reporting Period_
    * _Source_
    * _Safety Investigation_
3. Select **Save**.

## Grant Object Permissions

Ensure your <a href="/en/lr/22824/#object-permissions">permission sets</a> are updated to grant the appropriate level of access for Admins and users to objects and fields according to your organization's process. Manage object permissions from **Admin > Users & Groups > Permission Sets > [Permission Set] > Objects > [Object]**.

The following table summarizes the recommended level of access for your permission sets:
<table>
    <thead>
        <tr>
            <th>Permission Set</th>
            <th>Object</th>
            <th>Objects/Fields</th>
            <th>Permissions</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>[Applicable Admin Permission Set] and [Applicable User Permission Set]</td>
            <td><em>Statistical Data</em></td>
            <td>(Optional) Object: 
                <ul>
                    <li><em>Statistical Data</em></li>
                </ul>
                <br>Fields:
                <ul>
                    <li><em>EBGM</em></li>
                    <li><em>EB05</em></li>
                    <li><em>EB95</em></li>
                </ul>
            </td>
            <td><em>Edit</em> access for object permissions
                <br>
                <br>
                <p><em>Read</em> access for object and field permissions</p>
            </td>
        </tr>
        <tr>
            <td>[Applicable User Permission Set]</td>
            <td><em>Signal Calculation Mapping</em></td>
            <td>Object: 
                <ul>
                    <li><em>Signal Calculation Mapping</em></li>
                </ul>
            </td>
            <td><em>Read</em>, <em>Create</em>, <em>Edit</em>, and <em>Delete</em> access</td>
        </tr>
    </tbody>
</table>                                      

[1]: #signal-calc-mapping-object-layout
[2]: #signal-calc-mapping-list-layout
[3]: #update-the-calculation-field
[4]: #update-the-signal-calculation-layout
[5]: #signal-calc-layout-rule
[6]: #signal-calc-list-layout
[7]: #statistical-data-fields
[8]: #statistical-data-layout
[9]: #statistical-data-list-layout