LRCAPW2 ;SLC/DCM- CAP WORKLOAD SUMMARY PRINT ; 12/10/86 12:06 PM ;
;;V~5.0~;LAB;;02/27/90 17:09
S LRPG=0,LRWORK=1
S LRSTA=$S($D(^DD("SITE")):^("SITE"),1:"HOSPITAL")
II S LRMAJ=0 F II=0:0 S LRMAJ=$O(^UTILITY($J,LRMAJ)) Q:LRMAJ="" D SEC Q:LREND
D:'LREND WAIT^LRCAPS2 W @IOF K LRPG,LRWORK,LRMAJ,JJ,LRSEC,TT,LL,T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12,MM,X1,X2,X3,X4,X5,X6,X7,X8,X9,X10,X11,X12,GT,LRCL
Q
SEC F JJ=0:0 S JJ=$N(^UTILITY($J,LRMAJ,JJ)) Q:JJ<1 S LRSEC=$S($D(^LAB(62.2,JJ,0)):$P(^(0),U,1),1:"SECTION #"_JJ) K GT D WAIT^LRCAPS2 Q:LREND D HEAD^LRCAPS2,SUB,SEC1 Q:LREND
Q
SEC1 F I=1:1:12 S @("T"_I)=0
D EQUALS^LRX S LRCL=IOM\2-($L(LRSEC)\2+7) W !?LRCL,"*** "_LRSEC_" TOTALS ***" D DASH^LRX
F TT=0:0 S TT=$N(GT(TT)) Q:TT<1 D ALL
D TOT
Q
SUB F LL=0:0 S LL=$N(^UTILITY($J,LRMAJ,JJ,LL)) Q:LL<1 S LRSB=$S($D(^LAB(62.2,LL,0)):$P(^(0),U,1),1:"SUB-SECTION #"_LL),(T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11,T12)=0 D HEAD1^LRCAPS2,SHIFT,TOT Q:LREND
I 'LREND I $Y>(IOSL-9) D DASH^LRX W !!?(IOM-14),"Continued..." D WAIT^LRCAPS2 I 'LREND D HEAD^LRCAPS2,HEAD1^LRCAPS2
Q
SHIFT F MM=0:0 S MM=$N(^UTILITY($J,LRMAJ,JJ,LL,MM)) Q:MM<1 S X=^(MM) D PRINT Q:LREND
Q
PRINT S X1=$P(X,"^",1),X2=$P(X,"^",2),X3=$P(X,"^",3),X4=$P(X,"^",4),X5=$P(X,"^",5),X6=$P(X,"^",6),X7=$P(X,"^",7),X8=$P(X,"^",8)
S X9=$P(X,"^",9),X10=$P(X,"^",10),X11=X1+X4+X7+X9,X12=X2+X5+X8+X10
S T1=T1+X1,T2=T2+X2,T3=T3+X3,T4=T4+X4,T5=T5+X5,T6=T6+X6,T7=T7+X7,T8=T8+X8,T9=T9+X9,T10=T10+X10,T11=T11+X11,T12=T12+X12
D:'$D(GT(MM)) GT S GT(MM,1)=GT(MM,1)+X1,GT(MM,2)=GT(MM,2)+X2,GT(MM,3)=GT(MM,3)+X3,GT(MM,4)=GT(MM,4)+X4,GT(MM,5)=GT(MM,5)+X5,GT(MM,6)=GT(MM,6)+X6
S GT(MM,7)=GT(MM,7)+X7,GT(MM,8)=GT(MM,8)+X8,GT(MM,9)=GT(MM,9)+X9,GT(MM,10)=GT(MM,10)+X10,GT(MM,11)=GT(MM,11)+X11,GT(MM,12)=GT(MM,12)+X12
I $Y>(IOSL-7) D DASH^LRX W !!?(IOM-14),"Continued..." D WAIT^LRCAPS2 Q:LREND D HEAD^LRCAPS2,HEAD1^LRCAPS2
W !,"SHIFT #"_MM," ",$E(LRSHIFT(MM),1,9),?37,$J(X1,8),$J(X2,8),$J(X3,8),$J(X4,10),$J(X5,8),$J(X6,8),$J(X7,7),$J(X8,6),$J(X9,6),$J(X10,6),$J(X11,9),$J(X12,10)
Q
TOT W !?23,"ALL SHIFTS",?37,$J(T1,8),$J(T2,8),$J(T3,8),$J(T4,10),$J(T5,8),$J(T6,8),$J(T7,7),$J(T8,6),$J(T9,6),$J(T10,6),$J(T11,9),$J(T12,10)
D DASH^LRX
Q
GT F I=1:1:12 S GT(MM,I)=0
Q
ALL W !,"SHIFT #"_TT," ",$E(LRSHIFT(TT),1,9),?37,$J(GT(TT,1),8),$J(GT(TT,2),8),$J(GT(TT,3),8),$J(GT(TT,4),10),$J(GT(TT,5),8),$J(GT(TT,6),8),$J(GT(TT,7),7)
W $J(GT(TT,8),6),$J(GT(TT,9),6),$J(GT(TT,10),6),$J(GT(TT,11),9),$J(GT(TT,12),10)
S T1=T1+GT(TT,1),T2=T2+GT(TT,2),T3=T3+GT(TT,3),T4=T4+GT(TT,4),T5=T5+GT(TT,5),T6=T6+GT(TT,6),T7=T7+GT(TT,7),T8=T8+GT(TT,8),T9=T9+GT(TT,9),T10=T10+GT(TT,10),T11=T11+GT(TT,11),T12=T12+GT(TT,12)