IS00029A ;Compiled from script 'Generated: HL IHS IZV04 V03VXR OUT-O' on AUG 15, 2018
;Part 2
;Copyright 2018 SAIC
EN S L1=$G(@INV@("PID17")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,18,L1,.CP) S L1=$G(@INV@("PID19")) S:$TR(L1,$G(SUBDELIM))="" L1=""
D SETPIECE^INHU(.LINE,DELIM,20,L1,.CP) S L1=$G(@INV@("PID22")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,23,L1,.CP) S L1=$G(@INV@("PID24"))
S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,25,L1,.CP)
S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
Q
A1 S INDA=INDA0 K INDA0
SET INSETID=0
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(2,INI(1))) Q:'INI(1) S INDA=$S(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1)) D
.Q:'$D(^DPT(INDA,0))
.D ^BYIMNK1
.;SET NK11 = INSGX\^INTHL7FT(1,3)\\100\@NK11
.S D0=INDA S X=$G(INA("NK11",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,100)
.S @INV@("NK11")=X K DXS,D0
.;SET NK12 = INSGX\^INTHL7FT(1,3)\\250\@NK12
.S D0=INDA S X=$G(INA("NK12",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK12")=X K DXS,D0
.;SET NK13 = INSGX\^INTHL7FT(1,3)\\250\@NK13
.S D0=INDA S X=$G(INA("NK13",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK13")=X K DXS,D0
.;SET NK14 = INSGX\^INTHL7FT(1,3)\\250\@NK14
.S D0=INDA S X=$G(INA("NK14",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK14")=X K DXS,D0
.;SET NK15 = INSGX\^INTHL7FT(1,3)\\50\@NK15
.S D0=INDA S X=$G(INA("NK15",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,50)
.S @INV@("NK15")=X K DXS,D0
.;SET NK17 = INSGX\^INTHL7FT(1,3)\\99\@NK17
.S D0=INDA S X=$G(INA("NK17",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
.S @INV@("NK17")=X K DXS,D0
.D:'INVS MC^INHS
.K LINE S LINE="",CP=0 S L1="NK1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("NK11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("NK12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("NK13"))
.S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("NK14")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
.S L1=$G(@INV@("NK15")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,6,L1,.CP) S L1=$G(@INV@("NK17")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,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
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(2,INI(1))) Q:'INI(1) S INDA=$S(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1)) D
.Q:'$D(^DPT(INDA,0))
.;SET NK11 = INSGX\^INTHL7FT(11,3)\\4\"NK1"
.S D0=INDA S X="NK1"
.S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("NK11")=X K DXS,D0
.;SET NK12 = INSGX\^INTHL7FT(7,3)\\250\#.331
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,1)
.S X1="^INTHL7FT(7,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK12")=X K DXS,D0
.;SET NK13.1 = INSGX\^INTHL7F(14540,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14540,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK13.1")=X K DXS,D0
.;SET NK13.2 = INSGX\^INTHL7FT(1,3)\\60\#.332
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,2)
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK13.2")=X K DXS,D0
.;SET NK13.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@("NK13.3")=X K DXS,D0
.;SET NK14.1 = $E(#.333,1,106)
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,3),Y(2)=$G(X) S X=1,Y(3)=$G(X) S X=106,X=$E(Y(2),Y(3),X)
.S @INV@("NK14.1")=X K DXS,D0
.;SET NK14.2 = $E(#.334,1,106)
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,4),Y(2)=$G(X) S X=1,Y(3)=$G(X) S X=106,X=$E(Y(2),Y(3),X)
.S @INV@("NK14.2")=X K DXS,D0
.;SET NK14.3 = $E(#.336,1,106)
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,6),Y(2)=$G(X) S X=1,Y(3)=$G(X) S X=106,X=$E(Y(2),Y(3),X)
.S @INV@("NK14.3")=X K DXS,D0
.;SET NK14.4 = INSGX\^INTHL7F(14527,5)\\106\#.337
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P($G(^DIC(5,+$P(Y(1),U,7),0)),U)
.S X1="^INTHL7F(14527,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,106)
.S @INV@("NK14.4")=X K DXS,D0
.;SET NK14.5 = $E(#.338,1,106)
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,8),Y(2)=$G(X) S X=1,Y(3)=$G(X) S X=106,X=$E(Y(2),Y(3),X)
.S @INV@("NK14.5")=X K DXS,D0
.;SET NK15 = INSGX\^INTHL7FT(8,3)\\250\#.339
.S D0=INDA S Y(1)=$S($D(^DPT(D0,.33)):^(.33),1:"") S X=$P(Y(1),U,9)
.S X1="^INTHL7FT(8,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK15")=X K DXS,D0
.;SET NK17.1 = INSGX\^INTHL7F(14544,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14544,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK17.1")=X K DXS,D0
.;SET NK17.2 = INSGX\^INTHL7F(14545,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14545,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK17.2")=X K DXS,D0
.;SET NK17.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@("NK17.3")=X K DXS,D0
.D:'INVS MC^INHS
.K LINE S LINE="",CP=0 S L1="NK1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("NK11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("NK12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("NK13.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK13.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK13.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("NK14.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK14.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK14.3"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK14.4"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK14.5")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,5,L1,.CP) S L1=$G(@INV@("NK15")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,6,L1,.CP) S L1=$G(@INV@("NK17.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK17.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK17.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,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
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(2,INI(1))) Q:'INI(1) S INDA=$S(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1)) D
.Q:'$D(^DPT(INDA,0))
.;SET NK11 = INSGX\^INTHL7FT(11,3)\\4\"NK1"
.S D0=INDA S X="NK1"
.S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("NK11")=X K DXS,D0
.;SET NK13.1 = INSGX\^INTHL7F(14548,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14548,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK13.1")=X K DXS,D0
.;SET NK13.2 = INSGX\^INTHL7F(14549,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14549,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK13.2")=X K DXS,D0
.;SET NK13.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@("NK13.3")=X K DXS,D0
.;SET NK17.1 = INSGX\^INTHL7F(14538,5)\\2\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14538,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,2)
.S @INV@("NK17.1")=X K DXS,D0
.;SET NK17.2 = INSGX\^INTHL7FT(1,3)\\4\"SELF"
.S D0=INDA S X="SELF"
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("NK17.2")=X K DXS,D0
.;SET NK17.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@("NK17.3")=X K DXS,D0
.;SET NK113 = INSGX\^INTHL7F(14539,5)\\250\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14539,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK113")=X K DXS,D0
.D:'INVS MC^INHS
.K LINE S LINE="",CP=0 S L1="NK1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("NK11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("NK13.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK13.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK13.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("NK17.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK17.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK17.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,L1,.CP) S L1=$G(@INV@("NK113")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,14,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
S INDA0=INDA,INI(1)=0 F S INI(1)=$O(INDA(2,INI(1))) Q:'INI(1) S INDA=$S(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1)) D
.Q:'$D(^DPT(INDA,0))
.;SET NK11 = INSGX\^INTHL7FT(11,3)\\4\"NK1"
.S D0=INDA S X="NK1"
.S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("NK11")=X K DXS,D0
.;SET NK13.1 = INSGX\^INTHL7F(14551,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14551,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK13.1")=X K DXS,D0
.;SET NK13.2 = INSGX\^INTHL7F(14552,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14552,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK13.2")=X K DXS,D0
.;SET NK13.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@("NK13.3")=X K DXS,D0
.;SET NK17.1 = INSGX\^INTHL7F(14555,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14555,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK17.1")=X K DXS,D0
.;SET NK17.2 = INSGX\^INTHL7F(14556,5)\\60\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14556,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("NK17.2")=X K DXS,D0
.;SET NK17.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@("NK17.3")=X K DXS,D0
.;SET NK113 = INSGX\^INTHL7F(14557,5)\\250\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14557,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("NK113")=X K DXS,D0
.D:'INVS MC^INHS
.K LINE S LINE="",CP=0 S L1="NK1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("NK11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("NK13.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK13.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK13.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("NK17.1"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK17.2"))
.S D0=INDA S X="^" S L1=L1_X
.S L1=L1_$G(@INV@("NK17.3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,L1,.CP) S L1=$G(@INV@("NK113")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,14,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(9000010)) S INI=0 F S INI=$O(^AUPNVSIT("AC",INDA,INI)) Q:'INI S INDA(9000010,INI)=""
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))
.;SET PV11 = INSGX\^INTHL7F(14573,5)\\4\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14573,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("PV11")=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 PV17 = INSGX\^INTHL7F(14575,5)\\250\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14575,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("PV17")=X K DXS,D0
.;SET PV19 = INSGX\^INTHL7F(14576,5)\\250\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(14576,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("PV19")=X K DXS,D0
.;SET PV110 = #.07
.S D0=INDA S Y(2)=$C(59)_$P($G(^DD(9000010,.07,0)),U,3),Y(1)=$S($D(^AUPNVSIT(D0,0)):^(0),1:"") S X=$P($P(Y(2),$C(59)_$P(Y(1),U,7)_":",2),$C(59))
.S @INV@("PV110")=X K DXS,D0
.;SET PV119 = INSGX\^INTHL7F(15154,5)\\250\"OUTPUT TRANSFORM"
.S D0=INDA S X="OUTPUT TRANSFORM"
.S X1="^INTHL7F(15154,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
.S @INV@("PV119")=X K DXS,D0
.;SET PV144 = INSGX\^INTHL7FT(6,3)\\26\#.01
.S D0=INDA S Y(1)=$S($D(^AUPNVSIT(D0,0)):^(0),1:"") S X=$P(Y(1),U,1)
.S X1="^INTHL7FT(6,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,26)
.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@("PV13")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("PV17"))
.S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,L1,.CP) S L1=$G(@INV@("PV19")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,10,L1,.CP)
.S D0=INDA S X=@INV@("PV110"),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,11,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@("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
9 G EN^IS00029B
IS00029A ;Compiled from script 'Generated: HL IHS IZV04 V03VXR OUT-O' on AUG 15, 2018
+1 ;Part 2
+2 ;Copyright 2018 SAIC
EN SET L1=$GET(@INV@("PID17"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,18,L1,.CP)
SET L1=$GET(@INV@("PID19"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+1 DO SETPIECE^INHU(.LINE,DELIM,20,L1,.CP)
SET L1=$GET(@INV@("PID22"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,23,L1,.CP)
SET L1=$GET(@INV@("PID24"))
+2 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,25,L1,.CP)
+3 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+4 QUIT
A1 SET INDA=INDA0
KILL INDA0
+1 SET INSETID=0
+2 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(2,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1))
Begin DoDot:1
+3 IF '$DATA(^DPT(INDA,0))
QUIT
+4 DO ^BYIMNK1
+5 ;SET NK11 = INSGX\^INTHL7FT(1,3)\\100\@NK11
+6 SET D0=INDA
SET X=$GET(INA("NK11",INI(1)))
+7 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,100)
+8 SET @INV@("NK11")=X
KILL DXS,D0
+9 ;SET NK12 = INSGX\^INTHL7FT(1,3)\\250\@NK12
+10 SET D0=INDA
SET X=$GET(INA("NK12",INI(1)))
+11 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+12 SET @INV@("NK12")=X
KILL DXS,D0
+13 ;SET NK13 = INSGX\^INTHL7FT(1,3)\\250\@NK13
+14 SET D0=INDA
SET X=$GET(INA("NK13",INI(1)))
+15 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+16 SET @INV@("NK13")=X
KILL DXS,D0
+17 ;SET NK14 = INSGX\^INTHL7FT(1,3)\\250\@NK14
+18 SET D0=INDA
SET X=$GET(INA("NK14",INI(1)))
+19 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+20 SET @INV@("NK14")=X
KILL DXS,D0
+21 ;SET NK15 = INSGX\^INTHL7FT(1,3)\\50\@NK15
+22 SET D0=INDA
SET X=$GET(INA("NK15",INI(1)))
+23 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,50)
+24 SET @INV@("NK15")=X
KILL DXS,D0
+25 ;SET NK17 = INSGX\^INTHL7FT(1,3)\\99\@NK17
+26 SET D0=INDA
SET X=$GET(INA("NK17",INI(1)))
+27 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+28 SET @INV@("NK17")=X
KILL DXS,D0
+29 IF 'INVS
DO MC^INHS
+30 KILL LINE
SET LINE=""
SET CP=0
SET L1="NK1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("NK11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+31 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("NK12"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,3,L1,.CP)
SET L1=$GET(@INV@("NK13"))
+32 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("NK14"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
+33 SET L1=$GET(@INV@("NK15"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,6,L1,.CP)
SET L1=$GET(@INV@("NK17"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,8,L1,.CP)
+34 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+35 QUIT
End DoDot:1
+36 SET INDA=INDA0
KILL INDA0
+37 SET INSETID=0
+38 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(2,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1))
Begin DoDot:1
+39 IF '$DATA(^DPT(INDA,0))
QUIT
+40 ;SET NK11 = INSGX\^INTHL7FT(11,3)\\4\"NK1"
+41 SET D0=INDA
SET X="NK1"
+42 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+43 SET @INV@("NK11")=X
KILL DXS,D0
+44 ;SET NK12 = INSGX\^INTHL7FT(7,3)\\250\#.331
+45 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,1)
+46 SET X1="^INTHL7FT(7,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+47 SET @INV@("NK12")=X
KILL DXS,D0
+48 ;SET NK13.1 = INSGX\^INTHL7F(14540,5)\\60\"OUTPUT TRANSFORM"
+49 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+50 SET X1="^INTHL7F(14540,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+51 SET @INV@("NK13.1")=X
KILL DXS,D0
+52 ;SET NK13.2 = INSGX\^INTHL7FT(1,3)\\60\#.332
+53 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,2)
+54 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+55 SET @INV@("NK13.2")=X
KILL DXS,D0
+56 ;SET NK13.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+57 SET D0=INDA
SET X="99IHS"
+58 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+59 SET @INV@("NK13.3")=X
KILL DXS,D0
+60 ;SET NK14.1 = $E(#.333,1,106)
+61 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,3)
SET Y(2)=$GET(X)
SET X=1
SET Y(3)=$GET(X)
SET X=106
SET X=$EXTRACT(Y(2),Y(3),X)
+62 SET @INV@("NK14.1")=X
KILL DXS,D0
+63 ;SET NK14.2 = $E(#.334,1,106)
+64 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,4)
SET Y(2)=$GET(X)
SET X=1
SET Y(3)=$GET(X)
SET X=106
SET X=$EXTRACT(Y(2),Y(3),X)
+65 SET @INV@("NK14.2")=X
KILL DXS,D0
+66 ;SET NK14.3 = $E(#.336,1,106)
+67 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,6)
SET Y(2)=$GET(X)
SET X=1
SET Y(3)=$GET(X)
SET X=106
SET X=$EXTRACT(Y(2),Y(3),X)
+68 SET @INV@("NK14.3")=X
KILL DXS,D0
+69 ;SET NK14.4 = INSGX\^INTHL7F(14527,5)\\106\#.337
+70 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE($GET(^DIC(5,+$PIECE(Y(1),U,7),0)),U)
+71 SET X1="^INTHL7F(14527,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,106)
+72 SET @INV@("NK14.4")=X
KILL DXS,D0
+73 ;SET NK14.5 = $E(#.338,1,106)
+74 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,8)
SET Y(2)=$GET(X)
SET X=1
SET Y(3)=$GET(X)
SET X=106
SET X=$EXTRACT(Y(2),Y(3),X)
+75 SET @INV@("NK14.5")=X
KILL DXS,D0
+76 ;SET NK15 = INSGX\^INTHL7FT(8,3)\\250\#.339
+77 SET D0=INDA
SET Y(1)=$SELECT($DATA(^DPT(D0,.33)):^(.33),1:"")
SET X=$PIECE(Y(1),U,9)
+78 SET X1="^INTHL7FT(8,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+79 SET @INV@("NK15")=X
KILL DXS,D0
+80 ;SET NK17.1 = INSGX\^INTHL7F(14544,5)\\60\"OUTPUT TRANSFORM"
+81 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+82 SET X1="^INTHL7F(14544,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+83 SET @INV@("NK17.1")=X
KILL DXS,D0
+84 ;SET NK17.2 = INSGX\^INTHL7F(14545,5)\\60\"OUTPUT TRANSFORM"
+85 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+86 SET X1="^INTHL7F(14545,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+87 SET @INV@("NK17.2")=X
KILL DXS,D0
+88 ;SET NK17.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+89 SET D0=INDA
SET X="99IHS"
+90 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+91 SET @INV@("NK17.3")=X
KILL DXS,D0
+92 IF 'INVS
DO MC^INHS
+93 KILL LINE
SET LINE=""
SET CP=0
SET L1="NK1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("NK11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+94 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("NK12"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,3,L1,.CP)
SET L1=$GET(@INV@("NK13.1"))
+95 SET D0=INDA
SET X="^"
SET L1=L1_X
+96 SET L1=L1_$GET(@INV@("NK13.2"))
+97 SET D0=INDA
SET X="^"
SET L1=L1_X
+98 SET L1=L1_$GET(@INV@("NK13.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("NK14.1"))
+99 SET D0=INDA
SET X="^"
SET L1=L1_X
+100 SET L1=L1_$GET(@INV@("NK14.2"))
+101 SET D0=INDA
SET X="^"
SET L1=L1_X
+102 SET L1=L1_$GET(@INV@("NK14.3"))
+103 SET D0=INDA
SET X="^"
SET L1=L1_X
+104 SET L1=L1_$GET(@INV@("NK14.4"))
+105 SET D0=INDA
SET X="^"
SET L1=L1_X
+106 SET L1=L1_$GET(@INV@("NK14.5"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
SET L1=$GET(@INV@("NK15"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+107 DO SETPIECE^INHU(.LINE,DELIM,6,L1,.CP)
SET L1=$GET(@INV@("NK17.1"))
+108 SET D0=INDA
SET X="^"
SET L1=L1_X
+109 SET L1=L1_$GET(@INV@("NK17.2"))
+110 SET D0=INDA
SET X="^"
SET L1=L1_X
+111 SET L1=L1_$GET(@INV@("NK17.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,8,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:1
+114 SET INDA=INDA0
KILL INDA0
+115 SET INSETID=0
+116 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(2,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1))
Begin DoDot:1
+117 IF '$DATA(^DPT(INDA,0))
QUIT
+118 ;SET NK11 = INSGX\^INTHL7FT(11,3)\\4\"NK1"
+119 SET D0=INDA
SET X="NK1"
+120 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+121 SET @INV@("NK11")=X
KILL DXS,D0
+122 ;SET NK13.1 = INSGX\^INTHL7F(14548,5)\\60\"OUTPUT TRANSFORM"
+123 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+124 SET X1="^INTHL7F(14548,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+125 SET @INV@("NK13.1")=X
KILL DXS,D0
+126 ;SET NK13.2 = INSGX\^INTHL7F(14549,5)\\60\"OUTPUT TRANSFORM"
+127 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+128 SET X1="^INTHL7F(14549,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+129 SET @INV@("NK13.2")=X
KILL DXS,D0
+130 ;SET NK13.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+131 SET D0=INDA
SET X="99IHS"
+132 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+133 SET @INV@("NK13.3")=X
KILL DXS,D0
+134 ;SET NK17.1 = INSGX\^INTHL7F(14538,5)\\2\"OUTPUT TRANSFORM"
+135 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+136 SET X1="^INTHL7F(14538,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,2)
+137 SET @INV@("NK17.1")=X
KILL DXS,D0
+138 ;SET NK17.2 = INSGX\^INTHL7FT(1,3)\\4\"SELF"
+139 SET D0=INDA
SET X="SELF"
+140 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+141 SET @INV@("NK17.2")=X
KILL DXS,D0
+142 ;SET NK17.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+143 SET D0=INDA
SET X="99IHS"
+144 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+145 SET @INV@("NK17.3")=X
KILL DXS,D0
+146 ;SET NK113 = INSGX\^INTHL7F(14539,5)\\250\"OUTPUT TRANSFORM"
+147 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+148 SET X1="^INTHL7F(14539,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+149 SET @INV@("NK113")=X
KILL DXS,D0
+150 IF 'INVS
DO MC^INHS
+151 KILL LINE
SET LINE=""
SET CP=0
SET L1="NK1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("NK11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+152 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("NK13.1"))
+153 SET D0=INDA
SET X="^"
SET L1=L1_X
+154 SET L1=L1_$GET(@INV@("NK13.2"))
+155 SET D0=INDA
SET X="^"
SET L1=L1_X
+156 SET L1=L1_$GET(@INV@("NK13.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("NK17.1"))
+157 SET D0=INDA
SET X="^"
SET L1=L1_X
+158 SET L1=L1_$GET(@INV@("NK17.2"))
+159 SET D0=INDA
SET X="^"
SET L1=L1_X
+160 SET L1=L1_$GET(@INV@("NK17.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,8,L1,.CP)
SET L1=$GET(@INV@("NK113"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+161 DO SETPIECE^INHU(.LINE,DELIM,14,L1,.CP)
+162 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+163 QUIT
End DoDot:1
+164 SET INDA=INDA0
KILL INDA0
+165 SET INSETID=0
+166 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA(2,INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA(2,INI(1)):INDA(2,INI(1)),1:INI(1))
Begin DoDot:1
+167 IF '$DATA(^DPT(INDA,0))
QUIT
+168 ;SET NK11 = INSGX\^INTHL7FT(11,3)\\4\"NK1"
+169 SET D0=INDA
SET X="NK1"
+170 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+171 SET @INV@("NK11")=X
KILL DXS,D0
+172 ;SET NK13.1 = INSGX\^INTHL7F(14551,5)\\60\"OUTPUT TRANSFORM"
+173 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+174 SET X1="^INTHL7F(14551,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+175 SET @INV@("NK13.1")=X
KILL DXS,D0
+176 ;SET NK13.2 = INSGX\^INTHL7F(14552,5)\\60\"OUTPUT TRANSFORM"
+177 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+178 SET X1="^INTHL7F(14552,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+179 SET @INV@("NK13.2")=X
KILL DXS,D0
+180 ;SET NK13.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+181 SET D0=INDA
SET X="99IHS"
+182 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+183 SET @INV@("NK13.3")=X
KILL DXS,D0
+184 ;SET NK17.1 = INSGX\^INTHL7F(14555,5)\\60\"OUTPUT TRANSFORM"
+185 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+186 SET X1="^INTHL7F(14555,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+187 SET @INV@("NK17.1")=X
KILL DXS,D0
+188 ;SET NK17.2 = INSGX\^INTHL7F(14556,5)\\60\"OUTPUT TRANSFORM"
+189 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+190 SET X1="^INTHL7F(14556,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+191 SET @INV@("NK17.2")=X
KILL DXS,D0
+192 ;SET NK17.3 = INSGX\^INTHL7FT(1,3)\\5\"99IHS"
+193 SET D0=INDA
SET X="99IHS"
+194 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,5)
+195 SET @INV@("NK17.3")=X
KILL DXS,D0
+196 ;SET NK113 = INSGX\^INTHL7F(14557,5)\\250\"OUTPUT TRANSFORM"
+197 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+198 SET X1="^INTHL7F(14557,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+199 SET @INV@("NK113")=X
KILL DXS,D0
+200 IF 'INVS
DO MC^INHS
+201 KILL LINE
SET LINE=""
SET CP=0
SET L1="NK1"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("NK11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+202 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("NK13.1"))
+203 SET D0=INDA
SET X="^"
SET L1=L1_X
+204 SET L1=L1_$GET(@INV@("NK13.2"))
+205 SET D0=INDA
SET X="^"
SET L1=L1_X
+206 SET L1=L1_$GET(@INV@("NK13.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("NK17.1"))
+207 SET D0=INDA
SET X="^"
SET L1=L1_X
+208 SET L1=L1_$GET(@INV@("NK17.2"))
+209 SET D0=INDA
SET X="^"
SET L1=L1_X
+210 SET L1=L1_$GET(@INV@("NK17.3"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,8,L1,.CP)
SET L1=$GET(@INV@("NK113"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+211 DO SETPIECE^INHU(.LINE,DELIM,14,L1,.CP)
+212 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+213 QUIT
End DoDot:1
+214 SET INDA=INDA0
KILL INDA0
+215 SET INSETID=0
+216 IF '$DATA(INDA(9000010))
SET INI=0
FOR
SET INI=$ORDER(^AUPNVSIT("AC",INDA,INI))
IF 'INI
QUIT
SET INDA(9000010,INI)=""
+217 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
+218 IF '$DATA(^AUPNVSIT(INDA,0))
QUIT
+219 ;SET PV11 = INSGX\^INTHL7F(14573,5)\\4\"OUTPUT TRANSFORM"
+220 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+221 SET X1="^INTHL7F(14573,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+222 SET @INV@("PV11")=X
KILL DXS,D0
+223 ;SET PV13 = INSGX\^INTHL7FT(1,3)\\99\@PV13
+224 SET D0=INDA
SET X=$GET(INA("PV13",INI(1)))
+225 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,99)
+226 SET @INV@("PV13")=X
KILL DXS,D0
+227 ;SET PV17 = INSGX\^INTHL7F(14575,5)\\250\"OUTPUT TRANSFORM"
+228 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+229 SET X1="^INTHL7F(14575,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+230 SET @INV@("PV17")=X
KILL DXS,D0
+231 ;SET PV19 = INSGX\^INTHL7F(14576,5)\\250\"OUTPUT TRANSFORM"
+232 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+233 SET X1="^INTHL7F(14576,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+234 SET @INV@("PV19")=X
KILL DXS,D0
+235 ;SET PV110 = #.07
+236 SET D0=INDA
SET Y(2)=$CHAR(59)_$PIECE($GET(^DD(9000010,.07,0)),U,3)
SET Y(1)=$SELECT($DATA(^AUPNVSIT(D0,0)):^(0),1:"")
SET X=$PIECE($PIECE(Y(2),$CHAR(59)_$PIECE(Y(1),U,7)_":",2),$CHAR(59))
+237 SET @INV@("PV110")=X
KILL DXS,D0
+238 ;SET PV119 = INSGX\^INTHL7F(15154,5)\\250\"OUTPUT TRANSFORM"
+239 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+240 SET X1="^INTHL7F(15154,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+241 SET @INV@("PV119")=X
KILL DXS,D0
+242 ;SET PV144 = INSGX\^INTHL7FT(6,3)\\26\#.01
+243 SET D0=INDA
SET Y(1)=$SELECT($DATA(^AUPNVSIT(D0,0)):^(0),1:"")
SET X=$PIECE(Y(1),U,1)
+244 SET X1="^INTHL7FT(6,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,26)
+245 SET @INV@("PV144")=X
KILL DXS,D0
+246 IF 'INVS
DO MC^INHS
+247 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=""
+248 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("PV13"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("PV17"))
+249 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,8,L1,.CP)
SET L1=$GET(@INV@("PV19"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,10,L1,.CP)
+250 SET D0=INDA
SET X=@INV@("PV110")
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
+251 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,11,L1,.CP)
SET L1=$GET(@INV@("PV119"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,20,L1,.CP)
+252 SET L1=$GET(@INV@("PV144"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,45,L1,.CP)
+253 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+254 QUIT
End DoDot:1
+255 SET INDA=INDA0
KILL INDA0
+256 SET INSETID=0
9 GOTO EN^IS00029B