FSCLMPOW ;SLC/STAFF-NOIS List Manager Protocol Other Workload ;1/11/98 18:37
;;1.1;NOIS;;Sep 06, 1998
;
WKLD(CALL) ; from FSCLMPO
N CNT,DATE,HRS,OK,TOTHRS,USER,WKLD
K ^TMP("FSCWKLD",$J)
S OK=1,TOTHRS=+$P(^FSCD("CALL",CALL,0),U,13)
I 'TOTHRS D
.W !,"No time entries."
E D
.W !?5,"Total hours: ",TOTHRS
.S WKLD=0 F S WKLD=$O(^FSCD("WKLD","B",CALL,WKLD)) Q:WKLD<1 D
..S DATE=$P(^FSCD("WKLD",WKLD,0),U,3),HRS=+$P(^(0),U,4),USER=$P(^(0),U,2),USER=$$VALUE^FSCGET(USER,7103.5,1)
..I $L(DATE),$L(USER) D
...S ^TMP("FSCWKLD",$J,"DU",DATE,USER)=HRS
...S ^TMP("FSCWKLD",$J,"UD",USER,DATE)=HRS
...S ^(DATE)=$G(^TMP("FSCWKLD",$J,"D",DATE))+HRS
...S ^(USER)=$G(^TMP("FSCWKLD",$J,"U",USER))+HRS
.W !,"By Date | Specialist:"
.S CNT=3
.S DATE=0 F S DATE=$O(^TMP("FSCWKLD",$J,"DU",DATE)) Q:DATE<1 D I 'OK Q
..W !?5,$$FMTE^XLFDT(DATE)," (",^TMP("FSCWKLD",$J,"D",DATE),")"
..S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
..S USER="" F S USER=$O(^TMP("FSCWKLD",$J,"DU",DATE,USER)) Q:USER="" S HRS=^(USER) D I 'OK Q
...W !,?20,USER,?50,HRS
...S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
.W !,"By Specialist | Date:"
.S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
.S USER="" F S USER=$O(^TMP("FSCWKLD",$J,"UD",USER)) Q:USER="" D I 'OK Q
..W !?5,USER," (",^TMP("FSCWKLD",$J,"U",USER),")"
..S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
..S DATE=0 F S DATE=$O(^TMP("FSCWKLD",$J,"UD",USER,DATE)) Q:DATE<1 S HRS=^(DATE) D I 'OK Q
...W !,?20,$$FMTE^XLFDT(DATE),?50,HRS
...S CNT=CNT+1 I CNT'<(IOSL-1) S CNT=1 D PAUSE^FSCU(.OK) I 'OK Q
K ^TMP("FSCWKLD",$J)
I 'OK Q
D PAUSE^FSCU(.OK)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLMPOW 1713 printed Oct 16, 2024@18:19:08 Page 2
FSCLMPOW ;SLC/STAFF-NOIS List Manager Protocol Other Workload ;1/11/98 18:37
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
WKLD(CALL) ; from FSCLMPO
+1 NEW CNT,DATE,HRS,OK,TOTHRS,USER,WKLD
+2 KILL ^TMP("FSCWKLD",$JOB)
+3 SET OK=1
SET TOTHRS=+$PIECE(^FSCD("CALL",CALL,0),U,13)
+4 IF 'TOTHRS
Begin DoDot:1
+5 WRITE !,"No time entries."
End DoDot:1
+6 IF '$TEST
Begin DoDot:1
+7 WRITE !?5,"Total hours: ",TOTHRS
+8 SET WKLD=0
FOR
SET WKLD=$ORDER(^FSCD("WKLD","B",CALL,WKLD))
if WKLD<1
QUIT
Begin DoDot:2
+9 SET DATE=$PIECE(^FSCD("WKLD",WKLD,0),U,3)
SET HRS=+$PIECE(^(0),U,4)
SET USER=$PIECE(^(0),U,2)
SET USER=$$VALUE^FSCGET(USER,7103.5,1)
+10 IF $LENGTH(DATE)
IF $LENGTH(USER)
Begin DoDot:3
+11 SET ^TMP("FSCWKLD",$JOB,"DU",DATE,USER)=HRS
+12 SET ^TMP("FSCWKLD",$JOB,"UD",USER,DATE)=HRS
+13 SET ^(DATE)=$GET(^TMP("FSCWKLD",$JOB,"D",DATE))+HRS
+14 SET ^(USER)=$GET(^TMP("FSCWKLD",$JOB,"U",USER))+HRS
End DoDot:3
End DoDot:2
+15 WRITE !,"By Date | Specialist:"
+16 SET CNT=3
+17 SET DATE=0
FOR
SET DATE=$ORDER(^TMP("FSCWKLD",$JOB,"DU",DATE))
if DATE<1
QUIT
Begin DoDot:2
+18 WRITE !?5,$$FMTE^XLFDT(DATE)," (",^TMP("FSCWKLD",$JOB,"D",DATE),")"
+19 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
+20 SET USER=""
FOR
SET USER=$ORDER(^TMP("FSCWKLD",$JOB,"DU",DATE,USER))
if USER=""
QUIT
SET HRS=^(USER)
Begin DoDot:3
+21 WRITE !,?20,USER,?50,HRS
+22 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
End DoDot:3
IF 'OK
QUIT
End DoDot:2
IF 'OK
QUIT
+23 WRITE !,"By Specialist | Date:"
+24 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
+25 SET USER=""
FOR
SET USER=$ORDER(^TMP("FSCWKLD",$JOB,"UD",USER))
if USER=""
QUIT
Begin DoDot:2
+26 WRITE !?5,USER," (",^TMP("FSCWKLD",$JOB,"U",USER),")"
+27 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
+28 SET DATE=0
FOR
SET DATE=$ORDER(^TMP("FSCWKLD",$JOB,"UD",USER,DATE))
if DATE<1
QUIT
SET HRS=^(DATE)
Begin DoDot:3
+29 WRITE !,?20,$$FMTE^XLFDT(DATE),?50,HRS
+30 SET CNT=CNT+1
IF CNT'<(IOSL-1)
SET CNT=1
DO PAUSE^FSCU(.OK)
IF 'OK
QUIT
End DoDot:3
IF 'OK
QUIT
End DoDot:2
IF 'OK
QUIT
End DoDot:1
+31 KILL ^TMP("FSCWKLD",$JOB)
+32 IF 'OK
QUIT
+33 DO PAUSE^FSCU(.OK)
+34 QUIT