Skip to main content

Adverse Events

An Adverse Event (AE) record stores information on perceived unintended or unfavorable symptoms of a product. An AE record can be added to an Interaction to track pertinent information. The AE page is configured using the Adverse Event Layout (MED_Adverse_Event_Layout__mdt) custom metadata type and uses the following custom objects:

Adverse Event primary sources​

When the Auto Stamp Primary Source Global Setting is enabled and an Adverse Event record is created, Inquiry Management automatically creates and displays primary source records in the AE Primary Source Related List on the Adverse Event record. The primary source records automatically populate with information from the Requester and Referred By accounts listed on the Interaction. More specifically, information about the Requester listed on Interaction maps to an automatically generated primary source record associated with the Adverse Event. Likewise, Referred By fields on the Interaction map to a second primary source record. For more information about the Global Setting custom metadata, see Custom metadata settings.

Field mappings​

The Requester to primary source field mapping and Referred By to primary source field mapping tables list the primary source field mappings.

Requester to primary source field mapping​
AE Primary SourceCase
MED_First_Name__cAccount.FirstName
MED_Last_Name__cAccount.LastName
MED_Middle_Name__cAccount.MiddleName
MED_Title__cAccount.PersonTitle
MED_Qualification__cAccount.MED_Credentials__c
MED_Organization__cMED_Institution_Name__c
MED_City__cMED_City__c
MED_Postal_Code__cMED_Postal_Code__c
MED_Phone__cMED_Phone__c
MED_State__cMED_State__c
MED_Country__cMED_Country__c
MED_Address_Street__cMED_Address_Line_1__c + MED_Address_Line_2__c Note: If the Case street address value exceeds 100 characters, the value is truncated when mapped to MED_Address_Street__c.

In the Referred By to primary source field mapping table, sometimes the Case fields lead with <primary address> or <primary phone>. <primary address> and <primary phone> indicate that the data is copied from the Contact Information records related to the Referred By Account.

note

Account type MED_Employee is blacklisted from creating a primary source from Referred By.

Referred By to primary source field mapping​
AE Primary SourceCase
MED_First_Name__cMED_Referred_By__r.FirstName
MED_Last_Name__cMED_Referred_By__r.LastName
MED_Middle_Name__cMED_Referred_By__r.MiddleName
MED_Title__cMED_Referred_By__r.PersonTitle
MED_Qualification__cMED_Referred_By__r.MED_Credentials__c
MED_City__c<primary address>.MED_City__c
MED_Postal_Code__c<primary address>.MED_Postal_Code__c
MED_Phone__c<primary phone>.MED_Phone__c
MED_State__c<primary address>.MED_State__c
MED_Country__c<primary address>.MED_Country__c
MED_Address_Street__c<primary address>.MED_Address_Line_1__c + MED_Address_Line_2__c Note: If the Case street address value exceeds 100 characters, the value is truncated when mapped to MED_Address_Street__c.

E2B(R3) generation​

E2B(R3) XML files can be generated from and attached to an Adverse Event (MED_Adverse_Event__c) record. They are attached as Files or as Attachments depending on the "Use Files" Global Setting value configured within the instance.

Each generated E2B file is saved with a filename that combines the timestamp at which the file was generated and the Adverse Event Name:

ICSR_<yyyyMMddHHmmss>_<Adverse Event Name>.xml

For example, an E2B file generated on June 1, 2026 at 10:15:30 for the Adverse Event named AE-00042 is saved as ICSR_20260601101530_AE-00042.xml. Including the Adverse Event Name ensures that the filename is unique even when E2B files for different Adverse Events are generated within the same second.

The following file formats are supported:

  • Portable network graphics (.png)

  • Bitmap image format (.bmp)

  • Graphics interchange format (.gif)

  • Word processing document format (.wpd)

For additional details regarding the E2B(R3) support, see E2B(R3) support.

Enablement​

To enable the ability for users to generate E2B files, add the Generate E2B quick action to the Adverse Event page layout.

Configuration​

Inquiry Management ships with a default mapping of Adverse Event (and child object) fields to nodes in the E2B(R3) XML specification. These mappings can be modified using the E2B Field Mapping and E2B Setting custom metadata types. The field mapping maps the Data Element Identifiers (e.g., C.1.2) to fields in the Inquiry Management data model. Currently, only data elements with a default mapping are supported in the output E2B file.

If Inquiry Management is configured to use Salesforce Files instead of attachments, additional documents attached to the Adverse Event are also included in the E2B file.

Custom labels​

This component makes use of the following labels that can be configured within the Salesforce translation workbench to change display text values.

#Label Name
1MED_E2B_Download_Button
2MED_E2B_Error
3MED_E2B_Error_Header
4MED_E2B_Field_Required
5MED_E2B_Generate_Button
6MED_E2B_Generator_Header
7MED_E2B_Generator_Instruction_Text
8MED_E2B_Invalid_Document_Format
9MED_E2B_Locked_Message
10MED_E2B_Success

Customization​

Customers can override how E2B XML documents are generated through the use of the E2B customization framework. This framework is intended to be utilized by a Salesforce.com developer to alter how E2B XML files are generated. This can be useful should an XML element attribute require a localized value that differs from the standard XML schema that is supported.

The high-level process of customizing an XML node generation is as follows:

  1. Review the documentation within the MED_E2B_MCCI_IN200100UV01_Batch apex class within the Inquiry Management source code.

  2. Create a new Apex Class that extends the MED_E2B_MCCI_IN200100UV01_Batch apex class, and implement the desired implementations of the relevant virtual methods from the MED_E2B_MCCI_IN200100UV01_Batch class. As a best practice appropriate test code should also be written to offer unit test coverage for the customization.

  3. Deploy the new Apex Class to the appropriate environments.

  4. Create an E2B Custom Generator Custom Metadata Type to register the new Apex Class with the E2B generation process.

  5. Test the custom functionality by generating test E2B documents.

For developers seeking to customize how an XML element within the E2B file is generated, visit How to Contact Customer Support to contact Mavens Customer Support for sample code and additional developer details.

Telecom tags​

By default, \<telecom\> tags in E2B files automatically add the appropriate telecommunication prefix for every reporter's phone number, sender's phone number, sender's fax number, and sender's email address, if a prefix does not already exist. The \<telecom\> tag prefixes are as follows:

Element numberElement name\<telecom\> tag prefix
C.2.r.2.7Reporter's Telephonetel:
C.3.4.6Sender's Telephonetel:
C.3.4.7Sender's Faxfax:
C.3.4.8Sender's Emailmailto:

NullFlavors​

As a general rule, Medical Information Cloud omits the node instead of using a nullFlavor. For example, if a field does not have a value, it is not included and nullFlavor is not used. When D.1, specifically, is left blank, they will be sent as a nullFlavor of UNK.

To set a nullFlavor, map a value with nullFlavor_\<null flavor value\>. The specified \<null flavor value\> (without the nullFlavor_ prefix) will be set as a special nullFlavor attribute.

Integration​

Customers that intend to integrate generated E2B files with 3rd party systems are recommended to explore facilitation via an integration service provider. The Salesforce.com platform is optimized to support multi-tenancy, which includes limits placed on the amount of computing resources any one tenant can consume from shared platform resources. Specifically, there exist several limits on the size and duration of outbound HTTP/S requests that can be made natively on the Salesforce.com platform.

Given the nature of E2B files and the potentially large number and large size of related source materials, it is recommended that Customers use an external integration solution, such as a middleware provider, to ensure E2B files are transmitted in a reliable and scalable fashion.

For more information on the relevant platform governor limits, see Salesforce's documentation.

E2B(R3) support​

Inquiry Management can now generate E2B files that comply with the R3 specification, available here: https://www.fda.gov/downloads/Drugs/GuidanceComplianceRegulatoryInformation/Guidances/UCM275638.pdf

It should be noted that not all elements supported within the comprehensive E2B(R3) specification are supported currently. While efforts have been made to cover the portions of the specification most relevant to medical information, there may exist certain scenarios that are not presently covered. For this reason, it is highly recommended that sufficient time be allocated to properly define the requirements specific to a particular implementation of E2B within Inquiry Management and rationalize them against the supported field set to ensure no gaps exist. Fields that are not explicitly listed below should be considered unsupported.

Supported E2B(R3) elements​

The current set of E2B(R3) elements supported within Inquiry Management is defined in the tables below.

Case safety report elements​
Element numberElement name
C.1.3Type of Report
C.1.4Date Report Was First Received from Source
C.1.6.1Are Additional Documents Available
C.1.6.1.r.1Documents Held by Sender
C.1.7Does This Case Fulfill the Local Criteria for an Expedited Report?
C.2.r.1.1Reporter's Title
C.2.r.1.2Reporter's Given Name
C.2.r.1.3Reporter's Middle Name
C.2.r.1.4Reporter's Family Name
C.2.r.2.1Reporter's Organization
C.2.r.2.2Reporter's Department
C.2.r.2.3Reporter's Street
C.2.r.2.4Reporter's City
C.2.r.2.5Reporter's State or Province
C.2.r.2.6Reporter's Postcode
C.2.r.2.7Reporter's Telephone
C.2.r.3Reporter's Country Code
C.2.r.4Qualification
C.2.r.5Primary Source for Regulatory Purposes
C.4.r.1Literature Reference(s)
C.5.3Sponsor Study Number
C.5.4Study Type Where Reaction(s) / Event(s) Were Observed
Patient elements​
Element numberElement name
D.1Patient (name or initials)
D.2.1Date of Birth
D.2.2.1aGestation Period When Reaction / Event Was Observed in the Foetus (value)
D.2.2.1bGestation Period When Reaction / Event Was Observed in the Foetus (unit)
D.2.3Patient Age Group (as per reporter)
D.3Body Weight (kg)
D.4Height (cm)
D.5Sex
D.6Las Menstrual Period Date
D.7.1.r.1aMedDRA Version for Medical History
D.7.1.r.1bMedical history (disease / surgical procedure / etc.) (MedDRA code)
D.7.1.r.2Start Date
D.7.1.r.3Continuing
D.7.1.r.4End Date
D.7.1.r.5Comments
D.7.1.r.6Family History
D.7.2Text for Relevant Medical History and Concurrent Conditions (not including reaction / event)
D.7.3Concomitant Therapies
D.8.r.1Name of Drug as Reported
D.8.r.4Start Date
D.8.r.5End Date
D.8.r.6aMedDRA Version for Indication
D.8.r.6bIndication (MedDRA code)
D.8.r.7aMedDRA Version for Reaction
D.8.r.7bReaction (MedDRA code)
D.9.1Date of Death
D.9.2.r.1aMedDRA Version for Reported Cause(s) of Death
D.9.2.r.1bReported Cause(s) of Death (MedDRA code)
D.9.2.r.2Reported Cause(s) of Death (free text)
D.9.3Was Autopsy Done?
D.9.4.r.1aMedDRA Version for Autopsy-determined Cause(s) of Death
D.9.4.r.2Autopsy-determined Cause(s) of Death (free text)
D.10.1Patient Identification
D.10.2.1Date of Birth of Parent
D.10.2.2aAge of Parent (number)
D.10.3Last Menstrual Period Date of Parent
D.10.4Body Weight (kg) of Parent
D.10.5Height (cm) of Parent
D.10.6Sex of Parent
D.10.7.1.r.1aMedDRA Version for Medical History
D.10.7.1.r.1bMedical History (disease / surgical procedure/ etc.) (MedDRA code)
D.10.7.1.r.2Start Date
D.10.7.1.r.3Continuing
D.10.7.1.r.4End Date
D.10.7.1.r.5Comments
D.10.7.2Text for Relevant Medical History and Concurrent Conditions of Parent
D.10.8.r.1Name of Drug as Reported
D.10.8.r.4Start Date
D.10.8.r.5End Date
D.10.8.r.6aMedDRA Version for Indication
D.10.8.r.6bIndication (MedDRA code)
D.10.8.r.7aMedDRA Version for Reaction
D.10.8.r.7bReactions (MedDRA code)
Reaction / Event elements​
Element numberElement name
E.i.1.1aReaction / Event as Reported by the Primary Source in Native Language
E.i.1.1bReaction / Event as Reported by the Primary Source Language
E.i.1.2Reaction / Event as Reported by the Primary Source for Translation
E.i.2.1aMedDRA Version for Reaction / Event
E.i.2.1bReaction / Event (MedDRA code)
E.i.3.1Term Highlighted by the Reporter
E.i.3.2aResults in Death
E.i.3.2bLife Threatening
E.i.3.2cCaused / Prolonged Hospitalisation
E.i.3.2dDisabling / Incapacitating
E.i.3.2eCongenital Anomaly / Birth Defect
E.i.3.2fOther Medically Important Condition
E.i.4Date of Start of Reaction / Event
E.i.5Date of End of Reaction / Event
E.i.6aDuration of Reaction / Event (number)
E.i.6bDuration of Reaction / Event (unit)
E.i.7Outcome of Reaction / Event at the Time of Last Observation
E.i.8Medical Confirmation by Healthcare Professional
E.i.9Identification of the Country Where the Reaction / Event Occurred
Test result elements​
Element numberElement name
F.r.1Test Date
F.r.2.1Test Name (Free text)
F.r.2.2aMedDRA Version for Test Name
F.r.2.2bTest Name (MedDRA code)
F.r.3.1Test Result (code)
F.r.3.2Test Result (value / qualifier)
F.r.3.3Test Result (unit)
F.r.3.4Result Unstructured Data (free text)
F.r.4Normal Low Value Note: Enter numeric values for the units described in MED_Unit__c. Numeric values improve reporting per the E2B(R3) specification.
F.r.5Normal High Value Note: Enter numeric values for the units described in MED_Unit__c. Numeric values improve reporting per the E2B(R3) specification.
F.r.6Comments (free text)
F.r.7More Information Available
Drug elements​
Element numberElement name
G.k.1Characterization of Drug Role
G.k.2.2Medicinal Product Name as Reported by the Primary Source
G.k.2.4Identification of the Country Where the Drug Was Obtained
G.k.3.1Authorization / Application Number
G.k.3.2Country of Authorization / Application
G.k.3.3Name of Holder / Applicant
G.k.4.r.1aDose(number)
G.k.4.r.1bDose (unit)
G.k.4.r.2Number of Units in the Interval
G.k.4.r.3Definition of the Time Interval Unit
G.k.4.r.4Date and Time of Start of Drug
G.k.4.r.5Date and Time of Last Administration
G.k.4.r.6aDuration of Drug Administration (number)
G.k.4.r.6bDuration of Drug Administration (unit)
G.k.4.r.7Batch / Lot Number
G.k.4.r.8Dosage Text
G.k.4.r.9.1Pharmaceutical Dose Form (free text)
G.k.4.r.10.1Route of Administration (free text)
G.k.4.r.10.2aRoute of Administration TermID Version Date / Number
G.k.4.r.10.2bRoute of Administration TermID
G.k.4.r.11.1Parent Route of Administration (free text)
G.k.4.r.11.2aParent Route of Administration TermID Version Date / Number
G.k.4.r.11.2bParent Route of Administration TermID
G.k.5aCumulative Dose to First Reaction (number)
G.k.5bCumulative Dose to First Reaction (unit)
G.k.6aGestation Period at Time of Exposure (number)
G.k.6bGestation Period at Time of Exposure (unit)
G.k.7.r.1Indication as Reported by the Primary Source
G.k.7.r.2aMedDRA Version for Indication
G.k.8Action(s) Taken with Drug
G.k.9.i.3.1aTime Interval between Beginning of Drug Administration and Start of Reaction / Event (number)
G.k.9.i.3.1bTime Interval between Beginning of Drug Administration and Start of Reaction / Event (unit)
G.k.9.i.3.2aTime Interval between Last Dose of Drug and Start of Reaction / Event (number)
G.k.9.i.3.2bTime Interval between Last Dose of Drug and Start of Reaction / Event (unit)
G.k.9.i.4Did Reaction Recur on Re-administration?
G.k.11Additional Information on Drug (free text)
Case summary elements​
Element numberElement name
H.1Case Narrative Including Clinical Course, Therapeutic Measures, Outcome and Additional Relevant Information
H.2Reporter's Comments
Transmission identification elements​
Element numberElement name
N.1.3Batch Sender Identifier
N.1.4Batch Receiver Identifier
N.2.r.2Message Sender Identifier
N.2.r.3Message Receiver Identifier
Document attachments​

Optionally, you can configure whether or not you want documents compressed and included in the E2B file. This can be enabled for any attachments that are included in-line within the E2B file. Medical Information Cloud supports the deflate compression algorithm. For additional details on this configuration, see E2B(R3) support.

To enable file compression:

  • If you are including files, ensure the Use Compression (MED_Use_Compression__c) field on the E2B Setting (MED_E2B_Setting__mdt) custom metadata type is checked.

  • If the files attached to the E2B should be included in the E2B XML file, ensure the Include Files (MED_Include_Files__c) field on the E2B Setting (MED_E2B_Setting__mdt) is checked.

As of Medical Information Cloud V15, the new E2B package, the E2B XML is now always stored as a Salesforce file and never as an attachment as the MED_Global_Settings__.MED_Use_Files__c metadata is no longer supported. As such, you still need to configure these settings for the new E2B package. Reference the Required actions section below.

Required actions​

If using the new E2B package, you must complete the following required actions:

  1. Assign the new MED_E2B_User permission set to users who need to generate E2B files. If using permission set groups, as recommended, add this new permission set to the existing group that is assigned to your users.

  2. Make sure MED_E2B_Setting__mdt.MED_Include_Files__c is checked unless MED_Global_Settings__.MED_Use_Files__c was unchecked (rare). The former controls whether files are included in the XML output.

E2B testing​

Mavens uses the following procedures when validating E2B functionalities.

E2B development and bug fixing​

When developing or fixing the E2B generation, developers should reference this information and use the following testing strategies.

  • Manually check the XML file for the values entered into the AE (Adverse Event)

  • Compare the XML structure to the reference instance

  • Perform E2B Schema validation with xmllint

  • Perform FDA validation with FDA online validator

  • XPath validation

Validation testing​

Validation test cases require manually filling out a specific set of fields, generating the file, and verifying the values are present. While not every field is tested individually, all supported fields are included in the overall testing. Additionally, some tests involve populating a large number of fields then validating the file using the FDA validator.

Each bug identified also has a dedicated test case to replicate the exact scenario of the bug and manually confirm that the XML meets the expected format. Moving forward, Mavens will also be adding XPath validation to all new bug fix validation tests.

  • For Ad-hoc testing when developers make a change, the following processes are followed:

    • Use a tool to randomly populate a complete Adverse Event, generate the E2B then check it against the XML Schema using xmllint

    • Perform FDA validation steps

    • Compare the test case to the reference instance

  • For Existing test plans:

    • Most test cases manually check for the values

    • There is a generic case that uses xmllint to validate the entire file

  • For New bugs have a dedicated test plan that includes the following:

    • Conducting FDA validation

    • Performing XPath validation

      • The XPath and version used will be published
Presubmit Validation for Adverse Events​

Administrators can enforce client-specific data completeness on an Adverse Event (MED_Adverse_Event__c) record and its child records immediately before the Adverse Event is submitted to safety. Submission happens through Send To Safety (MED_Send_To_Safety) or Generate E2B (MED_Generate_E2B_Action) quick actions.

As specialists may need several days to collect Adverse Event data, applying these completeness checks on every save is not ideal. The Presubmit Validation mechanism lets administrators apply these checks only at submission time.

The Run Presubmit Validation (MED_Run_Presubmit_Validation__c) checkbox field is available on the Adverse Event (MED_Adverse_Event__c) object and on the following Adverse Event child objects:

Adverse Event Child Objects​
  • Adverse Event Drug Information (MED_AE_Drug_Information__c)
  • Adverse Event Drug History (MED_AE_Drug_History__c)
  • Adverse Event Medical History (MED_AE_Medical_History__c)
  • Adverse Event Primary Source (MED_AE_Primary_Source__c)
  • Adverse Event Reaction (MED_AE_Reaction__c)
  • Adverse Event Results (MED_AE_Results__c)

The Run Presubmit Validation (MED_Run_Presubmit_Validation__c) field defaults to false on every record so validation rules using it are inactive during routine record edits and only enforce completeness at the moment of submission. When a user clicks Send To Safety or Generate E2B, the system sets Run Presubmit Validation to true on the parent Adverse Event record and propagates the value to every related child record. At this point, Salesforce evaluates every validation rule on the Adverse Event (MED_Adverse_Event__c) object and its child objects whose formula references the Run Presubmit Validation (MED_Run_Presubmit_Validation__c) field. If a validation rule blocks the update, the submission is canceled and the user sees the validation error.

Use Presubmit Validation

To use Presubmit Validation:

  1. Grant users access to the new Run Presubmit Validation (MED_Run_Presubmit_Validation__c) field on the Adverse Event object and each Adverse Event child object listed above.

  2. In the Object Manager, open the Adverse Event (MED_Adverse_Event__c) object or an Adverse Event child object.

  3. Create a new Validation Rule.

  4. Configure the following:

    • Rule Name - Enter a name.

    • Error Condition Formula - Here, reference the Run Presubmit Validation (MED_Run_Presubmit_Validation__c) field and the data-completeness condition you want to enforce. For example:

      AND
      (
      MED_Run_Presubmit_Validation__c,
      ISBLANK(MED_Some_Required_Field__c)
      )
    • Error Message - Provide an error message that tells the user which field must be populated and where it lives.

      tip

      Administrators can also add the Run Presubmit Validation (MED_Run_Presubmit_Validation__c) field to the Adverse Event (MED_Adverse_Event__c) Page Layout to allow users to toggle Presubmit Validation manually before clicking a submission button (Send To Safety (MED_Send_To_Safety) or Generate E2B (MED_Generate_E2B_Action)).