Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Delimited to Delimited (X12 832 javascript transform) (http://www.mirthcorp.com/community/forums/showthread.php?t=218657)

nmanning 10-12-2018 01:53 PM

Delimited to Delimited (X12 832 javascript transform)
 
1 Attachment(s)
I am new to mirth. I am trying to create an X12 output file from a csv delimited input file. I am using in: Delimited, out: delimited and doing all my transforming in the destination javascript transformers. I have to create the envelope records, read some data from the in csv file, and eventually retrieve some values from mysql, as well as calculating counters.

So, right now I am just trying to create the envelope segments and a "LIN" segment for each row in the in csv.

The Destination transform is creating too many "LIN" segments for the amount of rows in the in csv. And I am getting errors on every destination and receiving no output.

example of destination transformed data. (It is looking like what I want)
"row" : {
"1" : {
"column1" : "ISA",
"column2" : "00",
"column3" : " ",
"column4" : "00",
"column5" : "ZZ",
"column6" : "BCBMDD",
"column7" : "01",
"column8" : "006097142",
"column9" : "181010",
"column10" : "0652",
"column11" : "U",
"column12" : "00400",
"column13" : "000144545",
"column14" : "0",
"column15" : "T"
},
"2" : {
"column1" : "GS",
"column2" : "SC",
"column3" : "BCBMD",
"column4" : "006097142",
"column5" : "20181010",
"column6" : "0652",
"column7" : "13868",
"column8" : "004010"
},
"3" : {
"column1" : "LIN",
"column2" : 0,
"column3" : "CB",
"column4" : "..."
},
"4" : {
"column1" : "LIN",
"column2" : 1,
"column3" : "CB",
"column4" : "..."
},
"5" : {
"column1" : "LIN",
"column2" : 2,
"column3" : "CB",
"column4" : "..."
},
"6" : {
"column1" : "LIN",
"column2" : 3,
"column3" : "CB",
"column4" : "..."
},


Can someone explain why I am getting this error... My channel is attached. "Source" says "TRANSFORMED". Destination says "ERROR"

Here is the format of my delimited input
4023,421208,4-4-8 #2-BTR KD D-FIR ,"$160.00 ",STORE PREPAID ,1181,GLOBL,CORPRAT ,8/26/2018,12/31/9999
4319,552308,2-8-8 TCEDAR ,"$460.00 ",STORE PREPAID ,1634,GLOBL,CORPRAT ,8/26/2018,12/31/9999
4321,552312,2-8-12 TCEDAR ,"$560.00 ",STORE PREPAID ,1634,GLOBL,CORPRAT ,8/26/2018,12/31/9999
4323,552316,2-8-16 TCEDAR ,"$660.00 ",STORE PREPAID ,1634,GLOBL,CORPRAT ,8/26/2018,12/31/9999
5210,141520,2-12-20 PINE G ,$760.00 ,STORE PREPAID ,2984,GLOBL,CORPRAT ,8/26/2018,12/31/9999


All times are GMT -8. The time now is 06:01 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation