# Configuring Recurrence Check (QMS)

The QMS Recurrence Check feature is an intelligent and streamlined interface for users to determine whether an event, such as a _Quality Event_ or _Complaint_ is a recurrence of another event. With this feature configured, Vault can simplify a complex manual process with a simple user or entry action where text search terms are automatically suggested by Vault. When executed, the user is shown a set of potential records along with their similarity score in a side-by-side comparison user interface. When the analysis is complete, Vault stores the results and automatically links recurrent events by creating applicable related event records, depending on your configuration. If configured, Vault may also provide insights following recurrence check completion to advise next steps according to your organization's processes.

The Recurrence Check feature supports standard and custom object types on the _Complaint_ object and all object types on the _Quality Event_ object, as well as the _Change Control_, _Change Plan_, _Deviation_, _Finding_, _Lab Investigation_, _Continuous Improvement_, _Nonconformance_, and _MedTech CAPA_ objects.

<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>: Base object types are not available for configuration, even if they are active.</p>
    </div>
  </div>
</div>



The configuration steps for those objects and object types are described below, and the objects are collectively referred to as the "supported object" in this article.

## Configuration Overview

Complete the following steps to enable the Recurrence Check feature:

  * Optional: Configure <a href="/en/gr/981284/#record-checks-suggestions">Quality Automated Language Translations</a>
 on <a href="/en/gr/981284/#supported-objects">supported objects</a>
 to allow users to search and match with translated field data.
  * Configure <a href="/en/gr/70474/">Quality Relationship Automation</a>
 for the relevant supported object or object type.
  * Add the _Run Quality Record Check_ [user or entry action][3] to the supported object lifecycle for the relevant object type.
  * Optional: Add the [_Match Criteria_][4] object control to the _Details_ section of applicable _Record Check Result_ object layouts to allow users to modify date and match field overrides.
  * Add the _Record Check Result_ and _Record Check Result State_ fields to the relevant object type.
  * Create [_Quality Record Checks_][4] as needed for your business processes.
  * Optional: [Enable an application setting][9] to give users the ability to specify terms that all matching records must contain.
  * Add the _Generate Document From Report_ action to the [_Record Check Result_][6] lifecycle.
  * Configure the [Recurrence Check Insights page][8] for the desired _Quality Record Checks_.

##  Configuring the Run Quality Record Check Action for Recurrence {#entry-action}

In order for users to have access to recurrence check functionality at the appropriate stage in the supported object's lifecycle, you must make the _Run Quality Record Check_ user or entry action available in that lifecycle state.

To configure the user action:

  1. Navigate to **Admin** > **Configuration** > **Object Lifecycles** and click into the supported object lifecycle.
  2. In the _States_ section, click into the lifecycle state in which you want users to run their recurrence check. For example, select the _Closed_ state to allow users to check for recurrence after the _Quality Event_ has been finalized.
  3. In the _User Actions_ section, click **Edit**.
  4. Click **Create Rule**.
  5. If configuring the action for a _Quality Event_ object type, select **Perform with Conditions**, and select **Quality Event Type** > **equals** > **[object type]**.
  6. Select **Run Quality Record Check** from the _Allow the following actions_ drop-down.
  7. Select an appropriate _Quality Record Check_ from the **Available Quality Record Checks** drop-down. See below for _Quality Record Check_ [configuration instructions][4].
  8. Select the **Allow user to override discovered match terms** checkbox to allow modification of search terms in a pop-up dialog after the user performs the action.
  9. Add an _Action Label_ for the action.
  10. Click **Save**.

To configure the entry action:

  1. Navigate to **Admin > Configuration > Object Lifecycles** and click into the supported object lifecycle.
  2. In the _States_ section, click into the lifecycle state in which you want the recurrence check to be executed as an entry action. For example, select the _Define Team_ state to allow Vault to check for recurrence after the _Quality Event_ has been created.
  3. In the _Entry Actions_ section, click **Edit**.
  4. Click **Create Entry Action**.
  5. Choose whether the entry action rule will **Always** apply or should only **Perform with conditions**. See details for <a href="/en/gr/59885/#conditions">defining conditions</a>
.
  6. If configuring the action for a _Quality Event_ object type, select **Perform with Conditions**, and select **Quality Event Type > equals > [object type]**.
  7. Select **Run Quality Record Check** from the _Allow the following actions_ drop-down.
  8. Select an appropriate _Quality Record Check_ from the **Available Quality Record Checks** drop-down. See below for _Quality Record Check_ [configuration instructions][4].
  9. Select the **Allow user to override discovered match terms** checkbox to allow a user to modify search terms upon initiating a refresh. Vault ignores this setting initially when executing the entry action.
  10. Select a role from the **Inherit Owner from Following Lifecycle Role** drop-down. The user(s) assigned this role will become the owner of the _Record Check Result_ once the entry action is executed. You cannot select Viewers as a role to inherit ownership of the _Record Check Result_.
  11. Click **Save**.

## Creating Quality Record Checks for Recurrence {#record-checks}

You can create _Quality Record Check_ configurations for each scenario in which users need to check for recurrences. For example, if your quality system requires that a newly completed _Deviation_ be checked against older _Deviations_ for recurrence for either six (6) months or one (1) year, depending on the affected process, you can create two (2) _Quality Record Check_ configurations appropriately, with both available to users as separate user actions.

To create _Quality Record Check_ configurations for recurrence:

  1. Navigate to **Admin** > **Configuration** > **Quality Record Checks**.
  2. Click **Create**.
  3. Enter a **Label**.
  4. Optional: Enter a **Description**.
  5. Select an **Object** and, if applicable, an **Object Type**. <a href="/en/gr/15298/#locked-objects">Locked objects</a>
 are not available to select.
  6. In the **Date comparison field** drop-down, select a date field from the supported object from which to base your timeframe.
  7. In the **Date comparison timeframe** drop-downs, select a number and time period unit. For example, to include records up to one (1) year prior to the value in the date field selected above, select **1** and **Years**.
  8. Optional: Select the **Allow user to enter date range** checkbox to allow a user to indicate a timeframe upon executing a recurrence check.
  9. In the **Fields on object that must match** field, select up to five (5) fields on the object that must match exactly between the records to be included in the recurrence check. For example, if your processes require you to check for recurrences only affecting the same facility, select the _Owning Facility_ field to exclude records for other facilities.
  10. Optional: Select the **Allow user to override exact match field values** checkbox to allow a user to override the matching field values upon executing a recurrence check. Users can only override values for Picklist, Reference Object, and Boolean fields. All other matching field values are read-only.
  11. Optional: If you want to limit the check to evaluate object records with a certain lifecycle state, select those states in the **Lifecycle states to include** drop-down.
  12. <a id="similar-match"></a>In the **Fields on object to compare in text search** field, select text fields on which to run the recurrence check. When a user performs the action on a record, these are the fields for which Vault provides a percentage match score. If you are configuring a _Complaint_ or _MedTech Complaint_ recurrence check, this field is optional, however, you must populate this field and select the **Enable Comparison Settings** checkbox to make the _Comparison Settings_ section visible.
  13. Optional: If you want Vault to exclude alphanumeric values from system-generated match terms, select the **Exclude numeric suggested terms** checkbox.
  14. Optional: In the _Related Object Match Criteria_ section, select fields on objects referenced by supported object records with which to further limit the records included in the check. For example, if your originating _Deviation_ has _Root Cause Category_ values of _Materials_, _Labelling_, and _Tooling_, you can define match criteria to only include _Deviation_ records where the _Root Cause Category_ on related _Root Cause_ records includes at least one of those categories. Vault displays these criteria when users perform the recurrence check action. <a href="/en/gr/15298/#locked-objects">Locked objects</a>
 are not available to select as the **Related Object**.
  15. Optional: In the _Related Object Match Criteria_ section, add _Criteria VQL_ to better refine the results sets. You can validate the syntax of the _Criteria VQL_ through the **Validate** button, or select **Need Help With VQL Syntax?** for further assistance.
  16. Optional: In the _Related Object Match Criteria_ section, add hover text via the _Hover Text_ field to explain the _Criteria VQL_ for a related object to the user. The hover text is displayed in the _Run Record Check_ dialog, the _View Match Criteria_ popup on the _Review Results_ page, and the _Refresh Results_ dialog on the _Review Results_ page.
  17. Optional: In the _Quality Record Check Insight_ section, select the **Gather Record Check Insights** checkbox to enable insights for this particular check. Select an existing **Quality Record Check Insight Configuration** from the drop-down if you've previously configured a [Recurrence Check Insights page][8].
  18. Fill in the [_Comparison Settings_][5] section. This section is visible and required if you are creating a _Quality Record Check_ for a _Complaint_ or _MedTech Complaint_ and the _Enable Comparison Settings_ checkbox is enabled.
  19. Click **Save**.

### Comparison Settings {#comparison-settings}

Perform these additional steps to configure _Comparison Settings_ for a _Quality Record Check_:

  1. In the _Comparison Settings_ section, define three tiers of match similarity to assist users in analyzing potential recurrences. If you select the **Display** checkbox, when a user performs the recurrence check user action, Vault displays the tier as a category at the top of the page.
     1. Optional: If you do not want to display percentages for the similarity scores, you can select the **Hide similarity scores from users** checkbox to display the default labels of _Likely Matches_, _Possible Matches_, and _Unlikely Matches_ instead, or you can define and select your own labels from the single value _Recurrence Check Tier Label_ picklists. Ensure that the _Picklist Value Name_ value matches for each tier in both picklists.
  2. If you select the **Display** checkbox for **Tier 2** or **Tier 3**, when a user performs the recurrence check user action, Vault hides the tier column and displays the tier as a category at the top of the page.
  3. Select a **% minimum similarity score** from the drop-down for each tier.
  4. Optional: For each tier, selecting the **Relationship type required** checkbox requires users to provide a relationship type when analyzing each record of that tier. For example, you might require that users select a relationship only for the most likely matches. If you select this option, you can further require users to provide a justification by selecting the **Justification required** checkbox.
  5. In the **Quality Relationship Automation** drop-down, select the <a href="/en/gr/70474/">relationship configuration</a>
 applicable to your recurrence check, then select the **Relationship types** applicable to the _Deviation_ being checked.
  6. Optional: In the _Fields to Display_ section, you can choose fields from the _Deviation_ record to display in the recurrence check interface to assist the user in their analysis. These fields are not included in the match calculation.

## Enabling Match on All Terms {#all-terms-setting}

You can enable an application setting to give users the option to specify search terms that all matching records must contain when completing a recurrence check. To do this, navigate to **Admin > Settings > Application Settings**, and enable the **Enable Match on All Terms in Record Check and Record Suggestions Actions** checkbox in the _QMS_ section.

<div class="note-border alert-important">
  <div class="alert alert-important" role="alert">
    <div><i class="far fa-exclamation-circle"></i></div>
    <div class="alert-text">
      <p><strong>Important</strong>: Once enabled, you cannot disable the <em>Enable Match on All Terms in Record Check and Record Suggestions Actions</em> setting.</p>
    </div>
  </div>
</div>



## Configuring the Generate Document From Report Action for Recurrence {#generate-doc-from-report-action}

The _Generate Document From Report_ action allows a user to create a document containing recurrence check information directly from a _Record Check Result_ record. The newly generated document is linked from a document reference field on the originating _Record Check Result_ record. In order for users to have access to this function, you must create an appropriate [report][7] and <a href="/en/gr/72016/#configuring-the-generate-document-from-report-action">make the _Generate Document From Report_ action available to users</a>
 in the _Record Check Result_ object lifecycle.

### Creating a Report for Recurrence Checks {#reports-for-recurrence-check}

When configuring the **Generate Document From Report** action, you must select a <a href="/en/gr/55007/">report type</a>
 and report view. While you can select any report in your Vault, it is most useful to select a report type which matches _Record Check Result_ details to supported object details for records that have been identified as duplicates in the recurrence check. The report view can further filter the resulting report to records of the appropriate object type.

## Configuring the Recurrence Check Insights Page {#configuring-insights}

You can configure the <a href="/en/gr/725816/">Recurrence Check Insights page</a>
 to help users make data-driven decisions following a recurrence check of a _Deviation_, _Quality Event_, _Complaint_, or _Nonconformance_ record. You can create multiple configurations for each object and object type your organization requires. Once active, Vault automatically navigates to this page after a user completes a recurrence check.

To configure the Recurrence Check Insights page:

  1. Navigate to **Admin > Configuration > Quality Record Check Insights** and click **Create**.
  2. Populate the **Label**, **Description**, **Status**, and **Object** fields. The following objects are available for retrieving insights: _Deviation_, _Quality Event_, _Complaint_, or _Nonconformance_.
  3. Select an **Object Type** from the drop-down.
  4. In the _Related Records to Summarize_ section, click **+ Add Related Record Summary**. You can add up to three (3) related objects to summarize.
  5. Select a **Related Object**.
  6. Select up to two (2) fields to group by.
  7. Select an **Inbound Reference Field**. Repeat steps 5-7 for each related object to summarize.
  8. In the _Field Suggestions_ section, select up to three (3) fields from the **Field Values to Summarize** drop-down. You can only select fields with a type of _Object_, _Picklist_, or _Boolean_.
  9. In the _Field Suggestion Tiers_ section, provide a **Minimum Similarity Score (%)** for each tier.
  10. In the _Fields to Display_ section, you can choose fields from the source record to display on the Recurrence Check Insights page to assist the user in their analysis.
  11. Click **Save**.

To enable the insights configuration for use:

  1. Navigate to **Admin > Configuration > Quality Record Checks** and select the desired _Quality Record Check_.
  2. Click **Edit**.
  3. In the _Quality Record Check Insight_ section, select the **Gather Record Check Insights** checkbox to enable insights for this particular check. Select the **Quality Record Check Insight Configuration** you just created from the drop-down.
  4. Click **Save**.

To enable the Relate to Source functionality on the Recurrence Check Insights page, ensure that users have _Read_ and _Edit_ permissions on the primary object records (_Deviations_, _Complaints_, or _Nonconformances_), on the associated related object and object records (_CAPAs_, _Effectiveness Checks_, and _Investigations_), and on the join objects. 

If the permissions are incomplete or missing, users cannot see the _Relate to Source_ button or the checkboxes for the related object records on the Recurrence Check Insights page.

## Recurrence Check Limitations

By default, Vault can include up to 100 records in the results of recurrence checks that use text search functions, such as [similar match fields][1], to find suggested terms and provide a similarity score. For recurrence checks that do not use text search, but instead rely entirely on exact field and record matches, this limit is 1,500 records.

## Related Permissions

You must have the following permissions to configure or use _Quality Record Checks_:

|Type|Permission|Controls|
|--- |--- |--- |
|Security Profile|Admin: Quality Record Check: Read, Create, Edit, Delete|Ability to see, create, and manage _Quality Record Check_ configurations|
|Security Profile|Admin: Quality Relationship Automation: Read|Ability to select _Quality Relationship Automation_ values within _Quality Record Check_ configurations|
|Security Profile|Page: Recurrence Check Insights: View|Ability to view recurrence check insights|
|Security Profile|Object: Quality Event: \[object type\]: Read, Edit|Ability to view records of this object type in the recurrence check interface and edit fields from the Recurrence Check Insights page|
|Security Profile|Object: Complaint: Read, Edit|Ability to view records of this object in the recurrence check interface and edit fields from the Recurrence Check Insights page|
|Security Profile|Object: Change Control: Read|Ability to view records of this object in the recurrence check interface|
|Security Profile|Object: Change Plan: Read|Ability to view records of this object in the recurrence check interface|
|Security Profile|Object: Deviation: Read, Edit|Ability to view records of this object in the recurrence check interface and edit fields from the Recurrence Check Insights page|
|Security Profile|Object: Finding: Read|Ability to view records of this object in the recurrence check interface|
|Security Profile|Object: Lab Investigation: Read|Ability to view records of this object in the recurrence check interface|
|Security Profile|Object: Continuous Improvement: Read|Ability to view records of this object in the recurrence check interface|
|Security Profile|Object: Record Check Result: \[object type\]:  Read, Edit|Ability to view and edit _Record Check Results_ and records of this object type|
|Security Profile|Object: Record Check Match Record: \[object type\]: Read, Edit|Ability to view and edit _Record Check Match_ records of this object type|
|Security Profile|Object: Related Record - Summary Data: Read|Ability to view data for related records on the _Summaries_ tab of the Recurrence Check Insights page|
|Security Profile|Object: Related Record - Field Summary: Read|Ability to view data for related records on the _Field Suggestions_ tab of the Recurrence Check Insights page|
|Security Profile|Object Control: Match Criteria: View|Ability to view the object control in the _Details_ section on a _Record Check Result_ record.|

[1]: #similar-match
[2]: #lifecycle
[3]: #entry-action
[4]: #record-checks
[5]: #comparison-settings
[6]: #generate-doc-from-report-action
[7]: #reports-for-recurrence-check
[8]: #configuring-insights
[9]: #all-terms-setting