LRVR1 ;DALOI/CJS/JAH - LAB ROUTINE DATA VERIFICATION ;8/10/04
;;5.2;LAB SERVICE;**1031**;NOV 1, 1997
;
;;VA LR Patch(s): 42,153,221,286,291
;
N LRI,LRN,LRBETST,LRBEY
S (LRI,LRN)=0
F S LRI=$O(^LAH(LRLL,1,"C",LRAN,LRI)) Q:LRI<1 D
. N LRX
. S LRX=$G(^LAH(LRLL,1,LRI,0))
. ; Quit if different accession area.
. I $P(LRX,"^",3),$P(LRX,"^",3)'=LRAA Q
. ; Quit if different accession date and not a rollover accession (same original accession date).
. I $P(LRX,"^",4),$P(LRX,"^",4)'=LRAD,$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,0)),"^",3)'=$P($G(^LRO(68,LRAA,1,$P(LRX,"^",4),1,LRAN,0)),"^",3) Q
. I LRN W !
. S LRN=LRN+1,LRSQ=LRI
. W !,?2,"Seq #: ",LRI,?13," Accession: ",$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,.2)),"^")
. I $P(LRX,"^",10) W ?40," Results received: ",$$FMTE^XLFDT($P(LRX,"^",10),"1M")
. W !,?20,"UID: ",$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,.3),"UNKNOWN"),"^")
. I $P(LRX,"^",11) W ?44," Last updated: ",$$FMTE^XLFDT($P(LRX,"^",11),"1M")
G VER:LRN=1,T3:LRN>1
;
; If attempting to verify reference lab results and no entry in LAH
; associated with this accession then quit - do not allow manual entry
; of ref lab results via this option. Will not store units/normals.
I $G(LRDUZ(2)),DUZ(2)'=LRDUZ(2) W !,"No data there" Q
;
T1 R !,"What tray: ",X:DTIME Q:X["^"!'$T I X["?"!(X'?.N) W !,"Enter a number" G T1
I X'="" S LRTRAY=X G T2
I $D(^LRO(68.2,"AS",LRLL)) W !,"Can't MANUALLY add to a SEQUENCE instrument data file." G QUIT
W !,"Enter manually" S %=1 D YN^DICN G QUIT:%<1,T1:%=2 S LRSQ=-1 G VER
G VER
T2 R !,"What cup: ",X:DTIME Q:X["^"!'$T I X["?"!(X'?.N) W !,"Enter a number" G T2
Q:X="" S LRTRCP=LRTRAY_";"_X
K LRPRGSQ
S LRN=0 F LRI=0:0 S LRI=$O(^LAH(LRLL,1,"B",LRTRCP,LRI)) Q:LRI<1 S LRN=LRN+1,LRSQ=LRI,LRPRGSQ(LRI)="" W !,?5,LRI
T3 I LRN=0 W !,"No data for that tray & cup" Q
I LRN>1 R !,"Choose sequence number: ",X:DTIME Q:'$T I X["?"!(X'?.N) W !,"Enter a number" G T3
I X["^"!(X="") K LRPRGSQ Q
S:LRN'=1 LRSQ=X I '$D(^LAH(LRLL,1,LRSQ,0)) W !,"No data there" G T3
;
VER ; from LRFLAG, LRGP, LRVRW
N LRROOT
K LRTEST,LRNM,^TMP("LR",$J,"TMP")
S LRUID=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,.3)),"^")
;
; Determine if there are amended results to process via "EM"
S LRROOT=$Q(^LAH("LA7 AMENDED RESULTS",LRUID,1,LRLL))
I LRROOT'="",$QS(LRROOT,1)="LA7 AMENDED RESULTS",$QS(LRROOT,2)=LRUID,$QS(LRROOT,4)=LRLL D Q
. W !!,"Amended results exist for this accession. Please process these"
. W !,"first using option Enter/verify/modify data (manual) [LRENTER]"
;
D TEST
I $O(^TMP("LR",$J,"TMP",0))="" W !,"No tests in editing profile" Q
S X=DUZ D DUZ^LRX
G V2:LRSQ>0
L +^LAH(LRLL)
S (^LAH(LRLL),LRSQ)=1+$G(^LAH(LRLL))
S ^LAH(LRLL,1,LRSQ,0)="^^"_LRAA_"^"_LRAD_"^"_LRAN_"^^MANUAL"
D UID^LAGEN(LRLL,LRSQ,LRUID)
D UPDT^LAGEN(LRLL,LRSQ)
S ^LAH(LRLL,1,"C",LRAN,LRSQ)=""
L -^LAH(LRLL)
V2 K LRPRGSQ(LRSQ)
S LRLLOC=0,LROUTINE=$P(^LAB(69.9,1,3),U,2)
I $D(^LRO(69,LRODT,1,LRSN,0)) S LRLLOC=$P(^(0),U,7) S:'$L(LRLLOC) LRLLOC=0 W !,$P(^LRO(69,LRODT,1,LRSN,1),U,6)
S LRCDT=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U)
I '$P(^LRO(68,LRAA,1,LRAD,1,LRAN,3),"^",3) D
. N %DT,LRA1,LRA2,LRA3
. S %DT("B")=$$FMTE^XLFDT(LRCDT,"1")
. S LRSTATUS="C",LRA1=LRAA,LRA2=LRAD,LRA3=LRAN
. D P15^LROE1
. S LRAA=LRA1,LRAD=LRA2,LRAN=LRA3
. I LRCDT<1 Q
. I '$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,3) S $P(^(3),U,3)=$$NOW^XLFDT
; If user did not update then go to next
I '$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,3) Q
S LRCDT=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U)
I LRCDT<1 Q
S LREAL=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,2),LRALERT=LROUTINE
S I=0
F S I=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,I)) Q:I<.5 I $G(^(I,0)) S LRAL=$P($G(^(0)),U,2) D
. I $G(LRAL) S LRALERT=$S(LRAL<50&(LRAL<LRALERT):LRAL,LRAL>50&(LRAL-50<LRALERT):LRAL-50,1:LRALERT)
S LRSAMP=$P($G(^LRO(69,LRODT,1,LRSN,0)),U,3)
;
S LRSS=$P(^LRO(68,LRAA,0),U,2)
I LRSS'="CH" Q
; Check for valid pointer to file #63 and entry in file #63.
S LRIDT=$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,5)
I LRIDT<1 W !,">>>>ERROR - NO POINTER TO FILE #63 - PLEASE NOTIFY SYSTEM MANAGER^ <<<<<",! Q
I '$D(^LR(LRDFN,LRSS,LRIDT,0)) W !,">>>>ERROR - NO ENTRY IN FILE #63 - PLEASE NOTIFY SYSTEM MANAGER<<^ <<<",! Q
;
S LRCW=8
LD S LRSS="CH"
I '($D(^LAH(LRLL,1,LRSQ,0))#2) W !!?5,"No Data for this Accession ",!! K ^LAH(LRLL,1,LRSQ),^LAH(LRLL,1,"C",LRAN,LRSQ) K LRPRGSQ Q
;
; Store any new methods with existing methods on file.
S LRMETH=$P(^LAH(LRLL,1,LRSQ,0),U,7) S:$D(LRGVP) LRMETH=LRMETH_"(GV)"
I $P($G(^LR(LRDFN,LRSS,LRIDT,0)),U,8)'="" D
. N I,X
. S X=$P(^LR(LRDFN,LRSS,LRIDT,0),U,8)
. F I=1:1:$L(X,";") I $P(X,";",I)'="",LRMETH'[$P(X,";",I) S LRMETH=LRMETH_";"_$P(X,";",I)
I LRMETH'="" S $P(^LR(LRDFN,LRSS,LRIDT,0),U,8)=LRMETH
;
W:$D(^LAB(62,+LRSAMP,0)) !,"Sample: ",$P(^(0),U)
;
D ^LRVR2
K LRDL,LRPRGSQ
Q ; leave LRVR1, back to LRVR
;
;
TEST ; from LRGV1
N LRI,LRX
S LRI=0
F S LRI=$O(^TMP("LR",$J,"VTO",LRI)) Q:LRI<1 K ^(LRI,"P")
S (LRI,LRNT)=0
F S LRI=$O(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRI)) Q:LRI<.5 I $D(^(LRI,0)),'$L($P(^(0),U,6)) S X=^(0) I $D(^TMP("LR",$J,"VTO",+X)) D
. S LRNT=LRNT+1,LRTEST(LRNT)=+X,LRX=$S($P(X,"^",2)>50:$P(X,"^",9),1:$P(X,"^"))
. S LRTEST(LRNT,"P")=LRX_U_$$NLT^LRVER1(LRX)_"!"
. S ^TMP("LR",$J,"VTO",+X,"P")=$P(LRTEST(LRNT,"P"),"!")
;
TEST1 ; from LRFLAG
;
N LRI
F LRI=1:1:LRNT S:$D(^LAB(60,+LRTEST(LRI),0)) (LRTEST(LRI),LRBETST(LRI))=LRTEST(LRI)_U_^(0)
I $G(LRORDR)'="P" K ^TMP("LR",$J,"TMP")
S LRNX=0
K LRM
F I=1:1 Q:'$D(LRTEST(I)) D
. S X=LRTEST(I),XP=$G(LRTEST(I,"P"))
. K LRTEST(I)
. D EX2
K LRTEST
Q
;
;
EX2 ;
; If dataname then process and quit
S LRSUB=$P(X,U,6)
I LRSUB'="" D Q
. S LRSB=$P(LRSUB,";",2)
. Q:'$D(LRVTS(LRSB))
. I $D(^TMP("LR",$J,"TMP",LRSB)) S ^(LRSB,"P")=XP
. Q:$D(^TMP("LR",$J,"TMP",LRSB))
. S ^TMP("LR",$J,"TMP",LRSB)=+X
. S XP=XP_$$RNLT^LRVER1(+X)
. S ^TMP("LR",$J,"TMP",LRSB,"P")=XP
. S:$P(X,U,18) LRM(LRSB)=+X,LRM(LRSB,"P")=XP
. S LRBEY(+XP,LRSB)="" ; CIDC
;
I $D(^LAB(60,+X,4)),$P(^(4),"^",2) S LRCFL=LRCFL_$P(^(4),"^",2)_U
;
; If panel then explode components of panel and
; set parent("P" node) to file #60 test being exploded
S J=0
F S J=$O(^LAB(60,+X,2,J)) Q:J<1 I $D(^(J,0))#2 D
. S LRNT=LRNT+1,Y=^LAB(60,+X,2,J,0)
. S LRTEST(LRNT)=+Y_U_^LAB(60,+Y,0)
. S LRTEST(LRNT,"P")=+XP_U_$$NLT^LRVER1(+XP)_"!"
Q
;
;
QUIT Q
;
WAIT W !,"Type ""^"" to skip "
WAIT1 R X:10 G LRVR1:X[U,WAIT1:$O(^LAH(LRLL,1,"C",LRAN,0))<1 G LRVR1
LRVR1 ;DALOI/CJS/JAH - LAB ROUTINE DATA VERIFICATION ;8/10/04
+1 ;;5.2;LAB SERVICE;**1031**;NOV 1, 1997
+2 ;
+3 ;;VA LR Patch(s): 42,153,221,286,291
+4 ;
+5 NEW LRI,LRN,LRBETST,LRBEY
+6 SET (LRI,LRN)=0
+7 FOR
SET LRI=$ORDER(^LAH(LRLL,1,"C",LRAN,LRI))
IF LRI<1
QUIT
Begin DoDot:1
+8 NEW LRX
+9 SET LRX=$GET(^LAH(LRLL,1,LRI,0))
+10 ; Quit if different accession area.
+11 IF $PIECE(LRX,"^",3)
IF $PIECE(LRX,"^",3)'=LRAA
QUIT
+12 ; Quit if different accession date and not a rollover accession (same original accession date).
+13 IF $PIECE(LRX,"^",4)
IF $PIECE(LRX,"^",4)'=LRAD
IF $PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,0)),"^",3)'=$PIECE($GET(^LRO(68,LRAA,1,$PIECE(LRX,"^",4),1,LRAN,0)),"^",3)
QUIT
+14 IF LRN
WRITE !
+15 SET LRN=LRN+1
SET LRSQ=LRI
+16 WRITE !,?2,"Seq #: ",LRI,?13," Accession: ",$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,.2)),"^")
+17 IF $PIECE(LRX,"^",10)
WRITE ?40," Results received: ",$$FMTE^XLFDT($PIECE(LRX,"^",10),"1M")
+18 WRITE !,?20,"UID: ",$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,.3),"UNKNOWN"),"^")
+19 IF $PIECE(LRX,"^",11)
WRITE ?44," Last updated: ",$$FMTE^XLFDT($PIECE(LRX,"^",11),"1M")
End DoDot:1
+20 IF LRN=1
GOTO VER
IF LRN>1
GOTO T3
+21 ;
+22 ; If attempting to verify reference lab results and no entry in LAH
+23 ; associated with this accession then quit - do not allow manual entry
+24 ; of ref lab results via this option. Will not store units/normals.
+25 IF $GET(LRDUZ(2))
IF DUZ(2)'=LRDUZ(2)
WRITE !,"No data there"
QUIT
+26 ;
T1 READ !,"What tray: ",X:DTIME
IF X["^"!'$TEST
QUIT
IF X["?"!(X'?.N)
WRITE !,"Enter a number"
GOTO T1
+1 IF X'=""
SET LRTRAY=X
GOTO T2
+2 IF $DATA(^LRO(68.2,"AS",LRLL))
WRITE !,"Can't MANUALLY add to a SEQUENCE instrument data file."
GOTO QUIT
+3 WRITE !,"Enter manually"
SET %=1
DO YN^DICN
IF %<1
GOTO QUIT
IF %=2
GOTO T1
SET LRSQ=-1
GOTO VER
+4 GOTO VER
T2 READ !,"What cup: ",X:DTIME
IF X["^"!'$TEST
QUIT
IF X["?"!(X'?.N)
WRITE !,"Enter a number"
GOTO T2
+1 IF X=""
QUIT
SET LRTRCP=LRTRAY_";"_X
+2 KILL LRPRGSQ
+3 SET LRN=0
FOR LRI=0:0
SET LRI=$ORDER(^LAH(LRLL,1,"B",LRTRCP,LRI))
IF LRI<1
QUIT
SET LRN=LRN+1
SET LRSQ=LRI
SET LRPRGSQ(LRI)=""
WRITE !,?5,LRI
T3 IF LRN=0
WRITE !,"No data for that tray & cup"
QUIT
+1 IF LRN>1
READ !,"Choose sequence number: ",X:DTIME
IF '$TEST
QUIT
IF X["?"!(X'?.N)
WRITE !,"Enter a number"
GOTO T3
+2 IF X["^"!(X="")
KILL LRPRGSQ
QUIT
+3 IF LRN'=1
SET LRSQ=X
IF '$DATA(^LAH(LRLL,1,LRSQ,0))
WRITE !,"No data there"
GOTO T3
+4 ;
VER ; from LRFLAG, LRGP, LRVRW
+1 NEW LRROOT
+2 KILL LRTEST,LRNM,^TMP("LR",$JOB,"TMP")
+3 SET LRUID=$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,.3)),"^")
+4 ;
+5 ; Determine if there are amended results to process via "EM"
+6 SET LRROOT=$QUERY(^LAH("LA7 AMENDED RESULTS",LRUID,1,LRLL))
+7 IF LRROOT'=""
IF $QSUBSCRIPT(LRROOT,1)="LA7 AMENDED RESULTS"
IF $QSUBSCRIPT(LRROOT,2)=LRUID
IF $QSUBSCRIPT(LRROOT,4)=LRLL
Begin DoDot:1
+8 WRITE !!,"Amended results exist for this accession. Please process these"
+9 WRITE !,"first using option Enter/verify/modify data (manual) [LRENTER]"
End DoDot:1
QUIT
+10 ;
+11 DO TEST
+12 IF $ORDER(^TMP("LR",$JOB,"TMP",0))=""
WRITE !,"No tests in editing profile"
QUIT
+13 SET X=DUZ
DO DUZ^LRX
+14 IF LRSQ>0
GOTO V2
+15 LOCK +^LAH(LRLL)
+16 SET (^LAH(LRLL),LRSQ)=1+$GET(^LAH(LRLL))
+17 SET ^LAH(LRLL,1,LRSQ,0)="^^"_LRAA_"^"_LRAD_"^"_LRAN_"^^MANUAL"
+18 DO UID^LAGEN(LRLL,LRSQ,LRUID)
+19 DO UPDT^LAGEN(LRLL,LRSQ)
+20 SET ^LAH(LRLL,1,"C",LRAN,LRSQ)=""
+21 LOCK -^LAH(LRLL)
V2 KILL LRPRGSQ(LRSQ)
+1 SET LRLLOC=0
SET LROUTINE=$PIECE(^LAB(69.9,1,3),U,2)
+2 IF $DATA(^LRO(69,LRODT,1,LRSN,0))
SET LRLLOC=$PIECE(^(0),U,7)
IF '$LENGTH(LRLLOC)
SET LRLLOC=0
WRITE !,$PIECE(^LRO(69,LRODT,1,LRSN,1),U,6)
+3 SET LRCDT=$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U)
+4 IF '$PIECE(^LRO(68,LRAA,1,LRAD,1,LRAN,3),"^",3)
Begin DoDot:1
+5 NEW %DT,LRA1,LRA2,LRA3
+6 SET %DT("B")=$$FMTE^XLFDT(LRCDT,"1")
+7 SET LRSTATUS="C"
SET LRA1=LRAA
SET LRA2=LRAD
SET LRA3=LRAN
+8 DO P15^LROE1
+9 SET LRAA=LRA1
SET LRAD=LRA2
SET LRAN=LRA3
+10 IF LRCDT<1
QUIT
+11 IF '$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,3)
SET $PIECE(^(3),U,3)=$$NOW^XLFDT
End DoDot:1
+12 ; If user did not update then go to next
+13 IF '$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,3)
QUIT
+14 SET LRCDT=$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U)
+15 IF LRCDT<1
QUIT
+16 SET LREAL=$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,2)
SET LRALERT=LROUTINE
+17 SET I=0
+18 FOR
SET I=$ORDER(^LRO(68,LRAA,1,LRAD,1,LRAN,4,I))
IF I<.5
QUIT
IF $GET(^(I,0))
SET LRAL=$PIECE($GET(^(0)),U,2)
Begin DoDot:1
+19 IF $GET(LRAL)
SET LRALERT=$SELECT(LRAL<50&(LRAL<LRALERT):LRAL,LRAL>50&(LRAL-50<LRALERT):LRAL-50,1:LRALERT)
End DoDot:1
+20 SET LRSAMP=$PIECE($GET(^LRO(69,LRODT,1,LRSN,0)),U,3)
+21 ;
+22 SET LRSS=$PIECE(^LRO(68,LRAA,0),U,2)
+23 IF LRSS'="CH"
QUIT
+24 ; Check for valid pointer to file #63 and entry in file #63.
+25 SET LRIDT=$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,5)
+26 IF LRIDT<1
WRITE !,">>>>ERROR - NO POINTER TO FILE #63 - PLEASE NOTIFY SYSTEM MANAGER^ <<<<<",!
QUIT
+27 IF '$DATA(^LR(LRDFN,LRSS,LRIDT,0))
WRITE !,">>>>ERROR - NO ENTRY IN FILE #63 - PLEASE NOTIFY SYSTEM MANAGER<<^ <<<",!
QUIT
+28 ;
+29 SET LRCW=8
LD SET LRSS="CH"
+1 IF '($DATA(^LAH(LRLL,1,LRSQ,0))#2)
WRITE !!?5,"No Data for this Accession ",!!
KILL ^LAH(LRLL,1,LRSQ),^LAH(LRLL,1,"C",LRAN,LRSQ)
KILL LRPRGSQ
QUIT
+2 ;
+3 ; Store any new methods with existing methods on file.
+4 SET LRMETH=$PIECE(^LAH(LRLL,1,LRSQ,0),U,7)
IF $DATA(LRGVP)
SET LRMETH=LRMETH_"(GV)"
+5 IF $PIECE($GET(^LR(LRDFN,LRSS,LRIDT,0)),U,8)'=""
Begin DoDot:1
+6 NEW I,X
+7 SET X=$PIECE(^LR(LRDFN,LRSS,LRIDT,0),U,8)
+8 FOR I=1:1:$LENGTH(X,";")
IF $PIECE(X,";",I)'=""
IF LRMETH'[$PIECE(X,";",I)
SET LRMETH=LRMETH_";"_$PIECE(X,";",I)
End DoDot:1
+9 IF LRMETH'=""
SET $PIECE(^LR(LRDFN,LRSS,LRIDT,0),U,8)=LRMETH
+10 ;
+11 IF $DATA(^LAB(62,+LRSAMP,0))
WRITE !,"Sample: ",$PIECE(^(0),U)
+12 ;
+13 DO ^LRVR2
+14 KILL LRDL,LRPRGSQ
+15 ; leave LRVR1, back to LRVR
QUIT
+16 ;
+17 ;
TEST ; from LRGV1
+1 NEW LRI,LRX
+2 SET LRI=0
+3 FOR
SET LRI=$ORDER(^TMP("LR",$JOB,"VTO",LRI))
IF LRI<1
QUIT
KILL ^(LRI,"P")
+4 SET (LRI,LRNT)=0
+5 FOR
SET LRI=$ORDER(^LRO(68,LRAA,1,LRAD,1,LRAN,4,LRI))
IF LRI<.5
QUIT
IF $DATA(^(LRI,0))
IF '$LENGTH($PIECE(^(0),U,6))
SET X=^(0)
IF $DATA(^TMP("LR",$JOB,"VTO",+X))
Begin DoDot:1
+6 SET LRNT=LRNT+1
SET LRTEST(LRNT)=+X
SET LRX=$SELECT($PIECE(X,"^",2)>50:$PIECE(X,"^",9),1:$PIECE(X,"^"))
+7 SET LRTEST(LRNT,"P")=LRX_U_$$NLT^LRVER1(LRX)_"!"
+8 SET ^TMP("LR",$JOB,"VTO",+X,"P")=$PIECE(LRTEST(LRNT,"P"),"!")
End DoDot:1
+9 ;
TEST1 ; from LRFLAG
+1 ;
+2 NEW LRI
+3 FOR LRI=1:1:LRNT
IF $DATA(^LAB(60,+LRTEST(LRI),0))
SET (LRTEST(LRI),LRBETST(LRI))=LRTEST(LRI)_U_^(0)
+4 IF $GET(LRORDR)'="P"
KILL ^TMP("LR",$JOB,"TMP")
+5 SET LRNX=0
+6 KILL LRM
+7 FOR I=1:1
IF '$DATA(LRTEST(I))
QUIT
Begin DoDot:1
+8 SET X=LRTEST(I)
SET XP=$GET(LRTEST(I,"P"))
+9 KILL LRTEST(I)
+10 DO EX2
End DoDot:1
+11 KILL LRTEST
+12 QUIT
+13 ;
+14 ;
EX2 ;
+1 ; If dataname then process and quit
+2 SET LRSUB=$PIECE(X,U,6)
+3 IF LRSUB'=""
Begin DoDot:1
+4 SET LRSB=$PIECE(LRSUB,";",2)
+5 IF '$DATA(LRVTS(LRSB))
QUIT
+6 IF $DATA(^TMP("LR",$JOB,"TMP",LRSB))
SET ^(LRSB,"P")=XP
+7 IF $DATA(^TMP("LR",$JOB,"TMP",LRSB))
QUIT
+8 SET ^TMP("LR",$JOB,"TMP",LRSB)=+X
+9 SET XP=XP_$$RNLT^LRVER1(+X)
+10 SET ^TMP("LR",$JOB,"TMP",LRSB,"P")=XP
+11 IF $PIECE(X,U,18)
SET LRM(LRSB)=+X
SET LRM(LRSB,"P")=XP
+12 ; CIDC
SET LRBEY(+XP,LRSB)=""
End DoDot:1
QUIT
+13 ;
+14 IF $DATA(^LAB(60,+X,4))
IF $PIECE(^(4),"^",2)
SET LRCFL=LRCFL_$PIECE(^(4),"^",2)_U
+15 ;
+16 ; If panel then explode components of panel and
+17 ; set parent("P" node) to file #60 test being exploded
+18 SET J=0
+19 FOR
SET J=$ORDER(^LAB(60,+X,2,J))
IF J<1
QUIT
IF $DATA(^(J,0))#2
Begin DoDot:1
+20 SET LRNT=LRNT+1
SET Y=^LAB(60,+X,2,J,0)
+21 SET LRTEST(LRNT)=+Y_U_^LAB(60,+Y,0)
+22 SET LRTEST(LRNT,"P")=+XP_U_$$NLT^LRVER1(+XP)_"!"
End DoDot:1
+23 QUIT
+24 ;
+25 ;
QUIT QUIT
+1 ;
WAIT WRITE !,"Type ""^"" to skip "
WAIT1 READ X:10
IF X[U
GOTO LRVR1
IF $ORDER(^LAH(LRLL,1,"C",LRAN,0))<1
GOTO WAIT1
GOTO LRVR1