# How Age Fields are Calculated

This article clarifies how Vault calculates and populates the following age fields:

* [Age (normalized)][1] (`age_normalized_year__v`)
* [Age at Onset][2] (`age_value__v`)
* [Age Group ][3] (`age_group__v`)

During case processing, optionally, you can <a href="/en/lr/01155/">turn off auto-calculation</a> at the field level.

By default, Vault uses the Date of Birth (`dob_idate__v`) on the Case to calculate the following:

* Age (`age_value_v`) and Age Unit (`age_unit_v`)
* Age (normalized)
* Age Group

If the Date of Birth is not provided, the **Age**  and **Age Unit** fields can be populated on the Inbox Item or Case through data entry or import. When provided, Vault calculates Age (normalized) and Age Group based on these values. If an initial Case includes Age and Age Unit values, when a Follow-up Case is created those values are populated from the initial Case.

If the **Date of Birth**, **Age**, and **Age Unit** fields are blank on the Inbox Item, Vault cannot auto-calculate.

### Age (Normalized) {#age-normalized}

Vault calculates the _Age (normalized)_ value of the _Case Patient_ section using the time interval between the following dates:

* The _Date of Birth_ of the _Case Patient_
* The _Event Onset_ of the _Case Adverse Event_. If the _Event Onset_ is not available, Vault uses the _Receipt Date_ of the _Case_.

If there are multiple _Case Adverse Events_, Vault uses the earliest event to calculate the age. For fetal adverse events, Vault uses the event closest to the birth date. When only partial dates are available, Vault calculates the age using the first day in the month or year entered. For example, if only <em>2021</em> is entered, the date 1/1/2021 is used.

If an _Age at Onset_ value and unit exists on a Case (for example, from E2B import), Vault uses this value to populate the _Age (normalized)_, converted to years.

### Age at Onset {#age-onset}

After calculating _Age (normalized)_, Vault populates the equivalent applicable value as the _Age at Onset_. Vault rounds down to the nearest applicable age unit based on the patient's age as follows: 

* If the patient is more than two years old, the age displays in years. For example, if the patient's age at onset is 53 years and nine months, Vault displays _53 years_ in this field.
* If the patient is less than two years old, the age displays in months. For example, if the patient's age at onset is 50 days, Vault displays _1 month_ in this field.

### Age Group {#age-group}

Based on the _Age at Onset_, Vault populates the patient's _Age Group_ as follows:

* _Fetus_: 0 weeks/days/hours/minutes old
* _Neonate_: More than 0 to fewer than 4 weeks old
* _Infant_: 1 month to fewer than 24 months old
* _Child_: 2 years to fewer than 12 years old
* _Adolescent_: 12 years to fewer than 18 years old
* _Adult_: 18 years to fewer than 65 years old
* _Elderly_: 65 years and older

## How to Trigger Auto-Calculation of Age Fields

When you add or update the relevant fields on the Case or the Case Adverse Event, Vault recalculates the **Age (normalized)**. 

Once **Age at Onset** is populated, Vault calculates the **Age Group** based on this field. 

## Age (Normalized), Age at Onset, and Age Group Diagrams

The following diagrams show how Vault auto-calculates the **Age (normalized)**, **Age at Onset**, and the **Age Group** fields using the date intervals between the patient's **Date of Birth** and the Adverse Event **Event Onset**.

### Scenario 1: Age (Normalized) Populates Age at Onset

<a href="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-a.png" data-lightbox="saf-age-normalized-age-at-onset-a.png" data-title="Age (normalized) and Age at Onset Scenario A" data-alt="Age (normalized) and Age at Onset Scenario A">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-a.png" alt="Age (normalized) and Age at Onset Scenario A" style="max-width: 75%;"  />
</a>

1. The Case contains a **Date of Birth** and **Event Onset** value but no **Age at Onset**.
2. Vault automatically calculates **Age (normalized)** and uses this value to populate **Age at Onset**. Vault then uses the **Age at Onset** value to calculate **Age Group**.

### Scenario 2: Age at Onset Populates Age (Normalized)

<a href="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-b.png" data-lightbox="saf-age-normalized-age-at-onset-b.png" data-title="" data-alt="Age (normalized) and Age at Onset Scenario B">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-b.png" alt="Age (normalized) and Age at Onset Scenario B" style="max-width: 75%;"  />
</a>

1. The Case contains an **Age at Onset** value (from E2B import) and no **Date of Birth** or **Event Onset** value.
2. Vault automatically uses the **Age at Onset** field value to populate **Age Group** and **Age (normalized)**, converting it into "years" if not already.

### Scenario 3: Override Age at Onset 

<a href="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-c.png" data-lightbox="saf-age-normalized-age-at-onset-c.png" data-title="Age (normalized) and Age at Onset Scenario C" data-alt="Age (normalized) and Age at Onset Scenario C">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-c.png" alt="Age (normalized) and Age at Onset Scenario C" style="max-width: 75%;"  />
</a>

1. The Case contains a **Date of Birth** and **Event Onset** value but no **Age at Onset**.
2. Vault automatically calculates **Age (normalized)** and uses this value to populate **Age at Onset**. Vault then uses the **Age at Onset** value to calculate **Age Group**.
3. You can override the **Age at Onset** by manually entering a value in this field. After saving the Case, Vault retains this **Age at Onset** value and uses it to re-populate **Age (normalized)** and **Age Group**.

### Scenario 4: Override Age (Normalized) 

<a href="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-d.png" data-lightbox="saf-age-normalized-age-at-onset-d.png" data-title="" data-alt="Age (normalized) and Age at Onset Scenario D">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-age-normalized-age-at-onset-d.png" alt="Age (normalized) and Age at Onset Scenario D" style="max-width: 75%;"  />
</a>

1. The Case contains an **Age at Onset** value (from E2B import) as well as a **Date of Birth** and **Event Onset** value.
2. Vault automatically uses the **Age at Onset** field value to populate **Age Group** and **Age (normalized)**, converting it into "years" if not already.
3. You can override the **Event Onset** by manually entering a value in this field.
4. After saving the Case, Vault re-calculates the **Age (normalized)** field and re-populates the **Age at Onset** with this value. Vault then uses the **Age at Onset** value to calculate **Age Group**. Overriding the **Date of Birth** value in step 3 also results in Vault re-calculating **Age (normalized)**.

[1]: #age-normalized
[2]: #age-onset
[3]: #age-group