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

FSCFORMU.m

Go to the documentation of this file.
FSCFORMU ;SLC/STAFF-NOIS Format Utility ;8/25/94  09:05
 ;;1.1;NOIS;;Sep 06, 1998
 ;
SETUP(LISTNUM,CALLNUM,FORMAT,STYLE,LINECNT,TYPE) ; from FSCFORMB, FSCFORMC, FSCFORMD, FSCRS
 N COLUMN,LINE,MULT,MULTCNT,SECTION,VIDEO
 S STYLE=TYPE_STYLE
 S SECTION=0 F  S SECTION=$O(FORMAT(SECTION)) Q:SECTION<1  D
 .I '$L(FORMAT(SECTION)) D  Q
 ..F LINE=1:1 Q:$O(FORMAT(SECTION,LINE-.1))<1  D  ; formats non sequential lines
 ...S LINECNT=LINECNT+1,^TMP(STYLE,$J,LISTNUM,LINECNT,0)=$G(FORMAT(SECTION,LINE)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
 ...S COLUMN=0 F  S COLUMN=$O(FORMAT(SECTION,LINE,COLUMN)) Q:COLUMN<1  D
 ....S VIDEO=FORMAT(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))
 .S MULT=FORMAT(SECTION),MULTCNT=0,LINE=$$START(CALLNUM,STYLE,MULT) F  S LINE=$O(@MULT@(LINE)) Q:LINE<1  D
 ..S MULTCNT=MULTCNT+1
 ..S LINECNT=LINECNT+1,^TMP(STYLE,$J,LISTNUM,LINECNT,0)=$G(@MULT@(LINE,0)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
 S ^TMP(STYLE,$J,LISTNUM)="1^"_LINECNT ; used as VALMCNT for this style
 Q
 ;
VIEW(LISTNUM,CALLNUM,FORMAT,STYLE,LINECNT,TYPE) ; from FSCFORMB, FSCFORMC, FSCFORMD, FSCRS
 N COLUMN,LINE,MULT,MULTCNT,SECTION,VIDEO
 S STYLE=TYPE_STYLE
 S LINECNT=LINECNT+1
 S ^TMP(STYLE,$J,LINECNT,0)=$S(STYLE'["STAT":$G(^TMP("FSC LIST CALLS",$J,LISTNUM,0)),1:"COUNTS OF ITEMS")
 S ^TMP(STYLE,$J,"IDX",LISTNUM,LINECNT)=""
 S SECTION=0 F  S SECTION=$O(FORMAT(SECTION)) Q:SECTION<1  D
 .I '$L(FORMAT(SECTION)) D  Q
 ..F LINE=1:1 Q:$O(FORMAT(SECTION,LINE-.1))<1  D  ; formats non sequential lines
 ...S LINECNT=LINECNT+1,^TMP(STYLE,$J,LINECNT,0)=$G(FORMAT(SECTION,LINE)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
 ...S COLUMN=0 F  S COLUMN=$O(FORMAT(SECTION,LINE,COLUMN)) Q:COLUMN<1  D
 ....S VIDEO=FORMAT(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))
 .S MULT=FORMAT(SECTION),MULTCNT=0,LINE=$$START(CALLNUM,STYLE,MULT) F  S LINE=$O(@MULT@(LINE)) Q:LINE<1  D
 ..S MULTCNT=MULTCNT+1
 ..S LINECNT=LINECNT+1,^TMP(STYLE,$J,LINECNT,0)=$G(@MULT@(LINE,0)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
 S LINECNT=LINECNT+1,$P(^TMP(STYLE,$J,LINECNT,0),"=",80)=""
 Q
 ;
START(CALLNUM,STYLE,MULT) ; determines start of text
 I STYLE'["BRIEF" Q 0
 I MULT'[",50)" Q 0
 Q $P($G(^FSCD("CALL",CALLNUM,120)),U,6)-1 ; first line of last note