skip to Main Content

I think I’m missing something simple and obvious. But, this is giving me trouble.

I’m on Mirth 3.10.1 on Centos with SQL Server as my DB. I’m using file read inbound and file writer outbound.

Be gentle. This is my first and very simple project.

I want to take in a X12 835 with a ~ segment and | element and ^ subelement delimiter, and output with n segment and * element and : subelement delimeter. Shouldn’t I just have to set up source and destination with EDI and just change the inbound and outbound properties?

My Source Connector setup

2

Answers


  1. Chosen as BEST ANSWER

    SOOOOO.... I found my answer.

    Here's the deal, the Source and Destination delimiter values in Data Types dialog in the channel properties don't seem to do a thing to change the delimiters used in the output. I tried ALL combinations (I think) of Inferred, not Inferred, etc... nothing. Same delimiters on the way out as in. Then, I thought... hmmm... let's look at the XML since I have a background in XML. Sure enough, the delimiters are in the XML.

    So, I went looking for how to change those. And, in looking for that, i found the following code on another unrelated post:

        msg.@segmentDelimiter = "n";
        msg.@elementDelimiter = "*";
        msg.@subelementDelimiter = ":";
    

    And, what do you know.... It worked!

    Now, I feel ingorant enough to be dangerous rather than so ignorant I'm completely lost!


  2. This could probably be done entirely in the preprocessor with string replaces, and skip converting to xml in the transformer.

    message.replace(/~/g, 'n').replace(/|/g, '*').replace(/^/g, ':');
    

    I would have expected your initial attempt to work, as well, but I haven’t tried it myself. If it is not possible to make this work only by changing data type properties, that may be a bug.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search