# Configuring the TMF Viewer

The TMF Viewer allows you to manage a TMF by browsing dynamically organized content and switching between multiple configured hierarchies.

<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>: This feature is only available on Clinical Operations eTMF Vaults.</p>
    </div>
  </div>
</div>



Vault structures the TMF Viewer in a hierarchical view, allowing users to view all documents for a single _Study_.

Users can further filter on _Study Country_ and _Study Site_ for more specific results.

The TMF Viewer pulls data based on:

  * **Reference Model**: The _TMF RM 3.0_, _TMF RM 2.0_, and _Vault Clinical Docs_ model object records. The hierarchy displays documents based on the mapping of a given type, subtype, or classification to the artifacts of a given model.
  * **Document Type Hierarchy**: The configured <a href="/en/gr/618/">document type</a> hierarchy as it appears in the expandable tree view at **Admin > Configuration > Document Types**.

Vault only displays sections on the TMF Viewer when those sections contain documents. If document types have not been mapped to a section within a view or no documents exist for a given section, the section will not appear.

## Configuration Overview

  * <a href="/en/gr/22824/#tab_permissions">Ensure relevant users have _View_ permission</a> for the **TMF Viewer** tab.
  * From **Admin > Configuration > Tabs**, select the _TMF Viewer_ tab and change its status to _Active_.
  * Change the status of the old _TMF Viewer_ tab to _Inactive_ if you do not want both tabs to show on users' navigation bars.
  * Determine which [view models][4] users can see in the TMF Viewer.
  * [Map documents to a view model][5] (_TMF RM 3.0_, _TMF RM 2.0_, _Vault Clinical Docs_) for them to appear when users select that view in the TMF Viewer. You can map a document type to a view model within the _Type Defaults_ tab of a document type's configuration.
  * Optional: [Exclude specific classifications][6] from appearing to users in the TMF Viewer when they select the Document Type Hierarchy view.

## View Models {#view-models}

View models define the hierarchy structure of the TMF Viewer. There are four (4) views to choose from:

  * TMF RM 2.0
  * TMF RM 3.0
  * Vault Clinical Docs
  * Document Type Hierarchy

### Enabling View Models {#enabling-view-models}

You can configure which view models are available for users to choose from in the TMF Viewer. To reveal a view model:

First, configure the user action on the _Model_ object:

  1. Navigate to **Admin > Configuration > Objects > Model > Actions > Create**.
  2. Select the **Toggle Display in TMF Viewer** action.
  3. Click **Continue** to review the details of the action.
  4. Click **Save**.

To reveal a specific view model to users:

  1. Navigate to **Admin > Business Admin > Models**
  2. From the **Actions** menu for the applicable _Model_ record, select **Toggle Display in TMF Viewer**.

### Reference Model Views

Each view has its own unique structure for organizing the documents of a _Study_. In order to have your documents appear in the TMF Viewer, you must map their document types to a view. To do this:

  1. Navigate to **Admin > Configuration > Document Types**.
  2. Click the **Actions** menu on a document type and click **Edit Details**.
  3. From the **Type Defaults** tab, select an artifact for each **Reference Model**. This will be the view that defines the section hierarchy for documents of this type.

Note that documents will only be visible in the TMF Viewer if the _Reference Model Versions_ (`model__v`) and _Artifacts_ (`hierarchy__v`) object fields of a document are populated. These fields indicate in which section Vault should display a document for a given view.

Documents transferred from a source Vault via <a href="/en/gr/53413/">TMF Transfer</a> are classified as _TMF Documents_. Vault displays these based on the value in the _Source Artifact_ (`source_artifact__v`) field rather than the values in the _Reference Model Versions_ (`model__v`) and _Artifacts_ (`hierarchy__v`) fields.

### Document Type Hierarchy View {#exclude}

You can exclude specific classifications from being displayed to users when they select the _Document Type Hierarchy_ view in the TMF Viewer. To do this, set the **Display in TMF Viewer** field to **No** on the corresponding _Clinical Document Type Detail_ record or on any parent _Clinical Document Type Detail_ record.

Users must have the _Read_ <a href="/en/gr/22824/#objectpermissions">permission</a> on the _Clinical Document Type Detail_ object in order to utilize the _Document Type Hierarchy_ view.

## Enabling Artifact Number

You can include the hierarchy item number in addition to the names on the hierarchical folder structure in the TMF Viewer. To enable this feature, navigate to **Admin > Settings > Application Settings** and set the **Enable Artifact Number on TMF Viewer Index** checkbox in the _eTMF Features_ section.

 [4]: #enabling-view-models
 [5]: #view-models
 [6]: #exclude
