G-Queries CSV File Example for EDI

This lesson will provide an example of using G-Queries for EDI. The instructions for completing each of the steps within this lesson can be found in the Software Tester Intermediate Flight Plan G-Queries Training Module.

Story:

For this example, a Tester needs to generate EDI 837P Documents that contain data queried from two CSV Files. The CSV Files are displayed below:

CSV File 1 – Claim Information

CSV File 2 – Claim for Service Line

A separate G-Query will need to be created and set up for each CSV File. Within each G-Query, complete the following steps:

  1. Configure the G-Query Parameters (e.g., output directory, file subdirectory, file name, etc.).
  2. Import the CSV File Column Names into GenRocket.
  3. Map each CSV File Column Name to a Segment/Loop (i.e., Domain) and Element (i.e., Attribute)

Once set up, G-Queries can be added to a G-Case. The data will be queried automatically when the G-Case is used to generate EDI data.

Step 1: Create Claim CSV File G-Query

The first G-Query in this example is titled “ClaimQueries” and is displayed below. To create a new G-Query, click on the Add G-Query button within the G-Queries Management Dashboard.

Complete the following steps to add the G-Query:

Step 1: Enter a Name and Description (optional but recommended).

Step 2: Select the Type of Query.

Step 3: Click the Save button.

Step 2: Configure the Claim CSV File Query Parameters

The following Query Parameters have been configured within the Claim CSV File G-Query:

  • path – Defines the path for the CSV File.
  • subDir – Defines a subdirectory where the CSV File is located.
  • fileName – Defines the name of the CSV File.
  • Delimiter – Defines the delimiter used within the CSV File.

Remember to click the Save button after making any changes to the Query Parameters.

Step 3: Import the Claim CSV File Column Names

The Claim CSV File column names will need to be imported to map them to Segments/Loops (i.e., Domains) and Elements (i.e., Attributes).

Complete the following steps within the CSV File Column Names Pane:

  1. Click on the Import button.
  2. Browse to and select the CSV File.
  3. Click the Save button.

The column names will appear within the CSV File Column Names Pane after the import has finished.

Step 4: Map Each CSV Column Name to a Segment/Loop and Element

Each column within the CSV File that will be queried will need to be mapped to a Segment/Loop (i.e., Domain) and an Element (i.e., Attribute).

Complete the following steps for each CSV Column within the Domain Attributes Pane:

  1. Click the Add button.
  2. Select the EDI Segment.
  3. Select the EDI Element.
  4. Select the Column Name.
  5. Click the Save button.

The Domain Attributes Pane will appear as shown below once the needed CSV Columns have been mapped to a Segment/Loop and Element.

Step 5: Create the Claim for Service Line CSV File G-Query

The second G-Query in this example is titled “ServiceLineQueries” and is displayed below. To create a new G-Query, click the Add G-Query button.

  1. Enter a Name and Description (optional but recommended).
  2. Select the Type of Query.
  3. Click the Save button.

Step 6: Configure the Claim for Service Line CSV File Query Parameters

The following Query Parameters have been configured within the Service Line CSV File G-Query:

  • path – Defines the path for the CSV File.
  • subDir – Defines a subdirectory where the CSV File is located.
  • fileName – Defines the name of the CSV File.
  • Delimiter – Defines the delimiter used within the CSV File.

Remember to click the Save button after making any changes to the Query Parameters.

Step 7: Import the Claim for Service Line CSV File Column Names

The Claim for Service Line CSV File column names will need to be imported to map them to Segments/Loops and Elements.

Complete the following steps within the CSV File Column Names Pane:

  1. Click on the Import button.
  2. Browse to and select the CSV File.
  3. Click the Save button.

The column names will appear within the CSV File Column Names Pane after the import has finished.

Step 8: Map Each CSV Column Name to a Segment/Loop and Element

Each column within the CSV File that will be queried will need to be mapped to a Segment/Loop and an Element.

Complete the following steps for each CSV Column within the Domain Attributes Pane:

  1. Click the Add button.
  2. Select the EDI Segment.
  3. Select the EDI Element.
  4. Select the Column Name.
  5. Click the Save button.

The Domain Attributes Pane will appear as shown below after mapping the needed CSV Columns to the appropriate Segments/Loops and Elements.

Step 9: Add the G-Queries to a G-Case

G-Queries can be added to a G-Case within the G-Case Management Dashboard by completing the following steps:

  1. Select the G-Case Suite, G-Case Category, and G-Case.
  2. Select the G-Queries Tab.
  3. Click on the Add G-Query button.
  4. Select the Q-Query and click the Save button.

Step 10: Run the G-Case Command with the Scenario Chain Set

To generate EDI data using G-Queries, a user will need to download the G-Case Suite or a Test Data File with selected G-Cases. Additionally, users will need to download the EDI Configuration File and Scenario Chain Set.

Once downloaded to a user’s local computer, they will need to copy the G-Case Command within the G-Cases Management Dashboard and complete these steps:

  1. Place the EDI Config File within the config subdirectory and rename to Config.xml.
  2. Open a Command Prompt or Terminal window.
  3. Change the directory to match the resource.home.directory path.
  4. Paste the command into the Command Prompt or Terminal window.
  5. Replace with the name of the Scenario Chain Set.
  6. Press the Enter Key to run the command.

Note: For detailed steps on how to generate EDI data, please see Module 8 of the EDI Flight Plan.

Related Assets

GenRocket - Test Data Management

Download Literature

View Literature
GenRocket - Test Data Management

View Blog

Read More
GenRocket - Test Data Management

How can we help
you today?

Request a Demo

See how GenRocket can solve your toughest test data challenge with quality synthetic data by-design and on-demand