# Configure Safety Views for Signal Case Series

You can create <a href="/en/gr/753138/">safety views</a> of the _Signal View_ type to use _Signal Case Series_. A <a href="/en/gr/935435/#signal-case-series">_Signal Case Series_</a> is a static list of _Case_ versions that does not change over time and can be used for consistent signal detection and analysis. Some _Case_ series views may be available in your Vault.

After following the configuration on this page, configure <a href="/en/gr/753144/#create-signal-calculations">_Signal Calculations_</a> and <a href="/en/gr/808068/#create-signal-product-profiles">_Signal Product Profiles_</a> for _Case_ series.

## Prerequisites

Before you can create _Signal Case Series_-enabled views, you must <a href="/en/gr/825941/">enable _Signal Case Series_</a>.

## Create Signal Case Series Views

Create _Signal Case Series_ views to obtain the following data:
* New _Case_ counts
* Cumulative _Case_ counts
* _Cases_ with adverse events evaluated as listed or unlisted

To create a _Signal View_ to use _Signal Case Series_:
1. Navigate to **Business Admin > Objects > Workbench Views**.
2. Select **Create**.
3. In the _Create Workbench View_ dialog, select **Signal View** and then select **Continue**.
4. Complete the details and SQL information about the respective _Signal View_ using the following table and then select **Save**:
<table>
    <thead>
        <tr>
            <th>Signal View</th>
            <th>Name</th>
            <th>API Name</th>
            <th>Description</th>
            <th>SQL</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><em>Signal Case Series - New Counts</em></td>
            <td>PV Case Series - New Counts</td>
            <td>Enter a unique name for this view, for example, <code>signal_case_series_new_counts__c</code>.</td>
            <td>Case Series for Product-Event Combinations from the PV Product Family-Event New Counts View</td>
            <td><code>SELECT<br> 
                        filter.case_version_id, 
                        filter.product_family_id, 
                        filter.pt_code, 
                        TRUE AS is_all, 
                        filter.is_fatal, 
                        filter.is_serious, 
                        filter.is_postmarket_spontaneous<br> 
                    FROM<br>
                        ${pv_filterview_interval_pec_for_product__c} filter</code>
            </td>
        </tr>
        <tr>
            <td><em>Signal Case Series - Cumulative Counts</em></td>
            <td>PV Case Series - Cumulative Counts</td>
            <td>Enter a unique name for this view, for example, <code>signal_case_series_cumulative_counts__c</code>.</td>
            <td>Case Series for Product-Event Combinations from the PV Product Family-Event Cumulative Counts View</td>
            <td><code>SELECT<br>
                        filter.case_version_id,
                        filter.product_family_id,
                        filter.pt_code,
                        TRUE AS is_all,
                        filter.is_fatal,
                        filter.is_serious,
                        filter.is_postmarket_spontaneous<br>
                    FROM<br>
                        ${pv_filterview_cumulative_pec_for_product__c} filter</code>
            </td>
        </tr>
        <tr>
            <td><em>Signal Case Series - Listed</em></td>
            <td>PV Case Series - Listed</td>
            <td>Enter a unique name for this view, for example, <code>signal_case_series_listed__c</code>.</td>
            <td>Case Series for Product-Event Combinations from the PV Product Family-Event Listed View</td>
            <td><code>SELECT<br>
                        filter.case_version_id,
                        filter.product_family_id,
                        filter.pt_code,
                        TRUE AS filter.is_listed<br>
                    FROM<br>
                        ${pv_filterview_interval_pec_for_product__c} filter</code>
            </td>
        </tr>
    </tbody>
</table>

Vault sets the _Signal Case Series Enabled_ checkbox after you configure the _View Columns_ section for the _Signal Case Series_. Follow the steps in the sections below to add [dependent views][1] and [view columns][2].

### Add Dependent Views

When creating a new _Signal View_, this section appears only after saving.

To add a dependent view, expand the **Dependent Views** section and select **Create**. Use the following table to add the respective dependent view:

| Signal View | Dependent View |
| ----------- | -------------- |
| _Signal Case Series - New Counts_ | The dependent view should match that of the corresponding _Case_ count view, for example, _PV Filter View - Interval Product-Events for a Product Family_. |
| _Signal Case Series - Cumulative Counts_ | The dependent view should match that of the corresponding _Case_ count view, for example, _PV Filter View - Cumulative Product-Events for a Product Family_. |
| _Signal Case Series - Listed_  | The dependent view should match that of the corresponding _Case_ count view, for example, _PV Filter View - Interval Product-Events for a Product Family_. |

### Add View Columns

When creating a new _Signal View_, this section appears only after saving.

To populate the _View Columns_ section:
1. In the _View Columns_ section, select **Create**.
2. Use the [tables below][3] to create the necessary view columns for the applicable _Signal Views_.
3. Select **Save**.
4. Optional: To delete a field, select the **Actions** menu next to the field and then select **Delete**.

The following table describes the view columns for the _Signal Case Series - New Counts_ and _Signal Case Series - Cumulative Counts_ views:

<table id="view-columns-table">
    <thead>
        <tr>
            <th>Name</th>
            <th>API Name</th>
            <th>Column Type</th>
            <th>Safety Object Reference</th>
            <th>Safety Object Constraint</th>
            <th>Signal Case Series Key</th>
            <th>Case Version Key</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Case Version ID</td>
            <td rowspan="8">Enter the <em>API Name</em> of the view column. This value must match the name of the column returned by the <a href="/en/gr/753138/#sql-editor">SQL query</a>.</td>
            <td>Text</td>
            <td rowspan="8">Optional: The <em>Safety Object Reference</em> and <em>Safety Object Constraint</em> fields allow you to restrict the values that appear when filtering on this object, for example, restricting the <em>Controlled Vocabulary</em> object to display only <em>Drug Roles</em>. Enter the <em>API Name</em> of the object associated with this view column field.</td>
            <td rowspan="8">Optional: The <em>Safety Object Reference</em> and <em>Safety Object Constraint</em> fields allow you to restrict the values that appear when filtering on this object, for example, restricting the <em>Controlled Vocabulary</em> object to display only <em>Drug Roles</em>. Enter <a href="/en/gr/75340/">VQL to configure a reference constraint</a> to restrict the object values.</td>
            <td>N/A</td>
            <td>Yes</td>
        </tr>
        <tr>
            <td>Is All</td>
            <td>Yes/No</td>
            <td rowspan="7">Enter a <em>Signal Case Series Key</em>. The <em>Signal Case Series Key</em> must match the <em>API Name</em> of the <em>Statistical Data</em> field. This field ensures Vault maps the correct data from the <em>Signal Case Series</em> view when users create a <em>Statistical Data</em> record.</td>
            <td rowspan="7">N/A</td>
        </tr>
        <tr>
            <td>Is Fatal</td>
            <td>Yes/No</td>
        </tr>
        <tr>
            <td>Is Postmarket Spontaneous</td>
            <td>Yes/No</td>
        </tr>
        <tr>
            <td>Is Serious</td>
            <td>Yes/No</td>
        </tr>
        <tr>
            <td>Product Family ID</td>
            <td>Text</td>
        </tr>
        <tr>
            <td>PT Code</td>
            <td>Text</td>
        </tr>
    </tbody>
</table>

The following table describes the view columns for the _Signal Case Series - Listed_ view:

<table>
    <thead>
        <tr>
            <th>Name</th>
            <th>API Name</th>
            <th>Column Type</th>
            <th>Safety Object Reference</th>
            <th>Safety Object Constraint</th>
            <th>Signal Case Series Key</th>
            <th>Case Version Key</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Case Version ID</td>
            <td rowspan="4">Enter the <em>API Name</em> of the view column. This value must match the name of the column returned by the <a href="/en/gr/753138/#sql-editor">SQL query</a>.</td>
            <td>Text</td>
            <td rowspan="4">Optional: The <em>Safety Object Reference</em> and <em>Safety Object Constraint</em> fields allow you to restrict the values that appear when filtering on this object, for example, restricting the <em>Controlled Vocabulary</em> object to display only <em>Drug Roles</em>. Enter the <em>API Name</em> of the object associated with this view column field.</td>
            <td rowspan="4">Optional: The <em>Safety Object Reference</em> and <em>Safety Object Constraint</em> fields allow you to restrict the values that appear when filtering on this object, for example, restricting the <em>Controlled Vocabulary</em> object to display only <em>Drug Roles</em>. Enter <a href="/en/gr/75340/">VQL to configure a reference constraint</a> to restrict the object values.</td>
            <td>N/A</td>
            <td>Yes</td>
        </tr>
        <tr>
            <td>Is Listed</td>
            <td>Yes/No</td>
            <td rowspan="3">Enter a <em>Signal Case Series Key</em>. The <em>Signal Case Series Key</em> must match the <em>API Name</em> of the <em>Statistical Data</em> field. This field ensures Vault maps the correct data from the <em>Signal Case Series</em> view when users create a <em>Statistical Data</em> record.</td>
            <td rowspan="3">N/A</td>
        </tr>
        <tr>
            <td>Product Family ID</td>
            <td>Text</td>
        </tr>
        <tr>
            <td>PT Code</td>
            <td>Text</td>
        </tr>
    </tbody>
</table>

<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>: When you populate the <em>Signal Case Series Key</em> for all view columns and assign the <em>Case Version ID</em> view column as the <em>Case Version Key</em>, Vault automatically sets the <em>Signal Case Series Enabled</em> checkbox.</p>
    </div>
  </div>
</div>



## Assign the Case Version Key on Principal Views

For Vault to execute your configured _Signal Views_ using _Signal Case Series_, for each associated _Principal View_, you must [assign the _Case Version Key_][2] to the _Case Version ID_ view column.

[1]: #add-dependent-views
[2]: #add-view-columns
[3]: #view-columns-table
