# Configuring Health Authority Interaction

Vault provides functionality that allows you to capture, review, and track health authority questions and commitments from your regulatory correspondence documents. The Health Authority Interactions panel, available in the Document Information pane for the configured document types, allows you to select question and commitment text within a document to automatically extract a _Health Authority Question_ (HAQ) or _Commitment_ record for the question or commitment. You can then view all interactions extracted from a single document and add additional details to the records as needed to track your questions and commitments throughout their lifecycle. See [Working with Health Authority Interactions](/en/lr/7220602/) for more information on using this functionality.

If you have previously used HAQ or Commitment functionality, you may have configured custom object fields and document fields to capture and display information related to questions. You can continue using most of the custom fields as described in the configuration below or transition to using the [standard fields][1] available in Vault.

## Configuring Health Authority Question Extraction

### Prerequisites

Ensure that the following prerequisites are met before configuring this functionality:

* A lifecycle exists for the _Health Authority Question_ (`health_authority_question__rim`) object.
* The _HAQ_ object has no required fields that do not match required fields on the document types where they will be extracted from or are being defaulted.
* The _Lifecycle State Stage ID_ (`state_stage_id__sys`) field must exist on the _HAQ_ object. If it does not exist, complete the following steps:
  1. Create an [Object Lifecycle Stage Group](/en/lr/52053/) for the _HAQ_ object.
  2. Add a _Stage_ to the _Lifecycle Stage Group_ and add a _Lifecycle State_ to the _Stage_.
  3. Confirm that the _Lifecycle State Stage ID_ (`state_stage_id__sys`) field exists on the _HAQ_ object.
  4. Delete the _Stage_ and _Lifecycle Stage Group_ from the _HAQ_ object.

### Configuration Overview

To configure HAQ extraction functionality, complete the following steps:

1. [Enable][3] the HAQ extraction for the applicable document types.
2. [Activate][1] the HAQ document field and object fields.
3. [Configure][4] the HAQ relationship objects.
4. Optional: [Update][5] your custom configuration if you have previously used HAQ functionality.
5. [Add][6] the document fields to the document types for which you enabled HAQ extraction on.
6. [Update][7] any required fields on the HAQ object.

## Configuring Commitment Extraction

### Prerequisites

Ensure that the following prerequisites are met before configuring this functionality:

* A lifecycle exists for the _Commitment_ (`commitment__rim`) object.
* The _Commitment_ object has no required fields that do not match required fields on the document types where they will be extracted from or are being defaulted.
* The _Lifecycle State Stage ID_ (`state_stage_id__sys`) field must exist on the _Commitment_ object. If it does not exist, complete the following steps:
  1. Create an [Object Lifecycle Stage Group](/en/lr/52053/) for the _Commitment_ object.
  2. Add a _Stage_ to the _Lifecycle Stage Group_ and add a _Lifecycle State_ to the _Stage_.
  3. Confirm that the _Lifecycle State Stage ID_ (`state_stage_id__sys`) field exists on the _Commitment_ object.
  4. Delete the _Stage_ and _Lifecycle Stage Group_ from the _Commitment_ object.

### Configuration Overview

To configure Commitment extraction functionality, complete the following steps:

1. [Enable][3] the Commitment extraction for the applicable document types.
2. [Activate][1] the Commitment document field and object fields.
3. [Configure][10] the Commitment relationship objects.
4. [Add][6] the document fields to the document types for which you enabled Commitment extraction on.
6. [Update][7] any required fields on the Commitment object.

## Configuring Initiate Response

1. Navigate to **Admin \> Settings \> Application Settings \> RIM Settings** and select the checkbox for **Enable Initiate Response**.   
2. To automatically generate a Response Document as part of the guided flow, select a **Response Template**. Only templates where the _Root Object_ is **Health Authority Response** and the _Output Format_ is **Microsoft Word** can be selected.   
3. Grant the relevant permission sets for the **Execute the Initiate Response** object action on the _Health Authority Question_ object.   
   1. The same permission sets should also have access to:   
      1. Read/Edit/Create for the _Health Authority Response_ object   
      2. Read/Edit/Create for the _HA Response Submission_ object  
      3. Read/Edit for the _Health Authority Question_ object  
      4. Read for the _Relation of Submission_ field on the _HA Question Submission_ object. This field should also be Active.   
4. Grant the relevant permission sets access to the Health Authority Response Wizard page   
5. Configure the **Initiate Response** user action on the applicable HAQ lifecycle states.   
6. The following Health Authority Question fields should be activated and added to the relevant layout for the Health Authority Question object   
   1. _Health Authority Response_   
   2. _Response Document_   
   3. _Response Document Order_   
7. Navigate to **Admin \> Configuration \> RIM Document Type Configurations**. Configure the applicable document classification to be a Response Document Type.   
   1. Any required fields on the document classification that will be used as a Response Document Type should be made optional if the field will not be populated upon automatic creation via the Initiate Response flow.    
8. The following fields should be be configured on the Response Document Type   
   1. _Health Authority Response_  
   2. _Application_ 
   3. _Submission_  
   4. _Health Authority Questions_
9. It is recommended to set the configuration of the _Content Plan Template_ field on the Submission to default from the Application's Submission.   
10. It is recommended to default the _Relation of Submission_ field on the HA Question Submission to Originating

## Enabling Health Authority Interaction Extractions on Document Types {#configure-document-types}

To enable questions and/or commitments to be extracted from documents, you must enable the extraction appropriately on the specific document type, subtype, or classification that may contain questions or commitments. This also surfaces the Health Authority Interactions panel for documents of the configured document types. Extraction of interactions can be enabled for all document types, subtypes, and classifications except the following:

* _Submissions Archive_ (`archive__v`)
    * _Content_ (`content__v`)
    * _Structure_ (`structure__v`)
* _IDMP_ (`idmp__v`)
    * _EU IDMP Submission_ (`eu_idmp_submission__v`)
    * _eAF FHIR Output_ (`eaf_fhir_output__v`)
* _Submission Ready_ (`submission_ready__v`)
    * Clinical Study (`clinical_study__v`)
    * Nonclinical Study (`nonclinical_study__v`)
    * Report (`report__v`)
* _UDI_ (`udi__v`)
    * _UDI Submission_ (`udi_submission__v`)
* _Unclassified_ (`undefined__v`)

To enable the extraction of health authority interactions for a document type:

1. Navigate to **Admin > Configuration > Application Configurations > RIM Document Type Configurations**.
2. Click **Create** to create a RIM Document Type Configuration. 
3. Select the **Document Type,** and enter a **Name** and **Label** for the document type configuration. We recommend using the associated _Document Type_, _Subtype_ or _Classification_ _Name_ and _Label_ for these fields. When you select a Type or Subtype, the configuration applies to all Subtypes and Classifications under it. When using search functionality to find a _Document Type_, search terms are case sensitive and the search only shows results that start with the entered search term.
4. Select **Yes** for **Enable HAQ Extraction** to allow questions to be extracted from the selected document type. 
5. Select **Yes** for **Enable Commitment Extraction** to allow commitments to be extracted from the selected document type. 
5. Click **Save**.

## Activating Health Authority Question & Commitment Fields {#activating-fields}

If your organization has previously implemented HAQ functionality using custom fields, you can continue to use a majority of those custom fields as long as the fields that should be copied from the document to the HAQ record have the same _Name_. Alternatively, you can activate and use the standard fields.

### Activating Required Fields for Health Authority Questions

<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 configuration below is required to use Health Authority Question extraction functionality.</p>
    </div>
  </div>
</div>



Activate the following required HAQ fields:

1. Navigate to **Admin > Configuration > Document Fields** and set the _Health Authority Questions_ (`health_authority_question__v`) document field to **Active**. This standard document field must be activated to use this feature.
2. Navigate to **Admin > Configuration > Objects > Health Authority Question** (`health_authority_question__rim`) and set the following object fields to **Active**. These fields must be activated to use this feature:
    * _Question Source_ (`question_source__v`)
    * _Question Source Document_ (`question_source_document__v`)
    * _Question Source Document ID_ (`question_source_document_id__v`)
    * _Question Annotation ID_ (`question_annotation_id__v`)
    * _Full Question_ (`full_question__v`)

### Activating Required Fields for Commitments

<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 configuration below is required to use Commitment extraction functionality.</p>
    </div>
  </div>
</div>



Activate the following required Commitment fields:

1. Navigate to **Admin > Configuration > Document Fields** and set the _Commitments_ (`commitments__v`) document field to **Active**. This standard document field must be activated to use this feature.
2. Navigate to **Admin > Configuration > Objects > Commitment** (`commitment__rim`) and set the following object fields to **Active**. These fields must be activated to use this feature:
    * _Commitment Source_ (`commitment_source__v`)
    * _Commitment Source Document_ (`commitment_source_document__v`)
    * _Commitment Source Document ID_ (`commitment_source_document_id__v`)
    * _Commitment Annotation ID_ (`commitment_annotation_id__v`)
    * _Full Commitment Text_ (`full_commitment_text__v`)

### Configuring Optional Fields

<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 configuration below is optional.</p>
    </div>
  </div>
</div>



Fields on the HAQ and Commitment objects can be configured to be copied from the document where the question or commitment is extracted. You can use custom fields on the HAQ and/or Commitment object with the same name as the document fields below. If you are using custom fields, you may need to rename the field on either the document or the HAQ object so that they match. See [Reviewing Current Custom Fields][2] for more information about reviewing your current custom object fields if you have previously used them for HAQ functionality.

Alternatively, you can change the following standard object fields to **Active** for the _Health Authority Question_ (`health_authority_question__rim`) object: 

* _Primary Product Family_ (`product__v`)
* _Related Application_ (`applications__v`)
* _Country_ (`country__v`)
* _Question Topic_ (`question_topic__v`)
* _CTD Sections Impacted_ (`ctd_sections_impacted__v`)

You can also configure the standard document fields below. These fields are not required, and if they remain _Inactive_, Vault maps the respective custom document field with the same name instead:

* _Correspondence Scope_ (`correspondence_scope__v`)
* _Date Received_ (`date_received__v`)
* _Method of Communication_ (`method_of_communication__v`)
* _Regulatory Objectives_ (`regulatory_objectives__v`)
  * Although this field is optional, it is required for Vault to automatically create HAQ _Regulatory Objective_ records during question extraction. If the custom _Regulatory Objectives_ document field is used instead, the join is not automatically populated.

## Configuring Health Authority Question Relationship Objects {#configure-join-objects}

Create relationships for the join objects below between the Health Authority Question (`health_authority_question__rim`) parent object and the indicated parent object. The specific document field indicated must be configured and set to drive the automatic creation of the relationship, and custom document fields are not supported.

* _Health Authority Question Submission_ (`health_authority_question_submission__v`)
  * Vault creates a record for each Submission (`submissions__v`) set on the document.
* _Health Authority Question Application_ (`health_authority_question_application__v`)
  * Vault creates a record for each Application (`applications__v`) set on the document.
* _Health Authority Question Product Family_ (`health_authority_question_product_family__v`)
  * Vault creates a record for each Product Family (`product__v`) set on the document.
* _Health Authority Question Regulatory Objective_ (`health_authority_question_regulatory_objective__v`)
  * Vault creates a record for each Regulatory Objective (`regulatory_objectives__v`) set on the document.
* _HA Meeting HAQ_ (`ha_meeting_haq__v`)
  * Vault creates a record for each Health Authority Meeting (`health_authority_meeting__v`) set on the document.

Ensure that the appropriate permissions are added for those join objects for the users who will be extracting questions. In addition, add the above join objects to the _Health Authority Question_ (`health_authority_question__rim`) object page layouts.

## Configuring Commitment Relationship Objects {#configure-commitment-relationship-objects}

Create relationships for the join objects below between the Commitment (`commitment__rim`) parent object and the indicated parent object. The specific document field indicated must be configured and set to drive the automatic creation of the relationship, and custom document fields are not supported.

* _Commitment Submission_ (`commitment_submission__v`)
  * Vault creates a record for each Submission (`submissions__v`) set on the document.
* _Commitment Application_ (`commitment_application__v`)
  * Vault creates a record for each Application (`applications__v`) set on the document.
* _Commitment Regulatory Objective_ (`commitment_regulatory_objective__v`)
  * Vault creates a record for each Regulatory Objective (`regulatory_objectives__v`) set on the document.
* _HA Meeting Commitment_ (`ha_meeting_commitment__v`)
  * Vault creates a record for each Health Authority Meeting (`health_authority_meeting__v`) set on the document.

Ensure that the appropriate permissions are added for those join objects for the users who will be extracting commitments. In addition, add the above join objects to the _Commitment_ (`commitment__rim`) object page layouts.

## Updating the Custom Configuration {#update-custom-configuration}

This configuration section is optional and is only applicable if you have previously used custom configuration for HAQ or Commitment functionality.

### Reviewing Current Custom Fields {#reviewing-custom-fields}

If you have previously used HAQ or Commitment functionality, you may have configured custom object fields and document fields to capture and display information related to questions or commitments. You can continue using most of the custom fields or transition to using the [standard fields][1] available in Vault.

Assess the current custom fields on the HAQ or Commitment document field and HAQ or Commitment object that should be copied from the document to the HAQ or Commitment record during extraction to ensure that they have matching names.

To continue using the custom fields, rename the custom fields as needed to match their corresponding mapped field. For example, if you use the custom `related_application__c` object field on the HAQ object to capture the application related to the question, rename the custom object field to `application__c` to match the standard `application__v` document field. This ensures that the HAQ or commitment record can be correctly populated with information from the source document using field-matching logic.

Refer to the field names listed in the [Activating Required Fields][1] section to ensure that all of your custom object field names match the corresponding document field names. If you continue to use custom object fields, ensure that the standard field with the same name remains inactivated.

#### Updating Additional Field Names

Your organization's processes may include using additional document fields to capture information related to questions or commitments. Assess whether the fields should be defaulted from the document to the HAQ or Commitment record. If so, ensure that the fields have the same name and data type on both the document and the HAQ or Commitment object so that data is correctly mapped to the HAQ or Commitment record.

### Updating the Correspondence Details Field Layout

The standard Correspondence Details field layout contains the following document fields:

* Issued/Start Date
* Date Received
* Method of Communication
* Correspondence Scope
* Health Authority Questions
* Commitments

If your organization has previously used custom fields in a custom Correspondence Details field layout, you may need to [update the custom field layout](/en/lr/1535/) so that your Documentation Information panel does not display two Correspondence Details sections with duplicate data. 

To ensure that duplicate data is not displayed on the Documentation Information panel, delete, inactivate, or move the custom fields. Navigate to **Admin > Configuration > Document Fields** for each custom field and change its **Display Section** to a different field layout, set its **Status** to **Inactive**, or delete the custom field. If you deactivate or delete the custom field, ensure that you [activate][1] its corresponding standard field. 

#### Migrating Data from Custom Fields to Standard Fields

If you begin using the standard fields and have previously used custom fields, you may also need to perform a [data migration](/en/lr/26607/) to migrate existing values in custom fields to the new standard fields. This will ensure that the correct document information is displayed in the Correspondence Details section of the Documentation Information panel.

### Updating Criteria VQL to use Standard Objects

If the _Health Authority Question_ (`health_authority_question__rim`) or Commitment (`commitment__rim`) object has criteria VQL that uses custom object fields and you are transitioning to using standard object fields, update the criteria VQL to reference the new standard fields. For example, if the criteria VQL references a custom _Country_ (`country__c`) object field, update the VQL to reference the standard _Country_ (`country__v`) object field instead.

## Adding Document Fields to the Configured Document Types {#update-doc-types}

Navigate to **Admin > Configuration > Document Fields** and add the HAQ [document fields][1] to the [document types you configured][3] to display the Health Authority Interactions panel. See [Managing Document Fields](/en/lr/592/) and [Working with Shared Fields](/en/lr/4884/) for more information.

## Updating Required Fields on the Health Authority Question and Commitment Objects {#update-required-fields}

Required fields on the _Health Authority Question_ (`health_authority_question__rim`) and _Commitment_ (`commitment__rim`) objects will cause errors when using this feature if their values are not defaulted or if they are mapped from a document but not required on the document. 

Navigate to **Admin > Configuration > Objects > Health Authority Question** (`health_authority_question__rim`) or **Admin > Configuration > Objects > Commitment** (`commitment__rim`) and review whether any of the fields are required. If any fields are required and their values are not defaulted, or if they are mapped from a document but not required on the document, edit the object field and deselect [**User must always enter a value (required)**](/en/lr/15057/#required). You may then make the field required using [lifecycle entry criteria](/en/lr/59885/#entry_criteria) to enforce that the field is not blank on the next lifecycle state after the _Initial_ state.

## Related Permissions {#permissions}

The following permissions are required for configuring HAQ or Commitment extraction functionality:

|Type|Permission|Controls|
|--- |--- |--- |
|Security Profile|**Object > Health Authority Question**: Read, Create, Edit, Delete| Ability to create and edit the HAQ object; ability to extract questions from a document; ability to delete HAQ records|
|Security Profile|**Object > Health Authority Question Submission**: Read, Create|Ability to create HAQ Submission records when extracting questions|
|Security Profile|**Object > Health Authority Question Application**: Read, Create|Ability to create HAQ Application records when extracting questions|
|Security Profile|**Object > Health Authority Question Product Family**: Read, Create|Ability to create HAQ Product Family records when extracting questions|
|Security Profile|**Object > Health Authority Question Regulatory Objective**: Read, Create|Ability to create HAQ Regulatory Objective records when extracting questions|
|Security Profile|**Admin > Document Fields**: Read, Create|Ability to set the HAQ and/or Commitment document field when extracting questions or commitments|
|Security Profile|**Object > Commitment**: Read, Create, Edit, Delete|Ability to create and edit the Commitment object; ability to extract commitments from a document; ability to delete commitment records|
|Security Profile|**Object > Commitment Submission**: Read, Create|Ability to create Commitment Submission records when extracting commitments|
|Security Profile|**Object > Commitment Application**: Read, Create|Ability to create Commitment Application records when extracting commitments|
|Security Profile|**Object > Commitment Regulatory Objective**: Read, Create|Ability to create Commitment Regulatory Objective records when extracting commitments|
|Security Profile|**Admin > Health Authority Meeting Commitment**: Read, Create|Ability to create Health Authority Meeting Commitment records when extracting commitments|
|Security Profile|**Admin > Health Authority Meeting**: Read, Create|Ability to create Health Authority Meeting HAQ records when extracting HAQs.|
|Document Role|Annotate|Ability to highlight questions or commitments in a document|

[1]: #activating-fields
[2]: #reviewing-custom-fields
[3]: #configure-document-types
[4]: #configure-join-objects
[5]: #update-custom-configuration
[6]: #update-doc-types
[7]: #update-required-fields
[8]: #update-document-lifecycle
[9]: #permissions
[10]: #configuring-commitment-relationship-objects
