# How the Cumulative Dose is Calculated

Vault calculates the _Cumulative Dose_ field on the _Case Product_ when the required data points are available.

To calculate the _Cumulative Dose_, Vault uses the _Onset_ field on the _Case Adverse Event_ and the following _Case Product Dosage_ fields:
* _Dose_
* _Frequency_
* _First Admin Date_
* _Last Admin Date_

For Vault to calculate the _Cumulative Dose_, the _Frequency_ unit must match the precision of the _Onset_, _First Admin Date_ and _Last Admin Date_.

<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>: For Vault to calculate the <em>Cumulative Dose</em> for a monthly <em>Dose</em> frequency, set the <em>Frequency</em> to <em>Every 30 days</em>.</p>
    </div>
  </div>
</div>



## How to Trigger Cumulative Dose Auto-Calculation

When you add or update fields on the relevant _Case Product Dosage_ or _Case Adverse Event_, Vault recalculates the _Cumulative Dose_.

## Cumulative Dose Example Diagrams

The following diagrams show how Vault calculates the _Cumulative Dose_ field using dosage intervals and the _Onset_ date of the _Case Adverse Event_.

### Diagram 1A: Cumulative Dose Calculation with First and Last Admin Date

<a href="https://platform.veevavault.help/assets/images/saf-cumulative-dose-1a.png" data-lightbox="saf-cumulative-dose-1a.png" data-title="" data-alt="Cumulative Dose Diagram 1A">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-cumulative-dose-1a.png" alt="Cumulative Dose Diagram 1A" style="max-width: 75%;"  />
</a>

1. The _First Admin Date_ and _Last Admin Date_ are populated with a precision to the day (YYYY/MM/DD). The _Onset_ date is also populated with a precision to the day and occurs after the _Last Admin Date_. Lastly, the _Dose_ and _Frequency_ are populated.
2. Upon saving the _Case Adverse Event_ and _Case Product Dosage_ records, Vault calculates the _Cumulative Dose_.

### Diagram 1B: Cumulative Dose Calculation with First and Last Admin Date (Precision to the Time)

<a href="https://platform.veevavault.help/assets/images/saf-cumulative-dose-1b.png" data-lightbox="saf-cumulative-dose-1b.png" data-title="Cumulative Dose Diagram 1B" data-alt="cumulative-dose-1b">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-cumulative-dose-1b.png" alt="cumulative-dose-1b" style="max-width: 75%;"  />
</a>

1. The _First Admin Date_ and _Last Admin Date_ are populated with a precision to the day (YYYY/MM/DD HH:MM). The _Onset date_ is also populated with a precision to the time and occurs after the _Last Admin Date_. Lastly, the _Dose_ and _Frequency_ are populated.
2. Upon saving the _Case Adverse Event_ and _Case Product Dosage_ records, Vault calculates the _Cumulative Dose_. The _Cumulative Dose_ value remains the same as when using the precision to the day, however Vault calculates the _Duration_ of the _Case Product Dosage_ with even more precision.

### Diagram 2: Cumulative Dose Calculation with Last Admin Date Past Onset Date

<a href="https://platform.veevavault.help/assets/images/saf-cumulative-dose-2.png" data-lightbox="saf-cumulative-dose-2.png" data-title="" data-alt="Cumulative Dose Diagram 2">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-cumulative-dose-2.png" alt="Cumulative Dose Diagram 2" style="max-width: 75%;"  />
</a>

1. The _First Admin Date_, _Last Admin Date_, and the _Onset_ date are populated. The _Last Admin Date_ occurs after the _Onset_ date. The _Dose_ and _Frequency_ are also populated.
2. Upon saving the _Case Adverse Event_ and _Case Product Dosage_ records, Vault calculates the _Cumulative Dose_. The _Cumulative Dose_ considers the date interval until the onset of an _Adverse Event_. Although the _Last Admin Date_ is July 16, the _Cumulative Dose_ only calculates until July 11 (the _Onset_ date).

### Diagram 3: Cumulative Dose Calculation with Unknown First Admin Date

<a href="https://platform.veevavault.help/assets/images/saf-cumulative-dose-3.png" data-lightbox="saf-cumulative-dose-3.png" data-title="" data-alt="Cumulative Dose Diagram 3">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-cumulative-dose-3.png" alt="Cumulative Dose Diagram 3" style="max-width: 75%;"  />
</a>

1. The _Last Admin Date_ and the _Onset_ date are populated but the _First Admin Date_ is blank. The _Dose_ and _Frequency_ are also populated.
2. Upon saving the _Case_, Vault cannot calculate the _Cumulative Dose_ due to an unknown _First Admin Date_.