# Configure Individual Case Routing Criteria

When you configure _Individual Case Routing Criteria_, Vault evaluates each _Case Assessment_ against the rules. When a _Case Assessment_ meets a set of criteria, Vault can apply <a href="/en/gr/01287/#routing-tags">_Routing Tags_</a> and take other configured actions. This is useful for flagging _Cases_ for specialized review, such as <a href="/en/gr/873693/">signal</a> or medical review.

You assign each _Individual Case Routing Criteria_ a _Priority_ and one or more _Case Actions_. Vault evaluates each _Case Assessment_ in priority order against each _Individual Case Routing Criteria_ and _Case Action_ combination. When a _Case Assessment_ passes an _Individual Case Routing Criteria_, Vault performs the _Case Action_. Vault does not evaluate that _Case Assessment_ against any lower-priority _Individual Case Routing Criteria_, unless it contains a different _Case Action_.

## Prerequisite

Your Admin must <a href="/en/gr/860153/">enable Individual Case Routing Criteria</a>.

## Evaluating Case Assessments

Vault evaluates each _Case Assessment_ on a _Case_ against each _Individual Case Routing Criteria_ and _Case Action_ combination until it passes. You assign each _Individual Case Routing Criteria_ a _Priority_, and Vault evaluates the criteria in priority order. For example, if a _Case Assessment_ does not meet the criteria for the _Individual Case Routing Criteria_ with a _Priority_ value of `1`, Vault evaluates the _Case Assessment_ against the criteria with a _Priority_ value of `2`, and so on. When a _Case Assessment_ meets any criteria, Vault takes all configured _Case Actions_ related to that criteria, such as adding a specific _Routing Tag_. Vault does not evaluate that _Case Assessment_ against any lower-priority _Individual Case Routing Criteria_ with that _Case Action_. However, if lower-priority _Individual Case Routing Criteria_ include a different action, Vault evaluates the _Case Assessment_ against it.

## Example Routing Configuration & Evaluation for a Single Case Action

The following [routing][1] configuration, [_Case_ details][2], and [evaluation outcomes][3] outline the behavior of individual _Case_ routing when the _Individual Case Routing Criteria_ include a single _Case Action_.

### Individual Case Routing Criteria {#routing-criteria}

Suppose you define the following _Individual Case Routing Criteria_:

<table>
    <thead>
      <tr>
        <th>Priority</th>
        <th>Criteria</th>
        <th>Case Action</th>
        <th>Routing Tag</th>
        <th>Lifecycle State</th>
      </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Clinical trial <em>Case</em> tagged as <code>SUSAR</code></td>
      <td>Tag Case</td>
      <td>SUSAR</td>
      <td>--</td>
    </tr>
    <tr>
      <td>2</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> A has <code>No</code> in the <em>Expected</em> field</td>
      <td>Tag Case</td>
      <td>Priority Medical Review</td>
      <td>--</td>
    </tr>
    <tr>
      <td>3</td>
      <td>A <em>Case Assessment</em> with any <em>Case Product</em> has <code>No</code> in the <em>Expected</em> field</td>
      <td>Tag Case</td>
      <td>Medical Review</td>
      <td>--</td>
    </tr>
    <tr>
      <td>4</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> A has <code>Yes</code> in the <em>Expected</em> field</td>
      <td>Tag Case</td>
      <td>Post-Closure QC</td>
      <td><em>Approved</em></td>
    </tr>
  </tbody>
</table>

### Case Details {#case-details}

Suppose a _Case_ has the following details:

* The _Report Type_ is _Spontaneous_
* The following _Case Assessment_ details:
  * **_Case Assessment_ A**: _Case Product_ A, _Case Adverse Event_ 1, and _Expected_ is _No_
  * **_Case Assessment_ B**: _Case Product_ A, _Case Adverse Event_ 2, and _Expected_ is _Yes_
  * **_Case Assessment_ C**: _Case Product_ B, _Case Adverse Event_ 1, and _Expected_ is _No_
  * **_Case Assessment_ D**: _Case Product_ B, _Case Adverse Event_ 2, and _Expected_ is _Yes_
* The _Lifecycle State_ is _Approved_

### Evaluation Outcomes {#outcomes}

Vault evaluates the _Case Assessments_ against the _Individual Case Routing Criteria_ in priority order:

<table>
    <thead>
      <tr>
        <th>Priority</th>
        <th>Individual Case Routing Criteria</th>
        <th>Case Assessments Evaluated</th>
        <th>Does Case Assessment Meet the Criteria?</th>
        <th>Case Action</th>
      </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>Clinical trial <em>Case</em> tagged as <code>SUSAR</code></td>
      <td>
          <ul>
            <li>A</li>
            <li>B</li>
            <li>C</li>
            <li>D</li>
          </ul>
      </td>
      <td>No <em>Case Assessments</em> meet the criteria.</td>
      <td>N/A</td>
    </tr>
    <tr>
      <td>2</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> A has <code>No</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>A</li>
            <li>B</li>
            <li>C</li>
            <li>D</li>
          </ul>
      </td>
      <td><em>Case Assessment</em> A meets the criteria.</td>
      <td>Vault populates <em>Priority Medical Review</em> in the <em>Routing Tags</em> field of the <em>Case</em>.</td>
    </tr>
    <tr>
      <td>3</td>
      <td>A <em>Case Assessment</em> with any <em>Case Product</em> has <code>No</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>B</li>
            <li>C</li>
            <li>D</li>
          </ul>
        </td>
      <td><em>Case Assessment</em> C meets the criteria.</td>
      <td>Vault populates <em>Medical Review</em> in the <em>Routing Tags</em> field of the <em>Case</em>.</td>
    </tr>
    <tr>
      <td>4</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> A has <code>Yes</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>B</li>
            <li>D</li>
          </ul>
        </td>
      <td><em>Case Assessment</em> B meets the criteria.</td>
      <td>Vault populates <em>Post-Closure QC</em> in the <em>Routing Tags</em> field of the <em>Case</em>.</td>
    </tr>
  </tbody>
</table>

In this scenario, _Case Assessment_ D does not meet any _Individual Case Routing Criteria_.

## Example Routing Configuration and Evaluation for Multiple Case Actions

The following [routing][4] configuration, [_Case_ details][5], and [evaluation outcomes][6] outline the behavior of individual _Case_ routing when the _Individual Case Routing Criteria_ include multiple _Case Actions_.

### Individual Case Routing Criteria {#routing-criteria-2}

Suppose you define the following _Individual Case Routing Criteria_:

<table>
    <thead>
      <tr>
        <th>Priority</th>
        <th>Criteria</th>
        <th>Case Action</th>
        <th>Routing Tag</th>
        <th>Lifecycle State</th>
      </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> A has <code>No</code> in the <em>Expected</em> field</td>
      <td>Tag Case</td>
      <td>Priority Medical Review</td>
      <td>--</td>
    </tr>
    <tr>
      <td>2</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> B has <code>No</code> in the <em>Expected</em> field</td>
      <td>Tag Case</td>
      <td>Medical Review</td>
      <td>--</td>
    </tr>
    <tr>
      <td>3</td>
      <td>A <em>Case Assessment</em> with any <em>Case Product</em> has <code>No</code> in the <em>Expected</em> field</td>
      <td>Tag Case, Create Signal Individual Case Review</td>
      <td>Post-Closure QC</td>
      <td><em>Approved</em></td>
    </tr>
  </tbody>
</table>

### Case Details {#case-details-2}

Suppose a _Case_ has the following details:

* The _Report Type_ is _Spontaneous_
* The following _Case Assessment_ details:
  * **_Case Assessment_ A**: _Case Product_ A, _Case Adverse Event_ 1, and _Expected_ is _No_
  * **_Case Assessment_ B**: _Case Product_ A, _Case Adverse Event_ 2, and _Expected_ is _Yes_
  * **_Case Assessment_ C**: _Case Product_ B, _Case Adverse Event_ 1, and _Expected_ is _No_
* The _Lifecycle State_ is _Approved_

### Evaluation Outcomes {#outcomes-2}

Vault evaluates the _Case Assessments_ against the _Individual Case Routing Criteria_ for each _Case Action_ in priority order:

<table>
    <thead>
      <tr>
        <th>Priority</th>
        <th>Individual Case Routing Criteria</th>
        <th>Case Assessments Evaluated</th>
        <th>Does Case Assessment Meet the Criteria?</th>
        <th>Case Action</th>
      </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> A has <code>No</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>A</li>
            <li>B</li>
            <li>C</li>
          </ul>
      </td>
      <td><em>Case Assessment</em> A meets the criteria.</td>
      <td>Vault populates <em>Priority Medical Review</em> in the <em>Routing Tags</em> field of the <em>Case</em>.</td>
    </tr>
    <tr>
      <td>2</td>
      <td>A <em>Case Assessment</em> with <em>Case Product</em> B has <code>No</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>B</li>
            <li>C</li>
          </ul>
          Vault does not evaluate <em>Case Assessment</em> A because it already passed an <em>Individual Case Routing Criteria</em> with <em>Tag Case</em> in the <em>Case Action</em> field.
        </td>
      <td><em>Case Assessment</em> C meets the criteria.</td>
      <td>Vault populates <em>Medical Review</em> in the <em>Routing Tags</em> field of the <em>Case</em>.</td>
    </tr>
    <tr>
      <td>3</td>
      <td>A <em>Case Assessment</em> with any <em>Case Product</em> has <code>No</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>B</li>
          </ul>
          For <em>Tag Case</em>, Vault evaluates only <em>Case Assessment</em> B because both A and C have already passed an <em>Individual Case Routing Criteria</em> with <em>Tag Case</em> in the <em>Case Action</em> field.
        </td>
      <td>No <em>Case Assessment</em> meets the criteria.</td>
      <td>--</td>
    </tr>
    <tr>
      <td>3</td>
      <td>A <em>Case Assessment</em> with any <em>Case Product</em> has <code>No</code> in the <em>Expected</em> field</td>
      <td>
          <ul>
            <li>A</li>
            <li>B</li>
            <li>C</li>
          </ul>
          For <em>Create Signal Individual Case Review</em>, Vault evaluates all three <em>Case Assessments</em> because none have previously passed an <em>Individual Case Routing Criteria</em> with <em>Create Signal Individual Case Review</em> in the <em>Case Action</em> field.
          </td>
      <td><em>Case Assessments</em> A and C meets the criteria.</td>
      <td>Vault performs <em>Create Signal Individual Case Review</em>.</td>
    </tr>
  </tbody>
</table>

In this scenario, _Case Assessment_ B does not meet any _Individual Case Routing Criteria_.

## Create Individual Case Routing Criteria

To create _Individual Case Routing Criteria_:

1. Navigate to **Business Admin > Objects > Individual Case Routing Criterias**.
2. Select **Create**.
3. Complete applicable [fields][7].
4. Select **Save**.

### Individual Case Routing Criteria Fields {#icrc-fields}

The following fields may be available:

<table>
    <thead>
      <tr>
        <th>Field</th>
        <th>Description</th>
      </tr>
  </thead>
  <tbody>
    <tr>
      <td><em>Name</em></td>
      <td>Enter a name for the routing criteria.</td>
    </tr>
    <tr>
      <td><em>Case Actions</em></td>
      <td>Select the actions Vault should take when a <em>Case</em> meets the criteria for routing.</td>
    </tr>
    <tr>
      <td><em>Case Lifecycle State</em></td>
      <td>Select the eligible states for routing.</td>
    </tr>
    <tr>
      <td><em>Expression</em></td>
      <td>Enter a <a class="external-link " href="https://developer.veevavault.com/vql/#criteria-vql" target="_blank" rel="noopener">VQL formula expression<i class="fa fa-external-link" aria-hidden="true"></i></a>. You can use any of the operators and functions in the <a href="/en/gr/52324/">Vault Formula Reference Guide</a> and the Safety-specific functions detailed in <a href="/en/gr/861364/">Create Formula Expressions</a>. For <em>Individual Case Routing Criteria</em>, your expression must:
        <ul><li> Begin with <code>VS_LET</code></li>
            <li>Contain <code>case_assessment__v</code></li>
        </ul>
        <p>For example, the expression <code>VS_LET(ca, case_assessment__v, ca.expectedness__v=false)</code> returns true if the <em>Case</em> has any unexpected adverse events.</p></td>
    </tr>
    <tr>
      <td><em>Priority</em></td>
      <td>Enter a number. Vault assesses the criteria in priority order, so Vault evaluates the <em>Individual Case Routing Criteria</em> with <em>Priority</em> <code>1</code> before <em>Priority</em> <code>3</code>.</td>
    </tr>
    <tr>
      <td><em>Routing Tags</em></td>
      <td>Select the tags Vault will apply when a <em>Case Assessment</em> meets the criteria for routing.</td>
    </tr>
  </tbody>
</table>

[1]: #routing-criteria
[2]: #case-details
[3]: #outcomes
[4]: #routing-criteria-2
[5]: #case-details-2
[6]: #outcomes-2
[7]: #icrc-fields
