Description

The EDIFileMaskReceiver uses an existing EDI document as a template for masking. It creates one or more new EDI documents from the referenced template document by replacing the sensitive data with synthetically generated data at the positions configured in this Receiver. 

Important: This Receiver can only generate EDI documents with an existing EDI Document to reference as a template. 


In This Article


Receiver Parameters

The EDIFileMaskReceiver requires the following parameters to be configured. The * means that a particular Receiver parameter is required to be filled in.

  • outputDirectory* - Defines the location to store the synthetically generated EDI documents.
  • outputSubDir - Defines the sub-directory within the output directory to store the generated EDI documents.
  • outputFileNamePrefix* - Defines the prefix of the output EDI Document name.
  • templateDirectory* - Defines the location of the EDI Template Document.
  • templateSubDir - Defines the sub-directory within the EDI Template Directory where the EDI Template document will be placed.
  • templateFileName* -  Defines the name of the EDI Template document.
  • numberOfDocuments* - Define the number of EDI documents to create. 
  • dataSeparator* - Defines the data separator in the EDI document.
  • subDataSeparator* - Defines the sub-element separator within the EDI document.
  • repeatSeparator* - Defines the repeat separator used in the EDI template document.
  • segmentSeparator* -  Defines the Segment separator used in the EDI template document.




Receiver Property Keys

The EDIFileReceiver requires the following Receiver Property Keys to be configured.

  • segmentName - Defines the name of the segment in which the data element needs to be replaced with synthetically generated data.
  • elementPosition - Defines the position of the Data element in the given segment where the value is to be replaced with the synthetically generated values. The element position starts with 0.
  • parentSegment - This field is optional. This is required only when you want to mask a segment that has to be masked for a particular parent. (N3 segment for Billing Provider only (NM1*85)).

Example 1 - To replace the GENROCKET HEALTH in the following segment


NM1*41*2*GENROCKET HEALTH*****46*GENTH0001~


segmentName = NM1

elementPosition = 3


Example 2 - To replace the 123 W 7TH STREET in the following segment (for billing Provider only)


NM1*85*2*GENROCKET HEALTH*****46*GENTH0001~

N3*123 W 7TH STREET~


segmentName = N3

elementPosition = 1

parentSegment = NM1*85




How Does EDI Masking Work? 

Note: An EDI Project is not needed to use this Receiver. Users only need a basic project with a project version. 


Step 1 - Create a Domain and set loopCount

The Domain contains the Attributes and configured Generators that will be used to mask template file values with enumerated or synthetic data values in the generated output file(s).

  • The Domain loopCount should be the number of segments to be masked within an EDI template times the number of documents to be created (as mentioned in the Receiver parameter).



Step 2 - Add Attributes and Configure Generators

Add Attributes for each Element that needs to be masked with Enumerated or Synthetic data.



For each Attribute, assign the appropriate Generator: 

  • Enumerated - Use a Generator (e.g., ListCSVGen, ListCSVV2Gen) to import data at the time of test data generation.


  • Synthetic data - Configure Generators to generate the correct type of synthetic data values during test data generation. This can be any Generator that generates the required synthetic data—for example, AddressGen for street addresses.


Step 3 - Assign the EDIFileMaskReceiver to the Domain

To learn how to assign a Receiver, click here.
 

Step 4 - Configure the Receiver Parameters

These parameters are necessary for information such as the output file name format, source template file name used for masking, and number of generated documents. 

  • Remember to configure the numberOfDocuments parameter. This determines how many masked EDI documents will be generated.
  • Remember to use the right path for the template as well.


Step 5 - Configure the Receiver Attribute Property Keys

  • The property keys determine the segment and positions along with any parent segment for SDM.
  • Examples are provided in the Receiver Property Keys section.


Step 6 - Create a Scenario for the Domain and Download the Scenario

Use the New Scenario or Quick Scenario button to create a new Scenario. Then, use the Cloud icon to download it to your local machine.
 


Step 7 - Run the Command at the Command Line

Use the scenario name that is created in the GenRocket web platform. In this example, it was BatchfileScenario.grs.
 

genrocket -r BatchfileScenario.grs


Template File Data Sample


Generated File Data Sample