DVBAUDPRT2 ;ALB/CP - UTL Printing subroutines & extrinsics #2 ; 10/10/18 1:58pm
;;2.7;AMIE;**256**;;Build 19
; Per VHA Directive 6402 this routine should not be modified
; $$UP^XLFSTR ; IA #10104
Q
;
BUSYSET ; Setup the busy indicator
;
SET DVBBUSY=0
W " [|]"
;
Q ; BUSYSET
;
BUSYSHOW ; Update the busy indicator state
;
S DVBBUSY=$G(DVBBUSY)+1#4
W @IOBS,@IOBS ; Executes 2 backspaces
W $S(DVBBUSY=0:"|",DVBBUSY=1:"/",DVBBUSY=2:"-",DVBBUSY=3:"\",1:" "),"]"
;
Q ; BUSYSHOW
;
BUSYKILL ; Break down the busy indicator
;
K DVBBUSY W !
;
Q ; BUSYKILL
;
BUSYTEST ; Test the busy indicator
;
W !,"This is about 20 seconds of a BUSY INDICATOR:"
D BUSYSET
N DVBI F DVBI=1:1:20 H 1 D BUSYSHOW
D BUSYKILL
;
Q ; BUSYTEST
;
DOTS(DVBCURRCNT,DVBDISPCNT) ; Write dots '.....' to the video display every x number
;
S DVBDISPCNT=$G(DVBDISPCNT,100) ;-> Default to every 100 entries
I DVBCURRCNT#DVBDISPCNT=0,$E(IOST)="C" W "."
;
Q ; DOTS
;
SHOWGOAL(DVBRTN) ; Display the purpose or goal of the routine/menu option
;
N DVBCNT,DVBGOALEND,DVBLINENUM,DVBROUTINE,DVBTEXT
; ZEXCEPT: IOF,IOSL
;
S DVBGOALEND="*** END ***"
S DVBLINENUM=1
S DVBCNT=0
S DVBROUTINE="GOAL+"_DVBLINENUM_"^"_DVBRTN
W !
F S DVBTEXT=$P($T(@DVBROUTINE),";;",2,999) Q:DVBTEXT[DVBGOALEND D ;
. I $Y>(IOSL-5) D CONTINUE^DVBAUDPRT1(2,"R") W @IOF
. W !,DVBTEXT
. S DVBLINENUM=DVBLINENUM+1
. S DVBROUTINE="GOAL+"_DVBLINENUM_"^"_DVBRTN
. S DVBCNT=DVBCNT+1
;
D CONTINUE^DVBAUDPRT1(2,"R") ;............. Press <ENTER> to continue
W @IOF
;
Q ; SHOWGOAL
;
SHOWOPT(DVBOPTION) ; Display option DVBTEXT.
;
Q:DVBOPTION=""
W @IOF,!?1,"*** ",$$UP^XLFSTR(DVBOPTION)," ***"
;
Q ; SHOWOPT
;
TRYAGAIN(DVBINPUTVAR) ; Generic user response message to try again or exit.
;
I $A($E(DVBINPUTVAR))>96 W !?6,"Make sure your <CAPS LOCK> key is on.",!
;
; Generic message always displayed to the user on input errors
W !?6,"You may try again, or optionally exit this option by pressing"
W !?6,"<Enter> or entering an up arrow ('^') after returning to the"
W !?6,"first prompt."
;
D CONTINUE^DVBAUDPRT1(2,"R") ; Press <ENTER> to continue
S DVBQUIT=1 ; Set output status flag to unsuccessful
;
Q ; TRYAGAIN
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDVBAUDPRT2 2302 printed Sep 17, 2026@20:27:28 Page 2
DVBAUDPRT2 ;ALB/CP - UTL Printing subroutines & extrinsics #2 ; 10/10/18 1:58pm
+1 ;;2.7;AMIE;**256**;;Build 19
+2 ; Per VHA Directive 6402 this routine should not be modified
+3 ; $$UP^XLFSTR ; IA #10104
+4 QUIT
+5 ;
BUSYSET ; Setup the busy indicator
+1 ;
+2 SET DVBBUSY=0
+3 WRITE " [|]"
+4 ;
+5 ; BUSYSET
QUIT
+6 ;
BUSYSHOW ; Update the busy indicator state
+1 ;
+2 SET DVBBUSY=$GET(DVBBUSY)+1#4
+3 ; Executes 2 backspaces
WRITE @IOBS,@IOBS
+4 WRITE $SELECT(DVBBUSY=0:"|",DVBBUSY=1:"/",DVBBUSY=2:"-",DVBBUSY=3:"\",1:" "),"]"
+5 ;
+6 ; BUSYSHOW
QUIT
+7 ;
BUSYKILL ; Break down the busy indicator
+1 ;
+2 KILL DVBBUSY
WRITE !
+3 ;
+4 ; BUSYKILL
QUIT
+5 ;
BUSYTEST ; Test the busy indicator
+1 ;
+2 WRITE !,"This is about 20 seconds of a BUSY INDICATOR:"
+3 DO BUSYSET
+4 NEW DVBI
FOR DVBI=1:1:20
HANG 1
DO BUSYSHOW
+5 DO BUSYKILL
+6 ;
+7 ; BUSYTEST
QUIT
+8 ;
DOTS(DVBCURRCNT,DVBDISPCNT) ; Write dots '.....' to the video display every x number
+1 ;
+2 ;-> Default to every 100 entries
SET DVBDISPCNT=$GET(DVBDISPCNT,100)
+3 IF DVBCURRCNT#DVBDISPCNT=0
IF $EXTRACT(IOST)="C"
WRITE "."
+4 ;
+5 ; DOTS
QUIT
+6 ;
SHOWGOAL(DVBRTN) ; Display the purpose or goal of the routine/menu option
+1 ;
+2 NEW DVBCNT,DVBGOALEND,DVBLINENUM,DVBROUTINE,DVBTEXT
+3 ; ZEXCEPT: IOF,IOSL
+4 ;
+5 SET DVBGOALEND="*** END ***"
+6 SET DVBLINENUM=1
+7 SET DVBCNT=0
+8 SET DVBROUTINE="GOAL+"_DVBLINENUM_"^"_DVBRTN
+9 WRITE !
+10 ;
FOR
SET DVBTEXT=$PIECE($TEXT(@DVBROUTINE),";;",2,999)
if DVBTEXT[DVBGOALEND
QUIT
Begin DoDot:1
+11 IF $Y>(IOSL-5)
DO CONTINUE^DVBAUDPRT1(2,"R")
WRITE @IOF
+12 WRITE !,DVBTEXT
+13 SET DVBLINENUM=DVBLINENUM+1
+14 SET DVBROUTINE="GOAL+"_DVBLINENUM_"^"_DVBRTN
+15 SET DVBCNT=DVBCNT+1
End DoDot:1
+16 ;
+17 ;............. Press <ENTER> to continue
DO CONTINUE^DVBAUDPRT1(2,"R")
+18 WRITE @IOF
+19 ;
+20 ; SHOWGOAL
QUIT
+21 ;
SHOWOPT(DVBOPTION) ; Display option DVBTEXT.
+1 ;
+2 if DVBOPTION=""
QUIT
+3 WRITE @IOF,!?1,"*** ",$$UP^XLFSTR(DVBOPTION)," ***"
+4 ;
+5 ; SHOWOPT
QUIT
+6 ;
TRYAGAIN(DVBINPUTVAR) ; Generic user response message to try again or exit.
+1 ;
+2 IF $ASCII($EXTRACT(DVBINPUTVAR))>96
WRITE !?6,"Make sure your <CAPS LOCK> key is on.",!
+3 ;
+4 ; Generic message always displayed to the user on input errors
+5 WRITE !?6,"You may try again, or optionally exit this option by pressing"
+6 WRITE !?6,"<Enter> or entering an up arrow ('^') after returning to the"
+7 WRITE !?6,"first prompt."
+8 ;
+9 ; Press <ENTER> to continue
DO CONTINUE^DVBAUDPRT1(2,"R")
+10 ; Set output status flag to unsuccessful
SET DVBQUIT=1
+11 ;
+12 ; TRYAGAIN
QUIT