# Configuring Constraints (RIM)

The _Constraint_ object allows you to define constraints or filters for values used in object records. When data values or attributes have a hierarchical relationship to other categorical values, constraints can add control and ensure specificity of data at the time and point of entry.



<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 available on all RIM application Vaults, however constraints are not supported when <a href="/en/lr/47965/#copying-rlcp">copying report level content plans</a>.</p>
    </div>
  </div>
</div>



## Filtering the _Application Type_

In the _Application_ object, you can filter the _Application Type_ field based on the _Region_ and _Lead Market_ _Country_. This restricts the _Application Type_ picklist to only display specific values (defined in the _Controlled Vocabularies_ object) relevant to the previous selections of _Region_ and _Lead Market Country_. To facilitate this, create a _Constraint_ record and select the applicable **Region**, **Country**, and **Application Type** in the CV_1 field.

## Filtering the _Clinical Study Subtype_

You can create a _Constraint_ record to filter _Clinical Study Subtype_ based on _Clinical Study Type_. In the _Constraint_ record, select **CV_1** as the _Clinical Study Type_, and select **CV_2** as _Clinical Study Subtype_. The _Region_ and _Country_ fields are left blank in this example.

## Mapping Global & Local Terms

Along with the related RIM application [settings](/en/lr/53688/#submission-type-mapping), you can create or update _Constraint_ records which operate in tandem with _Controlled Vocabulary_ records to allow users to select a preferred global term for _Submission Type_, _Submission Subtype_, and _Manufacturing Site Role_ when creating records in bulk.

For _Manufacturing Site Roles_, Vault also uses these records during [bundling](/en/lr/49520/) or [splitting](/en/lr/50022/), where the underlying _Constraint_ records are referenced to populate a global value (defined on the _Event_ relationship record) to the local _Manufacturing Site Role_ term on the new _Regulatory Objective_ relationship record.

To expedite this process, you can download a set of sample _Constraint_ and _Controlled Vocabulary_ records from the <a class="external-link " href="https://support.veeva.com/hc/en-us/sections/360007944254-Vault-RIM" target="_blank" rel="noopener">Vault Regulatory Updates<i class="fa fa-external-link" aria-hidden="true"></i></a> page for the current General Release in the Veeva Product Support Portal.



<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>: The <em>Enable Global to Local Manufacturing Site Role Mapping</em> setting and related <em>Manufacturing Site Role</em> Constraints are supported for <a href="/en/lr/59835/">bulk record creation</a>, as well as <a href="/en/lr/50545/">bundling and splitting</a>. They are not supported when <a href="/en/lr/77853/">dispatching</a> a <a href="/en/lr/77855/#manufacturing-site-role-note">global content plan</a>.</p>
    </div>
  </div>
</div>



### Mapping Submission Type & Submission Subtype Terms {#mapping-submission-type-and-subtype}



<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 only supports a <a href="/en/lr/43081/#supported-constraint-scopes-and-appplication-object-type-combinations">specific set</a> of Constraint Scope and Application object type combinations.</p>
    </div>
  </div>
</div>



To allow users to select preferred global terms for the _Submission Type_ and _Submission Subtype_ when creating records in bulk:

  1. Create two _Controlled Vocabulary_ records and set the _Controlled Vocabulary Type_ field to _Global Submission Type_ and _Global Submission Subtype_, respectively.
  2. Create two additional _Controlled Vocabulary_ records with the _Controlled Vocabulary Type_ field set to _Submission Type_ and _Submission Subtype_, respectively. Your Vault may already have records of these types, which you can repurpose for this configuration.
  3. Create a _Constraint_ record and select _Global to Local Submission Type_ as the **Constraint Type**. To map submission types, select the new _Global Submission Type_ _Controlled Vocabulary_ record (from Step 1) for **CV_1**, and the new _Submission Type_ _Controlled Vocabulary_ record for **CV_2** (Step 2). To map submission subtypes, select the new _Global Submission Subtype_ _Controlled Vocabulary_ record (from Step 1) for **CV_3**, and the new _Submission Subtype_ _Controlled Vocabulary_ record for **CV_4**. Additionally, populate values for the **Region**, **Country**, and **Constraint Scope** for the application (_Investigational_, _Marketing_, _Site Registration_, or _Substance_).

These mapping records can replace any existing _Planned Submission_ _Constraint_ records in use in your Vault.

#### Supported Constraint Scope & Application Object Type Combinations {#supported-constraint-scopes-and-appplication-object-type-combinations}

This feature currently supports the below _Constraint Scope_ and _Application_ object type combinations.

| Constraint Scope           | Application Object Types               |
|----------------------------|----------------------------------------|
| `investigational__c`       | `investigational_application__c`       |
| `marketing_application__c` | `marketing__c`                         |
| `site_registration__c`     | `site_registration_application__c`     |
| `substance__c`             | `substance_application__c`             |
| `investigational__v`       | `investigational_device_application__v`<br>`investigational_drug_application__v`|
| `marketing__v`             | `marketing_device_application__v`<br>`marketing_drug_application__v`|
| `manufacturing_site__v`    | `manufacturing_site_application__v`    |
| `substance__v`             | `substance_application__v`             |

### Mapping Manufacturing Site Role Terms {#mapping-manufacturing-site-role}

To populate the local _Manufacturing Site Role_ term on records created in bulk, or via bundling and splitting, you must first configure the following:

  1. Within each _Event_ relationship object (for example, _Event Product_), ensure any Criteria VQL configured for the _Manufacturing Site Role_ field only allows for global site role values.
  2. Within each _Application_, _Submission_, _Regulatory Objective_, and _Registration_ relationship object (for example, _Application Active Substance_ and _Registered Indication_), ensure any Criteria VQL configured for the _Manufacturing Role_ field only allows for local site role values.
  3. Review your Vault's _Application_ object types and their corresponding _Constraint Scope_ picklist values. For each _Application_ object type (for example, _Investigational Application_), ensure the object type is represented in the list, and that the configured Picklist Value Name matches the object type name (`investigational_application__c`).

Then, create _Controlled Vocabulary_ and _Constraint_ records such that each global value for each market has one and only one corresponding local value:

  1. Create a _Controlled Vocabulary_ record and select **Global Site Role** as the **Controlled Vocabulary Type**.
  2. Create a second _Controlled Vocabulary_ record and set the _Controlled Vocabulary Type_ field to _Local_ _Manufacturing Site Role_.
  3. Create a _Constraint_ record and select _Site Role_ as the **Constraint Type**. To map site roles, select the new _Global Site Role_ _Controlled Vocabulary_ record (from Step 1) for **CV_1**, and the new _Local Manufacturing Site Role_ _Controlled Vocabulary_ record (from Step 2) for **CV_2**. Additionally, populate values for the **Region**, **Country**, and **Constraint Scope** for the application (_Investigational_, _Marketing_, _Site Registration_, or _Substance_).

## Using the _Template Constraint Type_ Field

Using the _Template Constraint Type_ picklist field, you can apply template constraints at an additional level defined by your organization, beyond the agency-driven values for _Region_, _Country_, _Application Type_, _Submission Type_, _Submission Subtype_, and _Supplement Effective Date_.

For example, a _Submission Type_ of _Variation Type IA_ in the European Union will require different sections to be included in the content plan, depending on whether it is for CMC, clinical, or labeling. To further constrain based on these values, you can add _CMC_, _Clinical_, and _Labeling_ as _Template Constraint Type_ [picklist](/en/lr/1269/) values, then create corresponding _Application and Submission Constraint_ and _Content Plan Template Constraint_ records with characteristics defined in the table below.

|  | _Template Constraint Type_ | _Constraint Option_ | Template Constraints |
|---|---|---|---|
| Constraint 1 | CMC | Exclude | 4 Nonclinical Study Reports and 5 Clinical Study Reports for _eCTD Content Plan Template_ |
| Constraint 2 | Clinical | Exclude | 3 Quality and 4 Nonclinical Study Reports for _eCTD Content Plan Template_ |
| Constraint 3 | Labeling | Exclude | M2 Common Technical Document Summaries, 3 Quality, 4 Nonclinical Study Reports, and 5 Clinical Study Reports for _eCTD Content Plan Template_ |

Using the sample data, if you create a submission with a _Template Constraint Type_ of _Labeling_ and a new submission content plan using the _eCTD Content Plan Template_, a new submission content plan is created with only the 1 Administrative Information section, while sections 2 Common Technical Document Summaries through 5 Clinical Study Reports are excluded.

## Supporting Certification Bodies in Multiple Markets

Though RIM Vaults support medical device applications in the European Union (EU) with the _Organization Type_ picklist value _Notified Body_, your MedTech organization may need to support other markets with similar Health Authority-authorized certification bodies, such as the United Kingdom (Approved Body), Australia (Conformity Assessment Body), United States (Third Party Review Organization), and Japan (Registered Certification Body).

To do this, you can configure your Vault's _Constraint_ and supporting records as follows:

1. Relabel the _Notified Body_ (`notified_body__v`) value within the _Organization Type_ picklist to _Certification Body_.
2. Activate the _Certification Body_ value within the _Constraint Scope_ picklist.
3. Within the _Constraint_ object:
    * Activate the _Region Specific Entry_ standard object type (`region_specific_entry__v`)
    * Add all fields used in the custom _Region Specific Entry_ object type (`region_specific_entry__c`) to the newly activated standard object type
    * Create an object page layout for the _Region Specific Entry_ object type
4. Within the _Application_ object:
    * Relabel the _Notified Body_ (`notified_body__v`) field to _Certification Body_.
    * Add the following recommended help text: "A non-HA organization that has been designated, accredited, or authorized by the HA to assess submissions against local regulations. May be referred to as Notified Body, etc."
    * Add criteria VQL to the _Certification Body_ field such that Vault will display only _Organizations_ from _Constraints_ which meet the following criteria:
        * _Organization_ has an _Organization Type_ of `notified_body__v`
        * _Constraint_ has a `region_specific_entry__v` object type
        * _Constraint_ has an _Applicable Product Type_ of _Medical Device_
        * _Constraint_ has a _Country_ which matches the _Lead Market_ on the _Registration_
5. Within all _Application_ object types, apply object page layout rules to display the _Certification Body_ field when the _Lead Market_ field is any country which uses a certification body, for example the EU.
6. Within the _Registration_ object, add criteria VQL to the _Certification Body_ (`cerification_body__c`) field such that Vault will display only _Organizations_ from _Constraints_ which meet the following criteria:
    * _Organization_ has an _Organization Type_ of `notified_body__v`
    * _Constraint_ has a `region_specific_entry__v` object type
    * _Constraint_ has an _Applicable Product Type_ of _Medical Device_
    * _Constraint_ has a _Country_ which matches the _Lead Market_ on the _Registration_
7. Add the _Certification Body_ field to any applicable medical device _Registration_ object types, including:
    * _Investigational Device Registration_
    * _Marketed Device Registration_
    * _Manufacturing Site Registration_

Once this preliminary configuration is complete:

1. Use Vault Loader to [update existing _Constraint_ records][3] using the custom object type to use the new standard _Region Specific Entry_ object type. Then, inactivate the custom _Region Specific Entry_ object type.
2. Create new _Constraint_ records of the _Region Specific Entry_ type, selecting a _Country_ and _Organization_, as well as the following:
    * _Constraint Scope_: Certification Body
    * _Applicable Product Type_: Medical Device

## Dynamic Procedure Countries {#dynamic-procedure-countries}

When users [create Registrations](/en/lr/43102/) in bulk for centrally authorised procedures, Vault can reference the _Application_'s _Procedure Type_ value to dynamically populate default countries based on Region Specific Entry _Constraints_ for that procedure. When the constraint defines a Health Authority, Vault also populates this value in the resulting registrations.

To do this:

1. In **Admin > Settings > Application Settings**, enable the **Enable dynamic procedure countries in Create Registrations** [setting](/en/lr/53688/#dynamic-procedure-countries).
2. Create _Constraint_ records of the _Region Specific Entry_ type for each relevant country, populating minimum values as follows:
    * **Region** and **Country** as applicable
    * **Constraint Scope**: _Procedure Type Country_
    * **CV_1**: _Centralised Procedure_
    * Optional: **Health Authority** as applicable

When the setting is enabled without configured _Constraint_ records, Vault defaults the _Application_'s countries in the wizard.

## Constraint Types

Object types are automatically enabled on the _Constraint_ object, including the default _Application and Submission_ object type. You can configure additional custom object types, which will allow you to create new _Constraint_ records and configure page layouts using specific object types.

For example, you can hide the _Region_, _Country_, _CV\_3_, and _CV\_4_ fields from a _Constraint_ record that defines a _Clinical Study Type_ – _Clinical Study Subtype_ reference relationship. You can also set a dynamic reference constraint on _CV\_1_ and _CV\_2_ to filter _Clinical Study Types_ and _Clinical Study Subtypes_, respectively, from _Controlled Vocabularies_.

By default, Vault sets all new records to the _Application and Submission_ object type. You can choose to set custom-created _Constraint_ object types as the default.

## Updating the Object Type on Existing Constraints {#updating-the-object-type-on-existing-constraints}

You can use [Vault Loader](/en/lr/26597/ ) to assign the _Application and Submission_ object type to existing _Constraint_ records. This object type is used to populate the _Constraint_ picklist when you extract from **RIM Maintenance**, and allows you to extract [content plan templates based on constraints](/en/lr/46496/ ) specific to _Application and Submission_ and use filtering to create more contextual content plans.

You cannot update the object type for existing _Constraint_ records in bulk. To update object types, you first must use Vault Loader to export existing constraints to a CSV file. Then, you can delete existing records in your Vault and load new records using the **Create** action.

### Extract Existing Constraints

To extract existing constraints:

  1. Navigate to the **Loader** tab.
  2. In the left panel, click **Extract**.
  3. From the **Object Type** drop-down, select **Constraints**.
  4. Select the **Override Default Column Selection** checkbox and [select columns to extract][4].
  5. Click **Extract**. When Vault finishes processing the request, you'll receive a Vault notification and email with request details and a CSV file.

#### **Column Selection** {#columns}

To help identify which constraints need to be updated, we recommend adding the following columns to include in the extract:

  * status\_\_v (required)
  * region\_\_regulatory (required)
  * region\_\_regulatory.name\_\_v
  * country__rim (required)
  * country\_\_regulatory.name\_\_v
  * object\_type\__v (required)
  * object\_type\_\_v.name\_\_v
  * cv\_1\__rim (required)
  * cv\_1\_\_regulatory.name\_\_v
  * cv\_2\__rim (required)
  * cv\_2\_\_regulatory.name\_\_v
  * cv\_3\__rim (required)
  * cv\_3\_\_regulatory.name\_\_v
  * cv\_4\__rim (required)
  * cv\_4\_\_regulatory.name\_\_v

### Preparing the CSV Input File

In order to successfully assign existing constraints to the _Application and Submission_ object type, you need to enter the correct object type ID in the _object\_type\__v_ field. You can obtain the object type ID by clicking on each **object type** defined for the _Constraint_ object. Additionally, you must delete specific columns to avoid errors when uploading your CSV input file.

To prepare the CSV input file:

  1. Download and open the CSV file that you extracted.
  2. Locate the _region\_regulatory.name\__v_, _country\_\_regulatory.name\_\_v_, and _object\_type\__v_ columns.
  3. For any record identifying a constraint for the _Application Type_, _Submission Type_, _Submission Subtype_, and _Supplemental Effective Date Type_ (usually this will be a record without a blank _region\_regulatory.name\__v_ or _country\_\_regulatory.name\_\_v_ column, but not always) enter the ID for the _Application and Submission_ object type in the corresponding **object\_type\__v** column.
  4. Delete the [columns][5] listed below. If any of these columns remain in your CSV file, the **Create** action will fail when loading your file.
  5. Save the CSV file.

#### **Columns to Delete** {#columns-to-delete}

You must delete the following columns from your CSV file in order for Vault to create _Constraint_ records correctly:

  * id
  * name__v
  * region\_\_regulatory.name\_\_v
  * country\_\_regulatory.name\_\_v
  * object\_type\_\_v.name\_\_v
  * cv\_1\_\_regulatory.name\_\_v
  * cv\_2\_\_regulatory.name\_\_v
  * cv\_3\_\_regulatory.name\_\_v
  * cv\_4\_\_regulatory.name\_\_v

### Delete Existing Constraints

Because you cannot update the object type for existing _Constraint_ records in bulk, you must [bulk delete](/en/lr/33725/ ) all existing _Constraint_ records before uploading your CSV file.

### Creating New Constraints

After you delete existing records, you can use your CSV input file to create new _Constraint_ records:

  1. Navigate to the **Loader** tab.
  2. In the left panel, click **Load**.
  3. For the **CSV File**, click **Choose** and select the CSV input file.
  4. In the **Object Type** drop-down, select **Constraints**.
  5. In the **Action Type** drop-down, select **Create**.
  6. Click **Start Load**. When finished, you'll receive a Vault notification and email with request details and CSV output files.

## Related Permissions

The following permissions control your ability to configure constraints:

<table class="wbord">
  <tr>
    <td style="width: 59.375px;">
      <p>
        <strong>Type</strong>
      </p>
    </td>
    <td style="width: 164.931px;">
      <p>
        <strong>Permission Label</strong>
      </p>
    </td>
    <td style="width: 568.264px;">
      <p>
        <strong>Controls</strong>
      </p>
    </td>
  </tr>
  <tr>
    <td style="width: 59.375px;">
      <p>
        Security Profile
      </p>
    </td>
    <td style="width: 164.931px;">
      <p>
        Application: RIM Maintenance
      </p>
    </td>
    <td style="width: 568.264px;">
      <p>
        Ability to navigate to the <strong>RIM Maintenance</strong> tab.
      </p>
    </td>
  </tr>
  <tr>
    <td style="width: 59.375px;">
      <p>
        Security Profile
      </p>
    </td>
    <td style="width: 164.931px;">
      <p>
        Objects: Create, Delete
      </p>
    </td>
    <td style="width: 568.264px;">
      <p>
        Ability to load <em>Content Plan Template Constraints</em> through the <strong>Load</strong> action on the <strong>RIM Maintenance</strong> tab.
      </p>
    </td>
  </tr>
  <tr>
    <td style="width: 59.375px;">
      <p>
        Security Profile
      </p>
    </td>
    <td style="width: 164.931px;">
      <p>
        Objects: Read
      </p>
    </td>
    <td style="width: 568.264px;">
      <p>
        Ability to view <em>Content Plan Template</em>, <em>Content Plan Item Template</em>, <em>Constraint</em>, and <em>Content Plan Template Constraints</em> through the <strong>Extract</strong> action on the <strong>RIM Maintenance</strong> tab.
      </p>
    </td>
  </tr>
</table>

 [3]: #updating-the-object-type-on-existing-constraints
 [4]: #columns
 [5]: #columns-to-delete
