# Enable the Japan Drug Dictionary

Set up and manage the Japan Drug Dictionary (JDD) for maintenance, case processing, and submissions.

## About the Feature 

Vault Safety supports the Japan Drug Dictionary (JDD), which is available when processing domestic and localized _Cases_ for Japan. This capability includes looking up and coding _External Products_ and _Substances_ with JDrug codes. For _Company Products_ in your _Product_ library, Vault continues to map codes from the _Local Product Code_ field of _Japan Product Registration_ records.

When new versions of the JDD are released, they are made available in your Vault. You control which version of the JDD Vault uses for coding.

Once enabled, <a href="/en/lr/01186/">Manage the Japan Drug Dictionary</a> describes how to maintain the dictionary and <a href="/en/lr/01163/">Code Japan Drug Dictionary Products</a> describes how to use this feature.

## Prerequisite

Your organization must maintain a valid JDD license to use the centralized JDD service.

## Add the Japan Drug Dictionary (JDD) Layout

To add the _JDrug Dictionary_ layout to your Vault:

1. Navigate to **Admin > Configuration > Objects > Dictionary > Layouts**.
2. Select **Create**.
3. On the **Add Layout** page, select **JDrug Dictionary** from the picklist, and then select **Create**.
4. On the **Dictionary: Record Name** page, in the **Details** section, replace the **Active JDrug Version** standard field with the <img class="inline" src="https://platform.veevavault.help/assets/images/saf-app-control.png" alt="Slider" style="" /> **Active JDrug Version** control field.
5. Insert a **Detail Form** section with the Section Label "System Information".
6. In the **System Information** section that you just created, add the following fields:
    * **Last Modified Date**
    * **Last Modified By**
    * **Created Date**
    * **Created By**
5. Select **Save**.

## Configure the Active Version Field on the JDD

To configure the _Active Version_ field to display which version of the JDD is active in your Vault:

1. Navigate to **Admin > Configuration > Objects > Dictionary > Fields**.
2. In the **Field** column, select **Active Version**, and then select **Edit**.
3. Edit the **Formula Expression** to match the following:<br>
`if(not(IsBlank(active_meddra_version__v)), text(active_meddra_version__v),`
`if(not(IsBlank(active_imdrf_version__v)), text(active_imdrf_version__v),`
`if(not(IsBlank(active_whodrug_version__v)), text(active_whodrug_version__v),`
`if(not(IsBlank(active_jdrug_version__v)), text(active_jdrug_version__v), ''))))`
4. Select **Save**. If an **Alert** message appears, select **OK**.

## Enable Fetch Dictionary Releases for the JDrug Dictionary

To enable the **Fetch Dictionary Releases** user action on the _JDrug Dictionary_ object type:

1. Navigate to **Admin > Configuration > Objects > Dictionary > Object Types**.
2. On the right side of the page, toggle to **Actions**.
3. In the **All Actions** menu, select **Edit Object Type Actions**.
4. In the **JDrug Dictionary** column, select the **Fetch Dictionary Releases** checkbox.
5. Select **Save**.

## Configure the Case Product Layout for Adding JDrug Codes to External Products

To configure the _JDrug_ field on _External Products_ for _Cases_ that are reportable to Japan: 

1. Navigate to **Admin > Configuration > Objects > Case Product > Layouts > External Product Page Layout**.
2. (Recommended) Move the **Country Obtained** field below the **Drug Role** field.
3. In the **Details** section, add the <img class="inline" src="https://platform.veevavault.help/assets/images/saf-app-control.png" alt="Slider" style="" /> **JDrug** control field. We recommend moving this field below the **Product (Reported)** field.
4. Select **Save**.

## Configure the Localized Case Product Layout

To configure the _Localized Case Product_ layout to support JDD coding on _Localized Cases_ reportable to Japan, navigate to **Admin > Configuration > Objects > Localized Case Product** and:
- <a href="#lookup-field">Create a lookup field for _Case Product_ _Type_</a>
- <a href="#update-layout">Update the layout</a>
- <a href="#layout-rule">Create a layout rule</a>

### <a id="lookup-field"></a>Create a Lookup Field for Case Product Type

To create a lookup field for _Case Product_ _Type_: 

1. On the **Fields** tab, select **Create**.
2. Complete the **Create Field** form with the following information:
    * **Field Type:** Lookup
    * **Label:** Case Product Type
    * **Name:** `case_product_type__c`
    * **Lookup Relationship:** Case Product (`case_product__vr`)
    * **Lookup Source Field:** Product Type
3. Select **Save**. If a system message appears, select **Continue**.
<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>: If the <strong>Lookup Source Field</strong> picklist includes multiple options for <strong>Product Type</strong>, you must select the first that appears in the list. The second is a Lookup field, which is not supported for an additional Lookup.</p>
    </div>
  </div>
</div>



### <a id="update-layout"></a>Update the Layout

To update the _Localized Case Product_ layout:

1. On the **Layouts** tab, select **Localized Case Product Detail Page Layout**.
2. Move the <img class="inline" src="https://platform.veevavault.help/assets/images/saf-app-control.png" alt="Slider" style="" /> **JDrug** control field below the **Product (Reported)** field.
3. Select **Save**.

### <a id="layout-rule"></a>Create a Layout Rule

To create a <a href="/en/lr/51632/">layout rule</a> so that the _JDrug_ field appears only when coding _External Products_ on a _Localized Case_ that is reportable to Japan:

1. From the **Localized Case Product Detail Page Layout** page, select **Layout Rules**.
2. Select **Create** and then configure the fields of the layout rule as follows:
    * **Label:**  Enter a label, for example, "Japan External".
    * **Hide the following Page Layout Items:**
        * **Type:** Fields
        * **Values:** Product (Coded), Registration Holder/Applicant, Local MPID
    * **IF this Layout Rule Expression is TRUE**:<br>`(case_product_type__cr.name__v = 'External Product') &&` <br>`(localization__cr.name__v != 'Japanese')`
3. Select **Save**.

## Add the Japan Drug Dictionary (JDD)

To add the Japan Drug Dictionary (JDD) to your Vault:

1. Navigate to **Business Admin > Objects > Dictionaries**.
2. Select **Create**.
3. In the **Create Dictionary** window, select **JDrug Dictionary** from the **Select Dictionary Type** picklist.
4. On the **Create JDrug Dictionary** page, in the **Name** field enter a name for the dictionary. For example, "JDrug Dictionary".
5. Select **Save**.

**Result**

The JDD is available in your Vault. Update the active dictionary version to make it ready for coding.

### Update the Active JDrug Version

When first adding the JDD, you must update the active dictionary version:

1. Navigate to **Business Admin > Objects > Dictionaries**.
2. On the **Dictionaries** page, select the **JDrug Dictionary** from the table to navigate to the **JDrug Dictionary** page.
    * When the list of available JDD versions is out of sync with the server, you see the following notification in the **Active JDrug Version** field: `The list of available JDrug versions is out of sync with the server. Please sync the JDrug versions to update the list.`
3. To sync the list of available JDrug versions:
    1. Open the **All Actions** menu.
    2. Select **Fetch Dictionary Releases**. Vault retrieves any new versions.
4. To activate a JDrug version:
    1. On the **JDrug Dictionary** page, select **Edit**.
    2. In the **Active JDRUG Version** field, select the desired dictionary version from the picklist.
    3. Select **Save**.

**Result**

Vault imports the selected version of the JDD. When the import is complete, you receive an email notification.

The status of the JDD becomes Active. When the **JDrug Browser** is used, the search results are based on the version selected.