1 | FSCFORMS ;SLC/STAFF-NOIS Format Statistic ;1/19/98 11:24
|
---|
2 | ;;1.1;NOIS;;Sep 06, 1998
|
---|
3 | ;
|
---|
4 | STAT ; from FSCFORM
|
---|
5 | N ABBREV,CABBREV,CCOUNT,CNUM,CNUMVAL,CNT,COUNT,CVALUE,FORMAT,LINE,NUM,NUMTOT,NUMVALUE,SECTION,TEXT,TOTAL,VALUE,VTYPE K FORMAT
|
---|
6 | S CNT=0 F S CNT=$O(STYLE(CNT)) Q:CNT<1 S ABBREV=$P(STYLE(CNT),U,7) I $L(ABBREV) S FIELD(ABBREV)=""
|
---|
7 | D GET^FSCGET("CUSTOM",CALLNUM,.FIELD)
|
---|
8 | I '$D(STYLE("COLLATE")) D
|
---|
9 | .S CNT=0 F S CNT=$O(STYLE(CNT)) Q:CNT<1 S ABBREV=$P(STYLE(CNT),U,7) I $L(ABBREV) D
|
---|
10 | ..I '$G(^TMP("FSC STATS",$J,ABBREV)) S ^(ABBREV)=0
|
---|
11 | ..I $L($P($G(FIELD(ABBREV)),U,2)) S VALUE=$P(FIELD(ABBREV),U,2) D
|
---|
12 | ...S $P(^(ABBREV),U)=+^TMP("FSC STATS",$J,ABBREV)+1
|
---|
13 | ...I '$G(^TMP("FSC STATS",$J,ABBREV,VALUE)) S ^(VALUE)=0
|
---|
14 | ...S ^(VALUE)=^TMP("FSC STATS",$J,ABBREV,VALUE)+1
|
---|
15 | I $D(STYLE("COLLATE")) D
|
---|
16 | .S CABBREV=$P(STYLE(STYLE("COLLATE")),U,7) I '$L(CABBREV) Q
|
---|
17 | .I $L($P($G(FIELD(CABBREV)),U,2)) S CVALUE=$P(FIELD(CABBREV),U,2) D
|
---|
18 | ..S ^(CABBREV)=$G(^TMP("FSC STATS",$J,CABBREV))+1
|
---|
19 | ..S ^(CVALUE)=$G(^TMP("FSC STATS",$J,CABBREV,CVALUE))+1
|
---|
20 | ..S CNT=0 F S CNT=$O(STYLE(CNT)) Q:CNT<1 I CNT'=STYLE("COLLATE") S ABBREV=$P(STYLE(CNT),U,7) I $L(ABBREV) D
|
---|
21 | ...I '$G(^TMP("FSC STATS",$J,CABBREV,CVALUE,ABBREV)) S ^(ABBREV)=0
|
---|
22 | ...I $L($P($G(FIELD(ABBREV)),U,2)) S VALUE=$P(FIELD(ABBREV),U,2) D
|
---|
23 | ....S $P(^(ABBREV),U)=+^TMP("FSC STATS",$J,CABBREV,CVALUE,ABBREV)+1
|
---|
24 | ....S ^(VALUE)=$G(^TMP("FSC STATS",$J,CABBREV,CVALUE,ABBREV,VALUE))+1
|
---|
25 | I TYPE'["VIEW"!('$O(^TMP("FSC SELECT",$J,$S(TYPE["VIEW":"VVALUES",1:"EVALUES"),LISTNUM))) D STAT^FSCFORMX
|
---|
26 | Q
|
---|