# Enable Literature Integration to PubMed

With the 25R1 release, SafetyDocs enhances its literature monitoring capabilities by integrating directly with the <a class="external-link " href="https://pubmed.ncbi.nlm.nih.gov/" target="_blank" rel="noopener">PubMed literature database<i class="fa fa-external-link" aria-hidden="true"></i></a> to support automated literature searches and article intake. This feature improves review efficiency by running scheduled automated PubMed literature searches and then using the search results to automatically create and populate new _Literature Reviews_ and _Literature Articles_.

After you have enabled this feature, see the following articles for more information:
- <a href="/en/lr/825419/">Create Literature Search Groups</a>
- <a href="/en/lr/726859/">Create Literature Standard Search Terms</a>
- <a href="/en/lr/01239/">Manage the Literature Review Process</a>

## 26R1 Update: Literature Integration to PubMed Enhancements {#r261-update}

With the 26R1 release, SafetyDocs enhances Literature Integration to PubMed by: 
- Introducing weekly and monthly literature article search jobs
- Populating the URL on _Literature Articles_ sourced from PubMed
- Adding warnings on the _Search Term_ field of _Literature Search Terms_ to reduce errors during automated searches

See [Configure Literature PubMed Integration Enhancements][10] to configure your Vault for this feature.

## Prerequisites

To enable Literature Integration to PubMed in your Vault, you must: 
- Have a PubMed account
- <a href="/en/lr/01318/">Enable Literature Review Process Management</a>

## Overview

To enable Literature Integration to PubMed in your Vault:
- [Enable the PubMed integration][1]
- Configure the [daily][2], [weekly][14], or [monthly][15] _Literature Article Search_ job, depending on your organization's business needs<sup><a href="#select-search-job">1</a></sup>
- [Update object layouts][3]
- [Configure the _Search Database_ action][4]
- [Grant _Literature Search Group_ object permissions][9]

<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>: 1.<a id="select-search-job"></a> Vault supports daily, weekly, or monthly automated PubMed literature article search jobs. Configure the option that meets your organization’s business needs.</p>
    </div>
  </div>
</div>



## Enable the PubMed Integration

To enable an integration connection between your Vault and the PubMed literature database:
1. <a class="external-link " href="https://support.nlm.nih.gov/kbArticle/?pn=KA-05317" target="_blank" rel="noopener">Generate an API key using your PubMed (NCBI) account<i class="fa fa-external-link" aria-hidden="true"></i></a>.
2. Copy your newly generated API key.
3. In SafetyDocs, navigate to **Admin > Connections > Literature Database: PubMed**.
4. In the _Details_ section, select the **Literature Database: PubMed** record in the _Authorization_ field.
5. From the _Client Credential: Literature Database: PubMed_ page, select **Edit**.
6. Paste your API key into the **Client ID** field.
7. Select **Save**.
8. Navigate back to the parent _Connection_ record by selecting the **Literature Database: PubMed** link at the top of the page.
9. Within the _Details_ section, ensure the _URL_ field contains the following value: `https://eutils.ncbi.nlm.nih.gov/entrez/eutils`
10. Optional: In the **Authorized Connection User** field, select a user to receive notifications if Vault encounters any PubMed connection errors. 
11. Update the record's status to **Active**.
12. In the dialog that appears, select **Yes** to confirm the state change and activate the connection.     


## Optional: Configure the Literature Article Daily Search Job {#configure-daily-search-job}

To enable the _Literature Article Daily Search Job_<sup><a href="#select-search-job">1</a></sup> in your Vault:

1. Navigate to **Admin > Operations > Job Definitions > Literature Article Daily Search Job**.
2. Select **Edit**.
3. In the **Status** drop-down, select **Active**.
4. Optional: Update the **Job Owner** value to change to whom Vault sends job notifications.
5. Optional: Update the **Vault Time** value to change when Vault runs this job.
6. Select **Save**.

Every day at the specified time, the _Literature Article Daily Search_ job searches the PubMed database and creates new object records using the following flow:

1. <a id="job-created-records"></a> Vault compiles a list of all _Active_-state <a href="/en/lr/726859/">_Literature Standard Search Terms_</a> with an _Enable Automatic Search_ field value of _Enabled_.
2. For each unique _Literature Standard Search Term_ found, Vault creates a new <a href="/en/lr/01239/#create-a-literature-review">_Literature Review_</a> and populates the fields using data on the originating _Literature Standard Search Term_.
3. For each new _Literature Review_, Vault creates a child <a href="/en/lr/01239/#search-terms">_Literature Search Term_</a> and populates its fields using data on the originating _Literature Standard Search Term_.
4. For each new _Literature Search Term_, Vault searches the PubMed database using its _Search Term_ field value.
5. For each search result, Vault creates a new <a href="/en/lr/01239/#create-literature-articles">_Literature Article_</a> and populates its fields using data from the PubMed search result and data from the originating _Literature Review_ and _Literature Search Term_.
    - If the search result duplicates an existing _Literature Article_, Vault updates the newly created _Literature Article_'s status and duplicate-related fields to reflect this.
6. Vault uses the current time to update the following field values:
    - The _Search Execution Time_ field value on the _Literature Search Term_ 
    - The _Last Search Date_ field value on the _Literature Standard Search Term_

If Vault encounters any errors connecting to PubMed or creating new records, a notification email is sent to the _Authorized Connection User_ on the [_Literature Database: PubMed Connection_ record][1]. 


## Update Object Layouts

To enable Literature Integration to PubMed, update layouts for the following objects:
- [_Literature Standard Search Term_][5]
- [_Literature Review_][6]
- [_Literature Article_][7]
- [_Literature Search Term_][8]


### Update the Literature Standard Search Term Layout

To configure the _Literature Standard Search Term_ object layout:

1. Navigate to **Admin > Configuration > Objects > Literature Standard Search Term > Layouts > Literature Standard Search Term Detail Page Layout**.
2. In the _Details_ section, <a href="/en/lr/26387/#how-to-add-object-fields">add</a> the following fields:
    - **Search Group**
    - **Enable Automatic Search**
    - **Last Search Date** 
3. Select **Save**.
4. Select **Layout Rules**.
5. Select **Create** and populate the field values as follows:
    - **Label**: `Hide Automatic Search`
    - **IF this Layout Rule Expression is TRUE**: `search_database__vr.name__v != 'PubMed'`
    - **Apply the following display effects**:
        - **Effect**: Hide
        - **Type**: Fields
        - **Values**: Enable Automatic Search, Last Search Date
6. Select **Save**.


### Update the Literature Review Layout

To configure the _Literature Review_ object layout:

1. Navigate to **Admin > Configuration > Objects > Literature Review > Layouts > Literature Review Detail Page Layout**.
2. In the _Details_ section, <a href="/en/lr/26387/#how-to-add-object-fields">add</a> the **Literature Search Group** field.
3. Select **Save**.


### Update the Literature Article Layout
 
To configure the _Literature Article_ object layout:

1. Navigate to **Admin > Configuration > Objects > Literature Article > Layouts > Literature Article Detail Page Layout**.
2. In the _Article Details_ section, <a href="/en/lr/26387/#how-to-add-object-fields">add</a> the following fields:
    - **PubMed ID**
    - **Medline ID**
3. Select **Save**.

### Update the Literature Search Term Layout

To configure the _Literature Search Term_ object layout:

1. Navigate to **Admin > Configuration > Objects > Literature Search Term > Layouts > Literature Search Term Detail Page Layout**.
2. In the _Details_ section, <a href="/en/lr/26387/#how-to-add-object-fields">add</a> the **Search Execution Time** field.
3. Select **Save**.


## Configure the Search Database Action

To configure the _Search Database_ action, add the action as a <a href="/en/lr/59885/#define-actions">user action</a> to the _Active_ state of the _Literature Search Term Lifecycle_. 

## Grant Literature Search Group Object Permissions

Ensure your <a href="/en/lr/22824/#object-permissions">permission sets</a> are updated to grant the appropriate level of access for users to the _Literature Search Group_ object according to your organization's process. Manage object permissions from **Admin > Users & Groups > Permission Sets > Literature Actions > Objects > Literature Search Group**.

We recommend granting the following _Literature Search Group_ object permissions:

- **Read**
- **Create**
- **Edit**

## (26R1) Configure Literature Integration to PubMed Enhancements {#r261-configure}

To configure Literature Integration to PubMed Enhancements in your Vault:
- [Update the _Literature Search Term_ object layout][11]
- [Configure field defaults for the _Literature Search Term_ object][12]
- [Update the custom _Literature Actions_ permission set][13]
- Configure the [daily][2], [weekly][14], or [monthly][15] _Literature Article Search_ job, depending on your organization's business needs<sup><a href="#select-search-job">1</a></sup>

### Update the Literature Search Term Object Layout {#update-literature-search-term-object-layout}

To update the _Literature Search Term_ object layout:
1. <a href="/en/lr/26387/#save-as-layout">Copy the standard layout</a> for the _Literature Search Term_ object and ensure the new layout is <a href="/en/lr/26387/#object-type-layout">active</a>.
2. Within the copied layout, activate the _Standard Search Term Selected_ <a href="/en/lr/51632/#accessing-layout-rules">layout rule</a>.
3. <a href="/en/lr/26387/#set-a-default-layout">Set the copied layout as the default</a>.
4. <a href="/en/lr/26387/#delete-a-layout">Delete</a> any other existing custom layouts.

### Configure Field Defaults for the Literature Search Term Object {#configure-field-defaults}

Configure <a href="/en/lr/42778/#how-to-set-a-field-default">field defaults</a>  on the _Literature Search Term_ object as follows:
- **Literature Database**: Enter `standard_search_term__vr.search_database__v`
- **Product**: Enter `standard_search_term__vr.product__v`
- **Product Family**: Enter `standard_search_term__vr.product_family__v`
- **Search Term**: Enter `standard_search_term__vr.search_term__v`

### Update the Custom Literature Actions Permission Set {#update-literature-actions-permission-set}

Ensure your <a href="/en/lr/22824/#objectpermissions">permission sets</a> are updated to grant the appropriate level of access for users according to your organization's process:

1. Navigate to **Admin > Users & Groups > Permission Sets** and select the custom **Literature Actions** permission set.
2. Navigate to the **Objects** tab and select the **Literature Search Term** object.
3. Under the _Object Control Permissions_ section, select **Edit**, then add **View** permissions for the _Search Term_ object control.
4. Select **Save**.

### Optional: Configure the Literature Article Weekly Search Job {#configure-weekly-search-job}

To enable the _Literature Article Weekly Search Job_<sup><a href="#select-search-job">1</a></sup> in your Vault:

1. Navigate to **Admin > Operations > Job Definitions > Literature Article Weekly Search Job**.
2. Select **Edit**.
3. In the **Status** drop-down, select **Active**.
4. Optional: Update the **Job Owner** value to change to whom Vault sends job notifications.
5. Optional: Update the **Days of the Week** checkboxes to change the day on which Vault runs this job. 
6. Optional: Update the **Vault Time** value to change when on the selected days Vault runs this job.
7. Select **Save**.

Every week on the specified day and time, the _Literature Article Weekly Search Job_ searches the PubMed database and creates new object records [following the same logic as the _Literature Article Daily Search Job_][16].

### Optional: Configure the Literature Article Monthly Search Job {#configure-monthly-search-job}

To enable the _Literature Article Monthly Search Job_<sup><a href="#select-search-job">1</a></sup> in your Vault:

1. Navigate to **Admin > Operations > Job Definitions > Literature Article Monthly Search Job**.
2. Select **Edit**.
3. In the **Status** drop-down, select **Active**.
4. Optional: Update the **Job Owner** value to change to whom Vault sends job notifications.
5. Optional: Update the **Repeat By** value to define whether Vault runs this job on a specified day of the week or day of the month.
   * If you select **Day of Month**, select a value from the **Repeat on Day** drop-down to define the specific day of the month.
   * If you select **Day of the Week**, select values in the **Repeat on** drop-downs to define the specific day of the week.
6. Optional: Update the **Vault Time** value to change when on the selected day Vault runs this job.
7. Select **Save**.

Every month on the specified day and time, the _Literature Article Monthly Search Job_ searches the PubMed database and creates new object records [following the same logic as the _Literature Article Daily Search Job_][16].

[1]: #enable-the-pubmed-integration
[2]: #configure-daily-search-job
[3]: #update-object-layouts
[4]: #configure-the-search-database-action
[5]: #update-the-literature-standard-search-term-layout
[6]: #update-the-literature-review-layout
[7]: #update-the-literature-article-layout
[8]: #update-the-literature-search-term-layout
[9]: #grant-literature-search-group-object-permissions
[10]: #r261-configure
[11]: #update-literature-search-term-object-layout
[12]: #configure-field-defaults
[13]: #update-literature-actions-permission-set
[14]: #configure-weekly-search-job
[15]: #configure-monthly-search-job
[16]: #job-created-records