AnsweredAssumed Answered

Suppress data from EDI profile

Question asked by YechielKaplan8651 on Oct 8, 2018

Hey guys,

 

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*>
GS*PT*006973812*827406641ELEC*20180313*0601*746589*X*004010
ST*867*00001
BPT*52*20180312029314697*20180312*DD
N1*8S*PSE&G*1*006973812
N1*SJ*PLYMOUTH ROCK ENERGY, LLC*9*800006641ELEC
N1*8R*BD EDU
REF*12*10210505340316
PTD*SU
QTY*QD*.2*K1
MEA**PRQ*.2*K1***51
DTM*150*20170218
DTM*151*20170321

PTD*SU
QTY*QD*172*KH
MEA**PRQ*172*KH***51
DTM*150*20170218
DTM*151*20170321

 

 

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. 

Outcomes