When an EDI 837P Project is created in GenRocket, the entire Transaction Set is enabled. Of course, when you are testing a Transaction Set, not every Segment, Loop, and Element will be needed to complete each test or to achieve a specific Business Case Scenario.

This is where Test Data Cases can be extremely beneficial because they make it possible to fully customize what Transaction Set Segments, Loops, and Elements will be used to generate data. Additionally, you can add Segments (i.e. Domains), add Attributes, and make Generator Configuration changes that are specific to the Test Data Case, but do not effect the Project as a whole. 

When should Test Data Cases be used for EDI 837P Projects?

Test Data Cases can be used to perform specific types of testing (Negative, Integration, Beta, etc.) and for testing Business Case Scenarios., such as: 

  • Commercial Health Insurance Claims
  • Encounter Claims
  • Coordination of Benefits Claims
  • Medicare Secondary Payer Example (COB)
  • Ambulance Claims
  • Chiropractic Claims
  • Oxygen Claims
  • Wheelchair Claims
  • Anesthesia Claims
  • PPO Repriced Claims
  • Out of Network Repriced Claims

We have provided samples of a few of the above Business Case Scenarios within the G-Case Dashboard, which you can copy and customize to meet more specific needs.

How to use Test Data Cases for Business Case Scenarios

To set up a Test Data Case to generate data matching a specific Business Case Scenario, complete the following steps: 

Step 1: Copy a Business Scenario Test Data Case (or Create a New One)

It is recommended to copy a provided Business Case Scenario and to modify the created copy rather than the original Test Data Case. Complete the following steps to do so:

  • Within the G-Case Dashboard, click on the Copy icon within the Actions column.

  • Enter a new Name and Description for the copied Test Data Case.

  • Click Save once finished.

Step 2: Disable/Enable EDI Segments, Loops, and Elements within the Test Data Case

Segments, Loops, and Elements have already been disabled to create each provided Business Case Scenario sample. Once the Test Data Case has been copied, you can enable or disable these items to meet more specific needs. 

To enable or disable specific items within the Transaction Set, complete the following steps: 

  • Choose the EDI View from the drop-down menu.

  • Click on the EDI Tree icon on the G-Case Editor tab.

  • Use each checkbox to enable or disable a Segment, Loop, or Element. A checkmark means the item is currently enabled.

  • Expand Segments and Loops within the EDI Tree View to make additional changes. In this example, Loop_2000A has been expanded. 

  • Click OK once finished.


  • EDI 837P Segments will appear as part of the Test Data Case, as shown below. What Segments are enabled and disabled will depend on what was disabled in the steps above. You can enable and disable Segments within the Test Data Case as needed. 

Step 3: Add Segments or Remove Segments from the Test Data Case (Optional)

Segments can be added to or removed from the Test Data Case after completing Step 2. If a Segment is added and enabled, then test data will be generated for that Segment when the Test Data Case is run.

To add a Segment to a Test Data Case, complete these steps: 

  • Use the Filter to locate each needed Segment. For this example "BHT" has been entered to find the BHT_BeginningOfHierarchicalTransaction.

  • Next, click the Plus (+) icon located to the right of the Segment within the G-Case Editor tab.

  • Added Segments will appear in the table located on the right of the G-Case Editor tab.

  • To remove a Segment from the Test Data Case, click on the Remove (-) icon in the Actions column.

Step 4: Disable/Enable Segments within a Test Data Case (Optional)

Segments added to a Test Data Case can be enabled or disabled as needed to alter what test data is generated when the Test Data Case is run. 

To disable or enable a Segment, click on the toggle slider to the right of its name. If the toggle is blue, then it is enabled. If it is white, it is disabled.

Step 5: Alter Loop Counts for Segments

The Loop Count for each Test Data Case Segment can be changed to a Constant, Increasing, Decreasing, or Range value. 

For example, Loop_2400V1 may need to have a Loop Count of 4 because there will be 4 iterations. Complete these steps to update the Loop Count for a Segment: 

  • Click on the Update Loop Count for Domain icon in the Actions column.

  • Enter 4 for the Loop Count and then click the Save button.

  • Loop_2400V1 will now have a 4, as shown below:

Step 6: Add Attributes to Test Data Case Domain for the Segment

In some instances, you may need to make changes to the generated data for a specific Test Data Case to match the Business Case Scenario. This can be done by adding an Attribute to the Test Data Case Domain.

  • Click the Edit Test Data Case Domain icon in the Actions column.

  • Click the Plus (+) button to add one or more Attributes to the Test Data Case Domain.

  • In the dialog window, tick the checkbox for each Attribute that needs to be added.

  • Click the Save button once finished.

  • Each selected Attribute will be added to the Test Data Case Domain. You can now replace the Generator or make changes to the Generator's Parameter configuration for each added Attribute to generate the appropriate test data for your Business Case Scenario.

Step 7: Alter Generator Configurations for Added Attributes

The Generator configuration for each added Test Data Case Domain Attribute can be modified to meet a defined Business Case Scenario need. Below are 2 examples that show how to: 

  • Alter the Generator Parameters
  • Replace the Current Generator

Example 1: Remove Values from a Test Data Case Domain Attribute

For example, let's say that only one Encounter Identifier is needed in the BHT_BeginningOfHiearchicalTransaction. Remember an encounteridentifier06 Attribute was created for the Test Data Case Domain in Step 6 above.

The encounterIdentifier06 Attribute Generator, by default, has 3 identifiers: CH, RP, and 31. For this sample, only CH is needed. You will need to modify the Generator configuration so that only CH is generated. Complete the steps below: 

  • Click on the encounterIdentifier06 Attribute.

  • Click on a value within the list to select it and then click the Remove button. This will need to be done twice to remove each value from the Attribute.

  • The configuration will appear as shown below. Click the Save Generator button.

Example 2: Replace a Generator for a Test Data Case Domain Attribute

In some Business Case Scenarios, an Attribute will need to be set to "Empty" or a specific text value.

For this example, the organizationName103 Attribute Generator within the NM1_SubmitterName_1000A Segment will need to be replaced with the ConstantGen Generator and a constant value of "PREMIER BILLING SERVICE".

  • Click on the organizationName103 Attribute.

  • Select the ConstantGen Generator in the Quick Generator Replacement Menu.

  • Once selected, click the Replace button to replace the current Generator.

  • Click Yes to replace the Generator.

  • Enter PREMIER BILLING SERVICE as the value and click the Save Generator button.

Generating EDI Test Data

Once the EDI 837P Test Data Case has been configured for your specific Business Case Scenario, you will be able to download and run the Test Data Case using the provided command line.

EDI Projects have a Scenario Chain Set and a Config File that must also be downloaded in order to generate test data for a Test Data Case. You can download these items from the EDI Dashboard, which is accessed by expanding the Management menu and selecting EDI Management.

Select the EDI-837-P Project. Then click on the EDI Config and Scenarios buttons to download these items. Please note that it takes a little time to download the Scenario Chain Set. For detailed steps, click here.

The name of the set will replace <ScenarioName.grs> within the command line above. For an EDI 837P Project, the name would look similar to this: EDI837PScenarioChainSet. Please note that this name could be different based on the project. 


EDI Test Data Cases can be used to customize what Segments, Loops, and Elements are included in generated Test Data. Domains, Attributes, and Generator configurations can be modified to test specific Business Case Scenarios within a Test Data Case without impacting the EDI Project Configuration.

Note: A detailed implementation guide for Business Case Scenario 1: Commercial Health Insurance Claim can be found here.