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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCFORMS 1556 printed Dec 13, 2024@02:17:50 Page 2
FSCFORMS ;SLC/STAFF-NOIS Format Statistic ;1/19/98 11:24
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
STAT ; from FSCFORM
+1 NEW ABBREV,CABBREV,CCOUNT,CNUM,CNUMVAL,CNT,COUNT,CVALUE,FORMAT,LINE,NUM,NUMTOT,NUMVALUE,SECTION,TEXT,TOTAL,VALUE,VTYPE
KILL FORMAT
+2 SET CNT=0
FOR
SET CNT=$ORDER(STYLE(CNT))
if CNT<1
QUIT
SET ABBREV=$PIECE(STYLE(CNT),U,7)
IF $LENGTH(ABBREV)
SET FIELD(ABBREV)=""
+3 DO GET^FSCGET("CUSTOM",CALLNUM,.FIELD)
+4 IF '$DATA(STYLE("COLLATE"))
Begin DoDot:1
+5 SET CNT=0
FOR
SET CNT=$ORDER(STYLE(CNT))
if CNT<1
QUIT
SET ABBREV=$PIECE(STYLE(CNT),U,7)
IF $LENGTH(ABBREV)
Begin DoDot:2
+6 IF '$GET(^TMP("FSC STATS",$JOB,ABBREV))
SET ^(ABBREV)=0
+7 IF $LENGTH($PIECE($GET(FIELD(ABBREV)),U,2))
SET VALUE=$PIECE(FIELD(ABBREV),U,2)
Begin DoDot:3
+8 SET $PIECE(^(ABBREV),U)=+^TMP("FSC STATS",$JOB,ABBREV)+1
+9 IF '$GET(^TMP("FSC STATS",$JOB,ABBREV,VALUE))
SET ^(VALUE)=0
+10 SET ^(VALUE)=^TMP("FSC STATS",$JOB,ABBREV,VALUE)+1
End DoDot:3
End DoDot:2
End DoDot:1
+11 IF $DATA(STYLE("COLLATE"))
Begin DoDot:1
+12 SET CABBREV=$PIECE(STYLE(STYLE("COLLATE")),U,7)
IF '$LENGTH(CABBREV)
QUIT
+13 IF $LENGTH($PIECE($GET(FIELD(CABBREV)),U,2))
SET CVALUE=$PIECE(FIELD(CABBREV),U,2)
Begin DoDot:2
+14 SET ^(CABBREV)=$GET(^TMP("FSC STATS",$JOB,CABBREV))+1
+15 SET ^(CVALUE)=$GET(^TMP("FSC STATS",$JOB,CABBREV,CVALUE))+1
+16 SET CNT=0
FOR
SET CNT=$ORDER(STYLE(CNT))
if CNT<1
QUIT
IF CNT'=STYLE("COLLATE")
SET ABBREV=$PIECE(STYLE(CNT),U,7)
IF $LENGTH(ABBREV)
Begin DoDot:3
+17 IF '$GET(^TMP("FSC STATS",$JOB,CABBREV,CVALUE,ABBREV))
SET ^(ABBREV)=0
+18 IF $LENGTH($PIECE($GET(FIELD(ABBREV)),U,2))
SET VALUE=$PIECE(FIELD(ABBREV),U,2)
Begin DoDot:4
+19 SET $PIECE(^(ABBREV),U)=+^TMP("FSC STATS",$JOB,CABBREV,CVALUE,ABBREV)+1
+20 SET ^(VALUE)=$GET(^TMP("FSC STATS",$JOB,CABBREV,CVALUE,ABBREV,VALUE))+1
End DoDot:4
End DoDot:3
End DoDot:2
End DoDot:1
+21 IF TYPE'["VIEW"!('$ORDER(^TMP("FSC SELECT",$JOB,$SELECT(TYPE["VIEW":"VVALUES",1:"EVALUES"),LISTNUM)))
DO STAT^FSCFORMX
+22 QUIT