IS00011A ;Compiled from script 'Generated: HL IHS IZV04 OUT-O' on AUG 15, 2018
;Part 2
;Copyright 2018 SAIC
EN S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(9000010,INI(1))) Q:'INI(1) S INDA=$S(INDA(9000010,INI(1)):INDA(9000010,INI(1)),1:INI(1)) D
.Q:'$D(^AUPNVSIT(INDA,0))
.D PV1^BYIMSEGS
.;SET PV11 = INSGX\^INTHL7FT(1,3)\\99\@PV11
.S D0=INDA S X=$G(INA("PV11",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
.S @INV@("PV11")=X K DXS,D0
.;SET PV12 = INSGX\^INTHL7FT(1,3)\\1\"R"
.S D0=INDA S X="R"
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,1)
.S @INV@("PV12")=X K DXS,D0
.;SET PV13 = INSGX\^INTHL7FT(1,3)\\99\@PV13
.S D0=INDA S X=$G(INA("PV13",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
.S @INV@("PV13")=X K DXS,D0
.;SET PV119 = INSGX\^INTHL7FT(1,3)\\99\@PV119
.S D0=INDA S X=$G(INA("PV119",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
.S @INV@("PV119")=X K DXS,D0
.;SET PV120 = INSGX\^INTHL7FT(1,3)\\200\@PV120
.S D0=INDA S X=$G(INA("PV120",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,200)
.S @INV@("PV120")=X K DXS,D0
.;SET PV144 = INSGX\^INTHL7FT(1,3)\\99\@PV144
.S D0=INDA S X=$G(INA("PV144",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
.S @INV@("PV144")=X K DXS,D0
.D:'INVS MC^INHS
.K LINE S LINE="",CP=0 S L1="PV1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("PV11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("PV12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("PV13"))
.S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("PV119")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,20,L1,.CP)
.S L1=$G(@INV@("PV120")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,21,L1,.CP) S L1=$G(@INV@("PV144")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,45,L1,.CP)
.S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
.Q
S INDA=INDA0 K INDA0
SET INSETID=0
I '$D(INDA(9000003)) S INI=0 F S INI=$O(^AUPNMCR("B",INDA,INI)) Q:'INI S INDA(9000003,INI)=""
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(9000003,INI(1))) Q:'INI(1) S INDA=$S(INDA(9000003,INI(1)):INDA(9000003,INI(1)),1:INI(1)) D
.Q:'$D(^AUPNMCR(INDA,0))
.D IN1MCARE^BYIMSEG1
.SET INSETID=0
.S MULT=MULT+1,INDA(0)=INDA,INDA=0 F I=MULT:-1:1 S INDA(I)=INDA(I-1)
.K INDA(0) S INDA=0
.I '$D(INDA(9000003.11)) S INI=0 F S INI=$O(^AUPNMCR(INDA(1),11,INI)) Q:'INI S INDA(9000003.11,INI)=""
.S INI(2)=0 F S INI(2)=$O(INDA(9000003.11,INI(2))) Q:'INI(2) S INDA=$S(INDA(9000003.11,INI(2)):INDA(9000003.11,INI(2)),1:INI(2)) D
..Q:'$D(^AUPNMCR(INDA(1),11,INDA,0))
..D IN1MCARE^BYIMSEG1
..;SET IN11 = INSGX\^INTHL7FT(11,3)\\4\"IN1"
..S D0=INDA S X="IN1"
..S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
..S @INV@("IN11")=X K DXS,D0
..;SET IN14 = INSGX\^INTHL7F(14563,5)\\250\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14563,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
..S @INV@("IN14")=X K DXS,D0
..;SET IN18 = INSGX\^INTHL7F(14564,5)\\12\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14564,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,12)
..S @INV@("IN18")=X K DXS,D0
..;SET IN112 = INSGX\^INTHL7FT(4,3)\\8\#.01
..S D0=INDA S Y(1)=$S($D(^AUPNMCR(INDA(1),11,D0,0)):^(0),1:"") S X=$P(Y(1),U,1)
..S X1="^INTHL7FT(4,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
..S @INV@("IN112")=X K DXS,D0
..;SET IN113 = INSGX\^INTHL7FT(4,3)\\8\#.02
..S D0=INDA S Y(1)=$S($D(^AUPNMCR(INDA(1),11,D0,0)):^(0),1:"") S X=$P(Y(1),U,2)
..S X1="^INTHL7FT(4,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
..S @INV@("IN113")=X K DXS,D0
..;SET IN116 = INSGX\^INTHL7F(14567,5)\\250\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14567,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
..S @INV@("IN116")=X K DXS,D0
..;SET IN117.1 = INSGX\^INTHL7F(14569,5)\\80\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14569,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,80)
..S @INV@("IN117.1")=X K DXS,D0
..;SET IN117.2 = INSGX\^INTHL7F(14570,5)\\80\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14570,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,80)
..S @INV@("IN117.2")=X K DXS,D0
..;SET IN117.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
..S D0=INDA S X="99IHS"
..S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,5)
..S @INV@("IN117.3")=X K DXS,D0
..;SET IN147 = #.03
..S D0=INDA S Y(2)=$C(59)_$P($G(^DD(9000003.11,.03,0)),U,3),Y(1)=$S($D(^AUPNMCR(INDA(1),11,D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,3)_":",2),$C(59))
..S @INV@("IN147")=X K DXS,D0
..;SET IN149 = INSGX\^INTHL7FT(1,3)\\99\@IN1MCR49
..S D0=INDA S X=$G(INA("IN1MCR49",INI(1),INI(2)))
..S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
..S @INV@("IN149")=X K DXS,D0
..D:'INVS MC^INHS
..K LINE S LINE="",CP=0 S L1="IN1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("IN11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("IN14")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,5,L1,.CP) S L1=$G(@INV@("IN18"))
..S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,9,L1,.CP) S L1=$G(@INV@("IN112")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,13,L1,.CP)
..S L1=$G(@INV@("IN113")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,14,L1,.CP) S L1=$G(@INV@("IN116")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,17,L1,.CP) S L1=$G(@INV@("IN117.1"))
..S D0=INDA S X="^" S L1=L1_X
..S L1=L1_$G(@INV@("IN117.2"))
..S D0=INDA S X="^" S L1=L1_X
..S L1=L1_$G(@INV@("IN117.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,18,L1,.CP)
..S D0=INDA S X=@INV@("IN147"),Y(1)=$G(X) S X=1,Y(2)=$G(X) S X=3,X=$E(Y(1),Y(2),X) S L1=X
..S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,48,L1,.CP) S L1=$G(@INV@("IN149")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,50,L1,.CP)
..S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
..SET INSETID=0
..;SET IN26 = INSGX\^INTHL7F(14590,5)\\15\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14590,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,15)
..S @INV@("IN26")=X K DXS,D0
..D:'INVS MC^INHS
..K LINE S LINE="",CP=0 S L1="IN2" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("IN26")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,7,L1,.CP)
..S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
..Q
.F I=1:1:MULT S INDA(I-1)=INDA(I)
.S INDA=INDA(0) K INDA(0) S MULT=MULT-1
.Q
S INDA=INDA0 K INDA0
SET INSETID=0
I '$D(INDA(9000004)) S INI=0 F S INI=$O(^AUPNMCD("B",INDA,INI)) Q:'INI S INDA(9000004,INI)=""
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(9000004,INI(1))) Q:'INI(1) S INDA=$S(INDA(9000004,INI(1)):INDA(9000004,INI(1)),1:INI(1)) D
.Q:'$D(^AUPNMCD(INDA,0))
.SET INSETID=0
.S MULT=MULT+1,INDA(0)=INDA,INDA=0 F I=MULT:-1:1 S INDA(I)=INDA(I-1)
.K INDA(0) S INDA=0
.I '$D(INDA(9000004.11)) S INI=0 F S INI=$O(^AUPNMCD(INDA(1),11,INI)) Q:'INI S INDA(9000004.11,INI)=""
.S INI(2)=0 F S INI(2)=$O(INDA(9000004.11,INI(2))) Q:'INI(2) S INDA=$S(INDA(9000004.11,INI(2)):INDA(9000004.11,INI(2)),1:INI(2)) D
..Q:'$D(^AUPNMCD(INDA(1),11,INDA,0))
..;SET IN11 = INSGX\^INTHL7FT(11,3)\\4\"IN1"
..S D0=INDA S X="IN1"
..S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
..S @INV@("IN11")=X K DXS,D0
..;SET IN14 = INSGX\^INTHL7FT(32,3)\\250\"MEDICAID"
..S D0=INDA S X="MEDICAID"
..S X1="^INTHL7FT(32,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
..S @INV@("IN14")=X K DXS,D0
..;SET IN18 = INSGX\^INTHL7F(14740,5)\\12\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14740,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,12)
..S @INV@("IN18")=X K DXS,D0
..;SET IN19 = INSGX\^INTHL7FT(32,3)\\130\#.03
..S D0=INDA S Y(1)=$S($D(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"") S X=$P(Y(1),U,3)
..S X1="^INTHL7FT(32,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,130)
..S @INV@("IN19")=X K DXS,D0
..;SET IN112 = INSGX\^INTHL7FT(4,3)\\8\#.01
..S D0=INDA S Y(1)=$S($D(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"") S X=$P(Y(1),U,1)
..S X1="^INTHL7FT(4,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
..S @INV@("IN112")=X K DXS,D0
..;SET IN113 = INSGX\^INTHL7FT(4,3)\\8\#.02
..S D0=INDA S Y(1)=$S($D(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"") S X=$P(Y(1),U,2)
..S X1="^INTHL7FT(4,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
..S @INV@("IN113")=X K DXS,D0
..;SET IN116 = INSGX\^INTHL7F(14744,5)\\250\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14744,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
..S @INV@("IN116")=X K DXS,D0
..;SET IN117.1 = INSGX\^INTHL7F(14569,5)\\80\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14569,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,80)
..S @INV@("IN117.1")=X K DXS,D0
..;SET IN117.2 = INSGX\^INTHL7F(14570,5)\\80\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14570,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,80)
..S @INV@("IN117.2")=X K DXS,D0
..;SET IN117.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
..S D0=INDA S X="99IHS"
..S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,5)
..S @INV@("IN117.3")=X K DXS,D0
..;SET IN143 = INSGX\^INTHL7F(14745,5)\\1\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14745,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,1)
..S @INV@("IN143")=X K DXS,D0
..;SET IN147 = #.03
..S D0=INDA S Y(1)=$S($D(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"") S X=$P(Y(1),U,3)
..S @INV@("IN147")=X K DXS,D0
..;SET IN149 = INSGX\^INTHL7F(14747,5)\\250\"OUTPUT TRANSFORM"
..S D0=INDA S X="OUTPUT TRANSFORM"
..S X1="^INTHL7F(14747,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
..S @INV@("IN149")=X K DXS,D0
..D:'INVS MC^INHS
..K LINE S LINE="",CP=0 S L1="IN1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("IN11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("IN14")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,5,L1,.CP) S L1=$G(@INV@("IN18"))
..S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,9,L1,.CP) S L1=$G(@INV@("IN19")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,10,L1,.CP)
..S L1=$G(@INV@("IN112")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,13,L1,.CP) S L1=$G(@INV@("IN113")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,14,L1,.CP) S L1=$G(@INV@("IN116")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,17,L1,.CP) S L1=$G(@INV@("IN117.1"))
..S D0=INDA S X="^" S L1=L1_X
..S L1=L1_$G(@INV@("IN117.2"))
..S D0=INDA S X="^" S L1=L1_X
..S L1=L1_$G(@INV@("IN117.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,18,L1,.CP) S L1=$G(@INV@("IN143")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,44,L1,.CP)
..S D0=INDA S X=@INV@("IN147"),Y(1)=$G(X) S X=1,Y(2)=$G(X) S X=3,X=$E(Y(1),Y(2),X) S L1=X
..S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,48,L1,.CP) S L1=$G(@INV@("IN149")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,50,L1,.CP)
..S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
..SET INSETID=0
..;SET IN28 = INSGX\^INTHL7F(14751,5)\\15\"OUTPUT TRANSFORN"
..S D0=INDA S X="OUTPUT TRANSFORN"
..S X1="^INTHL7F(14751,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,15)
..S @INV@("IN28")=X K DXS,D0
..D:'INVS MC^INHS
..K LINE S LINE="",CP=0 S L1="IN2" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("IN28")) S:$TR(L1,$G(SUBDELIM))="" L1=""
..D SETPIECE^INHU(.LINE,DELIM,9,L1,.CP)
..S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
..Q
.F I=1:1:MULT S INDA(I-1)=INDA(I)
.S INDA=INDA(0) K INDA(0) S MULT=MULT-1
.Q
S INDA=INDA0 K INDA0
SET INSETID=0
I '$D(INDA(9000003.1)) S INI=0 F S INI=$O(^AUPN3PPH("C",INDA,INI)) Q:'INI S INDA(9000003.1,INI)=""
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(9000003.1,INI(1))) Q:'INI(1) S INDA=$S(INDA(9000003.1,INI(1)):INDA(9000003.1,INI(1)),1:INI(1)) D
.Q:'$D(^AUPN3PPH(INDA,0))
.;SET IN11 = INSGX\^INTHL7FT(11,3)\\4\"IN1"
.S D0=INDA S X="IN1"
.S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("IN11")=X K DXS,D0
.;SET IN12 = INSGX\^INTHL7FT(1,3)\\20\#.04
.S D0=INDA S Y(1)=$S($D(^AUPN3PPH(D0,0)):^(0),1:"") S X=$P(Y(1),U,4)
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,20)
.S @INV@("IN12")=X K DXS,D0
.;SET IN13 = INSGX\^INTHL7F(17064,5)\\50\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(17064,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,50)
.S @INV@("IN13")=X K DXS,D0
.;SET IN14 = INSGX\^INTHL7F(17063,5)\\250\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(17063,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("IN14")=X K DXS,D0
.;SET IN18 = INSGX\^INTHL7FT(1,3)\\12\#.06
.S D0=INDA S Y(1)=$S($D(^AUPN3PPH(D0,0)):^(0),1:"") S X=$P($G(^AUTNEGRP(+$P(Y(1),U,6),0)),U)
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,12)
.S @INV@("IN18")=X K DXS,D0
.;SET IN112 = INSGX\^INTHL7FT(4,3)\\8\#.17
.S D0=INDA S Y(1)=$S($D(^AUPN3PPH(D0,0)):^(0),1:"") S X=$P(Y(1),U,17)
.S X1="^INTHL7FT(4,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
.S @INV@("IN112")=X K DXS,D0
.;SET IN113 = INSGX\^INTHL7FT(4,3)\\8\#.18
.S D0=INDA S Y(1)=$S($D(^AUPN3PPH(D0,0)):^(0),1:"") S X=$P(Y(1),U,18)
.S X1="^INTHL7FT(4,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
.S @INV@("IN113")=X K DXS,D0
.;SET IN116 = INSGX\^INTHL7FT(35,3)\\250\#.01
.S D0=INDA S Y(1)=$S($D(^AUPN3PPH(D0,0)):^(0),1:"") S X=$P(Y(1),U,1)
.S X1="^INTHL7FT(35,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("IN116")=X K DXS,D0
.;SET IN118 = INSGX\^INTHL7FT(6,3)\\26\#.19
.S D0=INDA S Y(1)=$S($D(^AUPN3PPH(D0,0)):^(0),1:"") S X=$P(Y(1),U,19)
.S X1="^INTHL7FT(6,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,26)
.S @INV@("IN118")=X K DXS,D0
.;SET IN119.1 = $E(#.09,1,106)
9 .D EN^IS00011B
G G1^IS00011B
IS00011A ;Compiled from script 'Generated: HL IHS IZV04 OUT-O' on AUG 15, 2018
+1 ;Part 2
+2 ;Copyright 2018 SAIC
EN SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(9000010,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(9000010,INI(1)):INDA(9000010,INI(1)),1:INI(1))
Begin DoDot:1
+1 IF '$DATA(^AUPNVSIT(INDA,0))
QUIT
+2 DO PV1^BYIMSEGS
+3 ;SET PV11 = INSGX\^INTHL7FT(1,3)\\99\@PV11
+4 SET D0=INDA
SET X=$GET(INA("PV11",INI(1)))
+5 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+6 SET @INV@("PV11")=X
KILL DXS,D0
+7 ;SET PV12 = INSGX\^INTHL7FT(1,3)\\1\"R"
+8 SET D0=INDA
SET X="R"
+9 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,1)
+10 SET @INV@("PV12")=X
KILL DXS,D0
+11 ;SET PV13 = INSGX\^INTHL7FT(1,3)\\99\@PV13
+12 SET D0=INDA
SET X=$GET(INA("PV13",INI(1)))
+13 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+14 SET @INV@("PV13")=X
KILL DXS,D0
+15 ;SET PV119 = INSGX\^INTHL7FT(1,3)\\99\@PV119
+16 SET D0=INDA
SET X=$GET(INA("PV119",INI(1)))
+17 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+18 SET @INV@("PV119")=X
KILL DXS,D0
+19 ;SET PV120 = INSGX\^INTHL7FT(1,3)\\200\@PV120
+20 SET D0=INDA
SET X=$GET(INA("PV120",INI(1)))
+21 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,200)
+22 SET @INV@("PV120")=X
KILL DXS,D0
+23 ;SET PV144 = INSGX\^INTHL7FT(1,3)\\99\@PV144
+24 SET D0=INDA
SET X=$GET(INA("PV144",INI(1)))
+25 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+26 SET @INV@("PV144")=X
KILL DXS,D0
+27 IF 'INVS
DO MC^INHS
+28 KILL LINE
SET LINE=""
SET CP=0
SET L1="PV1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("PV11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+29 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("PV12"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,3,L1,.CP)
SET L1=$GET(@INV@("PV13"))
+30 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("PV119"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,20,L1,.CP)
+31 SET L1=$GET(@INV@("PV120"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,21,L1,.CP)
SET L1=$GET(@INV@("PV144"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+32 DO SETPIECE^INHU(.LINE,DELIM,45,L1,.CP)
+33 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+34 QUIT
End DoDot:1
+35 SET INDA=INDA0
KILL INDA0
+36 SET INSETID=0
+37 IF '$DATA(INDA(9000003))
SET INI=0
FOR
SET INI=$ORDER(^AUPNMCR("B",INDA,INI))
IF 'INI
QUIT
SET INDA(9000003,INI)=""
+38 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(9000003,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(9000003,INI(1)):INDA(9000003,INI(1)),1:INI(1))
Begin DoDot:1
+39 IF '$DATA(^AUPNMCR(INDA,0))
QUIT
+40 DO IN1MCARE^BYIMSEG1
+41 SET INSETID=0
+42 SET MULT=MULT+1
SET INDA(0)=INDA
SET INDA=0
FOR I=MULT:-1:1
SET INDA(I)=INDA(I-1)
+43 KILL INDA(0)
SET INDA=0
+44 IF '$DATA(INDA(9000003.11))
SET INI=0
FOR
SET INI=$ORDER(^AUPNMCR(INDA(1),11,INI))
IF 'INI
QUIT
SET INDA(9000003.11,INI)=""
+45 SET INI(2)=0
FOR
SET INI(2)=$ORDER(INDA(9000003.11,INI(2)))
IF 'INI(2)
QUIT
SET INDA=$SELECT(INDA(9000003.11,INI(2)):INDA(9000003.11,INI(2)),1:INI(2))
Begin DoDot:2
+46 IF '$DATA(^AUPNMCR(INDA(1),11,INDA,0))
QUIT
+47 DO IN1MCARE^BYIMSEG1
+48 ;SET IN11 = INSGX\^INTHL7FT(11,3)\\4\"IN1"
+49 SET D0=INDA
SET X="IN1"
+50 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+51 SET @INV@("IN11")=X
KILL DXS,D0
+52 ;SET IN14 = INSGX\^INTHL7F(14563,5)\\250\"OUTPUT TRANSFORM"
+53 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+54 SET X1="^INTHL7F(14563,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+55 SET @INV@("IN14")=X
KILL DXS,D0
+56 ;SET IN18 = INSGX\^INTHL7F(14564,5)\\12\"OUTPUT TRANSFORM"
+57 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+58 SET X1="^INTHL7F(14564,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,12)
+59 SET @INV@("IN18")=X
KILL DXS,D0
+60 ;SET IN112 = INSGX\^INTHL7FT(4,3)\\8\#.01
+61 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNMCR(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,1)
+62 SET X1="^INTHL7FT(4,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,8)
+63 SET @INV@("IN112")=X
KILL DXS,D0
+64 ;SET IN113 = INSGX\^INTHL7FT(4,3)\\8\#.02
+65 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNMCR(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,2)
+66 SET X1="^INTHL7FT(4,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,8)
+67 SET @INV@("IN113")=X
KILL DXS,D0
+68 ;SET IN116 = INSGX\^INTHL7F(14567,5)\\250\"OUTPUT TRANSFORM"
+69 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+70 SET X1="^INTHL7F(14567,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+71 SET @INV@("IN116")=X
KILL DXS,D0
+72 ;SET IN117.1 = INSGX\^INTHL7F(14569,5)\\80\"OUTPUT TRANSFORM"
+73 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+74 SET X1="^INTHL7F(14569,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,80)
+75 SET @INV@("IN117.1")=X
KILL DXS,D0
+76 ;SET IN117.2 = INSGX\^INTHL7F(14570,5)\\80\"OUTPUT TRANSFORM"
+77 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+78 SET X1="^INTHL7F(14570,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,80)
+79 SET @INV@("IN117.2")=X
KILL DXS,D0
+80 ;SET IN117.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+81 SET D0=INDA
SET X="99IHS"
+82 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+83 SET @INV@("IN117.3")=X
KILL DXS,D0
+84 ;SET IN147 = #.03
+85 SET D0=INDA
SET Y(2)=$CHAR(59)_$PIECE($GET(^DD(9000003.11,.03,0)),U,3)
SET Y(1)=$SELECT($DATA(^AUPNMCR(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE($PIECE(Y(2),$CHAR(59)_$PIECE(Y(1),U,3)_":",2),$CHAR(59))
+86 SET @INV@("IN147")=X
KILL DXS,D0
+87 ;SET IN149 = INSGX\^INTHL7FT(1,3)\\99\@IN1MCR49
+88 SET D0=INDA
SET X=$GET(INA("IN1MCR49",INI(1),INI(2)))
+89 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+90 SET @INV@("IN149")=X
KILL DXS,D0
+91 IF 'INVS
DO MC^INHS
+92 KILL LINE
SET LINE=""
SET CP=0
SET L1="IN1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("IN11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+93 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("IN14"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
SET L1=$GET(@INV@("IN18"))
+94 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,9,L1,.CP)
SET L1=$GET(@INV@("IN112"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,13,L1,.CP)
+95 SET L1=$GET(@INV@("IN113"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,14,L1,.CP)
SET L1=$GET(@INV@("IN116"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+96 DO SETPIECE^INHU(.LINE,DELIM,17,L1,.CP)
SET L1=$GET(@INV@("IN117.1"))
+97 SET D0=INDA
SET X="^"
SET L1=L1_X
+98 SET L1=L1_$GET(@INV@("IN117.2"))
+99 SET D0=INDA
SET X="^"
SET L1=L1_X
+100 SET L1=L1_$GET(@INV@("IN117.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,18,L1,.CP)
+101 SET D0=INDA
SET X=@INV@("IN147")
SET Y(1)=$GET(X)
SET X=1
SET Y(2)=$GET(X)
SET X=3
SET X=$EXTRACT(Y(1),Y(2),X)
SET L1=X
+102 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,48,L1,.CP)
SET L1=$GET(@INV@("IN149"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,50,L1,.CP)
+103 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+104 SET INSETID=0
+105 ;SET IN26 = INSGX\^INTHL7F(14590,5)\\15\"OUTPUT TRANSFORM"
+106 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+107 SET X1="^INTHL7F(14590,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,15)
+108 SET @INV@("IN26")=X
KILL DXS,D0
+109 IF 'INVS
DO MC^INHS
+110 KILL LINE
SET LINE=""
SET CP=0
SET L1="IN2"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("IN26"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+111 DO SETPIECE^INHU(.LINE,DELIM,7,L1,.CP)
+112 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+113 QUIT
End DoDot:2
+114 FOR I=1:1:MULT
SET INDA(I-1)=INDA(I)
+115 SET INDA=INDA(0)
KILL INDA(0)
SET MULT=MULT-1
+116 QUIT
End DoDot:1
+117 SET INDA=INDA0
KILL INDA0
+118 SET INSETID=0
+119 IF '$DATA(INDA(9000004))
SET INI=0
FOR
SET INI=$ORDER(^AUPNMCD("B",INDA,INI))
IF 'INI
QUIT
SET INDA(9000004,INI)=""
+120 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(9000004,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(9000004,INI(1)):INDA(9000004,INI(1)),1:INI(1))
Begin DoDot:1
+121 IF '$DATA(^AUPNMCD(INDA,0))
QUIT
+122 SET INSETID=0
+123 SET MULT=MULT+1
SET INDA(0)=INDA
SET INDA=0
FOR I=MULT:-1:1
SET INDA(I)=INDA(I-1)
+124 KILL INDA(0)
SET INDA=0
+125 IF '$DATA(INDA(9000004.11))
SET INI=0
FOR
SET INI=$ORDER(^AUPNMCD(INDA(1),11,INI))
IF 'INI
QUIT
SET INDA(9000004.11,INI)=""
+126 SET INI(2)=0
FOR
SET INI(2)=$ORDER(INDA(9000004.11,INI(2)))
IF 'INI(2)
QUIT
SET INDA=$SELECT(INDA(9000004.11,INI(2)):INDA(9000004.11,INI(2)),1:INI(2))
Begin DoDot:2
+127 IF '$DATA(^AUPNMCD(INDA(1),11,INDA,0))
QUIT
+128 ;SET IN11 = INSGX\^INTHL7FT(11,3)\\4\"IN1"
+129 SET D0=INDA
SET X="IN1"
+130 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+131 SET @INV@("IN11")=X
KILL DXS,D0
+132 ;SET IN14 = INSGX\^INTHL7FT(32,3)\\250\"MEDICAID"
+133 SET D0=INDA
SET X="MEDICAID"
+134 SET X1="^INTHL7FT(32,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+135 SET @INV@("IN14")=X
KILL DXS,D0
+136 ;SET IN18 = INSGX\^INTHL7F(14740,5)\\12\"OUTPUT TRANSFORM"
+137 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+138 SET X1="^INTHL7F(14740,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,12)
+139 SET @INV@("IN18")=X
KILL DXS,D0
+140 ;SET IN19 = INSGX\^INTHL7FT(32,3)\\130\#.03
+141 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,3)
+142 SET X1="^INTHL7FT(32,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,130)
+143 SET @INV@("IN19")=X
KILL DXS,D0
+144 ;SET IN112 = INSGX\^INTHL7FT(4,3)\\8\#.01
+145 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,1)
+146 SET X1="^INTHL7FT(4,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,8)
+147 SET @INV@("IN112")=X
KILL DXS,D0
+148 ;SET IN113 = INSGX\^INTHL7FT(4,3)\\8\#.02
+149 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,2)
+150 SET X1="^INTHL7FT(4,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,8)
+151 SET @INV@("IN113")=X
KILL DXS,D0
+152 ;SET IN116 = INSGX\^INTHL7F(14744,5)\\250\"OUTPUT TRANSFORM"
+153 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+154 SET X1="^INTHL7F(14744,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+155 SET @INV@("IN116")=X
KILL DXS,D0
+156 ;SET IN117.1 = INSGX\^INTHL7F(14569,5)\\80\"OUTPUT TRANSFORM"
+157 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+158 SET X1="^INTHL7F(14569,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,80)
+159 SET @INV@("IN117.1")=X
KILL DXS,D0
+160 ;SET IN117.2 = INSGX\^INTHL7F(14570,5)\\80\"OUTPUT TRANSFORM"
+161 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+162 SET X1="^INTHL7F(14570,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,80)
+163 SET @INV@("IN117.2")=X
KILL DXS,D0
+164 ;SET IN117.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+165 SET D0=INDA
SET X="99IHS"
+166 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+167 SET @INV@("IN117.3")=X
KILL DXS,D0
+168 ;SET IN143 = INSGX\^INTHL7F(14745,5)\\1\"OUTPUT TRANSFORM"
+169 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+170 SET X1="^INTHL7F(14745,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,1)
+171 SET @INV@("IN143")=X
KILL DXS,D0
+172 ;SET IN147 = #.03
+173 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNMCD(INDA(1),11,D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,3)
+174 SET @INV@("IN147")=X
KILL DXS,D0
+175 ;SET IN149 = INSGX\^INTHL7F(14747,5)\\250\"OUTPUT TRANSFORM"
+176 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+177 SET X1="^INTHL7F(14747,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+178 SET @INV@("IN149")=X
KILL DXS,D0
+179 IF 'INVS
DO MC^INHS
+180 KILL LINE
SET LINE=""
SET CP=0
SET L1="IN1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("IN11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+181 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("IN14"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
SET L1=$GET(@INV@("IN18"))
+182 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,9,L1,.CP)
SET L1=$GET(@INV@("IN19"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,10,L1,.CP)
+183 SET L1=$GET(@INV@("IN112"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,13,L1,.CP)
SET L1=$GET(@INV@("IN113"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+184 DO SETPIECE^INHU(.LINE,DELIM,14,L1,.CP)
SET L1=$GET(@INV@("IN116"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,17,L1,.CP)
SET L1=$GET(@INV@("IN117.1"))
+185 SET D0=INDA
SET X="^"
SET L1=L1_X
+186 SET L1=L1_$GET(@INV@("IN117.2"))
+187 SET D0=INDA
SET X="^"
SET L1=L1_X
+188 SET L1=L1_$GET(@INV@("IN117.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,18,L1,.CP)
SET L1=$GET(@INV@("IN143"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+189 DO SETPIECE^INHU(.LINE,DELIM,44,L1,.CP)
+190 SET D0=INDA
SET X=@INV@("IN147")
SET Y(1)=$GET(X)
SET X=1
SET Y(2)=$GET(X)
SET X=3
SET X=$EXTRACT(Y(1),Y(2),X)
SET L1=X
+191 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,48,L1,.CP)
SET L1=$GET(@INV@("IN149"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,50,L1,.CP)
+192 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+193 SET INSETID=0
+194 ;SET IN28 = INSGX\^INTHL7F(14751,5)\\15\"OUTPUT TRANSFORN"
+195 SET D0=INDA
SET X="OUTPUT TRANSFORN"
+196 SET X1="^INTHL7F(14751,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,15)
+197 SET @INV@("IN28")=X
KILL DXS,D0
+198 IF 'INVS
DO MC^INHS
+199 KILL LINE
SET LINE=""
SET CP=0
SET L1="IN2"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("IN28"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+200 DO SETPIECE^INHU(.LINE,DELIM,9,L1,.CP)
+201 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+202 QUIT
End DoDot:2
+203 FOR I=1:1:MULT
SET INDA(I-1)=INDA(I)
+204 SET INDA=INDA(0)
KILL INDA(0)
SET MULT=MULT-1
+205 QUIT
End DoDot:1
+206 SET INDA=INDA0
KILL INDA0
+207 SET INSETID=0
+208 IF '$DATA(INDA(9000003.1))
SET INI=0
FOR
SET INI=$ORDER(^AUPN3PPH("C",INDA,INI))
IF 'INI
QUIT
SET INDA(9000003.1,INI)=""
+209 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(9000003.1,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(9000003.1,INI(1)):INDA(9000003.1,INI(1)),1:INI(1))
Begin DoDot:1
+210 IF '$DATA(^AUPN3PPH(INDA,0))
QUIT
+211 ;SET IN11 = INSGX\^INTHL7FT(11,3)\\4\"IN1"
+212 SET D0=INDA
SET X="IN1"
+213 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+214 SET @INV@("IN11")=X
KILL DXS,D0
+215 ;SET IN12 = INSGX\^INTHL7FT(1,3)\\20\#.04
+216 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPN3PPH(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,4)
+217 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,20)
+218 SET @INV@("IN12")=X
KILL DXS,D0
+219 ;SET IN13 = INSGX\^INTHL7F(17064,5)\\50\"OUTPUT TRANSFORM"
+220 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+221 SET X1="^INTHL7F(17064,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,50)
+222 SET @INV@("IN13")=X
KILL DXS,D0
+223 ;SET IN14 = INSGX\^INTHL7F(17063,5)\\250\"OUTPUT TRANSFORM"
+224 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+225 SET X1="^INTHL7F(17063,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+226 SET @INV@("IN14")=X
KILL DXS,D0
+227 ;SET IN18 = INSGX\^INTHL7FT(1,3)\\12\#.06
+228 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPN3PPH(D0,0)):^(0),1:"")
SET X=$PIECE($GET(^AUTNEGRP(+$PIECE(Y(1),U,6),0)),U)
+229 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,12)
+230 SET @INV@("IN18")=X
KILL DXS,D0
+231 ;SET IN112 = INSGX\^INTHL7FT(4,3)\\8\#.17
+232 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPN3PPH(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,17)
+233 SET X1="^INTHL7FT(4,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,8)
+234 SET @INV@("IN112")=X
KILL DXS,D0
+235 ;SET IN113 = INSGX\^INTHL7FT(4,3)\\8\#.18
+236 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPN3PPH(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,18)
+237 SET X1="^INTHL7FT(4,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,8)
+238 SET @INV@("IN113")=X
KILL DXS,D0
+239 ;SET IN116 = INSGX\^INTHL7FT(35,3)\\250\#.01
+240 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPN3PPH(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,1)
+241 SET X1="^INTHL7FT(35,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+242 SET @INV@("IN116")=X
KILL DXS,D0
+243 ;SET IN118 = INSGX\^INTHL7FT(6,3)\\26\#.19
+244 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPN3PPH(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,19)
+245 SET X1="^INTHL7FT(6,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,26)
+246 SET @INV@("IN118")=X
KILL DXS,D0
+247 ;SET IN119.1 = $E(#.09,1,106)
9 DO EN^IS00011B
End DoDot:1
+1 GOTO G1^IS00011B