# Configuring the Safety-EDC Connection

Using the <a href="/en/lr/679350/">Safety-EDC Connection</a>, you can exchange data in near-real time between Safety and Clinical Data EDC Vaults. To use the Safety-EDC Connection, you must configure the relevant components, connect any existing data, and activate the connection. This setup requires configuration steps in both Vaults.

The following diagram outlines how the Safety-EDC Connection exchanges data for new clinical subject SAEs:

<a href="https://platform.veevavault.help/assets/images/saf-saf-edc-flow.png" data-lightbox="images" data-title="" data-alt="Safety-EDC Connection Data Exchange for New Clinical Subject SAE">
  <img class="docimage" src="https://platform.veevavault.help/assets/images/saf-saf-edc-flow.png" alt="Safety-EDC Connection Data Exchange for New Clinical Subject SAE" style="max-width: 100%;width: 700px;"  />
</a>

For more information, see <a class="external-link " href="https://cdmshelp.veeva.com/lr/study-designers/edc-safety-connection/" target="_blank" rel="noopener">Configuring Safety-EDC Connection Studies<i class="fa fa-external-link" aria-hidden="true"></i></a> in Veeva Clinical Data Help.

## Configuration Overview

You must complete the following steps in your Safety and EDC Vaults to configure the standard connection:
1. <a href="/en/lr/53358/">Establish the Vault to Vault connection</a>. 
2. Review the [connection components][1] and adjust as needed to fit your organization's business processes.
3. [Configure your Vaults][2].
4. [Establish the Connection][3] between your Safety and EDC Vaults.

## Safety-EDC Connection Components {#safety-edc-connection-components}

The components in the following sections support the standard Safety-EDC Connection.

### Connections {#connections}

The following _Connection_ records are available from **Admin > Connections**:
* _Safety-EDC Connection_ (`safety_cdms_connection__v`) is available in your Safety Vault.
* _Safety-EDC Connection_ (`safety_cdms_connection__v`) is available in your EDC Vault..

In your Safety Vault, you can update the _Connections_ <a href="/en/lr/26387/">object layout</a> to include the following fields in the <a href="/en/lr/53358/#stats">_Connection Stats_ section</a>:

* _EDC: Inbox Items created_
* _EDC: Cases Promoted_
* _EDC: Case Updated_

### Integrations & Integration Points

The _Integration_ and _Integration Point_ objects enable Vault to manage the message queues and define what documents and data the connection maps from one (1) Vault to another. These records are read-only and are used by Vault to manage the connection and track any connection errors.

|Integration Name|Integration Point Name(s)|Sent From|Sent To|Included Data
|--- |--- |--- |--- |--- |
|Safety-EDC: Serious Adverse Events|Safety-EDC: Safety Case Outbound|EDC|Safety|SAE and Subject information|
|Safety-EDC: Serious Adverse Events|Safety-EDC: CDMS Safety Case Inbound|Safety|EDC|SAE and Subject information|
|Safety-EDC: Serious Adverse Events|Safety-EDC: Case Information|EDC|Safety|SAE Case information|
|Safety-EDC: Serious Adverse Events|Safety-EDC: Case Information|Safety|EDC|SAE Case information|
|Safety-EDC: Serious Adverse Events|Safety-EDC: Safety Inbox and Case IDs|Safety|EDC|Inbox IDs and Case IDs|

### Queues

This feature includes four (4) standard <a href="/en/lr/53147/">message processing queues</a>: two (2) in the Safety Vault and two (2) in the EDC Vault. You can access and manage these queues from **Admin > Connections > Spark Queues**.

In the Safety Vault:
* _Safety-EDC SAE Inbound_ (`cdms_to_safety_sae_inbound_queue__v`)
* _Safety Outbound Messaging Queue_ (`cdms_to_safety_sae_outbound_queue__v`)

In the EDC Vault:
* _Safety-EDC SAE Outbound_ (`cdms_to_safety_sae_outbound_queue__v`)
* _Safety-EDC  SAE Inbound_ (`cdms_to_safety_sae_inbound_queue__v`)

### User Exception Objects

Vault includes the _User Exception Message_ object and its child object, _User Exception Item_, to help you track and resolve any errors that occur with your Safety-EDC Connection. If your Safety Vault integration can't process an incoming message, Vault creates a _User Exception Message_ record to capture the failure. Vault also creates individual _User Exception Item_ records, with _Study Numbers_, for each item that failed on the related _Integration Point_ record in the outbound Vault.

You can view and manage these messages from **Admin > Connections > User Exception Messages**. If you want specific users or groups to receive notifications when Vault creates _User Exception Message_ records, you must create a custom lifecycle for the _User Exception Message_ object and configure a <a href="/en/lr/59885/">notification entry action</a>.

A _User Exception Message_ means that you need to update your configuration. After you update the configuration, Vault attempts to resolve any errors the next time the connection runs. You can also select the **Reprocess Request** action to run the connection and resolve errors.

## Configuring Your Vaults {#configuring-your-vaults}

To configure your Safety and EDC Vaults to support the Safety-EDC Connection:
1. Follow the steps in <a class="external-link " href="https://cdmshelp.veeva.com/gr/study-designers/edc-safety-connection/" target="_blank" rel="noopener">Veeva Clinical Data Help<i class="fa fa-external-link" aria-hidden="true"></i></a>.
2. [Configure your Safety Vault][5].
3. [Configure _Study_ and _Study Product_ matching][4].

### Configuring Your Safety Vault

After completing all the required configurations in <a class="external-link " href="https://cdmshelp.veeva.com/gr/study-designers/edc-safety-connection/" target="_blank" rel="noopener">Veeva Clinical Data Help<i class="fa fa-external-link" aria-hidden="true"></i></a>, complete the following in your Safety Vault:

1. <a class="external-link " href="https://safety.veevavault.help/en/lr/680900" target="_blank" rel="noopener">Enable the Safety-EDC Connection<i class="fa fa-external-link" aria-hidden="true"></i></a>.
   * To receive all available data mappings from EDC, ensure you have copied the latest standard layouts for all <a href="/en/lr/679350/#cdms-subject-records">EDC subject information objects</a>, activated them, and set them as the defaults. 
2. Optional: [Configure custom field mappings][6] to populate mapped fields with data from the EDC Vault on the corresponding subject information and case objects in your Safety Vault.
3. Create the appropriate <a class="external-link " href="https://safety.veevavault.help/en/lr/01213#set-up-vault-customer-as-a-sponsor" target="_blank" rel="noopener">sponsor _Organization_<i class="fa fa-external-link" aria-hidden="true"></i></a> to which you will assign the applicable [_Studies_, _Products_, and _Study Products_][4]. This record must be a _Sponsor_ type of organization.
4. Configure <a class="external-link " href="https://safety.veevavault.help/en/lr/01182" target="_blank" rel="noopener">_Case Access Group_ Security<i class="fa fa-external-link" aria-hidden="true"></i></a> to control user access to subject information on SAE data received from EDC Vaults.
    * For the applicable _Case Access Groups_, create a <a class="external-link " href="https://safety.veevavault.help/en/lr/01182#create-case-assignment-rules" target="_blank" rel="noopener">_Case Assignment Rule_<i class="fa fa-external-link" aria-hidden="true"></i></a> with an _Intake Method_ for the _Safety-EDC Connection_.
    * For the applicable _Case Access Group Assignments_, update the _Subject Information Review_ field to _Subject Information Review_.
5. Optional: <a class="external-link " href="https://safety.veevavault.help/en/lr/725776" target="_blank" rel="noopener">Enable Automated Classification of Inbox Item Significance<i class="fa fa-external-link" aria-hidden="true"></i></a> and <a class="external-link " href="https://safety.veevavault.help/en/lr/869628" target="_blank" rel="noopener">configure _Significance Criteria_ rules<i class="fa fa-external-link" aria-hidden="true"></i></a> to assign _Significance_ values to _Inbox Items_ generated by the connection.
6. Optional: Configure the _Copy to new_ <a href="/en/lr/43127/#assign-actions">action</a> on the applicable states of the _Connection_ object lifecycle to connect to [multiple EDC Vaults][9]. 
7. Optional: Configure <a class="external-link " href="https://safety.veevavault.help/en/lr/01339" target="_blank" rel="noopener">Merge to In-Flight Case<i class="fa fa-external-link" aria-hidden="true"></i></a>.
8. Optional: Configure <a class="external-link " href="https://safety.veevavault.help/en/lr/01320" target="_blank" rel="noopener">Automated Case Promotion<i class="fa fa-external-link" aria-hidden="true"></i></a>.
    * Configure <a class="external-link " href="https://safety.veevavault.help/en/lr/740208#intake" target="_blank" rel="noopener">Intake Settings<i class="fa fa-external-link" aria-hidden="true"></i></a>.
    * For the _Safety-EDC Connection_ transmission profile, ensure the _Enable Auto Promote_ field is _Yes_.
9. Optional: To preserve dechallenge values from EDC, enable <a class="external-link " href="https://safety.veevavault.help/en/lr/935473" target="_blank" rel="noopener">Assessment Dechallenge Calculation<i class="fa fa-external-link" aria-hidden="true"></i></a> and ensure the <a class="external-link " href="https://safety.veevavault.help/en/lr/740208#auto-calc" target="_blank" rel="noopener">_Reset Dechallenge Override on Dechallenge recalculation_ setting<i class="fa fa-external-link" aria-hidden="true"></i></a> is clear.


<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>: Vault does not support the <a class="external-link " href="https://safety.veevavault.help/en/lr/01393" target="_blank" rel="noopener"><em>Promote to Multiple Cases</em> action<i class="fa fa-external-link" aria-hidden="true"></i></a> for <em>Inbox Items</em> generated by the <a href="/en/lr/679352/">Safety-EDC Connection</a>. We recommend that you configure the action to <a href="/en/lr/59885/#conditions">perform conditionally</a> so that it cannot run on <em>Inbox Items</em> with an <em>Intake Method</em> value of <em>Safety-EDC Connection</em>.</p>
    </div>
  </div>
</div>



### Configuring Custom Field Mappings {#map-custom-fields}

You can map [supported fields][7] in your EDC Vault to your Safety Vault so that the mapped fields automatically populate with the data received from the Safety-EDC Connection on the related subject information and case objects in your Safety Vault. The fields must have the same names on the Safety-related _Form Type_ in EDC as well as on the corresponding objects in your Safety Vault. When searching for mapped fields on case objects in your Safety Vault, Vault first checks for any matching custom (`__c`) fields. If no custom fields exist, Vault checks for applicable standard fields (`__v`). 

To map custom fields:

1. In your Safety Vault:
   1. Add <a href="/en/lr/15057/#how_to_add_object_fields">custom fields</a> to the relevant EDC subject information objects.
   2. Optional: Add custom fields to the relevant case objects for any fields you want to map that do not already exist as standard fields. Ensure the names have the exact same values as the corresponding fields you added to the EDC subject information objects.
2. In your EDC Vault, <a class="external-link " href="https://cdmshelp.veeva.com/lr/study-designers/edc-safety-connection/#custom-safety-fields" target="_blank" rel="noopener">map the custom fields<i class="fa fa-external-link" aria-hidden="true"></i></a> to the corresponding _Form Types_. Using the table below, ensure the names have the same name values as the custom fields you added to the corresponding EDC subject information objects in your Safety Vault.

<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 you previously configured mapping to custom fields on case objects in your Safety Vault and would like to map to the equivalent standard field instead, unmap your custom mapping in your EDC Vault and add the applicable replacement mapping.</p>
    </div>
  </div>
</div>



|EDC Subject Information Object in Safety|Case Object in Safety|Form Type in EDC|
|--- |--- |--- |--- |
|_CDMS Subject Adverse Event_|_Case Adverse Event_|_Safety Case Initiation Event_|
|_CDMS Subject Case Product_|_Case Product_|_ConMed Form_|
|_CDMS Subject Case Product Dosage_|_Case Product Dosage_|_Study Drug Form_|
|_CDMS Subject Cause of Death_|_Case Cause of Death_|_In Case of Death Form_|
|_CDMS Subject Drug History_|_Case Drug History_|_Drug History Form_|
|_CDMS Subject Information_|_Case_|_Patient Characteristics From_|
|_CDMS Subject Medical History_|_Case Medical History_|_Medical History Form_|
|_CDMS Subject Test Result_|_Case Test Result_|_External Labs Form_|

<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 these fields are not mapped correctly, users cannot select the related subject in the <a href="/en/lr/679350/#reviewing-adding-subject-information"><em>Add Relevant Subject Information</em></a> dialog after running the <em>Add Relevant Subject Information</em> action.</p>
    </div>
  </div>
</div>



#### Supported Fields {#supported-fields}

Vault supports the following <a href="/en/lr/15057/#how_to_add_object_fields">object field types</a> for mapping custom fields between EDC and Safety Vaults:

* Date
* Number
* Object (for the <a class="external-link " href="https://safety.veevavault.help/en/lr/01195" target="_blank" rel="noopener">_Controlled Vocabularies_<i class="fa fa-external-link" aria-hidden="true"></i></a> object)
* Picklist
* Text
* Yes/No

### Sending SAE Reporter Details {#sending-sae-reporter-details}

You can configure the <a class="external-link " href="https://cdmshelp.veeva.com/lr/study-designers/safety-configuration/#configure-general-settings" target="_blank" rel="noopener">general settings<i class="fa fa-external-link" aria-hidden="true"></i></a> in your EDC Vault so that the connection sends reporter details to Safety for all SAEs. To support this, ensure the _Reporter_ field value on the _Safety Settings_ page in your EDC Vault is _Full Site Information_.

### Study & Study Product Matching {#study-and-study-product-matching}

Vault can automatically match and populate the appropriate study-related fields on records created and updated from data received from the Safety-EDC Connection. To support matching, _Study_ and _Product_ records must have the same names in your Vaults so that Vault can automatically match and populate the appropriate product- and study-related fields on records created and updated from transferred EDC data. To do this:
* Ensure that _Studies_ and _Products_ have the same values in your Safety and EDC Vaults for the following fields to ensure matching:
    * <a class="external-link " href="https://safety.veevavault.help/en/lr/01216" target="_blank" rel="noopener">_Studies_<i class="fa fa-external-link" aria-hidden="true"></i></a> must have matching _Study Numbers_ (`name__v`).
    * <a class="external-link " href="https://safety.veevavault.help/en/lr/01215" target="_blank" rel="noopener">_Products_<i class="fa fa-external-link" aria-hidden="true"></i></a> must have matching _Product Names_ (`name__v`).
    * <a class="external-link " href="https://safety.veevavault.help/en/lr/01145#study-product-matching" target="_blank" rel="noopener">_Study Products_<i class="fa fa-external-link" aria-hidden="true"></i></a> must have matching _Names_ (`name__v`).
* In your Safety Vault: 
    * Create the appropriate <a class="external-link " href="https://safety.veevavault.help/en/lr/840046#blinded-names-in-study-arms" target="_blank" rel="noopener">_Study Product Placeholders_<i class="fa fa-external-link" aria-hidden="true"></i></a>.
    * Add <a class="external-link " href="https://safety.veevavault.help/en/lr/01216#add-study-products" target="_blank" rel="noopener">_Study Products_<i class="fa fa-external-link" aria-hidden="true"></i></a> with the appropriate matching _Blinded Names_ to the applicable _Studies_.
    * Select the appropriate "Sponsor" type of _Organization_ for the _Studies_, _Products_, and _Study Products_. 

If your organization also utilizes the <a href="/en/lr/526178/">Safety-Clinical Operations</a>, <a href="/en/lr/01272/">Safety-RIM</a>, and <a class="external-link " href="https://clinical.veevavault.help/en/lr/60661" target="_blank" rel="noopener">Clinical Operations-EDC<i class="fa fa-external-link" aria-hidden="true"></i></a> Connections, Vault matches _Studies_ between all Vaults based on the matching _Link_ (`link_sys`) values. If there are no common _Link_ values, Vault matches studies based on the <a class="external-link " href="https://safety.veevavault.help/en/lr/01145" target="_blank" rel="noopener">_Study_ matching logic<i class="fa fa-external-link" aria-hidden="true"></i></a>.

## Establishing the Connection {#establishing-the-connection}

When you've made all required configurations described above, establish the connection between your Safety Vault and EDC Vaults. See <a href="/en/lr/53358/">Creating & Managing Connections</a> for detailed instructions.

### Multiple Connections {#multiple-connections}

You can connect your Safety Vault to multiple EDC Vaults. Use the _Copy to new_ action on an existing connection to deep copy an existing connection, and its related [components][1], in the same status as the copied components. 

To copy an existing connection:
1. Navigate to **Admin > Connections**.
2. From the **All Actions** menu of the connection you want to copy, select **Copy to new**. This action is executable only for [_Safety-EDC Connections_][10].
3. Optional: Change the label of the newly generated _Connection_.

<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>: Vault supports up to ten (10) EDC connections in a Safety Vault. Contact your Veeva Representative if you require additional connections.</p>
    </div>
  </div>
</div>



[1]: #safety-edc-connection-components
[2]: #configuring-your-vaults
[3]: #establishing-the-connection
[4]: #study-and-study-product-matching
[5]: #configuring-your-safety-vault
[6]: #map-custom-fields
[7]: #supported-fields
[8]: #sending-sae-reporter-details
[9]: #multiple-connections
[10]: #connections


