IS00020A ;Compiled from script 'Generated: HL IHS LAB O01 SONORA QUEST-O' on AUG 14, 2006
;Part 2
;Copyright 2006 SAIC
EN SET INSETID=0
;SET ORC1 = INSGX\^INTHL7F(16938,5)\\2\"OUTPUT TRANSFORM"
S D0=INDA S X="OUTPUT TRANSFORM"
S X1="^INTHL7F(16938,5)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,2)
S @INV@("ORC1")=X K DXS,D0
;SET ORC2 = INSGX\^INTHL7FT(1,3)\\250\@ORC2LABO
S D0=INDA S X=$G(INA("ORC2LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
S @INV@("ORC2")=X K DXS,D0
;SET ORC9 = INSGX\^INTHL7FT(6,3)\\14\@ORC11LABO
S D0=INDA S X=$G(INA("ORC11LABO"))
S X1="^INTHL7FT(6,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,14)
S @INV@("ORC9")=X K DXS,D0
;SET ORC12 = INSGX\^INTHL7FT(1,3)\\250\@ORC12LABO
S D0=INDA S X=$G(INA("ORC12LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
S @INV@("ORC12")=X K DXS,D0
D:'INVS MC^INHS
K LINE S LINE="",CP=0 S L1="ORC" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("ORC1")) S:$TR(L1,$G(SUBDELIM))="" L1=""
D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("ORC2")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("ORC9"))
S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,10,L1,.CP) S L1=$G(@INV@("ORC12")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,13,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 OBR1 = INSGX\^INTHL7FT(11,3)\\4\"OBR"
S D0=INDA S X="OBR"
S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
S @INV@("OBR1")=X K DXS,D0
;SET OBR2 = INSGX\^INTHL7FT(1,3)\\250\@ORC2LABO
S D0=INDA S X=$G(INA("ORC2LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
S @INV@("OBR2")=X K DXS,D0
;SET OBR4 = INSGX\^INTHL7FT(1,3)\\250\@OBR4LABO
S D0=INDA S X=$G(INA("OBR4LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
S @INV@("OBR4")=X K DXS,D0
;SET OBR7 = INSGX\^INTHL7FT(6,3)\\14\@OBR7LABO
S D0=INDA S X=$G(INA("OBR7LABO"))
S X1="^INTHL7FT(6,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,14)
S @INV@("OBR7")=X K DXS,D0
;SET OBR11 = INSGX\^INTHL7FT(1,3)\\999\@OBR13LABO
S D0=INDA S X=$G(INA("OBR13LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,999)
S @INV@("OBR11")=X K DXS,D0
;SET OBR16 = INSGX\^INTHL7FT(1,3)\\250\@ORC12LABO
S D0=INDA S X=$G(INA("ORC12LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,250)
S @INV@("OBR16")=X K DXS,D0
;SET OBR22 = INSGX\^INTHL7FT(6,3)\\26\@OBR22LABO
S D0=INDA S X=$G(INA("OBR22LABO"))
S X1="^INTHL7FT(6,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,26)
S @INV@("OBR22")=X K DXS,D0
;SET OBR27 = INSGX\^INTHL7FT(1,3)\\1\@OBR27LABO
S D0=INDA S X=$G(INA("OBR27LABO"))
S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,1)
S @INV@("OBR27")=X K DXS,D0
D:'INVS MC^INHS
K LINE S LINE="",CP=0 S L1="OBR" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("OBR1")) S:$TR(L1,$G(SUBDELIM))="" L1=""
D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("OBR2")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("OBR4"))
S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,5,L1,.CP) S L1=$G(@INV@("OBR7")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,8,L1,.CP)
S L1=$G(@INV@("OBR11")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,12,L1,.CP) S L1=$G(@INV@("OBR16")) S:$TR(L1,$G(SUBDELIM))="" L1=""
D SETPIECE^INHU(.LINE,DELIM,17,L1,.CP) S L1=$G(@INV@("OBR22")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,23,L1,.CP) S L1=$G(@INV@("OBR27"))
S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,28,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("OBX",INI(1))) Q:'INI(1) S INDA=$S(INDA("OBX",INI(1)):INDA("OBX",INI(1)),1:INI(1)) D
.;SET OBX1 = INSGX\^INTHL7FT(11,3)\\4\"OBX"
.S D0=INDA S X="OBX"
.S X1="^INTHL7FT(11,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,4)
.S @INV@("OBX1")=X K DXS,D0
.;SET OBX2 = INSGX\^INTHL7FT(1,3)\\999\"ST"
.S D0=INDA S X="ST"
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,999)
.S @INV@("OBX2")=X K DXS,D0
.;SET OBX3 = INSGX\^INTHL7FT(1,3)\\60\@OBX3LABO
.S D0=INDA S X=$G(INA("OBX3LABO",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,60)
.S @INV@("OBX3")=X K DXS,D0
.;SET OBX5 = INSGX\^INTHL7FT(1,3)\\999\@OBX5LABO
.S D0=INDA S X=$G(INA("OBX5LABO",INI(1)))
.S X1="^INTHL7FT(1,3)" X:$L($G(@X1)) $G(@X1) S X=$E(X,1,999)
.S @INV@("OBX5")=X K DXS,D0
.D:'INVS MC^INHS
.K LINE S LINE="",CP=0 S L1="OBX" S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,1,L1,.CP) S L1=$G(@INV@("OBX1")) S:$TR(L1,$G(SUBDELIM))="" L1=""
.D SETPIECE^INHU(.LINE,DELIM,2,L1,.CP) S L1=$G(@INV@("OBX2")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,3,L1,.CP) S L1=$G(@INV@("OBX3"))
.S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,4,L1,.CP) S L1=$G(@INV@("OBX5")) S:$TR(L1,$G(SUBDELIM))="" L1="" D SETPIECE^INHU(.LINE,DELIM,6,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
D:'INVS MC^INHS
;Entering END section.
I $G(INSTERR) Q $S($G(INREQERR)>INSTERR:INREQERR,1:INSTERR)
S UIF=$$NEWO^INHD(INDEST,"^UTILITY(""INH"",$J)",+$P($G(^INRHT(INTT,0)),U,12),INTT,MESSID,$G(INQUE),$G(INORDUZ),$G(INORDIV),.INUIF6,.INUIF7,$G(INA("INMIDGEN")))
I UIF<0 D ERROR^INHS("UIF creation failed",2) Q 2
Q 0
IS00020A ;Compiled from script 'Generated: HL IHS LAB O01 SONORA QUEST-O' on AUG 14, 2006
+1 ;Part 2
+2 ;Copyright 2006 SAIC
EN SET INSETID=0
+1 ;SET ORC1 = INSGX\^INTHL7F(16938,5)\\2\"OUTPUT TRANSFORM"
+2 SET D0=INDA
SET X="OUTPUT TRANSFORM"
+3 SET X1="^INTHL7F(16938,5)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,2)
+4 SET @INV@("ORC1")=X
KILL DXS,D0
+5 ;SET ORC2 = INSGX\^INTHL7FT(1,3)\\250\@ORC2LABO
+6 SET D0=INDA
SET X=$GET(INA("ORC2LABO"))
+7 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+8 SET @INV@("ORC2")=X
KILL DXS,D0
+9 ;SET ORC9 = INSGX\^INTHL7FT(6,3)\\14\@ORC11LABO
+10 SET D0=INDA
SET X=$GET(INA("ORC11LABO"))
+11 SET X1="^INTHL7FT(6,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,14)
+12 SET @INV@("ORC9")=X
KILL DXS,D0
+13 ;SET ORC12 = INSGX\^INTHL7FT(1,3)\\250\@ORC12LABO
+14 SET D0=INDA
SET X=$GET(INA("ORC12LABO"))
+15 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+16 SET @INV@("ORC12")=X
KILL DXS,D0
+17 IF 'INVS
DO MC^INHS
+18 KILL LINE
SET LINE=""
SET CP=0
SET L1="ORC"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("ORC1"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+19 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("ORC2"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,3,L1,.CP)
SET L1=$GET(@INV@("ORC9"))
+20 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,10,L1,.CP)
SET L1=$GET(@INV@("ORC12"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,13,L1,.CP)
+21 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+22 SET INSETID=0
+23 ;SET OBR1 = INSGX\^INTHL7FT(11,3)\\4\"OBR"
+24 SET D0=INDA
SET X="OBR"
+25 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+26 SET @INV@("OBR1")=X
KILL DXS,D0
+27 ;SET OBR2 = INSGX\^INTHL7FT(1,3)\\250\@ORC2LABO
+28 SET D0=INDA
SET X=$GET(INA("ORC2LABO"))
+29 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+30 SET @INV@("OBR2")=X
KILL DXS,D0
+31 ;SET OBR4 = INSGX\^INTHL7FT(1,3)\\250\@OBR4LABO
+32 SET D0=INDA
SET X=$GET(INA("OBR4LABO"))
+33 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+34 SET @INV@("OBR4")=X
KILL DXS,D0
+35 ;SET OBR7 = INSGX\^INTHL7FT(6,3)\\14\@OBR7LABO
+36 SET D0=INDA
SET X=$GET(INA("OBR7LABO"))
+37 SET X1="^INTHL7FT(6,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,14)
+38 SET @INV@("OBR7")=X
KILL DXS,D0
+39 ;SET OBR11 = INSGX\^INTHL7FT(1,3)\\999\@OBR13LABO
+40 SET D0=INDA
SET X=$GET(INA("OBR13LABO"))
+41 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,999)
+42 SET @INV@("OBR11")=X
KILL DXS,D0
+43 ;SET OBR16 = INSGX\^INTHL7FT(1,3)\\250\@ORC12LABO
+44 SET D0=INDA
SET X=$GET(INA("ORC12LABO"))
+45 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,250)
+46 SET @INV@("OBR16")=X
KILL DXS,D0
+47 ;SET OBR22 = INSGX\^INTHL7FT(6,3)\\26\@OBR22LABO
+48 SET D0=INDA
SET X=$GET(INA("OBR22LABO"))
+49 SET X1="^INTHL7FT(6,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,26)
+50 SET @INV@("OBR22")=X
KILL DXS,D0
+51 ;SET OBR27 = INSGX\^INTHL7FT(1,3)\\1\@OBR27LABO
+52 SET D0=INDA
SET X=$GET(INA("OBR27LABO"))
+53 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,1)
+54 SET @INV@("OBR27")=X
KILL DXS,D0
+55 IF 'INVS
DO MC^INHS
+56 KILL LINE
SET LINE=""
SET CP=0
SET L1="OBR"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("OBR1"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+57 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("OBR2"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,3,L1,.CP)
SET L1=$GET(@INV@("OBR4"))
+58 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,5,L1,.CP)
SET L1=$GET(@INV@("OBR7"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,8,L1,.CP)
+59 SET L1=$GET(@INV@("OBR11"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,12,L1,.CP)
SET L1=$GET(@INV@("OBR16"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+60 DO SETPIECE^INHU(.LINE,DELIM,17,L1,.CP)
SET L1=$GET(@INV@("OBR22"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,23,L1,.CP)
SET L1=$GET(@INV@("OBR27"))
+61 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,28,L1,.CP)
+62 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+63 SET INSETID=0
+64 SET INDA0=INDA
SET INI(1)=0
FOR
SET INI(1)=$ORDER(INDA("OBX",INI(1)))
IF 'INI(1)
QUIT
SET INDA=$SELECT(INDA("OBX",INI(1)):INDA("OBX",INI(1)),1:INI(1))
Begin DoDot:1
+65 ;SET OBX1 = INSGX\^INTHL7FT(11,3)\\4\"OBX"
+66 SET D0=INDA
SET X="OBX"
+67 SET X1="^INTHL7FT(11,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,4)
+68 SET @INV@("OBX1")=X
KILL DXS,D0
+69 ;SET OBX2 = INSGX\^INTHL7FT(1,3)\\999\"ST"
+70 SET D0=INDA
SET X="ST"
+71 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,999)
+72 SET @INV@("OBX2")=X
KILL DXS,D0
+73 ;SET OBX3 = INSGX\^INTHL7FT(1,3)\\60\@OBX3LABO
+74 SET D0=INDA
SET X=$GET(INA("OBX3LABO",INI(1)))
+75 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,60)
+76 SET @INV@("OBX3")=X
KILL DXS,D0
+77 ;SET OBX5 = INSGX\^INTHL7FT(1,3)\\999\@OBX5LABO
+78 SET D0=INDA
SET X=$GET(INA("OBX5LABO",INI(1)))
+79 SET X1="^INTHL7FT(1,3)"
IF $LENGTH($GET(@X1))
XECUTE $GET(@X1)
SET X=$EXTRACT(X,1,999)
+80 SET @INV@("OBX5")=X
KILL DXS,D0
+81 IF 'INVS
DO MC^INHS
+82 KILL LINE
SET LINE=""
SET CP=0
SET L1="OBX"
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,1,L1,.CP)
SET L1=$GET(@INV@("OBX1"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
+83 DO SETPIECE^INHU(.LINE,DELIM,2,L1,.CP)
SET L1=$GET(@INV@("OBX2"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,3,L1,.CP)
SET L1=$GET(@INV@("OBX3"))
+84 IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,4,L1,.CP)
SET L1=$GET(@INV@("OBX5"))
IF $TRANSLATE(L1,$GET(SUBDELIM))=""
SET L1=""
DO SETPIECE^INHU(.LINE,DELIM,6,L1,.CP)
+85 SET LCT=LCT+1
SET ^UTILITY("INH",$JOB,LCT)=LINE
IF $DATA(LINE)>9
MERGE ^UTILITY("INH",$JOB,LCT)=LINE
+86 QUIT
End DoDot:1
+87 SET INDA=INDA0
KILL INDA0
+88 IF 'INVS
DO MC^INHS
+89 ;Entering END section.
+90 IF $GET(INSTERR)
QUIT $SELECT($GET(INREQERR)>INSTERR:INREQERR,1:INSTERR)
+91 SET UIF=$$NEWO^INHD(INDEST,"^UTILITY(""INH"",$J)",+$PIECE($GET(^INRHT(INTT,0)),U,12),INTT,MESSID,$GET(INQUE),$GET(INORDUZ),$GET(INORDIV),.INUIF6,.INUIF7,$GET(INA("INMIDGEN")))
+92 IF UIF<0
DO ERROR^INHS("UIF creation failed",2)
QUIT 2
+93 QUIT 0