LRSPRPTM ;AVAMC/REG/WTY - MODIFIED PATH REPORT ;9/22/00
;;5.2T9;LR;**1018**;Nov 17, 2004
;;5.2;LAB SERVICE;**1,248**;Sep 27, 1994
;
;Reference to ^VA(200 supported by IA #10060
;Reference to ^DIWP suppported by IA #10011
;Reference to ^DIWW suppported by IA #10029
;
W !?28,"*** MODIFIED REPORT ***"
W !,"(Last modified: "
S B=0
F A=0:0 S A=$O(^LR(LRDFN,LRSS,LRI,LR(0),A)) Q:'A!(LR("Q")) S B=A
Q:LR("Q") Q:'$D(^LR(LRDFN,LRSS,LRI,LR(0),B,0))
S A=^LR(LRDFN,LRSS,LRI,LR(0),B,0),Y=+A,A=$P(A,"^",2)
S A=$S($D(^VA(200,A,0)):$P(^(0),"^"),1:A)
D D^LRU W Y," typed by ",A,")"
D:$D(LRQ(9)) M
Q
;
M F A=0:0 S A=$O(^LR(LRDFN,LRSS,LRI,LR(0),A)) Q:'A!(LR("Q")) D
.S LRT=^LR(LRDFN,LRSS,LRI,LR(0),A,0)
.D:$Y>(IOSL-14) F^LRAPF,^LRAPF Q:LR("Q")
.S Y=+LRT,X=$P(LRT,"^",2),X=$S($D(^VA(200,X,0)):$P(^(0),"^"),1:X)
.D D^LRU W !,"Date modified:",Y," typed by ",X D F
Q:LR("Q")
W !?13,"==========Text below appears on final report=========="
Q
E K ^UTILITY($J) S DIWR=IOM-5,DIWL=5,DIWF="W"
Q
;
F D E S B=0
F LRZ=0:1 S B=$O(^LR(LRDFN,LRSS,LRI,LR(0),A,1,B)) Q:'B!(LR("Q")) D
.S LRT=^LR(LRDFN,LRSS,LRI,LR(0),A,1,B,0)
.D:$Y>(IOSL-14) F^LRAPF,^LRAPF Q:LR("Q")
.S X=LRT D ^DIWP
Q:LR("Q") D:LRZ ^DIWW
Q
LRSPRPTM ;AVAMC/REG/WTY - MODIFIED PATH REPORT ;9/22/00
+1 ;;5.2T9;LR;**1018**;Nov 17, 2004
+2 ;;5.2;LAB SERVICE;**1,248**;Sep 27, 1994
+3 ;
+4 ;Reference to ^VA(200 supported by IA #10060
+5 ;Reference to ^DIWP suppported by IA #10011
+6 ;Reference to ^DIWW suppported by IA #10029
+7 ;
+8 WRITE !?28,"*** MODIFIED REPORT ***"
+9 WRITE !,"(Last modified: "
+10 SET B=0
+11 FOR A=0:0
SET A=$ORDER(^LR(LRDFN,LRSS,LRI,LR(0),A))
IF 'A!(LR("Q"))
QUIT
SET B=A
+12 IF LR("Q")
QUIT
IF '$DATA(^LR(LRDFN,LRSS,LRI,LR(0),B,0))
QUIT
+13 SET A=^LR(LRDFN,LRSS,LRI,LR(0),B,0)
SET Y=+A
SET A=$PIECE(A,"^",2)
+14 SET A=$SELECT($DATA(^VA(200,A,0)):$PIECE(^(0),"^"),1:A)
+15 DO D^LRU
WRITE Y," typed by ",A,")"
+16 IF $DATA(LRQ(9))
DO M
+17 QUIT
+18 ;
M FOR A=0:0
SET A=$ORDER(^LR(LRDFN,LRSS,LRI,LR(0),A))
IF 'A!(LR("Q"))
QUIT
Begin DoDot:1
+1 SET LRT=^LR(LRDFN,LRSS,LRI,LR(0),A,0)
+2 IF $Y>(IOSL-14)
DO F^LRAPF
DO ^LRAPF
IF LR("Q")
QUIT
+3 SET Y=+LRT
SET X=$PIECE(LRT,"^",2)
SET X=$SELECT($DATA(^VA(200,X,0)):$PIECE(^(0),"^"),1:X)
+4 DO D^LRU
WRITE !,"Date modified:",Y," typed by ",X
DO F
End DoDot:1
+5 IF LR("Q")
QUIT
+6 WRITE !?13,"==========Text below appears on final report=========="
+7 QUIT
E KILL ^UTILITY($JOB)
SET DIWR=IOM-5
SET DIWL=5
SET DIWF="W"
+1 QUIT
+2 ;
F DO E
SET B=0
+1 FOR LRZ=0:1
SET B=$ORDER(^LR(LRDFN,LRSS,LRI,LR(0),A,1,B))
IF 'B!(LR("Q"))
QUIT
Begin DoDot:1
+2 SET LRT=^LR(LRDFN,LRSS,LRI,LR(0),A,1,B,0)
+3 IF $Y>(IOSL-14)
DO F^LRAPF
DO ^LRAPF
IF LR("Q")
QUIT
+4 SET X=LRT
DO ^DIWP
End DoDot:1
+5 IF LR("Q")
QUIT
IF LRZ
DO ^DIWW
+6 QUIT