Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: LRCAPW

LRCAPW.m

Go to the documentation of this file.
LRCAPW ;SLC/DCM- CAP WORKLOAD SUMMARY ; 1/31/89  10:35 ;
 ;;V~5.0~;LAB;;02/27/90 17:09
 S LREND=0 D MAJOR^LRCAPS I 'LREND D DATE^LRCAPS I 'LREND D TIME I 'LREND D ZIS I 'LREND U IO D ^LRCAPW1,^LRCAPW2
END X ^%ZIS("C") K ^UTILITY($J),LRS,LRM,LRA,LRALL,LREND,LRMAJ,LRSEC,LRFDT,LRLDT,LRH1,LRH2,LRSHIFT,LREND,LRSTOP,ZTSAVE,ZTRTN,ZTIO,ZTDESC,ZTSK
 Q
ZIS S %ZIS="QM" D ^%ZIS I POP S LREND=1 Q
 I $D(IO("Q")) K IO("Q") S ZTRTN="DQ^LRCAPW",ZTDESC="CAP WORKLOAD SUMMARY",ZTSAVE("LR*")="" D ^%ZTLOAD S LREND=1 Q
 Q
DQ U IO K:$D(ZTSK) ^%ZTSK(ZTSK),ZTSK D ^LRCAPW1,^LRCAPW2
 G END
TIME S LREND=0,C1=1,DEF(1)="0000-0759",DEF(2)="0800-1559",DEF(3)="1600-2359"
 F I=0:0 S LRSTOP=0 W !!,"Select starting and ending times for shift #"_C1_": " W:C1<4 DEF(C1)_" // " R X:DTIME D TIME1 Q:LREND  Q:X=""
 S:'$D(LRSHIFT) LREND=1 Q
TIME1 S:X="^"!('$T) LREND=1 S:X=""&(C1<4) X=DEF(C1) Q:X=""!(X="^")  D:X'?4N1P4N HELP I X?4N1P4N D CHECK I 'LRSTOP S LRSHIFT(C1)=X_.9999,C1=C1+1
 Q
HELP W !!,"Enter times in military format separated by a '-' to define"
 W !,"the work shifts that are to be totaled and reported."
 W !,"EXAMPLE: 0800-1630"
 Q
CHECK I +$E(X,1,2)>23!(+$E(X,6,7)>23) W *7,"   INVALID TIME!" D HELP S LRSTOP=1 Q
 I +$E(X,3,4)>59!(+$E(X,8,9)>59) W *7,"   INVALID TIME!" D HELP S LRSTOP=1 Q
 I +$E(X,1,4)>+$E(X,6,9) W *7,"   INVALID TIME RANGE!" D HELP S LRSTOP=1 Q
 Q