source: WorldVistAEHR/trunk/r/NOIS-FSC/FSCFORMU.m@ 629

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

initial load of WorldVistAEHR

File size: 2.3 KB
Line 
1FSCFORMU ;SLC/STAFF-NOIS Format Utility ;8/25/94 09:05
2 ;;1.1;NOIS;;Sep 06, 1998
3 ;
4SETUP(LISTNUM,CALLNUM,FORMAT,STYLE,LINECNT,TYPE) ; from FSCFORMB, FSCFORMC, FSCFORMD, FSCRS
5 N COLUMN,LINE,MULT,MULTCNT,SECTION,VIDEO
6 S STYLE=TYPE_STYLE
7 S SECTION=0 F S SECTION=$O(FORMAT(SECTION)) Q:SECTION<1 D
8 .I '$L(FORMAT(SECTION)) D Q
9 ..F LINE=1:1 Q:$O(FORMAT(SECTION,LINE-.1))<1 D ; formats non sequential lines
10 ...S LINECNT=LINECNT+1,^TMP(STYLE,$J,LISTNUM,LINECNT,0)=$G(FORMAT(SECTION,LINE)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
11 ...S COLUMN=0 F S COLUMN=$O(FORMAT(SECTION,LINE,COLUMN)) Q:COLUMN<1 D
12 ....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))
13 .S MULT=FORMAT(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 Q
18 ;
19VIEW(LISTNUM,CALLNUM,FORMAT,STYLE,LINECNT,TYPE) ; from FSCFORMB, FSCFORMC, FSCFORMD, FSCRS
20 N COLUMN,LINE,MULT,MULTCNT,SECTION,VIDEO
21 S STYLE=TYPE_STYLE
22 S LINECNT=LINECNT+1
23 S ^TMP(STYLE,$J,LINECNT,0)=$S(STYLE'["STAT":$G(^TMP("FSC LIST CALLS",$J,LISTNUM,0)),1:"COUNTS OF ITEMS")
24 S ^TMP(STYLE,$J,"IDX",LISTNUM,LINECNT)=""
25 S SECTION=0 F S SECTION=$O(FORMAT(SECTION)) Q:SECTION<1 D
26 .I '$L(FORMAT(SECTION)) D Q
27 ..F LINE=1:1 Q:$O(FORMAT(SECTION,LINE-.1))<1 D ; formats non sequential lines
28 ...S LINECNT=LINECNT+1,^TMP(STYLE,$J,LINECNT,0)=$G(FORMAT(SECTION,LINE)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
29 ...S COLUMN=0 F S COLUMN=$O(FORMAT(SECTION,LINE,COLUMN)) Q:COLUMN<1 D
30 ....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))
31 .S MULT=FORMAT(SECTION),MULTCNT=0,LINE=$$START(CALLNUM,STYLE,MULT) F S LINE=$O(@MULT@(LINE)) Q:LINE<1 D
32 ..S MULTCNT=MULTCNT+1
33 ..S LINECNT=LINECNT+1,^TMP(STYLE,$J,LINECNT,0)=$G(@MULT@(LINE,0)) I (LINECNT#10)=0,'$G(FSCDEV) W "."
34 S LINECNT=LINECNT+1,$P(^TMP(STYLE,$J,LINECNT,0),"=",80)=""
35 Q
36 ;
37START(CALLNUM,STYLE,MULT) ; determines start of text
38 I STYLE'["BRIEF" Q 0
39 I MULT'[",50)" Q 0
40 Q $P($G(^FSCD("CALL",CALLNUM,120)),U,6)-1 ; first line of last note
Note: See TracBrowser for help on using the repository browser.