IS00027A ;Compiled from script 'Generated: HL IHS IZV04 V03VXR IN-I' on AUG 15, 2018
;Part 2
;Copyright 2018 SAIC
EN K DXS
S (INX,X)=$G(@INV@("PID14"))
I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
S @INV@("PID14")=$G(X)
I '$D(X) D ERROR^INHS("Variable 'PID14' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
K DXS
S (INX,X)=$G(@INV@("PID17"))
I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
S @INV@("PID17")=$G(X)
I '$D(X) D ERROR^INHS("Variable 'PID17' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
K DXS
S (INX,X)=$G(@INV@("PID19"))
I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
S @INV@("PID19")=$G(X)
I '$D(X) D ERROR^INHS("Variable 'PID19' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
K DXS
S (INX,X)=$G(@INV@("PID26"))
I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
S @INV@("PID26")=$G(X)
I '$D(X) D ERROR^INHS("Variable 'PID26' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
K DXS
Q
I1 ;IF $D(@INV@("PD11"))
I $D(@INV@("PD11"))
D:$T
.S (INX,X)=$G(@INV@("PD14"))
.I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
.S @INV@("PD14")=$G(X)
.I '$D(X) D ERROR^INHS("Variable 'PD14' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
.K DXS
.Q
;IF $D(@INV@("NK11"))
I $D(@INV@("NK11"))
D:$T
.S INI(1)=0 F S INI(1)=$O(@INV@("NK12",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("NK12",INI(1))
..S:X]"" X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$P($G(INTHL7F2),U,4),"I")
..S @INV@("NK12",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'NK12' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("NK13",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("NK13",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("NK13",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'NK13' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("NK14",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("NK14",INI(1))
..I $L(X) S:$P(X,INSUBDEL,4)="" $P(X,INSUBDEL,4)=INSUBDEL
..S @INV@("NK14",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'NK14' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("NK15",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("NK15",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("NK15",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'NK15' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("NK17",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("NK17",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("NK17",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'NK17' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("NK113",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("NK113",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("NK113",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'NK113' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.Q
;IF $D(@INV@("PV11"))
I $D(@INV@("PV11"))
D:$T
.S (INX,X)=$G(@INV@("PV144"))
.I X]"" S X=$$TIMEIO^INHUT10(X,$P($G(INTHL7F2),U),$P($G(INTHL7F2),U,2),$P($G(INTHL7F2),U,3),1)
.S @INV@("PV144")=$G(X)
.I '$D(X) D ERROR^INHS("Variable 'PV144' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
.K DXS
.S (INX,X)=$G(@INV@("PV145"))
.I X]"" S X=$$TIMEIO^INHUT10(X,$P($G(INTHL7F2),U),$P($G(INTHL7F2),U,2),$P($G(INTHL7F2),U,3),1)
.S @INV@("PV145")=$G(X)
.I '$D(X) D ERROR^INHS("Variable 'PV145' failed input transform. Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
.K DXS
.Q
;IF $D(@INV@("IN11"))
I $D(@INV@("IN11"))
D:$T
.S INI(1)=0 F S INI(1)=$O(@INV@("IN14",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN14",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("IN14",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN14' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("IN18",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN18",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("IN18",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN18' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("IN19",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN19",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("IN19",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN19' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("IN112",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN112",INI(1))
..I X]"" S X=$E(X,1,4)-1700_$E(X,5,8)
..S @INV@("IN112",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN112' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("IN113",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN113",INI(1))
..I X]"" S X=$E(X,1,4)-1700_$E(X,5,8)
..S @INV@("IN113",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN113' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("IN116",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN116",INI(1))
..S:X]"" X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$P($G(INTHL7F2),U,4),"I")
..S @INV@("IN116",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN116' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("IN117",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("IN117",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("IN117",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'IN117' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.Q
;IF $D(@INV@("ORC1"))
I $D(@INV@("ORC1"))
D:$T
.S INI(1)=0 F S INI(1)=$O(@INV@("ORC5",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("ORC5",INI(1))
..I $P($G(INTHL7F2),U,4) S X=$$SUBESC^INHUT7(X,INDELIMS,"I")
..S @INV@("ORC5",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'ORC5' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("ORC9",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("ORC9",INI(1))
..I X]"" S X=$$TIMEIO^INHUT10(X,$P($G(INTHL7F2),U),$P($G(INTHL7F2),U,2),$P($G(INTHL7F2),U,3),1)
..S @INV@("ORC9",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'ORC9' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.S INI(1)=0 F S INI(1)=$O(@INV@("ORC15",INI(1))) Q:'INI(1) S INI=INI(1) D
..S (INX,X)=@INV@("ORC15",INI(1))
..I X]"" S X=$$TIMEIO^INHUT10(X,$P($G(INTHL7F2),U),$P($G(INTHL7F2),U,2),$P($G(INTHL7F2),U,3),1)
..S @INV@("ORC15",INI(1))=$G(X) I '$D(X) D ERROR^INHS("Variable 'ORC15' failed input transform in iteration #"_INI(1)_". Processing continues.",0),ERROR^INHS(" Value = '"_INX_"'",0)
..Q
.K DXS
.;IF $D(@INV@("RXA1"))
.I $D(@INV@("RXA1"))
.D:$T
..Q
.Q
;Entering REQUIRED section.
I $D(@INV@("MSH1"))#2,$G(@INV@("MSH1"))="" S INREQERR=2 D KILL^INHVA1("MSH","HL FIELD SEPARATOR")
I $D(@INV@("MSH1"))#2,$G(@INV@("MSH2"))="" S INREQERR=2 D KILL^INHVA1("MSH","HL ENCODING CHARACTERS")
I $D(@INV@("MSH1"))#2,$G(@INV@("MSH9"))="" S INREQERR=2 D KILL^INHVA1("MSH","HL MESSAGE TYPE")
I $D(@INV@("MSH1"))#2,$G(@INV@("MSH11"))="" S INREQERR=2 D KILL^INHVA1("MSH","HL PROCESSING ID")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD1"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN QDTM (QRD-1)")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD2"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN QFC (QRD-2)")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD3"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN QP (QRD-3)")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD4"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN QID (QRD-4)")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD7"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN QTY (QRD-7)")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD8"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN WHO (QRD-8)")
I $D(@INV@("QRD1"))#2,$G(@INV@("QRD9"))="" S INREQERR=2 D KILL^INHVA1("QRD","HL IHS QRD IN WHAT (QRD-9)")
I $D(@INV@("QRF1"))#2,$G(@INV@("QRF1"))="" S INREQERR=2 D KILL^INHVA1("QRF","HL IHS QRF IN WHERE (QRF-1)")
Q:$G(INSTERR) $S($G(INREQERR)>INSTERR:INREQERR,1:INSTERR) D MAIN^BHLI
I $G(INSTERR) Q $S($G(INREQERR)>INSTERR:INREQERR,1:INSTERR)
;Entering END section.
I $G(INSTERR) Q $S($G(INREQERR)>INSTERR:INREQERR,1:INSTERR)
K @INV,INV,INDA,DIPA Q +$G(INREQERR)
IS00027A ;Compiled from script 'Generated: HL IHS IZV04 V03VXR IN-I' on AUG 15, 2018
+1 ;Part 2
+2 ;Copyright 2018 SAIC
EN KILL DXS
+1 SET (INX,X)=$GET(@INV@("PID14"))
+2 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+3 SET @INV@("PID14")=$GET(X)
+4 IF '$DATA(X)
DO ERROR^INHS("Variable 'PID14' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+5 KILL DXS
+6 SET (INX,X)=$GET(@INV@("PID17"))
+7 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+8 SET @INV@("PID17")=$GET(X)
+9 IF '$DATA(X)
DO ERROR^INHS("Variable 'PID17' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+10 KILL DXS
+11 SET (INX,X)=$GET(@INV@("PID19"))
+12 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+13 SET @INV@("PID19")=$GET(X)
+14 IF '$DATA(X)
DO ERROR^INHS("Variable 'PID19' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+15 KILL DXS
+16 SET (INX,X)=$GET(@INV@("PID26"))
+17 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+18 SET @INV@("PID26")=$GET(X)
+19 IF '$DATA(X)
DO ERROR^INHS("Variable 'PID26' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+20 KILL DXS
+21 QUIT
I1 ;IF $D(@INV@("PD11"))
+1 IF $DATA(@INV@("PD11"))
+2 IF $TEST
Begin DoDot:1
+3 SET (INX,X)=$GET(@INV@("PD14"))
+4 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+5 SET @INV@("PD14")=$GET(X)
+6 IF '$DATA(X)
DO ERROR^INHS("Variable 'PD14' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+7 KILL DXS
+8 QUIT
End DoDot:1
+9 ;IF $D(@INV@("NK11"))
+10 IF $DATA(@INV@("NK11"))
+11 IF $TEST
Begin DoDot:1
+12 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("NK12",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+13 SET (INX,X)=@INV@("NK12",INI(1))
+14 IF X]""
SET X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$PIECE($GET(INTHL7F2),U,4),"I")
+15 SET @INV@("NK12",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'NK12' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+16 QUIT
End DoDot:2
+17 KILL DXS
+18 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("NK13",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+19 SET (INX,X)=@INV@("NK13",INI(1))
+20 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+21 SET @INV@("NK13",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'NK13' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+22 QUIT
End DoDot:2
+23 KILL DXS
+24 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("NK14",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+25 SET (INX,X)=@INV@("NK14",INI(1))
+26 IF $LENGTH(X)
IF $PIECE(X,INSUBDEL,4)=""
SET $PIECE(X,INSUBDEL,4)=INSUBDEL
+27 SET @INV@("NK14",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'NK14' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+28 QUIT
End DoDot:2
+29 KILL DXS
+30 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("NK15",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+31 SET (INX,X)=@INV@("NK15",INI(1))
+32 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+33 SET @INV@("NK15",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'NK15' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+34 QUIT
End DoDot:2
+35 KILL DXS
+36 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("NK17",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+37 SET (INX,X)=@INV@("NK17",INI(1))
+38 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+39 SET @INV@("NK17",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'NK17' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+40 QUIT
End DoDot:2
+41 KILL DXS
+42 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("NK113",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+43 SET (INX,X)=@INV@("NK113",INI(1))
+44 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+45 SET @INV@("NK113",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'NK113' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+46 QUIT
End DoDot:2
+47 KILL DXS
+48 QUIT
End DoDot:1
+49 ;IF $D(@INV@("PV11"))
+50 IF $DATA(@INV@("PV11"))
+51 IF $TEST
Begin DoDot:1
+52 SET (INX,X)=$GET(@INV@("PV144"))
+53 IF X]""
SET X=$$TIMEIO^INHUT10(X,$PIECE($GET(INTHL7F2),U),$PIECE($GET(INTHL7F2),U,2),$PIECE($GET(INTHL7F2),U,3),1)
+54 SET @INV@("PV144")=$GET(X)
+55 IF '$DATA(X)
DO ERROR^INHS("Variable 'PV144' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+56 KILL DXS
+57 SET (INX,X)=$GET(@INV@("PV145"))
+58 IF X]""
SET X=$$TIMEIO^INHUT10(X,$PIECE($GET(INTHL7F2),U),$PIECE($GET(INTHL7F2),U,2),$PIECE($GET(INTHL7F2),U,3),1)
+59 SET @INV@("PV145")=$GET(X)
+60 IF '$DATA(X)
DO ERROR^INHS("Variable 'PV145' failed input transform. Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+61 KILL DXS
+62 QUIT
End DoDot:1
+63 ;IF $D(@INV@("IN11"))
+64 IF $DATA(@INV@("IN11"))
+65 IF $TEST
Begin DoDot:1
+66 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN14",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+67 SET (INX,X)=@INV@("IN14",INI(1))
+68 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+69 SET @INV@("IN14",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN14' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+70 QUIT
End DoDot:2
+71 KILL DXS
+72 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN18",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+73 SET (INX,X)=@INV@("IN18",INI(1))
+74 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+75 SET @INV@("IN18",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN18' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+76 QUIT
End DoDot:2
+77 KILL DXS
+78 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN19",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+79 SET (INX,X)=@INV@("IN19",INI(1))
+80 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+81 SET @INV@("IN19",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN19' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+82 QUIT
End DoDot:2
+83 KILL DXS
+84 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN112",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+85 SET (INX,X)=@INV@("IN112",INI(1))
+86 IF X]""
SET X=$EXTRACT(X,1,4)-1700_$EXTRACT(X,5,8)
+87 SET @INV@("IN112",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN112' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+88 QUIT
End DoDot:2
+89 KILL DXS
+90 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN113",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+91 SET (INX,X)=@INV@("IN113",INI(1))
+92 IF X]""
SET X=$EXTRACT(X,1,4)-1700_$EXTRACT(X,5,8)
+93 SET @INV@("IN113",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN113' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+94 QUIT
End DoDot:2
+95 KILL DXS
+96 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN116",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+97 SET (INX,X)=@INV@("IN116",INI(1))
+98 IF X]""
SET X=$$HLPN^INHUT(X,INSUBDEL,INDELIMS,$PIECE($GET(INTHL7F2),U,4),"I")
+99 SET @INV@("IN116",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN116' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+100 QUIT
End DoDot:2
+101 KILL DXS
+102 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("IN117",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+103 SET (INX,X)=@INV@("IN117",INI(1))
+104 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+105 SET @INV@("IN117",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'IN117' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+106 QUIT
End DoDot:2
+107 KILL DXS
+108 QUIT
End DoDot:1
+109 ;IF $D(@INV@("ORC1"))
+110 IF $DATA(@INV@("ORC1"))
+111 IF $TEST
Begin DoDot:1
+112 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("ORC5",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+113 SET (INX,X)=@INV@("ORC5",INI(1))
+114 IF $PIECE($GET(INTHL7F2),U,4)
SET X=$$SUBESC^INHUT7(X,INDELIMS,"I")
+115 SET @INV@("ORC5",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'ORC5' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+116 QUIT
End DoDot:2
+117 KILL DXS
+118 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("ORC9",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+119 SET (INX,X)=@INV@("ORC9",INI(1))
+120 IF X]""
SET X=$$TIMEIO^INHUT10(X,$PIECE($GET(INTHL7F2),U),$PIECE($GET(INTHL7F2),U,2),$PIECE($GET(INTHL7F2),U,3),1)
+121 SET @INV@("ORC9",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'ORC9' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+122 QUIT
End DoDot:2
+123 KILL DXS
+124 SET INI(1)=0
FOR
SET INI(1)=$ORDER(@INV@("ORC15",INI(1)))
IF 'INI(1)
QUIT
SET INI=INI(1)
Begin DoDot:2
+125 SET (INX,X)=@INV@("ORC15",INI(1))
+126 IF X]""
SET X=$$TIMEIO^INHUT10(X,$PIECE($GET(INTHL7F2),U),$PIECE($GET(INTHL7F2),U,2),$PIECE($GET(INTHL7F2),U,3),1)
+127 SET @INV@("ORC15",INI(1))=$GET(X)
IF '$DATA(X)
DO ERROR^INHS("Variable 'ORC15' failed input transform in iteration #"_INI(1)_". Processing continues.",0)
DO ERROR^INHS(" Value = '"_INX_"'",0)
+128 QUIT
End DoDot:2
+129 KILL DXS
+130 ;IF $D(@INV@("RXA1"))
+131 IF $DATA(@INV@("RXA1"))
+132 IF $TEST
Begin DoDot:2
+133 QUIT
End DoDot:2
+134 QUIT
End DoDot:1
+135 ;Entering REQUIRED section.
+136 IF $DATA(@INV@("MSH1"))#2
IF $GET(@INV@("MSH1"))=""
SET INREQERR=2
DO KILL^INHVA1("MSH","HL FIELD SEPARATOR")
+137 IF $DATA(@INV@("MSH1"))#2
IF $GET(@INV@("MSH2"))=""
SET INREQERR=2
DO KILL^INHVA1("MSH","HL ENCODING CHARACTERS")
+138 IF $DATA(@INV@("MSH1"))#2
IF $GET(@INV@("MSH9"))=""
SET INREQERR=2
DO KILL^INHVA1("MSH","HL MESSAGE TYPE")
+139 IF $DATA(@INV@("MSH1"))#2
IF $GET(@INV@("MSH11"))=""
SET INREQERR=2
DO KILL^INHVA1("MSH","HL PROCESSING ID")
+140 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD1"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN QDTM (QRD-1)")
+141 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD2"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN QFC (QRD-2)")
+142 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD3"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN QP (QRD-3)")
+143 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD4"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN QID (QRD-4)")
+144 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD7"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN QTY (QRD-7)")
+145 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD8"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN WHO (QRD-8)")
+146 IF $DATA(@INV@("QRD1"))#2
IF $GET(@INV@("QRD9"))=""
SET INREQERR=2
DO KILL^INHVA1("QRD","HL IHS QRD IN WHAT (QRD-9)")
+147 IF $DATA(@INV@("QRF1"))#2
IF $GET(@INV@("QRF1"))=""
SET INREQERR=2
DO KILL^INHVA1("QRF","HL IHS QRF IN WHERE (QRF-1)")
+148 IF $GET(INSTERR)
QUIT $SELECT($GET(INREQERR)>INSTERR:INREQERR,1:INSTERR)
DO MAIN^BHLI
+149 IF $GET(INSTERR)
QUIT $SELECT($GET(INREQERR)>INSTERR:INREQERR,1:INSTERR)
+150 ;Entering END section.
+151 IF $GET(INSTERR)
QUIT $SELECT($GET(INREQERR)>INSTERR:INREQERR,1:INSTERR)
+152 KILL @INV,INV,INDA,DIPA
QUIT +$GET(INREQERR)