source: FOIAVistA/trunk/r/NOIS-FSC/FSCRPCOW.m@ 1009

Last change on this file since 1009 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1FSCRPCOW ;SLC/STAFF-NOIS RPC Other Workload ;1/18/97 21:32
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4WKLD(IN,OUT) ; from FSCRPX (RPCCallWorkload)
5 N CALL,CNT,DATE,HRS,TOTHRS,USER,WKLD
6 S CALL=+$G(^TMP("FSCRPC",$J,"INPUT",1))
7 I 'CALL S ^TMP("FSCRPC",$J,"OUTPUT",1)="no information" Q
8 S CNT=0
9 K ^TMP("FSCWKLD",$J)
10 S TOTHRS=+$P(^FSCD("CALL",CALL,0),U,13)
11 I 'TOTHRS D
12 .S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="No time entries."
13 E D
14 .S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=" Total hours: "_TOTHRS
15 .S WKLD=0 F S WKLD=$O(^FSCD("WKLD","B",CALL,WKLD)) Q:WKLD<1 D
16 ..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)
17 ..I $L(DATE),$L(USER) D
18 ...S ^TMP("FSCWKLD",$J,"DU",DATE,USER)=HRS
19 ...S ^TMP("FSCWKLD",$J,"UD",USER,DATE)=HRS
20 ...S ^(DATE)=$G(^TMP("FSCWKLD",$J,"D",DATE))+HRS
21 ...S ^(USER)=$G(^TMP("FSCWKLD",$J,"U",USER))+HRS
22 .S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="By Date | Specialist:"
23 .S DATE=0 F S DATE=$O(^TMP("FSCWKLD",$J,"DU",DATE)) Q:DATE<1 D
24 ..S CNT=CNT+1,^TMP("FSCWKLD",$J,"OUTPUT",CNT)=" "_$$FMTE^XLFDT(DATE)_" ("_^TMP("FSCWKLD",$J,"D",DATE)_")"
25 ..S USER="" F S USER=$O(^TMP("FSCWKLD",$J,"DU",DATE,USER)) Q:USER="" S HRS=^(USER) D
26 ...S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=" "_USER
27 ...S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=$$SETSTR^VALM1(HRS,^TMP("FSCRPC",$J,"OUTPUT",CNT),50,$L(HRS))
28 .S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)="By Specialist | Date:"
29 .S USER="" F S USER=$O(^TMP("FSCWKLD",$J,"UD",USER)) Q:USER="" D
30 ..S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=USER_" ("_^TMP("FSCWKLD",$J,"U",USER)_")"
31 ..S DATE=0 F S DATE=$O(^TMP("FSCWKLD",$J,"UD",USER,DATE)) Q:DATE<1 S HRS=^(DATE) D
32 ...S CNT=CNT+1,^TMP("FSCRPC",$J,"OUTPUT",CNT)=" "_$$FMTE^XLFDT(DATE)
33 ...S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=$$SETSTR^VALM1(HRS,^TMP("FSCRPC",$J,"OUTPUT",CNT),50,$L(HRS))
34 K ^TMP("FSCWKLD",$J)
35 Q
Note: See TracBrowser for help on using the repository browser.