# Configure Templates for Aggregate Report Authoring

Learn how to customize Aggregate Report Templates in SafetyDocs.

## About Aggregate Report Templates

SafetyDocs provides the following templates to help users author aggregate reports:

* DSUR Global Template - Complex (Sample)
* DSUR Global Template - Simple (Sample)
* PBRER Global Template - Complex (Sample)
* PBRER Global Template - Simple (Sample)
* PSUR Global Template - Complex (Sample)
* PSUR Global Template - Simple (Sample)

<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-provided Aggregate Report Templates should be used as a starting point for drafting purposes only. We do not guarantee approval of any reports drafted using these templates and highly recommend customizing them according to your organization’s requirements.</p>
    </div>
  </div>
</div>



For more information, see <a href="/en/gr/680414/#generate-aggregate-report-sections">Author Aggregate Reports: Generate Aggregate Report Sections</a>.

### 25R2 Update: Literature Inclusion in Aggregate Reports

With the 25R2 release, SafetyDocs extends aggregate reporting functionality by allowing users to mark specific _Literature Articles_ and _Literature Article Products_ for inclusion in aggregate reports. To configure your Vault for this feature, see <a href="/en/gr/862254/">Configure Literature Inclusion in Aggregate Reports</a>.

After you have configured this feature, see <a href="/en/gr/01239/#create-literature-articles">Manage the Literature Review Process</a> for more details. 

## Configure Vault-Provided Templates

Based on each organization's requirements, Admins can customize Vault-provided templates by adding or deleting Template Items or attaching document templates. In addition, you can create new custom templates to meet the requirements of different health authorities. 

To customize a default template, go to **Business Admin > Objects > Aggregate Report Templates**. Select the template and then select **Edit** to make your changes.

To create a custom template, complete the following steps:

1. Go to **Business Admin > Objects > Aggregate Report Templates** and select **Create**.
2. In the **Create Aggregate Report Template** dialog, select from the following options:
* **Global Aggregate Report Template**: For authoring reports that meet the requirements of this type of aggregate report globally.
* **Local Aggregate Report Template**: For authoring reports that meet the requirements of a specific health authority.
3. Complete the fields that appear and select **Save**.

### Add Aggregate Report Template Items

An Aggregate Report Template includes several Template Items, each mapped to a separate area of the report that requires authoring. When users run the **Generate Aggregate Report Sections** action on an **Aggregate Report** record, the system generates a **Section** record for each Template Item. All field values entered on Template Items are automatically copied to the corresponding fields on the generated Sections, reducing the need for repetitive data entry.

The Template Items of default templates are based on common requirements of global health authorities. Based on your organization's requirements, you can add Template Items to these default templates or to newly created custom templates.

To add a Template Item, go to an **Aggregate Report Template** record. In the **Aggregate Report Template Item** section, select **Create** and complete the fields that appear. 

#### Add Document Templates

Based on your organization's requirements, you can add document templates to each Template Item. These are placeholder documents that aggregate report authors will use as a starting point for drafting. 

When Template Items include document templates, after users generate Aggregate Report Sections, the system links each document template to the corresponding **Section** record. The template provides users with a document to begin authoring.

To add a document template, go to the **Aggregate Report Template Item** record under which you want to add the document template. In the **Document Template** field, select a document from the dropdown.   

#### Use Tokens for Source Report Prompts

When setting up a **Vault Report** type Template Item, you can use tokens in the **Source Report Prompt** field to represent the related field values. Every time a **Vault Report** type Section is created from this Template Item and the user generates a document from the linked report, the system replaces the token with the most updated value of the field it represents. This process eliminates the need for manually updating the source report prompt every time some information changes. 

 SafetyDocs supports the following dynamic tokens for source report prompts:

<table>
    <thead>
        <tr>
            <th>Token</th>
            <th>Source Field</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><code>${AggregateReport}</code></td>
            <td><strong>Aggregate Report</strong></td>
        </tr>
        <tr>
            <td><code>${ProductFamily}</code></td>
            <td><strong>Product Family</strong></td>
        </tr>
        <tr>
            <td><code>${DataPeriodStart}</code></td>
            <td><strong>Data Period Start</strong></td>
        </tr>
        <tr>
            <td><code>${DataPeriodEnd}</code></td>
            <td><strong>Data Period End</strong></td>
        </tr>
        <tr>
            <td><code>${HealthAuthority}</code></td>
            <td><strong>Health Authority</strong>
                <p>This field only applies to Local Sections.</p></td>
        </tr>
        <tr>
            <td><code>${ApplicableMarket}</code></td>
            <td><strong>Applicable Market</strong>
                <p>This field only applies to Local Sections.</p></td>
        </tr>
    </tbody>
</table>

