Description
This article will provide an example of using a G-Query for EDI. Click here for additional information on queries.
Story
For this example, a Tester needs to generate EDI 837P documents containing 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 query will need to be created and set up for each CSV File. Within each query, complete the following steps:
- Configure the Query Parameters (e.g., output directory, file subdirectory, file name, etc.).
- Import the CSV File Column Names into GenRocket.
- Map each CSV File Column Name to a Segment/Loop (i.e., Domain) and Element (i.e., Attribute)
Once set up, the Query can be added to a G-Case. The data will be queried automatically when the G-Case is used to generate EDI data.
Story Steps
- Step 1: Create Claim CSV File G-Query
- Step 2: Configure the Claim CSV File Query Parameters
- Step 3: Import the Claim CSV File Column Names
- Step 4: Map Each CSV Column Name to a Segment/Loop and Element
- Step 5: Create the Claim for Service Line CSV File G-Query
- Step 6: Configure the Claim for Service Line CSV File Query Parameters
- Step 7: Import the Claim for Service Line CSV File Column Names
- Step 8: Map Each CSV Column Name to a Segment/Loop and Element
- Step 9: Add the G-Queries to a G-Case
- Step 10: Run the G-Case Command with the Scenario Chain Set
Step 1: Create Claim CSV File Query
Click on the Add G-Query button.
Complete the following steps to add the G-Query:
- Enter a Name and Description (optional but recommended).
- Select the Type of Query.
- 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 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:
- Click on the Import button.
- Browse to and select the CSV file.
- 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 must 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:
- Click the Add button.
- Select the EDI Segment.
- Select the EDI Element.
- Select the Column Name.
- 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.
- Enter a Name and Description (optional but recommended).
- Select the Type of Query.
- 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 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:
- Click on the Import button.
- Browse to and select the CSV File.
- 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 must be mapped to a Segment/Loop and an Element.
Complete the following steps for each CSV Column within the Domain Attributes Pane:
- Click the Add button.
- Select the EDI Segment.
- Select the EDI Element.
- Select the Column Name.
- 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:
- Select the G-Case Suite, G-Case Category, and G-Case.
- Select the G-Queries Tab.
- Click on the Add G-Query button.
- 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 must 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:
- Place the EDI Config File within the config subdirectory and rename it to Config.xml.
- Open a Command Prompt or Terminal window.
- Change the directory to match the resource.home.directory path.
- Paste the command into the Command Prompt or Terminal window.
- Replace with the name of the Scenario Chain Set.
- Press the Enter key to run the command.