LRCENDEL ;SLC/CJS/DALOI/FHS-ORDER CANCELING NO TEST DELETE ; 22-Oct-2013 09:22 ; MKK
;;5.2;LR;**1010,1013,1018,1033**;NOV 1, 1997
;
;;VA Lab Patches: 100,121,202,221,263 ; Sep 27, 1994
;
W @IOF N LRCANK,LRTN
;----- BEGIN IHS MODIFICATION LR*5.2*1018
;S:$G(BLROPT)=""!($G(BLROPT(0))'=$P(XQY0,U)) BLROPT="DELORD",BLROPT(0)=$P(XQY0,U) ;IHS/OIRM TUC/AAB 2/1/97
;----- END IHS MODIFICATION
;----- BEGIN IHS MODIFICATIONS LR*5.2*1018 IHS TESTING CHANGE
S BLROPT="DELORD",BLROPT(0)=$P($G(XQY0),U)
;----- END IHS MODIFICATIONS
FIND S LREND=0 D ^LRPARAM I $G(LREND) G END
K LRDFN,LRONE,LRNATURE
; I '$D(LRLABKY) W !?3,"If lab has received the sample (i.e. the test has an accession),",!,"you can't change this order. If so, call the lab to change the test."
W !?3,"If lab has received the sample (i.e. the test has an accession),",!,?3,"you can't change this order. If so, use the REMOVE AN ACCESSION option",!,?3,"to change the test." ; IHS/OIT/MKK - LR*5.2*1033
D
. N DIR
. S DIR("A")="ENTER ORDER NUMBER: "
. S DIR(0)="LO^1:9999999999"
. S DIR("?")="Enter the number associated with the order. "
. S DIR("??")="^D ^LROS"
. S DIR("S")="I $O(^LRO(69,""C"",X,0))"
. D ^DIR
G END:$D(DTOUT)!($D(DUOUT))!($D(DIRUT))!($D(DIROUT))
S LRORD=X
W @IOF D LOOK G FIND
Q
LOOK ;
S LRCNT=0,LRODT=$O(^LRO(69,"C",LRORD,0)) I LRODT<1 W !,"Not found." Q
S (LRCANK,LROV,LRSN,LRCOL)=0
F S LRSN=$O(^LRO(69,"C",+LRORD,LRODT,LRSN)) Q:LRSN<1!($G(LREND)) D:'$G(LREND) SHOW^LROS S LRCNT=1 S:$S($D(^LRO(69,LRODT,1,LRSN,3)):$P(^(3),U,2),1:0) LROV=1 D
. ; I $L($P($G(^LRO(69,LRODT,1,LRSN,1)),U,4)),'$D(LRLABKY) S LRCOL=1
. I $L($P($G(^LRO(69,LRODT,1,LRSN,1)),U,4)) S LRCOL=1 ; IHS/OIT/MKK - LR*5.2*1033
. L +^LRO(69,"C",+LRORD):1 I '$T W !?5,"Someone Else is Editing this order, try later",! S LREND=1 Q
. S LRTN=0 F S LRTN=$O(^LRO(69,LRODT,1,LRSN,2,LRTN)) Q:LRTN<1 S X=^(LRTN,0) I '$P(X,"^",11) S LRCANK=1 Q
I $G(LREND) D UNL69,END Q
I LRCNT<1 W !,"No order found with that number." D UNL69,END Q
I 'LRCANK W !!,"[ * All tests on this order # have already been dispositoned. * ]" D NAME Q
I $G(LRCOL) D D UNL69,END Q
. W !!?5," You CAN NOT change the status of test(s) on this order."
. W !,"Test sample(s) have already been received into the laboratory."
. ; W !,"You must CONTACT the Laboratory to have test(s) status changed.",$C(7)
. W !,"You must use the REMOVE AN ACCESSION option to have the test(s) status changed.",$C(7)
D NAME
S LRNOP=0 I 'LROV F I=0:0 W !,"Change entire order" S %=2 D YN^DICN Q:% W "Answer 'Y'es or 'N'o."
I 'LROV G END:%=-1,OUT:%=1
S LRT=0,J=0 F S J=$O(LRT(J)) Q:J<1 S LRT=J
I LRT<1 W !,$$CJ^XLFSTR(" Can't change status of test(s) on this order.",IOM),! D UNL69 Q
MORE W !,?8,"entry",?15,"test",?40,"sample"
S LRT=0,J=0 F S J=$O(LRT(J)) Q:J<1 S LRT=J W !,?10,J,?15,$P(^LAB(60,$P(LRT(J),U,3),0),U),?40,$P(LRT(J),U,4)
I LRT=0 W !,"All have been dispositioned from that order." Q
ONE R !,"Change status of which entry: ",LRJ:DTIME W:LRJ["?" !,"Pick one of the following entries:" G MORE:LRJ["?" Q:LRJ["^"!(LRJ="")
I LRJ'=+LRJ!(LRJ<1)!(LRJ>LRT) W !,"Enter a number between 1 and ",LRT,! G ONE
I '$D(LRT(LRJ)) W !,"You've already dispositioned that one.",! G MORE
K LRNATURE
D FX2^LRTSTOUT I $G(LREND) D UNL69,END Q
K LRTSTI,LRMSTATI D EN1,UNL69 G LOOK
Q
EN1 S LREND=0,LRSN=+LRT(LRJ),LRTSTI=+$P(LRT(LRJ),U,2),LRTSTS=+$P(LRT(LRJ),U,3)
I '$D(^LRO(69,LRODT,1,LRSN,2,LRTSTI,0))#2 W !,"Does not exist ",! Q
S LRX=^LRO(69,LRODT,1,LRSN,2,LRTSTI,0),LRAD=+$P(LRX,U,3),LRAA=+$P(LRX,U,4),LRAN=+$P(LRX,U,5),LRNOP=0,LRONE="",LRACC=0,ORIFN=$P(LRX,U,7)
S LRSS=$P($G(^LRO(68,LRAA,0)),U,2)
S LRTNM=$P($G(^LAB(60,LRTSTS,0)),U)
;----- BEGIN IHS MODIFICATION LR*5.2*1018
;D:BLRLOG ^BLREVTQ("M","D",$G(BLROPT),"TESTS")
;----- END IHS MODIFICATION
I '$L($G(LRNATURE)) D DC^LROR6() I $G(LRNATURE)=-1 W !!,$C(7),"NOTHING CHANGED" Q
S LRIDT=+$P($G(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,5)
I LRIDT L +^LR(LRDFN,LRSS,LRIDT):1 I '$T W !?5,"Someone else is editing this entry",! S LREND=1 Q
D SET^LRTSTOUT I LRIDT L -^LR(LRDFN,LRSS,LRIDT)
D UNL69
Q
D CEN1^LRCENDE1 K LRONE Q:LRACC&'$D(^XUSEC("LRLAB",DUZ))
I LRTSTI,'$G(LRNOP) D
. N LRI S LRI(LRTSN)=""
. D NEW^LR7OB1(LRODT,LRSN,$S($G(LRMSTATI)=""!($G(LRMSTATI)=1):"OC",1:"SC"),$G(LRNATURE),.LRI,$G(LRMSTATI))
. S $P(^LRO(69,LRODT,1,LRSN,2,LRTSTI,0),"^",3,6)="^^^",$P(^(0),"^",9,11)="CA^L^"_DUZ K T(LRJ)
. S DIE="^LRO(69,LRODT,1,LRSN,2,",DA=LRTSTI,DA(1)=LRODT,DR=99 D ^DIE
K LRI
S X=DUZ D DUZ^LRX
;I 'LRNOP S DIE="^LRO(69,LRODT,1,",DA=LRSN,DR="16" D ^DIE
W:'LRNOP !!,"Status changed to Not Performed" G FIND:$O(LRT(0))<1,ONE
OUT Q:$G(LRNOP) S LRJ=0
D FX2^LRTSTOUT I $G(LREND) D UNL69,END Q
S LRCCOMX=LRCCOM
S LRJ=0 F S LRJ=$O(LRT(LRJ)) Q:LRJ<1 S LRCCOM=LRCCOMX D EN1
K LRCCOMX D UNL69
Q
S LRSN=0 F S LRSN=$O(^LRO(69,"C",+LRORD,LRODT,LRSN)) Q:LRSN<1 D
. S LRX=^LRO(69,LRODT,1,LRSN,2,LRTSTI,0),LRAD=$P(LRX,U,3),LRAA=+$P(LRX,U,4),LRAN=+$P(LRX,U,5),LRNOP=0,LRONE="",LRACC=0,ORIFN=$P(LRX,U,7)
;----- BEGIN IHS MODIFICATION LR*5.2*1018
ALLDEL ;D:BLRLOG ^BLRSLTL("M","D",$G(BLROPT),"ORDER") ;IHS/OIRM TUC/AAB 11/14/96
;D:BLRLOG ^BLREVTQ("M","D",$G(BLROPT),"ORDER")
;-----END IHS MODIFICATION
K LRNATURE G FIND
% ; EP
; R %:DTIME Q:%=""!(%["N")!(%["Y") W !,"Answer 'Y' or 'N': " G %
; ----- BEGIN IHS/OIT/MKK - LR*5.2*1033
K DIR,X,Y,%
S DIR(0)="YO"
D ^DIR
S %=$E(X)
; ----- END IHS/OIT/MKK - LR*5.2*1033
Q
UNL69 ;
L -^LRO(69,"C",+LRORD)
Q
NAME ;S LRDFN=+^LRO(69,LRODT,1,$O(^LRO(69,"C",+LRORD,LRODT,0)),0),LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX W !,PNM,?30,SSN
;----- BEGIN IHS MODIFICATION LR*5.2*1018
S LRDFN=+^LRO(69,LRODT,1,$O(^LRO(69,"C",+LRORD,LRODT,0)),0),LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX W !,PNM,?30,HRCN ;IHS/ANMC/CLS 08/18/96
;----- END IHS MODIFICATION
EN ;from LRPHITE3
K LRT S (J,LRSN,LRNOP)=0 F S LRSN=$O(^LRO(69,"C",+LRORD,LRODT,LRSN)) Q:LRSN<1!($G(LRNOP)) D TSET
Q
TSET I $D(^LRO(69,LRODT,1,LRSN,3)),$P(^(3),"^",2) D Q
. W !,$$CJ^XLFSTR("Test(s) already verified for this order, cannot change ENTIRE order",IOM)
. W !,$$CJ^XLFSTR(" You must select individual test using the 'Delete Test from Accession' option.",IOM),!!
. D UNL69 S LRNOP=1
S I=0 F S I=$O(^LRO(69,LRODT,1,LRSN,2,I)) Q:I<1 S X=^(I,0) D
. Q:$P(X,"^",11)
. I $P(X,U,3),'$D(LRLABKY) Q
. S J=J+1,LRSPEC=$S($D(^LRO(69,LRODT,1,LRSN,4,1,0)):+^(0),1:""),LRT(J)=LRSN_U_I_U_+X_U_$S(LRSPEC:$P(^LAB(61,+LRSPEC,0),U),1:"")_U_$P(X,U,2,99)
Q
END K %,A,AGE,DFN,DIC,DIE,DOB,DQ,DR,DWLW,I,J,K,LRAA,LRACC,LRACN0,LRAD,LRAN,LRCL,LRCNT,LRCOL,LRDOC,LRDPF,LRDTM,LREND,LRIDT
K LRNOW,LRLL,LRLLOC,LRNOP,LROD0,LROD1,LROD3,LRODT,LROOS,LRORD,LROS,LROSD,LROT,LROV,LRROD
;K LRSCNXB,LRSN,LRSPEC,LRSS,LRTC,LRTP,LRTSTS,LRT,LRTT,LRURG,LRUSI,LRUSNM,LRWRD,PNM,SEX,SSN,T,X,X1,X2,X3,X4,Y,Z,LRNATURE,ORIFN
;-----BEGIN IHS MODIFICATION LR*5.2*1018
K LRSCNXB,LRSN,LRSPEC,LRSS,LRTC,LRTP,LRTSTS,LRT,LRTT,LRURG,LRUSI,LRUSNM,LRWRD,PNM,SEX,SSN,HRCN,T,X,X1,X2,X3,X4,Y,Z,LRNATURE,ORIFN
;-----END IHS MODIFICATION
K LRCANK,LRTN,LRCCOM,LRCCOM1 D END^LRTSTOUT
K LRACN,LRJ,LRTSTI
Q
LRCENDEL ;SLC/CJS/DALOI/FHS-ORDER CANCELING NO TEST DELETE ; 22-Oct-2013 09:22 ; MKK
+1 ;;5.2;LR;**1010,1013,1018,1033**;NOV 1, 1997
+2 ;
+3 ;;VA Lab Patches: 100,121,202,221,263 ; Sep 27, 1994
+4 ;
+5 WRITE @IOF
NEW LRCANK,LRTN
+6 ;----- BEGIN IHS MODIFICATION LR*5.2*1018
+7 ;S:$G(BLROPT)=""!($G(BLROPT(0))'=$P(XQY0,U)) BLROPT="DELORD",BLROPT(0)=$P(XQY0,U) ;IHS/OIRM TUC/AAB 2/1/97
+8 ;----- END IHS MODIFICATION
+9 ;----- BEGIN IHS MODIFICATIONS LR*5.2*1018 IHS TESTING CHANGE
+10 SET BLROPT="DELORD"
SET BLROPT(0)=$PIECE($GET(XQY0),U)
+11 ;----- END IHS MODIFICATIONS
FIND SET LREND=0
DO ^LRPARAM
IF $GET(LREND)
GOTO END
+1 KILL LRDFN,LRONE,LRNATURE
+2 ; I '$D(LRLABKY) W !?3,"If lab has received the sample (i.e. the test has an accession),",!,"you can't change this order. If so, call the lab to change the test."
+3 ; IHS/OIT/MKK - LR*5.2*1033
WRITE !?3,"If lab has received the sample (i.e. the test has an accession),",!,?3,"you can't change this order. If so, use the REMOVE AN ACCESSION option",!,?3,"to change the test."
+4 Begin DoDot:1
+5 NEW DIR
+6 SET DIR("A")="ENTER ORDER NUMBER: "
+7 SET DIR(0)="LO^1:9999999999"
+8 SET DIR("?")="Enter the number associated with the order. "
+9 SET DIR("??")="^D ^LROS"
+10 SET DIR("S")="I $O(^LRO(69,""C"",X,0))"
+11 DO ^DIR
End DoDot:1
+12 IF $DATA(DTOUT)!($DATA(DUOUT))!($DATA(DIRUT))!($DATA(DIROUT))
GOTO END
+13 SET LRORD=X
+14 WRITE @IOF
DO LOOK
GOTO FIND
+15 QUIT
LOOK ;
+1 SET LRCNT=0
SET LRODT=$ORDER(^LRO(69,"C",LRORD,0))
IF LRODT<1
WRITE !,"Not found."
QUIT
+2 SET (LRCANK,LROV,LRSN,LRCOL)=0
+3 FOR
SET LRSN=$ORDER(^LRO(69,"C",+LRORD,LRODT,LRSN))
IF LRSN<1!($GET(LREND))
QUIT
IF '$GET(LREND)
DO SHOW^LROS
SET LRCNT=1
IF $SELECT($DATA(^LRO(69,LRODT,1,LRSN,3))
SET LROV=1
Begin DoDot:1
+4 ; I $L($P($G(^LRO(69,LRODT,1,LRSN,1)),U,4)),'$D(LRLABKY) S LRCOL=1
+5 ; IHS/OIT/MKK - LR*5.2*1033
IF $LENGTH($PIECE($GET(^LRO(69,LRODT,1,LRSN,1)),U,4))
SET LRCOL=1
+6 LOCK +^LRO(69,"C",+LRORD):1
IF '$TEST
WRITE !?5,"Someone Else is Editing this order, try later",!
SET LREND=1
QUIT
+7 SET LRTN=0
FOR
SET LRTN=$ORDER(^LRO(69,LRODT,1,LRSN,2,LRTN))
IF LRTN<1
QUIT
SET X=^(LRTN,0)
IF '$PIECE(X,"^",11)
SET LRCANK=1
QUIT
End DoDot:1
+8 IF $GET(LREND)
DO UNL69
DO END
QUIT
+9 IF LRCNT<1
WRITE !,"No order found with that number."
DO UNL69
DO END
QUIT
+10 IF 'LRCANK
WRITE !!,"[ * All tests on this order # have already been dispositoned. * ]"
DO NAME
QUIT
+11 IF $GET(LRCOL)
Begin DoDot:1
+12 WRITE !!?5," You CAN NOT change the status of test(s) on this order."
+13 WRITE !,"Test sample(s) have already been received into the laboratory."
+14 ; W !,"You must CONTACT the Laboratory to have test(s) status changed.",$C(7)
+15 WRITE !,"You must use the REMOVE AN ACCESSION option to have the test(s) status changed.",$CHAR(7)
End DoDot:1
DO UNL69
DO END
QUIT
+16 DO NAME
+17 SET LRNOP=0
IF 'LROV
FOR I=0:0
WRITE !,"Change entire order"
SET %=2
DO YN^DICN
IF %
QUIT
WRITE "Answer 'Y'es or 'N'o."
+18 IF 'LROV
IF %=-1
GOTO END
IF %=1
GOTO OUT
+19 SET LRT=0
SET J=0
FOR
SET J=$ORDER(LRT(J))
IF J<1
QUIT
SET LRT=J
+20 IF LRT<1
WRITE !,$$CJ^XLFSTR(" Can't change status of test(s) on this order.",IOM),!
DO UNL69
QUIT
MORE WRITE !,?8,"entry",?15,"test",?40,"sample"
+1 SET LRT=0
SET J=0
FOR
SET J=$ORDER(LRT(J))
IF J<1
QUIT
SET LRT=J
WRITE !,?10,J,?15,$PIECE(^LAB(60,$PIECE(LRT(J),U,3),0),U),?40,$PIECE(LRT(J),U,4)
+2 IF LRT=0
WRITE !,"All have been dispositioned from that order."
QUIT
ONE READ !,"Change status of which entry: ",LRJ:DTIME
IF LRJ["?"
WRITE !,"Pick one of the following entries:"
IF LRJ["?"
GOTO MORE
IF LRJ["^"!(LRJ="")
QUIT
+1 IF LRJ'=+LRJ!(LRJ<1)!(LRJ>LRT)
WRITE !,"Enter a number between 1 and ",LRT,!
GOTO ONE
+2 IF '$DATA(LRT(LRJ))
WRITE !,"You've already dispositioned that one.",!
GOTO MORE
+3 KILL LRNATURE
+4 DO FX2^LRTSTOUT
IF $GET(LREND)
DO UNL69
DO END
QUIT
+5 KILL LRTSTI,LRMSTATI
DO EN1
DO UNL69
GOTO LOOK
+6 QUIT
EN1 SET LREND=0
SET LRSN=+LRT(LRJ)
SET LRTSTI=+$PIECE(LRT(LRJ),U,2)
SET LRTSTS=+$PIECE(LRT(LRJ),U,3)
+1 IF '$DATA(^LRO(69,LRODT,1,LRSN,2,LRTSTI,0))#2
WRITE !,"Does not exist ",!
QUIT
+2 SET LRX=^LRO(69,LRODT,1,LRSN,2,LRTSTI,0)
SET LRAD=+$PIECE(LRX,U,3)
SET LRAA=+$PIECE(LRX,U,4)
SET LRAN=+$PIECE(LRX,U,5)
SET LRNOP=0
SET LRONE=""
SET LRACC=0
SET ORIFN=$PIECE(LRX,U,7)
+3 SET LRSS=$PIECE($GET(^LRO(68,LRAA,0)),U,2)
+4 SET LRTNM=$PIECE($GET(^LAB(60,LRTSTS,0)),U)
+5 ;----- BEGIN IHS MODIFICATION LR*5.2*1018
+6 ;D:BLRLOG ^BLREVTQ("M","D",$G(BLROPT),"TESTS")
+7 ;----- END IHS MODIFICATION
+8 IF '$LENGTH($GET(LRNATURE))
DO DC^LROR6()
IF $GET(LRNATURE)=-1
WRITE !!,$CHAR(7),"NOTHING CHANGED"
QUIT
+9 SET LRIDT=+$PIECE($GET(^LRO(68,LRAA,1,LRAD,1,LRAN,3)),U,5)
+10 IF LRIDT
LOCK +^LR(LRDFN,LRSS,LRIDT):1
IF '$TEST
WRITE !?5,"Someone else is editing this entry",!
SET LREND=1
QUIT
+11 DO SET^LRTSTOUT
IF LRIDT
LOCK -^LR(LRDFN,LRSS,LRIDT)
+12 DO UNL69
+13 QUIT
+14 DO CEN1^LRCENDE1
KILL LRONE
IF LRACC&'$DATA(^XUSEC("LRLAB",DUZ))
QUIT
+15 IF LRTSTI
IF '$GET(LRNOP)
Begin DoDot:1
+16 NEW LRI
SET LRI(LRTSN)=""
+17 DO NEW^LR7OB1(LRODT,LRSN,$SELECT($GET(LRMSTATI)=""!($GET(LRMSTATI)=1):"OC",1:"SC"),$GET(LRNATURE),.LRI,$GET(LRMSTATI))
+18 SET $PIECE(^LRO(69,LRODT,1,LRSN,2,LRTSTI,0),"^",3,6)="^^^"
SET $PIECE(^(0),"^",9,11)="CA^L^"_DUZ
KILL T(LRJ)
+19 SET DIE="^LRO(69,LRODT,1,LRSN,2,"
SET DA=LRTSTI
SET DA(1)=LRODT
SET DR=99
DO ^DIE
End DoDot:1
+20 KILL LRI
+21 SET X=DUZ
DO DUZ^LRX
+22 ;I 'LRNOP S DIE="^LRO(69,LRODT,1,",DA=LRSN,DR="16" D ^DIE
+23 IF 'LRNOP
WRITE !!,"Status changed to Not Performed"
IF $ORDER(LRT(0))<1
GOTO FIND
GOTO ONE
OUT IF $GET(LRNOP)
QUIT
SET LRJ=0
+1 DO FX2^LRTSTOUT
IF $GET(LREND)
DO UNL69
DO END
QUIT
+2 SET LRCCOMX=LRCCOM
+3 SET LRJ=0
FOR
SET LRJ=$ORDER(LRT(LRJ))
IF LRJ<1
QUIT
SET LRCCOM=LRCCOMX
DO EN1
+4 KILL LRCCOMX
DO UNL69
+5 QUIT
+6 SET LRSN=0
FOR
SET LRSN=$ORDER(^LRO(69,"C",+LRORD,LRODT,LRSN))
IF LRSN<1
QUIT
Begin DoDot:1
+7 SET LRX=^LRO(69,LRODT,1,LRSN,2,LRTSTI,0)
SET LRAD=$PIECE(LRX,U,3)
SET LRAA=+$PIECE(LRX,U,4)
SET LRAN=+$PIECE(LRX,U,5)
SET LRNOP=0
SET LRONE=""
SET LRACC=0
SET ORIFN=$PIECE(LRX,U,7)
End DoDot:1
+8 ;----- BEGIN IHS MODIFICATION LR*5.2*1018
ALLDEL ;D:BLRLOG ^BLRSLTL("M","D",$G(BLROPT),"ORDER") ;IHS/OIRM TUC/AAB 11/14/96
+1 ;D:BLRLOG ^BLREVTQ("M","D",$G(BLROPT),"ORDER")
+2 ;-----END IHS MODIFICATION
+3 KILL LRNATURE
GOTO FIND
% ; EP
+1 ; R %:DTIME Q:%=""!(%["N")!(%["Y") W !,"Answer 'Y' or 'N': " G %
+2 ; ----- BEGIN IHS/OIT/MKK - LR*5.2*1033
+3 KILL DIR,X,Y,%
+4 SET DIR(0)="YO"
+5 DO ^DIR
+6 SET %=$EXTRACT(X)
+7 ; ----- END IHS/OIT/MKK - LR*5.2*1033
+8 QUIT
UNL69 ;
+1 LOCK -^LRO(69,"C",+LRORD)
+2 QUIT
NAME ;S LRDFN=+^LRO(69,LRODT,1,$O(^LRO(69,"C",+LRORD,LRODT,0)),0),LRDPF=$P(^LR(LRDFN,0),U,2),DFN=$P(^(0),U,3) D PT^LRX W !,PNM,?30,SSN
+1 ;----- BEGIN IHS MODIFICATION LR*5.2*1018
+2 ;IHS/ANMC/CLS 08/18/96
SET LRDFN=+^LRO(69,LRODT,1,$ORDER(^LRO(69,"C",+LRORD,LRODT,0)),0)
SET LRDPF=$PIECE(^LR(LRDFN,0),U,2)
SET DFN=$PIECE(^(0),U,3)
DO PT^LRX
WRITE !,PNM,?30,HRCN
+3 ;----- END IHS MODIFICATION
EN ;from LRPHITE3
+1 KILL LRT
SET (J,LRSN,LRNOP)=0
FOR
SET LRSN=$ORDER(^LRO(69,"C",+LRORD,LRODT,LRSN))
IF LRSN<1!($GET(LRNOP))
QUIT
DO TSET
+2 QUIT
TSET IF $DATA(^LRO(69,LRODT,1,LRSN,3))
IF $PIECE(^(3),"^",2)
Begin DoDot:1
+1 WRITE !,$$CJ^XLFSTR("Test(s) already verified for this order, cannot change ENTIRE order",IOM)
+2 WRITE !,$$CJ^XLFSTR(" You must select individual test using the 'Delete Test from Accession' option.",IOM),!!
+3 DO UNL69
SET LRNOP=1
End DoDot:1
QUIT
+4 SET I=0
FOR
SET I=$ORDER(^LRO(69,LRODT,1,LRSN,2,I))
IF I<1
QUIT
SET X=^(I,0)
Begin DoDot:1
+5 IF $PIECE(X,"^",11)
QUIT
+6 IF $PIECE(X,U,3)
IF '$DATA(LRLABKY)
QUIT
+7 SET J=J+1
SET LRSPEC=$SELECT($DATA(^LRO(69,LRODT,1,LRSN,4,1,0)):+^(0),1:"")
SET LRT(J)=LRSN_U_I_U_+X_U_$SELECT(LRSPEC:$PIECE(^LAB(61,+LRSPEC,0),U),1:"")_U_$PIECE(X,U,2,99)
End DoDot:1
+8 QUIT
END KILL %,A,AGE,DFN,DIC,DIE,DOB,DQ,DR,DWLW,I,J,K,LRAA,LRACC,LRACN0,LRAD,LRAN,LRCL,LRCNT,LRCOL,LRDOC,LRDPF,LRDTM,LREND,LRIDT
+1 KILL LRNOW,LRLL,LRLLOC,LRNOP,LROD0,LROD1,LROD3,LRODT,LROOS,LRORD,LROS,LROSD,LROT,LROV,LRROD
+2 ;K LRSCNXB,LRSN,LRSPEC,LRSS,LRTC,LRTP,LRTSTS,LRT,LRTT,LRURG,LRUSI,LRUSNM,LRWRD,PNM,SEX,SSN,T,X,X1,X2,X3,X4,Y,Z,LRNATURE,ORIFN
+3 ;-----BEGIN IHS MODIFICATION LR*5.2*1018
+4 KILL LRSCNXB,LRSN,LRSPEC,LRSS,LRTC,LRTP,LRTSTS,LRT,LRTT,LRURG,LRUSI,LRUSNM,LRWRD,PNM,SEX,SSN,HRCN,T,X,X1,X2,X3,X4,Y,Z,LRNATURE,ORIFN
+5 ;-----END IHS MODIFICATION
+6 KILL LRCANK,LRTN,LRCCOM,LRCCOM1
DO END^LRTSTOUT
+7 KILL LRACN,LRJ,LRTSTI
+8 QUIT