FSCWKLD ;SLC/STAFF-NOIS Workload ;1/11/98 15:08
;;1.1;NOIS;;Sep 06, 1998
;
HC(CALL) ; $$(call) -> # hrs
I '$D(^FSCD("CALL",+CALL,0)) Q ""
N TOTAL,WKLD
S TOTAL=0
S WKLD=0 F S WKLD=$O(^FSCD("WKLD","B",CALL,WKLD)) Q:WKLD<1 D
.I $G(^FSCD("WKLD",WKLD,0)),'$P(^(0),U,5) S TOTAL=TOTAL+$P(^(0),U,4)
Q TOTAL
;
HCUD(CALL,USER,DATE) ; $$(call,user,date) -> # hrs
N TOTAL,WKLD
S TOTAL=0
S WKLD=+$G(^FSCD("WKLD","AK",CALL,USER,DATE)) I 'WKLD Q ""
I '$P($G(^FSCD("WKLD",WKLD,0)),U,5) S TOTAL=$P(^(0),U,4)
Q TOTAL
;
HCD(CALL,DATE) ; $$(call,date) -> # hrs
N TOTAL,WKLD
S TOTAL=0
S WKLD=0 F S WKLD=$O(^FSCD("WKLD","B",CALL,WKLD)) Q:WKLD<1 D
.I $P(^FSCD("WKLD",WKLD,0),U,3)=DATE,'$P(^(0),U,5) S TOTAL=TOTAL+$P(^(0),U,4)
Q TOTAL
;
HD(DATE) ; $$(date) -> # hrs
N TOTAL,WKLD
S TOTAL=0
S WKLD=0 F S WKLD=$O(^FSCD("WKLD","D",DATE,WKLD)) Q:WKLD<1 D
.I '$P(^FSCD("WKLD",WKLD,0),U,5) S TOTAL=TOTAL+$P(^FSCD("WKLD",WKLD,0),U,4)
Q TOTAL
;
HUD(USER,DATE) ; $$(user,date) -> # hrs
I '$G(USER) Q ""
I '$G(DATE) Q ""
N TOTAL,WKLD
S TOTAL=0
S WKLD=0 F S WKLD=$O(^FSCD("WKLD","AUD",USER,DATE,WKLD)) Q:WKLD<1 D
.I $G(^FSCD("WKLD",WKLD,0)),'$P(^(0),U,5) S TOTAL=TOTAL+$P(^(0),U,4)
Q TOTAL
;
HUC(USER,CALL) ; $$(user,call) -> # hrs
N DATE,TOTAL,WKLD
S TOTAL=0
S DATE=0 F S DATE=$O(^FSCD("WKLD","AK",CALL,USER,DATE)) Q:DATE<1 S WKLD=+^(DATE) D
.I '$P(^FSCD("WKLD",WKLD,0),U,5) S TOTAL=TOTAL+$P(^(0),U,4)
Q TOTAL
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCWKLD 1473 printed Oct 16, 2024@18:21:09 Page 2
FSCWKLD ;SLC/STAFF-NOIS Workload ;1/11/98 15:08
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
HC(CALL) ; $$(call) -> # hrs
+1 IF '$DATA(^FSCD("CALL",+CALL,0))
QUIT ""
+2 NEW TOTAL,WKLD
+3 SET TOTAL=0
+4 SET WKLD=0
FOR
SET WKLD=$ORDER(^FSCD("WKLD","B",CALL,WKLD))
if WKLD<1
QUIT
Begin DoDot:1
+5 IF $GET(^FSCD("WKLD",WKLD,0))
IF '$PIECE(^(0),U,5)
SET TOTAL=TOTAL+$PIECE(^(0),U,4)
End DoDot:1
+6 QUIT TOTAL
+7 ;
HCUD(CALL,USER,DATE) ; $$(call,user,date) -> # hrs
+1 NEW TOTAL,WKLD
+2 SET TOTAL=0
+3 SET WKLD=+$GET(^FSCD("WKLD","AK",CALL,USER,DATE))
IF 'WKLD
QUIT ""
+4 IF '$PIECE($GET(^FSCD("WKLD",WKLD,0)),U,5)
SET TOTAL=$PIECE(^(0),U,4)
+5 QUIT TOTAL
+6 ;
HCD(CALL,DATE) ; $$(call,date) -> # hrs
+1 NEW TOTAL,WKLD
+2 SET TOTAL=0
+3 SET WKLD=0
FOR
SET WKLD=$ORDER(^FSCD("WKLD","B",CALL,WKLD))
if WKLD<1
QUIT
Begin DoDot:1
+4 IF $PIECE(^FSCD("WKLD",WKLD,0),U,3)=DATE
IF '$PIECE(^(0),U,5)
SET TOTAL=TOTAL+$PIECE(^(0),U,4)
End DoDot:1
+5 QUIT TOTAL
+6 ;
HD(DATE) ; $$(date) -> # hrs
+1 NEW TOTAL,WKLD
+2 SET TOTAL=0
+3 SET WKLD=0
FOR
SET WKLD=$ORDER(^FSCD("WKLD","D",DATE,WKLD))
if WKLD<1
QUIT
Begin DoDot:1
+4 IF '$PIECE(^FSCD("WKLD",WKLD,0),U,5)
SET TOTAL=TOTAL+$PIECE(^FSCD("WKLD",WKLD,0),U,4)
End DoDot:1
+5 QUIT TOTAL
+6 ;
HUD(USER,DATE) ; $$(user,date) -> # hrs
+1 IF '$GET(USER)
QUIT ""
+2 IF '$GET(DATE)
QUIT ""
+3 NEW TOTAL,WKLD
+4 SET TOTAL=0
+5 SET WKLD=0
FOR
SET WKLD=$ORDER(^FSCD("WKLD","AUD",USER,DATE,WKLD))
if WKLD<1
QUIT
Begin DoDot:1
+6 IF $GET(^FSCD("WKLD",WKLD,0))
IF '$PIECE(^(0),U,5)
SET TOTAL=TOTAL+$PIECE(^(0),U,4)
End DoDot:1
+7 QUIT TOTAL
+8 ;
HUC(USER,CALL) ; $$(user,call) -> # hrs
+1 NEW DATE,TOTAL,WKLD
+2 SET TOTAL=0
+3 SET DATE=0
FOR
SET DATE=$ORDER(^FSCD("WKLD","AK",CALL,USER,DATE))
if DATE<1
QUIT
SET WKLD=+^(DATE)
Begin DoDot:1
+4 IF '$PIECE(^FSCD("WKLD",WKLD,0),U,5)
SET TOTAL=TOTAL+$PIECE(^(0),U,4)
End DoDot:1
+5 QUIT TOTAL