****** input file ****** (output file at bottom)
Problem starts here. Need 4 echos to see entire record of 800 characters.
Got input record types 01,02,17,02,06,07,99 in position 1 and 2, sequence is correct.
Repeating block for type-02 and type-17. Will occur like this: 01 {02 17} 06 07 99.
Only 1 type-17 per type-02. Type-17 is optional.
##################################################################################################
data1=>01VXX EDIPPARADIGM20120403154121 QRS 2013042610461603VXQV01 |^~\&T 2.3.1 <
data2=> <
data3=> <
data4=> <
data1=>02VXX EDIPPARADIGM20120403154121 0000206918 BAKER CAKE 20090101M <
data2=> W 123 MAIN TAZEWELL TN37879 0134239999999 EN 444444444NH <
data3=> A00010101 BAKER MAN 26 <
data4=> 03 00000000R06301 2011100310342119 <
data1=>17VXX EDIPPARADIGM20120403154121 <
data2=> <
data3=> <
data4=> <
data1=>02VXX EDIPPARADIGM20120403154121 0000206940 TOOTH SWEET 20090101M <
data2=> W 1212 ST JACKSON TN38301 0579014799999 EN 444444444NH <
data3=> A00010101 <
data4=> 01 00000000R04726 2013041514593800 <
data1=>06VXX EDIPPARADIGM20120403154121 AA20120403154121 SUCCESSFUL PROCESS <
data2=> <
data3=> <
data4=> 0 <
data1=>07VXX EDIPPARADIGM20120403154121 20120403154121RI20120403152000 VXISIIS TNSIIS <
data2=> 20090101M444444444 <
data3=> <
data4=> <
data1=>99VXX EDIPPARADIGM20120403154121 <
data2=> <
data3=> <
data4=> <
#################################################################################################
No problems after this point.
#################################################################################################
*** some echos ***
######## hdr-app= PARADIGM
######## type02 dem pat no= 0000206918
######## type17 dem2 email=
######## type02 dem pat no= 0000206940
##################################################################################################
data1=>01VXX EDIPPARADIGM20120403154125 QRS 2013042610461641VXQV01 |^~\&T 2.3.1 <
data2=> <
data3=> <
data4=> <
data1=>02VXX EDIPPARADIGM20120403154125 0000204489 TNBEAVER JOSEPH H 19970719M <
data2=> U 121 KING STRRET NASHVEGAS TN38211 OTH 888888888 <
data3=> A00010101 LONG 26 <
data4=> 01 00000000H10000000000044 2011120710330700 <
data1=>02VXX EDIPPARADIGM20120403154125 0000204953 EARLY MORNING R 20090101M <
data2=> W 345 ARBIES MAIN COOKEVILLE TN38501 0719312323444 EN 888888888NH <
data3=> A00010101 EARLY SONA 26 <
data4=> 00000000 <
data1=>02VXX EDIPPARADIGM20120403154125 0000204994 LECTER HANNIBAL 20090101MCANNIBAL <
data2=> W 24 GRAVEYARD TOMB NUMBER 1 COOKEVILLE TN38501 0719312346666 EN 888888888NH <
data3=> A00010101 LECTER ROSE 26 <
data4=> 00000000 <
data1=>02VXX EDIPPARADIGM20120403154125 0000207790 LOUDON JONATHAN X 20000504M <
data2=> U 3402 RIDGEWAY ROAD LOUDON TN37444 44 TL 888888888NH <
data3=> A00010101 <
data4=> 02 00000000 2011120210491977 <
data1=>02VXX EDIPPARADIGM20120403154125 0000200185 TEST BRAD 20010224M <
data2=> U 123 JOHNSON CITY TN37604 1 4239793200 OTH 888888888 <
data3=> A20020101 <
data4=> 01 00000000R 2012101710045400 <
data1=>06VXX EDIPPARADIGM20120403154125 AA20120403154125 SUCCESSFUL PROCESS <
data2=> <
data3=> <
data4=> 0 <
data1=>07VXX EDIPPARADIGM20120403154125 20120403154125RI20120403152000 VXISIIS TNSIIS <
data2=> M888888888 <
data3=> <
data4=> <
data1=>99VXX EDIPPARADIGM20120403154125 <
data2=> <
data3=> <
data4=> <
################################################################################################
*** some echos ***
######## hdr-app= PARADIGM
######## type02 dem pat no= 0000204489
######## type02 dem pat no= 0000204953
######## type02 dem pat no= 0000204994
######## type02 dem pat no= 0000207790
######## type02 dem pat no= 0000200185
****** output file ******
*** this msg is bad, got 2 input record-type "02", one input record-type "17", got 1 output "PID", need 2 "PID"s.
MSH|^~\&|SIIS|TDH|ECMAP|BCBST|20130426||VXX^V02|20120403154121|T|2.3.1
MSA|AA|20120403154121|SUCCESSFUL PROCESS|||0
QRD|20120403154121|R|I|2012040315|||2000||VXI|SIIS
QRF|TNSIIS||||20090101~M~444444444~~~
PID|||0000206940^^^^SR~^^^^PN~^^^^BR~^^^^SL~444444444^^^^SS||TOOTH^SWEET||20090101|M||W|1212 <-- wrap ST^^JACKSON^TN^38301|057|9014799999||E|||||||NH|
*** this msg ok, got 5 input record-type "02", no input record-type "17", got 5 output "PID"s.
MSH|^~\&|SIIS|TDH|ECMAP|BCBST|20130426||VXX^V02|20120403154125|T|2.3.1
MSA|AA|20120403154125|SUCCESSFUL PROCESS|||0
QRD|20120403154125|R|I|2012040315|||2000||VXI|SIIS
QRF|TNSIIS||||~M~888888888~~~
PID|||0000204489^^^^SR~^^^^PN~^^^^BR~TN^^^^SL~888888888^^^^SS||BEAVER^JOSEPH^H||19970719|M||U|121 KING STRRET^^NASHVEGAS^TN^38211||||O
NK1||LONG|26
PID|||0000204953^^^^SR~^^^^PN~^^^^BR~^^^^SL~888888888^^^^SS||EARLY^MORNING^R||20090101|M||W|345 ARBIES MAIN^^COOKEVILLE^TN^38501|071|9312323444||E|||||||NH
NK1||EARLY^SONA|26
PID|||0000204994^^^^SR~^^^^PN~^^^^BR~^^^^SL~888888888^^^^SS||LECTER^HANNIBAL||20090101|M|CANNIBAL|W|24 GRAVEYARD TOMB NUMBER 1^^COOKEVILLE^TN^38501|071|9312346666||E|||||||NH
NK1||LECTER^ROSE|26
PID|||0000207790^^^^SR~^^^^PN~^^^^BR~^^^^SL~888888888^^^^SS||LOUDON^JONATHAN^X||20000504|M||U|3402 RIDGEWAY ROAD^^LOUDON^TN^37444|44|||B|||||||NH
PID|||0000200185^^^^SR~^^^^PN~^^^^BR~^^^^SL~888888888^^^^SS||TEST^BRAD||20010224|M||U|123^^JOHNSON CITY^TN^37604|1|4239793200||O