Download & Install Sample

Already running RSSBus Connect? This sample will setup RSSBus Connect with the data and port configurations referenced in this article:

  Download Sample
  Sample Installation Info

Convert EDI File to CSV

RSSBus Connect allows you to easily embed document translation directly into your EDI integration. The following sample project demonstrates how different ports in RSSBus Connect are used to automatically convert EDI files into CSV files. The included sample port configuration aggregates the requested services and procedures from a health care eligibility benefit inquiry (EDI 270) into a single CSV file.

Drop in the Sample EDI File

To get started with the sample, download and install RSSBus Connect (free 30-day trial). Then download the sample project and extract and copy the contents to the "data" folder in the installation location for RSSBus Connect. For Windows installations, this is likely C:\Program Files\RSSBus\RSSBus Connect. Please consult the documentation for the Java build of RSSBus Connect for Linux/Unix/Mac installations.

Convert the EDI Document from X12 to XML

The EDI_X12_In port is an X12 port that translates EDI documents from X12 format to XML format. This sample specifically translates a 270 document (health care eligibility benefit inquiry). To translate documents manually, navigate to the EDI_X12_IN port in RSSBus Connect, click the Send tab, select the documents you wish to translate, and click the Send button.

Configure Automation

To automate the translation, navigate to the Settings tab on the EDI_X12_In port, select the checkbox to enable automation, and select MAP_TO_CSV for the Send To port. By doing so, you configure RSSBus Connect to automatically translate any X12 documents sent to the port and send the XML on to the MAP_TO_CSV port, ready to be transformed into CSV.

Aggregate the Requested Services & Procedures to a CSV File

The MAP_TO_CSV port is a Map port that maps the data in an XML document to a CSV file. This sample takes each requested service and procedure code, along with the other provided provider, subscriber, and trace information, and stores them each as a separate row in the CSV file. The MAP_TO_CSV port uses a sample 270 XML file (270_sample.xml) and CSV file (270_sample.csv) as the source and destination file, respectively.

Script to Transform the 270 Document

RSSBus Connect has a template-based mapping option for complex data sets that simply allows you to fill in the destination template with lookup paths and conditional logic from the source document. The template below maps the XML-formatted 270 document to a CSV file. For more information on using RSSBus Connect mapping templates, you can refer to ourĀ Online Help documentation.

payer_name,payer_id,provider_name,provider_id,provider_hicn,subscriber_lastname,subscriber_firstname,subscriber_hicn,subscriber_dob,tracking_no,originating_company_id,service_code,procedure_code
<!--The script to read through the 270 XML file and organize the values as a comma-separated row. Each row will contain either a procedure or service along with all of the other information for the request (payer information, subscriber information, etc).-->
<rsb:call op='xmlDOMSearch?xpath=/Interchange/FunctionalGroup/TransactionSet/TX-00501-270'>
  <rsb:set attr="content">[xpath("HLLoop1\[NM1Loop1/NM1/NM101='PR'\]/NM1Loop1/NM1/NM103")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='PR'\]/NM1Loop1/NM1/NM109")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='1P'\]/NM1Loop1/NM1/NM103")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='1P'\]/NM1Loop1/NM1/NM109")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/NM1Loop1/NM1/NM109")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/NM1Loop1/NM1/NM103")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/NM1Loop1/NM1/NM104")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/NM1Loop1/NM1/NM109")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/NM1Loop1/DMG/DMG02")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/TRN/TRN02")],[xpath("HLLoop1\[NM1Loop1/NM1/NM101='IL'\]/TRN/TRN03")]</rsb:set>
  <rsb:call op="xmlDOMSearch?xpath=HLLoop1">
    <!-- EQLoops are only present for the subscriber HLLoop -->
    <rsb:call op="xmlDOMSearch?xpath=NM1Loop1/EQLoop1">
      <!--requested service(s)-->
      <rsb:set attr="tmp">[xpath("EQ/EQ01")]</rsb:set>
      <rsb:check attr= "tmp">[content],[tmp],
      </rsb:check>
      <!--requested procedure(s)-->
      <rsb:set attr="tmp2">[xpath("EQ/EQ02/EQ0202")]</rsb:set>
      <rsb:check attr= "tmp2">[content],,[tmp2]
      </rsb:check>
    </rsb:call>
  </rsb:call>
</rsb:call>

With the mapping written, the last thing to do is determine whether you wish to perform the aggregation manually or automatically.

Perform Aggregation Manually

To perform the aggregation manually, navigate to the MAP_TO_CSV port, click the Send tab, select the file(s) you wish to map, and click the Send button.

Configure Automation

To automate the aggregation, navigate to the MAP_TO_CSV port, click the Settings tab, scroll down, and select the checkbox to enable automation. This will cause the port to automatically map files placed in the Send folder. You can also have the results sent on to another port.

More Information & Next Steps

As you can see, with RSSBus Connect, it is possible to integrate data transformation into your EDI solution, easily aggregating data from an EDI document into a CSV file. For more information on RSSBus Connect, visit our home page. Download your free, 30-day trial and start controlling your business document exchange today!

Downloads