# Importing Reference Documents

With the Integration to PubMed feature, users can search and import publication and other scientific literature metadata from PubMed directly into MedComms. Once the relevant literature is selected, Vault imports the related metadata, such as the author, journal, abstract, and so on, into a _Reference_ record and creates a document placeholder where a copy of the literature can be uploaded. This simplifies the process of importing scientific literature for substantiation and reduces the amount of manual data input required to maintain a reference library.

## Creating Reference Records

To create a _Reference_ record from PubMed: 

1. From the **Reference Record** tab, select **References**.
2. Click **Create**.
3. From the **References Import** section, search for and select scientific literature to import from PubMed using either the Digital Object Identifier (DOI) or PubMed ID (PMID), and click **Search**. 
4. Click **Save**.

Vault then creates a _Reference_ record with the PubMed metadata populated and creates _Author_, _Reference Person_, _Target_, and _Target Event_ records for the literature and relates them to the _Reference_ record, where they are displayed in the _Documents_ section of the record. Vault also creates a document placeholder, which points to the _Reference_ record, where you can upload a copy of the literature.

To refresh the _Reference_ record with the latest data from PubMed, edit the record and search PubMed again using the DOI or PMID. You can click the **Refresh** icon next to each field to automatically update the data and click **Save** to save the changes, and the updated fields will display with the new values.

## Creating Reference Documents

Vault automatically creates a document placeholder when a new _Reference_ record is created. The standard document type and document field [must be active][1] to automatically create the document placeholder.

To use custom document types to create a _Reference_ document, you have to manually upload the document and select it in the _Reference Document_ field. 

You can also associate related documents with the _Reference_ record in the _Documents_ section by clicking **Add**, selecting the relevant documents, and click **Close**.

## Configuring the PubMed Integration {#configuring-integration}

The standard PubMed integration allows users to import scientific literature and the associated metadata from PubMed into their Medical Vaults. 

To use this feature, Admins need to configure the following items:

1. Activate the _PubMed Integration Connection_ record under **Admin > Configuration > Objects**.
2. Identify your Client ID from <a class="external-link " href="https://www.ncbi.nlm.nih.gov/" target="_blank" rel="noopener">PubMed<i class="fa fa-external-link" aria-hidden="true"></i></a> by logging in to your account, selecting **Settings**, and locating the **API key**. Set the **API key** as your **Client ID** on the _PubMed Connection Authorization_ record.
3. Under **Admin > Configuration > Objects > Reference > Actions**, copy the _Reference_ object page action layout and set this as the default layout.
4. Optional: Activate the standard document type (`reference__v.publication__v`), and configure and activate the _Reference_ document field on the document type.
5. Activate the _Author_ object type on the _Person_ object under **Admin > Configuration > Objects > Person**.
6. Activate the _ORCID_ field, and add it to the _Person_ object page layout.
7. Optional: Activate the _Initials_ field, and add it to the _Person_ object page layout.
8. Activate the _Journal_ object type on the _Target_ object under **Admin > Configuration > Objects > Target**.
9. Activate the _Journal Issue_ object type on the _Target Event_ object under **Admin > Configuration > Objects > Target Event**.

## Related Permissions

Ensure that users have _Create_, _Edit_, _Read_, _View_, and _Delete_ permissions for the _Third-Party Reference_ application section and the _Reference_, _Person_, _Reference Person_, _Target_, and _Target Event_ objects.

Because Vault manages the creation and updating of records related to the _Reference_ object, we recommend that users have at least _Read_ permission for these related objects.

[1]: #configuring-integration
