DVBCVW2 ;ALB/CMM LIST MANAGER PROTOCOL DRIVER ;17FEB92
;;2.7;AMIE;;Apr 10, 1995
;
;List Manager -display for exams and chapter/introductions
EN() ;
I VWQRY<2 Q
I '$D(QUIT)!(QUIT="Y") Q
I $D(DVBCSPR) G LEAVE^DVBCPGD
S VALMBG=1
;
;vwqry reference query number
;vwdoc reference doc number
;vwline reference line, default=1
;
I $D(QUIT) D EN^VALM("DVBA C VIEW EXAMS")
Q
;
INIT ; set up the doc to be viewed based on parameters
I '$D(QUIT)!(VWQRY<2) Q
I QUIT="Y" Q
S DVBCVAR="^TMP"
S VALMAR=VALMAR_"(""DVBCVIEW"",$J,"_VWQRY_","_VWDOC_")"
I $D(DVBCFLG) D CALLIT^DVBCPG1
;
S VWLINE=1,VALMBG=VWLINE
;
; get number of lines in doc from 0 node
S VALMCNT=$P($G(@VALMAR@(0)),"^",4)
I VALMCNT<1 Q
;
Q
;
Q
;
EXIT ;CLEAN UP
; set line to NULL so if user reopens doc it will be recalc'ed
I $D(DVBCSPR) Q
S VWLINE="",VALMBG=1
; if normal exit, then leave dvbcvw2
S VALMBCK="R"
I '$D(QUIT) Q
I $D(QUIT) D REMOVE^DVBCLMU5(VWQRY)
K ^TMP("DVBC,",$J,VWQRY),^TMP("DVBCVIEW",$J,VWQRY)
S VWQRY=VWQRY-1,DVBCHLD="DVBCVIEW,"_$J_","_VWQRY
I VWQRY>1 S VALMCNT=$P(^TMP("DVBCVIEW",$J,VWQRY,VWDOC,0),"^",4)
I VWQRY<3 K DVBCJMP,DVBCTEMP
S QUIT="Y"
S DVBCCT="Y"
Q
;
EXPAND ;EXPAND ACTION
Q
HELP ;DISPLAY HELP
N OFFSET,TEXT
D CLEAR^VALM1
W !,"*** The function keys F9 for 'Print List' and F12 for 'Super Quit' ***"
W !,"*** are available. ***"
F OFFSET=1:1 S TEXT=$P($T(HELPTXT+OFFSET),";;",2,78) Q:TEXT="$END" D
.I (TEXT="$PAUSE") D PAUSE^VALM1 Q:('Y) W !
.W:'(TEXT="$PAUSE") !,TEXT
D PAUSE^VALM1
S VALMBCK="R"
K Y
Q
HELPTXT ;TEXT FOR HELP
;;
;;Available Options Are:
;;
;; NX - Next Screen - Scroll down one screen
;; BU - Previous Screen - Scroll up one screen
;; UP - Up a Line - Scroll up one line
;; DN - Down a Line - Scroll down one line
;; FS - First Screen - Go to top of list
;; LS - Last Screen - Go to bottom of list
;; RE - Refresh Screen - Repaint the screen
;; PS - Print Screen - Print the current screen
;; PL - Print List - Print Exam or Chapter/Introduction displayed
;; AD - Auto Display(On/Off) - Turn on/off displaying of available actions
;; QU - Quit - Exit display screen
;; SQ - Super Quit - Exit Completely to Menu Option
;; JMP - Jump to New Exam - Select a New Exam to View
;;$END
;
;
KEYSET ;this sets up the print and super quit function keys
S XQORM("XLATE","F12")="SQ"
S XQORM("XLATE","F9")="PL"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBCVW2 2670 printed Dec 13, 2024@01:49:20 Page 2
DVBCVW2 ;ALB/CMM LIST MANAGER PROTOCOL DRIVER ;17FEB92
+1 ;;2.7;AMIE;;Apr 10, 1995
+2 ;
+3 ;List Manager -display for exams and chapter/introductions
EN() ;
+1 IF VWQRY<2
QUIT
+2 IF '$DATA(QUIT)!(QUIT="Y")
QUIT
+3 IF $DATA(DVBCSPR)
GOTO LEAVE^DVBCPGD
+4 SET VALMBG=1
+5 ;
+6 ;vwqry reference query number
+7 ;vwdoc reference doc number
+8 ;vwline reference line, default=1
+9 ;
+10 IF $DATA(QUIT)
DO EN^VALM("DVBA C VIEW EXAMS")
+11 QUIT
+12 ;
INIT ; set up the doc to be viewed based on parameters
+1 IF '$DATA(QUIT)!(VWQRY<2)
QUIT
+2 IF QUIT="Y"
QUIT
+3 SET DVBCVAR="^TMP"
+4 SET VALMAR=VALMAR_"(""DVBCVIEW"",$J,"_VWQRY_","_VWDOC_")"
+5 IF $DATA(DVBCFLG)
DO CALLIT^DVBCPG1
+6 ;
+7 SET VWLINE=1
SET VALMBG=VWLINE
+8 ;
+9 ; get number of lines in doc from 0 node
+10 SET VALMCNT=$PIECE($GET(@VALMAR@(0)),"^",4)
+11 IF VALMCNT<1
QUIT
+12 ;
+13 QUIT
+14 ;
+1 QUIT
+2 ;
EXIT ;CLEAN UP
+1 ; set line to NULL so if user reopens doc it will be recalc'ed
+2 IF $DATA(DVBCSPR)
QUIT
+3 SET VWLINE=""
SET VALMBG=1
+4 ; if normal exit, then leave dvbcvw2
+5 SET VALMBCK="R"
+6 IF '$DATA(QUIT)
QUIT
+7 IF $DATA(QUIT)
DO REMOVE^DVBCLMU5(VWQRY)
+8 KILL ^TMP("DVBC,",$JOB,VWQRY),^TMP("DVBCVIEW",$JOB,VWQRY)
+9 SET VWQRY=VWQRY-1
SET DVBCHLD="DVBCVIEW,"_$JOB_","_VWQRY
+10 IF VWQRY>1
SET VALMCNT=$PIECE(^TMP("DVBCVIEW",$JOB,VWQRY,VWDOC,0),"^",4)
+11 IF VWQRY<3
KILL DVBCJMP,DVBCTEMP
+12 SET QUIT="Y"
+13 SET DVBCCT="Y"
+14 QUIT
+15 ;
EXPAND ;EXPAND ACTION
+1 QUIT
HELP ;DISPLAY HELP
+1 NEW OFFSET,TEXT
+2 DO CLEAR^VALM1
+3 WRITE !,"*** The function keys F9 for 'Print List' and F12 for 'Super Quit' ***"
+4 WRITE !,"*** are available. ***"
+5 FOR OFFSET=1:1
SET TEXT=$PIECE($TEXT(HELPTXT+OFFSET),";;",2,78)
if TEXT="$END"
QUIT
Begin DoDot:1
+6 IF (TEXT="$PAUSE")
DO PAUSE^VALM1
if ('Y)
QUIT
WRITE !
+7 if '(TEXT="$PAUSE")
WRITE !,TEXT
End DoDot:1
+8 DO PAUSE^VALM1
+9 SET VALMBCK="R"
+10 KILL Y
+11 QUIT
HELPTXT ;TEXT FOR HELP
+1 ;;
+2 ;;Available Options Are:
+3 ;;
+4 ;; NX - Next Screen - Scroll down one screen
+5 ;; BU - Previous Screen - Scroll up one screen
+6 ;; UP - Up a Line - Scroll up one line
+7 ;; DN - Down a Line - Scroll down one line
+8 ;; FS - First Screen - Go to top of list
+9 ;; LS - Last Screen - Go to bottom of list
+10 ;; RE - Refresh Screen - Repaint the screen
+11 ;; PS - Print Screen - Print the current screen
+12 ;; PL - Print List - Print Exam or Chapter/Introduction displayed
+13 ;; AD - Auto Display(On/Off) - Turn on/off displaying of available actions
+14 ;; QU - Quit - Exit display screen
+15 ;; SQ - Super Quit - Exit Completely to Menu Option
+16 ;; JMP - Jump to New Exam - Select a New Exam to View
+17 ;;$END
+18 ;
+19 ;
KEYSET ;this sets up the print and super quit function keys
+1 SET XQORM("XLATE","F12")="SQ"
+2 SET XQORM("XLATE","F9")="PL"
+3 QUIT