source: FOIAVistA/trunk/r/NOIS-FSC/FSCFORMY.m@ 635

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

initial load of FOIAVistA 6/30/08 version

File size: 2.9 KB
Line 
1FSCFORMY ;SLC/STAFF-NOIS Format Utility Statistics ;1/11/98 15:49
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4SETUP(LISTNUM,CALLNUM,STYLE,LINECNT,TYPE) ; from FSCFORMX
5 N COLUMN,LINE,MULT,MULTCNT,SECTION,VIDEO
6 S STYLE=TYPE_STYLE
7 S SECTION=0 F S SECTION=$O(^TMP("FSC STAT FORMAT",$J,SECTION)) Q:SECTION<1 D
8 .I '$L(^TMP("FSC STAT FORMAT",$J,SECTION)) D Q
9 ..F LINE=1:1 Q:$O(^TMP("FSC STAT FORMAT",$J,SECTION,LINE-.1))<1 D ; formats non sequential lines
10 ...S LINECNT=LINECNT+1,^TMP(STYLE,$J,LISTNUM,LINECNT,0)=$G(^TMP("FSC STAT FORMAT",$J,SECTION,LINE)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
11 ...S COLUMN=0 F S COLUMN=$O(^TMP("FSC STAT FORMAT",$J,SECTION,LINE,COLUMN)) Q:COLUMN<1 D
12 ....S VIDEO=^TMP("FSC STAT FORMAT",$J,SECTION,LINE,COLUMN) I $L(VIDEO),$D(VALMAR),$D(VALMCC) D CNTRL^VALM10(LINECNT,COLUMN,$P(VIDEO,U),$P(VIDEO,U,2),$P(VIDEO,U,3))
13 .S MULT=^TMP("FSC STAT FORMAT",$J,SECTION),MULTCNT=0,LINE=$$START(CALLNUM,STYLE,MULT) F S LINE=$O(@MULT@(LINE)) Q:LINE<1 D
14 ..S MULTCNT=MULTCNT+1
15 ..S LINECNT=LINECNT+1,^TMP(STYLE,$J,LISTNUM,LINECNT,0)=$G(@MULT@(LINE,0)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
16 S ^TMP(STYLE,$J,LISTNUM)="1^"_LINECNT ; used as VALMCNT for this style
17 K ^TMP("FSC STAT FORMAT",$J)
18 Q
19 ;
20VIEW(LISTNUM,CALLNUM,STYLE,LINECNT,TYPE) ; from FSCFORMX
21 N COLUMN,LINE,MULT,MULTCNT,SECTION,VIDEO
22 S STYLE=TYPE_STYLE
23 S LINECNT=LINECNT+1
24 S ^TMP(STYLE,$J,LINECNT,0)=$S(STYLE'["STAT":$G(^TMP("FSC LIST CALLS",$J,LISTNUM,0)),1:"COUNTS OF ITEMS")
25 S ^TMP(STYLE,$J,"IDX",LISTNUM,LINECNT)=""
26 S SECTION=0 F S SECTION=$O(^TMP("FSC STAT FORMAT",$J,SECTION)) Q:SECTION<1 D
27 .I '$L(^TMP("FSC STAT FORMAT",$J,SECTION)) D Q
28 ..F LINE=1:1 Q:$O(^TMP("FSC STAT FORMAT",$J,SECTION,LINE-.1))<1 D ; formats non sequential lines
29 ...S LINECNT=LINECNT+1,^TMP(STYLE,$J,LINECNT,0)=$G(^TMP("FSC STAT FORMAT",$J,SECTION,LINE)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
30 ...S COLUMN=0 F S COLUMN=$O(^TMP("FSC STAT FORMAT",$J,SECTION,LINE,COLUMN)) Q:COLUMN<1 D
31 ....S VIDEO=^TMP("FSC STAT FORMAT",$J,SECTION,LINE,COLUMN) I $L(VIDEO),$D(VALMAR),$D(VALMCC) D CNTRL^VALM10(LINECNT,COLUMN,$P(VIDEO,U),$P(VIDEO,U,2),$P(VIDEO,U,3))
32 .S MULT=^TMP("FSC STAT FORMAT",$J,SECTION),MULTCNT=0,LINE=$$START(CALLNUM,STYLE,MULT) F S LINE=$O(@MULT@(LINE)) Q:LINE<1 D
33 ..S MULTCNT=MULTCNT+1
34 ..S LINECNT=LINECNT+1,^TMP(STYLE,$J,LINECNT,0)=$G(@MULT@(LINE,0)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
35 S LINECNT=LINECNT+1,$P(^TMP(STYLE,$J,LINECNT,0),"=",80)=""
36 K ^TMP("FSC STAT FORMAT",$J)
37 Q
38 ;
39START(CALLNUM,STYLE,MULT) ; determines start of text
40 I STYLE'["BRIEF" Q 0
41 I MULT'[",50)" Q 0
42 Q $P($G(^FSCD("CALL",CALLNUM,120)),U,6)-1 ; first line of last note
43 ;
44SETTEXT(SECTION,LINE,COLUMN,TEXT,ON,OFF) ; from FSCFORMX
45 S ^TMP("FSC STAT FORMAT",$J,SECTION)="",^TMP("FSC STAT FORMAT",$J,SECTION,LINE)=$$SETSTR^VALM1(TEXT,$G(^TMP("FSC STAT FORMAT",$J,SECTION,LINE)),COLUMN,$L(TEXT))
46 I $L($G(ON))!$L($G(OFF)) S ^TMP("FSC STAT FORMAT",$J,SECTION,LINE,COLUMN)=$L(TEXT)_U_$G(ON)_U_$G(OFF)
47 Q
Note: See TracBrowser for help on using the repository browser.