Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: FSCFORMS

FSCFORMS.m

Go to the documentation of this file.
FSCFORMS ;SLC/STAFF-NOIS Format Statistic ;1/19/98  11:24
 ;;1.1;NOIS;;Sep 06, 1998
 ;
STAT ; from FSCFORM
 N ABBREV,CABBREV,CCOUNT,CNUM,CNUMVAL,CNT,COUNT,CVALUE,FORMAT,LINE,NUM,NUMTOT,NUMVALUE,SECTION,TEXT,TOTAL,VALUE,VTYPE K FORMAT
 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)=""
 D GET^FSCGET("CUSTOM",CALLNUM,.FIELD)
 I '$D(STYLE("COLLATE")) D
 .S CNT=0 F  S CNT=$O(STYLE(CNT)) Q:CNT<1  S ABBREV=$P(STYLE(CNT),U,7) I $L(ABBREV) D
 ..I '$G(^TMP("FSC STATS",$J,ABBREV)) S ^(ABBREV)=0
 ..I $L($P($G(FIELD(ABBREV)),U,2)) S VALUE=$P(FIELD(ABBREV),U,2) D
 ...S $P(^(ABBREV),U)=+^TMP("FSC STATS",$J,ABBREV)+1
 ...I '$G(^TMP("FSC STATS",$J,ABBREV,VALUE)) S ^(VALUE)=0
 ...S ^(VALUE)=^TMP("FSC STATS",$J,ABBREV,VALUE)+1
 I $D(STYLE("COLLATE")) D
 .S CABBREV=$P(STYLE(STYLE("COLLATE")),U,7) I '$L(CABBREV) Q
 .I $L($P($G(FIELD(CABBREV)),U,2)) S CVALUE=$P(FIELD(CABBREV),U,2) D
 ..S ^(CABBREV)=$G(^TMP("FSC STATS",$J,CABBREV))+1
 ..S ^(CVALUE)=$G(^TMP("FSC STATS",$J,CABBREV,CVALUE))+1
 ..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
 ...I '$G(^TMP("FSC STATS",$J,CABBREV,CVALUE,ABBREV)) S ^(ABBREV)=0
 ...I $L($P($G(FIELD(ABBREV)),U,2)) S VALUE=$P(FIELD(ABBREV),U,2) D
 ....S $P(^(ABBREV),U)=+^TMP("FSC STATS",$J,CABBREV,CVALUE,ABBREV)+1
 ....S ^(VALUE)=$G(^TMP("FSC STATS",$J,CABBREV,CVALUE,ABBREV,VALUE))+1
 I TYPE'["VIEW"!('$O(^TMP("FSC SELECT",$J,$S(TYPE["VIEW":"VVALUES",1:"EVALUES"),LISTNUM))) D STAT^FSCFORMX
 Q