# How Case Adverse Events are Auto-Ranked

To identify the most conservative _Case Adverse Event_ as the primary event, Vault can [evaluate and rank events][1] based on your Admin's <a href="/en/gr/740208/#auto-calc">configuration</a>. Your Admin can set the priority ranking rules to either of the following:

* 1. Seriousness 2. Relatedness 3. Expectedness (default)
* 1. Relatedness 2. Seriousness 3. Expectedness

 <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>:  To auto-rank <em>Cases</em> that existed before this feature was introduced, you must run the <a href="#rank-run"> <em>Auto-Rank Case Adverse Events</em> action</a>.</p>
    </div>
  </div>
</div>



To determine ranks for tied events, Vault applies a fixed sequence of tie-breakers using outcome, severity, CTCAE Grade, and then creation date. When complete, Vault populates the <a href="/en/gr/01287/#auto-rank">_Auto-Rank_</a> and <a href="/en/gr/01287/#event-rank">_Rank_</a> fields on _Case Adverse Events_ and completes tagging and roll-ups. 

You can override Vault-populated _Ranks_. However, if you re-run auto-ranking, Vault overrides all values, including manually entered values.

## Prerequisite

Your Admin must <a href="/en/gr/881476/">enable Auto-Ranking Case Adverse Events</a>.

## Ranking Rules {#ranking-rules}

When Vault ranks _Case Adverse Events_, Vault applies the adverse event ranking order configured by your Admin. To complete ranking, Vault evaluates:

* _Seriousness_ based on the <a href="/en/gr/760903/#seriousness">most serious</a> _Case Adverse Event_.
* The _Causality Established_ values on _Case Assessment Results_ to determine whether _Case Adverse Events_ are <a href="/en/gr/01160/">related</a> to suspect products.
* The _Expected_ values on _Case Assessments_ to determine the <a href="/en/gr/737264/">expectedness</a> of _Case Adverse Events_.

If the above evaluations result in a tie, Vault completes a fixed sequence of evaluations to determine a tie-breaker. Across _Case Adverse Events_, Vault considers:

1. The most serious <a href="/en/gr/01287/#event-outcome">_Outcome_</a>, using the following priority:
    1. _fatal_
    2. _not recovered/not resolved/ongoing_
    3. _recovering/resolving_
    4. _unknown_ or blank
    5. _recovered/resolved with sequelae_
    6. _recovered/resolved_
2. The most serious <a href="/en/gr/01287/#severity">_Severity_</a>, using the following priority:
    1. _Severe_
    2. _Moderate_
    3. _Mild_
    4. Blank
3. The most serious <a href="/en/gr/01287/#ctcae-grade">_CTCAE Grade_</a>, with _Grade 5_ being the most serious and blank being the least serious
4. The earliest _Created Date_

If multiple assessments with different values exist for the same _Case Adverse Event_, Vault evaluates using the most conservative values.

## When Vault Auto-Ranks {#rank-run}

Depending on your Admin's configuration, Vault performs _Case Adverse Event_ auto-ranking when a _Case_ moves to an applicable lifecycle state. In addition, you can manually run auto-ranking on _Cases_ in configured lifecycle states. Refreshing ranks may be useful, for example, for Medical Reviewers updating assessment data. From the **All Actions** menu, select **Auto-Rank Case Adverse Events** (<img class="inline" src="https://platform.veevavault.help/assets/images/saf-rank-icon.png" alt="auto-ranking icon" style="" />). 

## Overriding Auto-Ranking

When Vault completes auto-ranking, it populates the _Auto-Rank_, _Rank_, and <a href="/en/gr/01287/#event-rank-status">_Event Rank (Status)_</a> fields. The _Auto-Rank_ and _Event Rank (Status)_ fields are not editable. When needed, you can override Vault-populated ranks by editing the _Rank_ field. This may be necessary if you want to manually flag a primary event by entering a `1` in the _Rank_ field of a _Case Adverse Event_. 

When you override a Vault-populated _Rank_ value or edit the value on [any field involved in auto-ranking][1], Vault updates the _Event Rank (Status)_ field on the _Case_ from _Auto Calculated_ to _Overridden_. After you edit a _Rank_, Vault does not update the _Auto-Rank_ value.

<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>: Vault always references the <em>Rank</em> field, and not the <em>Auto-Rank</em> field, as the source for rank values when evaluating reporting obligations and generating <em>Transmissions</em>.</p>
    </div>
  </div>
</div>

 

If you run the _Auto-Rank Case Adverse Events_ action after manually changing ranks, Vault re-ranks all _Case Adverse Events_, including any that were manually changed. This updates the _Auto-Rank_ and _Rank_ fields. In addition, Vault updates the _Event Rank (Status)_ field from _Overridden_ to _Auto Calculated_.

## Clearing Auto-Rank Results

Vault clears the _Event Rank (Status)_ field on a _Case_ and all _Auto-Rank_ fields on _Case Adverse Events_ when:

* You add a _Case Adverse Event_.
* An _Inbox Item_ is merged into an in-flight _Case_, regardless of whether the new information adds or changes any adverse events.

To re-add auto-ranking evaluations, run the **Auto-Rank Case Adverse Events** action.

## Copying Auto-Rank Results

Vault maps the _Event Rank (Status)_ field value on a _Case_ and all _Auto-Rank_ fields on _Case Adverse Events_ when:

* You <a href="/en/gr/01148/#create-a-follow-up-case">create a follow-up _Case_</a> by running the _Create Follow Up Case_ action on a _Case_.
* You <a href="/en/gr/774284/">copy a _Case_</a>.
* Vault creates follow-up _Cases_ during <a href="/en/gr/01181/#bulk-unblind-follow-up-case-updates">bulk unblinding</a>. 

[1]: #ranking-rules