LRAPTT1 ;AVAMC/REG/CYM - TURNAROUND TIME PATH ;2/13/98 09:42 ;
;;5.2;LAB SERVICE;**72,201**;Sep 27, 1994
I $D(LR("F")),IOST?1"C".E D M^LRU Q:LR("Q")
D F^LRU W !,$S('$D(LR("AU")):"",LR("AU")=1:"PAD",1:"FAD")," Turnaround time for ",LRO(68)," (",LRABV,")" W:LRL " (Exceeding ",LRB," ",$S(LRB=1:"day",1:"days"),")" W !,"From: ",LRSTR," To: ",LRLST,?57,"Lab work"
W !,"Acc #",?6,$S(LRSS="AU":" Performed",1:" Rec'd"),?19,"Entry",?40,"ID",?43,"Typist",?51,$S('$D(LR("AU")):"Released",LR("AU")=2:"Released",1:"Completed"),?61,"Days",?66,"Pathologist",!,LR("%") Q
T R !,"Enter limit in days: ",X:DTIME Q:X=""!(X[U) I +X'=X!(X<1)!(X>120) W $C(7),!,"Must be 1-120 days." G T
S LRB=X,LRL=X+1 Q
F S B=0 F A=0:0 S A=$O(LRM(A)) Q:'A I A'=2,LRM(A) S B=1 Q
Q:'B F LRA=0:0 S LRA=$O(LRM(LRA)) Q:'LRA I LRM(LRA) D:$Y>(IOSL-8) LRAPTT1 Q:LR("Q") D E
Q
E W !!,"Total ",$P(^DIC(LRA,0),U)," file cases: ",LRM(LRA) S X=LRM(LRA)-LRF(LRA) W:X !?3,"Incomplete cases:",$J(X,4) W !?3,"Complete cases:",$J(LRF(LRA),4)
W:LRF(LRA) !?5,"Average turnaround time (days): ",$J(LRE(LRA)/LRF(LRA),2,2) W:LRL&(LRF(LRA)) ?44,"Cases exceeding limit: ",LRA(LRA)," (",$J(LRA(LRA)/LRF(LRA)*100,2,2),"%)" Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HLRAPTT1 1192 printed Dec 13, 2024@02:08:33 Page 2
LRAPTT1 ;AVAMC/REG/CYM - TURNAROUND TIME PATH ;2/13/98 09:42 ;
+1 ;;5.2;LAB SERVICE;**72,201**;Sep 27, 1994
+2 IF $DATA(LR("F"))
IF IOST?1"C".E
DO M^LRU
if LR("Q")
QUIT
+3 DO F^LRU
WRITE !,$SELECT('$DATA(LR("AU")):"",LR("AU")=1:"PAD",1:"FAD")," Turnaround time for ",LRO(68)," (",LRABV,")"
if LRL
WRITE " (Exceeding ",LRB," ",$SELECT(LRB=1:"day",1:"days"),")"
WRITE !,"From: ",LRSTR," To: ",LRLST,?57,"Lab work"
+4 WRITE !,"Acc #",?6,$SELECT(LRSS="AU":" Performed",1:" Rec'd"),?19,"Entry",?40,"ID",?43,"Typist",?51,$SELECT('$DATA(LR("AU")):"Released",LR("AU")=2:"Released",1:"Completed"),?61,"Days",?66,"Pathologist",!,LR("%")
QUIT
T READ !,"Enter limit in days: ",X:DTIME
if X=""!(X[U)
QUIT
IF +X'=X!(X<1)!(X>120)
WRITE $CHAR(7),!,"Must be 1-120 days."
GOTO T
+1 SET LRB=X
SET LRL=X+1
QUIT
F SET B=0
FOR A=0:0
SET A=$ORDER(LRM(A))
if 'A
QUIT
IF A'=2
IF LRM(A)
SET B=1
QUIT
+1 if 'B
QUIT
FOR LRA=0:0
SET LRA=$ORDER(LRM(LRA))
if 'LRA
QUIT
IF LRM(LRA)
if $Y>(IOSL-8)
DO LRAPTT1
if LR("Q")
QUIT
DO E
+2 QUIT
E WRITE !!,"Total ",$PIECE(^DIC(LRA,0),U)," file cases: ",LRM(LRA)
SET X=LRM(LRA)-LRF(LRA)
if X
WRITE !?3,"Incomplete cases:",$JUSTIFY(X,4)
WRITE !?3,"Complete cases:",$JUSTIFY(LRF(LRA),4)
+1 if LRF(LRA)
WRITE !?5,"Average turnaround time (days): ",$JUSTIFY(LRE(LRA)/LRF(LRA),2,2)
if LRL&(LRF(LRA))
WRITE ?44,"Cases exceeding limit: ",LRA(LRA)," (",$JUSTIFY(LRA(LRA)/LRF(LRA)*100,2,2),"%)"
QUIT