1 | FSCRPCOG ;SLC/STAFF-NOIS RPC Other Graph ;6/15/98 23:46
|
---|
2 | ;;1.1;NOIS;;Sep 06, 1998
|
---|
3 | ;
|
---|
4 | GRAPH(IN,OUT) ; from FSCRPX (RPCGraph)
|
---|
5 | N CALL,CNT,EVALUE,FIELD,FLD,IEN,NODE,NPIECE,PFIELDS,PIECE,SVALUE,TOTAL,TYPE,VALUE,VCNT,ZERO K ^TMP("FSC STATS",$J),^TMP("FSC STATS ALPHA",$J)
|
---|
6 | S FIELD=+$G(^TMP("FSCRPC",$J,"INPUT",1))
|
---|
7 | S ZERO=$G(^FSC("FLD",FIELD,0))
|
---|
8 | S NPIECE=$P(ZERO,U,4),FLD=$P(ZERO,U,8),TYPE=$P(ZERO,U,3)
|
---|
9 | S (CNT,TOTAL)=0
|
---|
10 | I TYPE="W" D
|
---|
11 | .S CALL=0 F S CALL=$O(^TMP("FSC CURRENT LIST",$J,"C",CALL)) Q:CALL<1 D
|
---|
12 | ..S TOTAL=TOTAL+1
|
---|
13 | ..I FLD=.65 D Q
|
---|
14 | ...S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL))
|
---|
15 | ...I 'IEN Q
|
---|
16 | ...S CNT=CNT+1
|
---|
17 | ...S ^("<entry>")=1+$G(^TMP("FSC STATS",$J,"<entry>"))
|
---|
18 | ..I '$O(^FSCD("CALL",CALL,FLD,0)) Q
|
---|
19 | ..S CNT=CNT+1
|
---|
20 | ..S ^("<entry>")=1+$G(^TMP("FSC STATS",$J,"<entry>"))
|
---|
21 | I TYPE'="W" Q:'$L(NPIECE) Q:'FLD D
|
---|
22 | .S NODE=$P(NPIECE,";"),PIECE=+$P(NPIECE,";",2)
|
---|
23 | .I 'PIECE Q
|
---|
24 | .I NODE["7100.6," S PFIELDS=1,NODE=+$P(NODE,",",2)
|
---|
25 | .E S PFIELDS=0,NODE=+NODE
|
---|
26 | .S CALL=0 F S CALL=$O(^TMP("FSC CURRENT LIST",$J,"C",CALL)) Q:CALL<1 D
|
---|
27 | ..S TOTAL=TOTAL+1
|
---|
28 | ..I PFIELDS D Q
|
---|
29 | ...S IEN=+$G(^FSCD("CALL USER","AUC",DUZ,CALL))
|
---|
30 | ...I 'IEN Q
|
---|
31 | ...S VALUE=$P($G(^FSCD("CALL USER",IEN,NODE)),U,PIECE)
|
---|
32 | ...I $L(VALUE) D
|
---|
33 | ....S CNT=CNT+1
|
---|
34 | ....S ^(VALUE)=1+$G(^TMP("FSC STATS",$J,VALUE))
|
---|
35 | ..S VALUE=$P($G(^FSCD("CALL",CALL,NODE)),U,PIECE)
|
---|
36 | ..I $L(VALUE) D
|
---|
37 | ...S CNT=CNT+1
|
---|
38 | ...S ^(VALUE)=1+$G(^TMP("FSC STATS",$J,VALUE))
|
---|
39 | S VALUE="" F S VALUE=$O(^TMP("FSC STATS",$J,VALUE)) Q:VALUE="" S VCNT=+^(VALUE) D
|
---|
40 | .D
|
---|
41 | ..I TYPE="F" S (EVALUE,SVALUE)=VALUE Q
|
---|
42 | ..I TYPE="N" S (EVALUE,SVALUE)=+VALUE Q
|
---|
43 | ..I TYPE="W" S (EVALUE,SVALUE)=VALUE Q
|
---|
44 | ..I TYPE="D" S SVALUE=+VALUE,EVALUE=$$FMTE^XLFDT(VALUE) Q
|
---|
45 | ..S (EVALUE,SVALUE)=$$VALUE^FSCGET(VALUE,7100,FLD)
|
---|
46 | .I SVALUE="" S SVALUE=" "
|
---|
47 | .I TOTAL S ^TMP("FSC STATS ALPHA",$J,SVALUE)=VALUE_U_EVALUE_U_VCNT_U_$J(VCNT/TOTAL*100,0,0)_U_$J(VCNT/CNT*100,0,0)
|
---|
48 | I TOTAL S ^TMP("FSC STATS ALPHA",$J,"{no entry}")="<no entry>^<no entry>^"_(TOTAL-CNT)_U_$J(TOTAL-CNT/TOTAL*100,0,0)_"^0"
|
---|
49 | S CNT=0
|
---|
50 | S VALUE="" F S VALUE=$O(^TMP("FSC STATS ALPHA",$J,VALUE)) Q:VALUE="" S LINE=^(VALUE) D
|
---|
51 | .S CNT=CNT+1
|
---|
52 | .S ^TMP("FSCRPC",$J,"OUTPUT",CNT)=LINE
|
---|
53 | K ^TMP("FSC STATS",$J),^TMP("FSC STATS ALPHA",$J)
|
---|
54 | Q
|
---|