Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

v1.7 improper parsing of X12

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • v1.7 improper parsing of X12

    It appears that the X12 parser is not handling X12 messages properly. When reading an 835 file with multiple (or single) transactions, the resulting internal XML looks like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <X12Transaction>
    
        <ISA>
    
            <ISA.01>
    
                <ISA.01.1>00</ISA.01.1>
    
            </ISA.01>
    
            <ISA.02>
    
                <ISA.02.1/>
    
            </ISA.02>
    
            <ISA.03>
    
                <ISA.03.1>01</ISA.03.1>
    
            </ISA.03>
    
            <ISA.04>
    
                <ISA.04.1>AGENCY</ISA.04.1>
    
            </ISA.04>
    
            <ISA.05>
    
                <ISA.05.1>ZZ</ISA.05.1>
    
            </ISA.05>
    
            <ISA.06>
    
                <ISA.06.1>PROD</ISA.06.1>
    
            </ISA.06>
    
            <ISA.07>
    
                <ISA.07.1>ZZ</ISA.07.1>
    
            </ISA.07>
    
            <ISA.08>
    
                <ISA.08.1>AGENCY</ISA.08.1>
    
            </ISA.08>
    
            <ISA.09>
    
                <ISA.09.1>071101</ISA.09.1>
    
            </ISA.09>
    
            <ISA.10>
    
                <ISA.10.1>1104</ISA.10.1>
    
            </ISA.10>
    
            <ISA.11>
    
                <ISA.11.1>U</ISA.11.1>
    
            </ISA.11>
    
            <ISA.12>
    
                <ISA.12.1>00401</ISA.12.1>
    
            </ISA.12>
    
            <ISA.13>
    
                <ISA.13.1>000000020</ISA.13.1>
    
            </ISA.13>
    
            <ISA.14>
    
                <ISA.14.1>1</ISA.14.1>
    
            </ISA.14>
    
            <ISA.15>
    
                <ISA.15.1>P</ISA.15.1>
    
            </ISA.15>
    
            <ISA.16>
    
                <ISA.16.1/>
    
                <ISA.16.2/>
    
            </ISA.16>
    
        </ISA>
    
        <GS>
    
            <GS.01>
    
                <GS.01.1>HC</GS.01.1>
    
            </GS.01>
    
            <GS.02>
    
                <GS.02.1>D1212</GS.02.1>
    
            </GS.02>
    
            <GS.03>
    
                <GS.03.1>AGENCY</GS.03.1>
    
            </GS.03>
    
            <GS.04>
    
                <GS.04.1>20080201</GS.04.1>
    
            </GS.04>
    
            <GS.05>
    
                <GS.05.1>1104</GS.05.1>
    
            </GS.05>
    
            <GS.06>
    
                <GS.06.1>76</GS.06.1>
    
            </GS.06>
    
            <GS.07>
    
                <GS.07.1>X</GS.07.1>
    
            </GS.07>
    
            <GS.08>
    
                <GS.08.1>004010X098A1</GS.08.1>
    
            </GS.08>
    
        </GS>
    
        <ST>
    
            <ST.01>
    
                <ST.01.1>835</ST.01.1>
    
            </ST.01>
    
            <ST.02>
    
                <ST.02.1>0001</ST.02.1>
    
            </ST.02>
    
        </ST>
    
        <BHT>
    
            <BHT.01>
    
                <BHT.01.1>001</BHT.01.1>
         
    
        {...}
    
    
        <SE>
    
            <SE.01>
    
                <SE.01.1>001</SE.01.1>
    
            </SE.01>
    
            <SE.02>
    
                <SE.02.1>0001</SE.02.1>
    
            </SE.02>
    
        </SE>
    
        <GE>
    
            <GE.01>
    
                <GE.01.1>2</GE.01.1>
    
            </GE.01>
    
            <GE.02>
    
                <GE.02.1>76</GE.02.1>
    
            </GE.02>
    
        </GE>
    
        <IEA>
    
            <IEA.01>
    
                <IEA.01.1>1</IEA.01.1>
    
            </IEA.01>
    
            <IEA.02>
    
                <IEA.02.1>000000020</IEA.02.1>
    
            </IEA.02>
    
        </IEA>
    
    </X12Transaction>
    when you would expect it to look something like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <X12Transaction>
    
     
        <ISA>
    
            <ISA.01>
    
                <ISA.01.1>00</ISA.01.1>
    
            </ISA.01>
    
            <ISA.02>
    
                <ISA.02.1/>
    
            </ISA.02>
    
            <ISA.03>
    
                <ISA.03.1>01</ISA.03.1>
    
            </ISA.03>
    
            <ISA.04>
    
                <ISA.04.1>AGENCY</ISA.04.1>
    
            </ISA.04>
    
            <ISA.05>
    
                <ISA.05.1>ZZ</ISA.05.1>
    
            </ISA.05>
    
            <ISA.06>
    
                <ISA.06.1>PROD</ISA.06.1>
    
            </ISA.06>
    
            <ISA.07>
    
                <ISA.07.1>ZZ</ISA.07.1>
    
            </ISA.07>
    
            <ISA.08>
    
                <ISA.08.1>AGENCY</ISA.08.1>
    
            </ISA.08>
    
            <ISA.09>
    
                <ISA.09.1>071101</ISA.09.1>
    
            </ISA.09>
    
            <ISA.10>
    
                <ISA.10.1>1104</ISA.10.1>
    
            </ISA.10>
    
            <ISA.11>
    
                <ISA.11.1>U</ISA.11.1>
    
            </ISA.11>
    
            <ISA.12>
    
                <ISA.12.1>00401</ISA.12.1>
    
            </ISA.12>
    
            <ISA.13>
    
                <ISA.13.1>000000020</ISA.13.1>
    
            </ISA.13>
    
            <ISA.14>
    
                <ISA.14.1>1</ISA.14.1>
    
            </ISA.14>
    
            <ISA.15>
    
                <ISA.15.1>P</ISA.15.1>
    
            </ISA.15>
    
            <ISA.16>
    
                <ISA.16.1/>
    
                <ISA.16.2/>
    
            </ISA.16>
    
        </ISA>
    
        <GS>
    
            <GS.01>
    
                <GS.01.1>HC</GS.01.1>
    
            </GS.01>
    
            <GS.02>
    
                <GS.02.1>D1212</GS.02.1>
    
            </GS.02>
    
            <GS.03>
    
                <GS.03.1>AGENCY</GS.03.1>
    
            </GS.03>
    
            <GS.04>
    
                <GS.04.1>20080201</GS.04.1>
    
            </GS.04>
    
            <GS.05>
    
                <GS.05.1>1104</GS.05.1>
    
            </GS.05>
    
            <GS.06>
    
                <GS.06.1>76</GS.06.1>
    
            </GS.06>
    
            <GS.07>
    
                <GS.07.1>X</GS.07.1>
    
            </GS.07>
    
            <GS.08>
    
                <GS.08.1>004010X098A1</GS.08.1>
    
            </GS.08>
    
            <ST>
    
                 <ST.01>
    
                     <ST.01.1>835</ST.01.1>
    
                 </ST.01>
    
                 <ST.02>
    
                     <ST.02.1>0001</ST.02.1>
    
                 </ST.02>
    
                 <BHT>
    
                     <BHT.01>
    
                         <BHT.01.1>001</BHT.01.1>
         
    
             {...}
    
    
             </ST>
    
             <SE>
    
                 <SE.01>
    
                     <SE.01.1>001</SE.01.1>
    
                 </SE.01>
    
                 <SE.02>
    
                     <SE.02.1>0001</SE.02.1>
    
                 </SE.02>
    
             </SE>
        </GS>
    
        <GE>
    
            <GE.01>
    
                <GE.01.1>2</GE.01.1>
    
            </GE.01>
    
            <GE.02>
    
                <GE.02.1>76</GE.02.1>
    
            </GE.02>
    
        </GE>
    
        <IEA>
    
            <IEA.01>
    
                <IEA.01.1>1</IEA.01.1>
    
            </IEA.01>
    
            <IEA.02>
    
                <IEA.02.1>000000020</IEA.02.1>
    
            </IEA.02>
    
        </IEA>
    
    </X12Transaction>
    due to the hierarchical nature of the file.

    I know that the start and end tags are not the same when dealing with ST and SE segments (and some of the nesting below), but since they are standard file formats, I would still expect them to work out properly in the xml.

    Any thoughts? Or should I log this as a bug?

    Thanks,

    John Butler

    Post edited by: Noggin, at: 03/06/2008 14:34
Working...
X