I'm trying to map from an 867 EDI file to a JSON profile. The 867 is a 'usage' file which displays a monthly electric/gas usage for a customer. So each 'account number' should have 12 different values corresponding to 12 months (meter reads), however there are two types of 'usage'. One is referred to as K1 the other as KH. Both come in the QTY loop with the same identifier. I'm trying to suppress all data if the QTY03 is = K1. I'm able to suppress the K1, but I get duplicate data that isn't part of the QTY loop. Below is what the file looks like: (since the data comes in 12 months increments, I'll remove 11 months to make it easier to read.)
ISA*00* *00* *01*006973812 *01*827406641ELEC *180313*0601*U*00401*000746589*0*P*>
N1*SJ*PLYMOUTH ROCK ENERGY, LLC*9*800006641ELEC
Notice the K1 and KH are broken up by a second PTD*SU.
When I try to create an identifier instance for the KH, the DTM (from and to dates) get all messed up by writing each line of the DTM as a separate instance.
Please help! I've spent more hours than I care to admit.