FSCLMV ;SLC/STAFF-NOIS List Manager - View ;1/13/98 13:12
;;1.1;NOIS;;Sep 06, 1998
;
ENTRY ; from list template - entry code, FSCELL
N CALLCNT,CALLLINE,CALLNUM,LISTNUM,MAXLINE,OVERFLOW
K ^TMP("FSC VIEW",$J),^TMP("FSC VIEW BRIEF",$J),^TMP("FSC VIEW DETAIL",$J),^TMP("FSC VIEW FORMAT",$J),^TMP("FSC VIEW STAT",$J),^TMP("FSC VIEW CUSTOM",$J)
S VALMCNT=0
S VALMCAP=$$CAP^FSCU("V",.FSCSTYLE)
I '$G(FSCDEV) W !
S MAXLINE=$$MAXLINE^FSCUP,OVERFLOW=0
S (CALLCNT,LISTNUM)=0 F S LISTNUM=$O(^TMP("FSC SELECT",$J,LISTSEL,LISTNUM)) Q:LISTNUM<1 D Q:$D(DTOUT) Q:OVERFLOW
.S CALLCNT=CALLCNT+1
.S CALLLINE=+$O(^TMP("FSC LIST CALLS",$J,"IDX",LISTNUM,0))
.S CALLNUM=+$O(^TMP("FSC LIST CALLS",$J,"ICX",CALLLINE,0))
.D BUILD^FSCFORM(CALLLINE,CALLNUM,.FSCFMT,.VALMCNT,"FSC VIEW ")
.I VALMCNT>MAXLINE D
..S OVERFLOW=1
..W !,"List is restricted to ",MAXLINE," lines.",$C(7) H 2
S VALMAR="^TMP(""FSC VIEW "_FSCFMT_""",$J)"
S @VALMAR=CALLCNT_U_VALMCNT
D VIDEOOFF^FSCU
I $D(FSCFMT("E")) S VALMQUIT=1,VALMBCK="Q"
I $D(FSCFMT("T")) S VALMQUIT=1,VALMBCK="Q"
Q
;
S VALMHDR(1)=$$SETSTR^VALM1("# of calls: "_+@VALMAR,"List: "_FSCLNAME,62,18)
Q
;
EXIT ; from list template - exit code
I $G(FSC1) D CLEAR^VALM1
K ^TMP("FSC VIEW",$J)
K ^TMP("FSC VIEW BRIEF",$J)
K ^TMP("FSC VIEW DETAIL",$J)
K ^TMP("FSC VIEW FORMAT",$J)
K ^TMP("FSC VIEW STAT",$J)
K ^TMP("FSC VIEW CUSTOM",$J)
K ^TMP("FSC SELECT",$J,"VVALUES")
Q
;
HELP ; from list template - help code
I $G(X)'["?" Q
S VALMBCK="R"
N XQH
I X="?" S XQH="FSC MENU VIEW" D EN^XQH Q
I X="???" S VALMANS="?" D CLEAR^VALM1 S XQH="FSC U1 NOIS" D EN^XQH Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HFSCLMV 1706 printed Dec 13, 2024@02:18:38 Page 2
FSCLMV ;SLC/STAFF-NOIS List Manager - View ;1/13/98 13:12
+1 ;;1.1;NOIS;;Sep 06, 1998
+2 ;
ENTRY ; from list template - entry code, FSCELL
+1 NEW CALLCNT,CALLLINE,CALLNUM,LISTNUM,MAXLINE,OVERFLOW
+2 KILL ^TMP("FSC VIEW",$JOB),^TMP("FSC VIEW BRIEF",$JOB),^TMP("FSC VIEW DETAIL",$JOB),^TMP("FSC VIEW FORMAT",$JOB),^TMP("FSC VIEW STAT",$JOB),^TMP("FSC VIEW CUSTOM",$JOB)
+3 SET VALMCNT=0
+4 SET VALMCAP=$$CAP^FSCU("V",.FSCSTYLE)
+5 IF '$GET(FSCDEV)
WRITE !
+6 SET MAXLINE=$$MAXLINE^FSCUP
SET OVERFLOW=0
+7 SET (CALLCNT,LISTNUM)=0
FOR
SET LISTNUM=$ORDER(^TMP("FSC SELECT",$JOB,LISTSEL,LISTNUM))
if LISTNUM<1
QUIT
Begin DoDot:1
+8 SET CALLCNT=CALLCNT+1
+9 SET CALLLINE=+$ORDER(^TMP("FSC LIST CALLS",$JOB,"IDX",LISTNUM,0))
+10 SET CALLNUM=+$ORDER(^TMP("FSC LIST CALLS",$JOB,"ICX",CALLLINE,0))
+11 DO BUILD^FSCFORM(CALLLINE,CALLNUM,.FSCFMT,.VALMCNT,"FSC VIEW ")
+12 IF VALMCNT>MAXLINE
Begin DoDot:2
+13 SET OVERFLOW=1
+14 WRITE !,"List is restricted to ",MAXLINE," lines.",$CHAR(7)
HANG 2
End DoDot:2
End DoDot:1
if $DATA(DTOUT)
QUIT
if OVERFLOW
QUIT
+15 SET VALMAR="^TMP(""FSC VIEW "_FSCFMT_""",$J)"
+16 SET @VALMAR=CALLCNT_U_VALMCNT
+17 DO VIDEOOFF^FSCU
+18 IF $DATA(FSCFMT("E"))
SET VALMQUIT=1
SET VALMBCK="Q"
+19 IF $DATA(FSCFMT("T"))
SET VALMQUIT=1
SET VALMBCK="Q"
+20 QUIT
+21 ;
+1 SET VALMHDR(1)=$$SETSTR^VALM1("# of calls: "_+@VALMAR,"List: "_FSCLNAME,62,18)
+2 QUIT
+3 ;
EXIT ; from list template - exit code
+1 IF $GET(FSC1)
DO CLEAR^VALM1
+2 KILL ^TMP("FSC VIEW",$JOB)
+3 KILL ^TMP("FSC VIEW BRIEF",$JOB)
+4 KILL ^TMP("FSC VIEW DETAIL",$JOB)
+5 KILL ^TMP("FSC VIEW FORMAT",$JOB)
+6 KILL ^TMP("FSC VIEW STAT",$JOB)
+7 KILL ^TMP("FSC VIEW CUSTOM",$JOB)
+8 KILL ^TMP("FSC SELECT",$JOB,"VVALUES")
+9 QUIT
+10 ;
HELP ; from list template - help code
+1 IF $GET(X)'["?"
QUIT
+2 SET VALMBCK="R"
+3 NEW XQH
+4 IF X="?"
SET XQH="FSC MENU VIEW"
DO EN^XQH
QUIT
+5 IF X="???"
SET VALMANS="?"
DO CLEAR^VALM1
SET XQH="FSC U1 NOIS"
DO EN^XQH
QUIT
+6 QUIT