Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IS00011

IS00011.m

Go to the documentation of this file.
IS00011(INTT,INDA,INA,INDEST,INQUE,INORDUZ,INORDIV) ;Compiled from script 'Generated: HL IHS IZV04 OUT-O' on AUG 15, 2018
 ;Part 1
 ;Copyright 2018 SAIC
EN S X="ERROR^IS00011",@^%ZOSF("TRAP")
 G START
ERROR ;
 S X="",@^%ZOSF("TRAP") X ^INTHOS(1,3) D ERROR^INHS($$GETERR^%ZTOS)
 Q 2
START ;Initialize variables
 K ^UTILITY("INH",$J) S (MESSID,INA("MESSID"))=$$MESSID^INHD
 K INUIF6 M INUIF6=INDA
 K INREQERR,INHERR,INHERCNT,INV D SETDT^UTDT S DUZ(0)="@",DUZ("AG")="^1",DTIME=1 S (LCT,GERR)=0,INMODE="O",INVS=$P(^INRHSITE(1,0),U,12),INV=$S(INVS<2:"INV",1:"^UTILITY(""INV"",$J)"),(MULT,INSTERR)=0
 S INHLDUZ=$O(^VA(200,"B","GIS,USER",0)),DUZ=$S($G(INHLDUZ):INHLDUZ,1:.5)
 S BHLMIEN="12426"
 I $G(^INTHL7M(BHLMIEN,4,1,0))]"" X $G(^INTHL7M(BHLMIEN,4,1,0))
 K INSETID
 S INSMIN=$S($P($G(^INRHSITE(1,0)),U,14):$P(^(0),U,14),1:2500)
 S (DELIM,INDELIM)=$$FIELD^INHUT(),(SUBDELIM,INSUBDEL)=$$COMP^INHUT(),INSUBCOM=$$SUBCOMP^INHUT()
 S INDELIMS=$$FIELD^INHUT_$$COMP^INHUT_$$REP^INHUT_$$ESC^INHUT_$$SUBCOMP^INHUT
 ;Entering MUMPS section.
 D VST^BHLV,PATH^BYIMIMM
 ;Entering DATA section.
 S DELIM="|"
 S SUBDELIM="^"
 SET INSETID=0
 D MSH^BYIMSEGS
 ;SET MSH1 = INSGX\^INTHL7FT(1,3)\\4\@ENC
 S D0=INDA S X=$G(INA("ENC"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
 S @INV@("MSH1")=X K DXS,D0
 ;SET MSH2 = INSGX\^INTHL7FT(1,3)\\180\@MSH3
 S D0=INDA S X=$G(INA("MSH3"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,180)
 S @INV@("MSH2")=X K DXS,D0
 ;SET MSH3 = INSGX\^INTHL7FT(1,3)\\180\@MSH4
 S D0=INDA S X=$G(INA("MSH4"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,180)
 S @INV@("MSH3")=X K DXS,D0
 ;SET MSH4 = INSGX\^INTHL7FT(1,3)\\180\@MSH5
 S D0=INDA S X=$G(INA("MSH5"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,180)
 S @INV@("MSH4")=X K DXS,D0
 ;SET MSH5 = INSGX\^INTHL7FT(1,3)\\180\@MSH6
 S D0=INDA S X=$G(INA("MSH6"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,180)
 S @INV@("MSH5")=X K DXS,D0
 ;SET MSH6 = INSGX\^INTHL7FT(1,3)\\20\@MSH7
 S D0=INDA S X=$G(INA("MSH7"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,20)
 S @INV@("MSH6")=X K DXS,D0
 ;SET MSH7 = INSGX\^INTHL7FT(1,3)\\20\@MSH8
 S D0=INDA S X=$G(INA("MSH8"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,20)
 S @INV@("MSH7")=X K DXS,D0
 ;SET MSH8 = INSGX\^INTHL7FT(1,3)\\50\@MSH9
 S D0=INDA S X=$G(INA("MSH9"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,50)
 S @INV@("MSH8")=X K DXS,D0
 ;SET MSH9 = INSGX\^INTHL7FT(1,3)\\20\@MSH10
 S D0=INDA S X=$G(INA("MSH10"))
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,20)
 S @INV@("MSH9")=X K DXS,D0
 ;SET MSH10 = $E(INTERNAL(@PRID),1,1)
 S D0=INDA S X=$G(INA("PRID")),X=X S X=X,Y(1)=$G(X) S X=1,Y(2)=$G(X) S X=1,X=$E(Y(1),Y(2),X)
 S @INV@("MSH10")=X K DXS,D0
 ;SET MSH11 = @MSH12
 S D0=INDA S X=$G(INA("MSH12"))
 S @INV@("MSH11")=X K DXS,D0
 ;SET MSH12 = ""
 S D0=INDA S X=""
 S @INV@("MSH12")=X K DXS,D0
 ;SET MSH13 = ""
 S D0=INDA S X=""
 S @INV@("MSH13")=X K DXS,D0
 ;SET MSH14 = $E(INTERNAL(@ACA),1,2)
 S D0=INDA S X=$G(INA("ACA")),X=X S X=X,Y(1)=$G(X) S X=1,Y(2)=$G(X) S X=2,X=$E(Y(1),Y(2),X)
 S @INV@("MSH14")=X K DXS,D0
 ;SET MSH15 = $E(INTERNAL(@APA),1,2)
 S D0=INDA S X=$G(INA("APA")),X=X S X=X,Y(1)=$G(X) S X=1,Y(2)=$G(X) S X=2,X=$E(Y(1),Y(2),X)
 S @INV@("MSH15")=X K DXS,D0
 ;SET MSH16 = INSGX\^INTHL7FT(1,3)\\3\"USA"
 S D0=INDA S X="USA"
 S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,3)
 S @INV@("MSH16")=X K DXS,D0
 D:'INVS MC^INHS
 K LINE S LINE="",CP=0 S L1="MSH" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("MSH1")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("MSH2")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("MSH3"))
 S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("MSH4")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
 S L1=$G(@INV@("MSH5")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,6,L1,.CP) S L1=$G(@INV@("MSH6")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,7,L1,.CP)
 S L1=$G(@INV@("MSH7")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,L1,.CP) S L1=$G(@INV@("MSH8")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,9,L1,.CP)
 S L1=$G(@INV@("MSH9")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,10,L1,.CP) S L1=$G(@INV@("MSH10")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,11,L1,.CP)
 S D0=INDA S X=@INV@("MSH11"),Y(1)=$G(X) S X=1,Y(2)=$G(X) S X=10,X=$E(Y(1),Y(2),X) S L1=X
 S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,12,L1,.CP) S L1=$G(@INV@("MSH12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,13,L1,.CP)
 S L1=$G(@INV@("MSH13")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,14,L1,.CP) S L1=$G(@INV@("MSH14")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 D SETPIECE^INHU(.LINE,DELIM,15,L1,.CP) S L1=$G(@INV@("MSH15")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,16,L1,.CP) S L1=$G(@INV@("MSH16"))
 S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,17,L1,.CP)
 S LCT=LCT+1,^UTILITY("INH",$J,LCT)=LINE I $D(LINE)>9 M ^UTILITY("INH",$J,LCT)=LINE
 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 PID^BYIMSEGS
 .;SET PID1 = INSGX\^INTHL7FT(11,3)\\4\"PID"
 .S D0=INDA S X="PID"
 .S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
 .S @INV@("PID1")=X K DXS,D0
 .;SET PID3 = INSGX\^INTHL7FT(1,3)\\250\@PID3
 .S D0=INDA S X=$G(INA("PID3",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PID3")=X K DXS,D0
 .;SET PID5 = INSGX\^INTHL7FT(7,3)\\250\@PID5
 .S D0=INDA S X=$G(INA("PID5",INI(1)))
 .S X1="^INTHL7FT(7,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PID5")=X K DXS,D0
 .;SET PID6 = INSGX\^INTHL7FT(1,3)\\99\@PID6
 .S D0=INDA S X=$G(INA("PID6",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
 .S @INV@("PID6")=X K DXS,D0
 .;SET PID7 = INSGX\^INTHL7FT(1,3)\\8\@PID7
 .S D0=INDA S X=$G(INA("PID7",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
 .S @INV@("PID7")=X K DXS,D0
 .;SET PID8 = $E(INTERNAL(SEX),1,1)
 .S D0=INDA S Y(1)=$S($D(^DPT(D0,0)):^(0),1:"") S X=$P(Y(1),U,2),X=X S X=X,Y(2)=$G(X) S X=1,Y(3)=$G(X) S X=1,X=$E(Y(2),Y(3),X)
 .S @INV@("PID8")=X K DXS,D0
 .;SET PID10 = INSGX\^INTHL7FT(1,3)\\99\@PID10
 .S D0=INDA S X=$G(INA("PID10",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,99)
 .S @INV@("PID10")=X K DXS,D0
 .;SET PID11 = INSGX\^INTHL7FT(1,3)\\250\@PID11
 .S D0=INDA S X=$G(INA("PID11",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PID11")=X K DXS,D0
 .;SET PID12 = $E(INTERNAL(#.117),1,4)
 .S D0=INDA S Y(1)=$S($D(^DPT(D0,.11)):^(.11),1:"") S X=$P(Y(1),U,7),X=X S X=X,Y(2)=$G(X) S X=1,Y(3)=$G(X) S X=4,X=$E(Y(2),Y(3),X)
 .S @INV@("PID12")=X K DXS,D0
 .;SET PID13 = INSGX\^INTHL7FT(1,3)\\250\@PID13
 .S D0=INDA S X=$G(INA("PID13",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PID13")=X K DXS,D0
 .;SET PID14 = INSGX\^INTHL7FT(1,3)\\250\@PID14
 .S D0=INDA S X=$G(INA("PID14",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PID14")=X K DXS,D0
 .;SET PID17 = INSGX\^INTHL7FT(17,3)\\250\#.08
 .S D0=INDA S Y(1)=$S($D(^DPT(D0,0)):^(0),1:"") S X=$P($G(^DIC(13,+$P(Y(1),U,8),0)),U)
 .S X1="^INTHL7FT(17,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PID17")=X K DXS,D0
 .;SET PID19 = INSGX\^INTHL7FT(1,3)\\80\@PID19
 .S D0=INDA S X=$G(INA("PID19",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,80)
 .S @INV@("PID19")=X K DXS,D0
 .;SET PID22 = INSGX\^INTHL7FT(1,3)\\200\@PID22
 .S D0=INDA S X=$G(INA("PID22",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,200)
 .S @INV@("PID22")=X K DXS,D0
 .;SET PID24 = INSGX\^INTHL7FT(1,3)\\10\@PID24
 .S D0=INDA S X=$G(INA("PID24",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,10)
 .S @INV@("PID24")=X K DXS,D0
 .D:'INVS MC^INHS
 .K LINE S LINE="",CP=0 S L1="PID" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("PID1")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 .D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("PID3")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("PID5"))
 .S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,6,L1,.CP) S L1=$G(@INV@("PID6")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,7,L1,.CP)
 .S L1=$G(@INV@("PID7")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,L1,.CP) S L1=$G(@INV@("PID8")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,9,L1,.CP)
 .S L1=$G(@INV@("PID10")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,11,L1,.CP) S L1=$G(@INV@("PID11")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 .D SETPIECE^INHU(.LINE,DELIM,12,L1,.CP) S L1=$G(@INV@("PID12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,13,L1,.CP) S L1=$G(@INV@("PID13"))
 .S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,14,L1,.CP) S L1=$G(@INV@("PID14")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,15,L1,.CP)
 .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
 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 PD1^BYIMSEGS
 .;SET PD13 = INSGX\^INTHL7FT(1,3)\\250\@PD13
 .S D0=INDA S X=$G(INA("PD13",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
 .S @INV@("PD13")=X K DXS,D0
 .;SET PD111 = INSGX\^INTHL7FT(1,3)\\50\@PD111
 .S D0=INDA S X=$G(INA("PD111",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,50)
 .S @INV@("PD111")=X K DXS,D0
 .;SET PD112 = INSGX\^INTHL7F(16991,5)\\4\@PD112
 .S D0=INDA S X=$G(INA("PD112",INI(1)))
 .S X1="^INTHL7F(16991,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
 .S @INV@("PD112")=X K DXS,D0
 .;SET PD113 = INSGX\^INTHL7FT(1,3)\\8\@PD113
 .S D0=INDA S X=$G(INA("PD113",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,8)
 .S @INV@("PD113")=X K DXS,D0
 .;SET PD116 = INSGX\^INTHL7FT(1,3)\\1\@PD116
 .S D0=INDA S X=$G(INA("PD116",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,1)
 .S @INV@("PD116")=X K DXS,D0
 .;SET PD117 = INSGX\^INTHL7FT(1,3)\\50\@PD117
 .S D0=INDA S X=$G(INA("PD117",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,50)
 .S @INV@("PD117")=X K DXS,D0
 .;SET PD118 = INSGX\^INTHL7FT(1,3)\\50\@PD118
 .S D0=INDA S X=$G(INA("PD118",INI(1)))
 .S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,50)
 .S @INV@("PD118")=X K DXS,D0
 .D:'INVS MC^INHS
 .K LINE S LINE="",CP=0 S L1="PD1" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("PD13")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 .D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("PD111")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,12,L1,.CP) S L1=$G(@INV@("PD112"))
 .S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,13,L1,.CP) S L1=$G(@INV@("PD113")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,14,L1,.CP)
 .S L1=$G(@INV@("PD116")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,17,L1,.CP) S L1=$G(@INV@("PD117")) S:$TR(L1,$G(SUBDELIM))="" L1=""
 .D SETPIECE^INHU(.LINE,DELIM,18,L1,.CP) S L1=$G(@INV@("PD118")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,19,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))
 .D NK1^BYIMSEGS
 .;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
 I '$D(INDA(9000010)) S INI=0 F  S INI=$O(^AUPNVSIT("AC",INDA,INI)) Q:'INI  S INDA(9000010,INI)=""
9 G EN^IS00011A