DDS3 ;SFISC/MLH-COMMAND UTILS ;9:02 AM 6 Feb 1996
;;22.0;VA FileMan;;Mar 30, 1999
;Per VHA Directive 10-93-142, this routine should not be modified.
I Y(0)]"","ECNRS"[$E(Y(0)) D @$E(Y(0))
Q
;
S ;Save the form
D ^DDS4,R^DDSR
D:$D(DDSBR)#2 BR^DDS2
Q
;
R ;Repaint all pages on current screen
;Called after wp, mults, and deletions
G R^DDSR
;
E ;
I DDSSC>1!'DDSCHG!$P(DDSSC(DDSSC),U,4) S DDACT="Q" Q
S DDM=1
K DIR S DIR(0)="YO"
S DIR("A")=$$EZBLD^DIALOG(8075)
D BLD^DIALOG(9037,"","","DIR(""?"")")
S DIR0=IOSL-1_U_($L(DIR("A"))+1)_"^3^"_(IOSL-1)_"^0"
D ^DIR
K DIR,DUOUT,DIROUT,DIRUT
;
I Y=0!$D(DTOUT)!$D(DUOUT) D QT Q
I Y="" S DDACT="N" Q
I Y=1 D EX
Q
;
C ;Close
S DDACT="Q"
Q
;
N ;Next page
S:DDSNP]"" DDSPG=DDSNP,DDACT="NP"
Q
;
QT ;Exit, don't save
I $G(DDSDN)=1,DDO G ERR3
S DDACT="Q"
I DDSSC>1!$G(DDSSEL)!$P(DDSSC(DDSSC),U,4) D MSG1 Q
Q:'DDSCHG
D DEL^DDS6
S DX=0,DY=IOSL-1 X IOXY
W $P(DDGLCLR,DDGLDEL),$S($D(DTOUT):$$EZBLD^DIALOG(8076),1:"")_$$EZBLD^DIALOG(8077) H 1
Q
;
EX ;Exit, save
I $G(DDSDN)=1,DDO G ERR3
S DDACT="Q"
I DDSSC>1!$G(DDSSEL)!$P(DDSSC(DDSSC),U,4) D MSG1 Q
D ^DDS4 I 'Y S DDACT="N" D R D:$D(DDSBR)#2 BR^DDS2
Q
;
CL ;Close
I $G(DDSDN)=1,DDO G ERR3
G E
;
TO ;Time-out
I DDO,$G(DDSDN) S DDACT="N" G CURSOR^DDS01
I DDO S DDSOSV=DDO,DDO=0
E D E
Q
;
MSG1 ;Print closing page message
S DX=0,DY=IOSL-1 X IOXY
W $P(DDGLCLR,DDGLDEL)_"Closing page..." H 1
Q
;
ERR3 ;
D MSG^DDSMSG("Since navigation for the block is disabled, that key sequence is disabled.",1)
S DDACT="N"
Q
;
;#8075 Save changes before leaving form (Y/N)?
;#8076 Time out.
;#8077 Changes not saved!
;#9037 Enter 'Y' to save before exiting...(3 lines)
DDS3 ;SFISC/MLH-COMMAND UTILS ;9:02 AM 6 Feb 1996
+1 ;;22.0;VA FileMan;;Mar 30, 1999
+2 ;Per VHA Directive 10-93-142, this routine should not be modified.
+3 IF Y(0)]""
IF "ECNRS"[$EXTRACT(Y(0))
DO @$EXTRACT(Y(0))
+4 QUIT
+5 ;
S ;Save the form
+1 DO ^DDS4
DO R^DDSR
+2 IF $DATA(DDSBR)#2
DO BR^DDS2
+3 QUIT
+4 ;
R ;Repaint all pages on current screen
+1 ;Called after wp, mults, and deletions
+2 GOTO R^DDSR
+3 ;
E ;
+1 IF DDSSC>1!'DDSCHG!$PIECE(DDSSC(DDSSC),U,4)
SET DDACT="Q"
QUIT
+2 SET DDM=1
+3 KILL DIR
SET DIR(0)="YO"
+4 SET DIR("A")=$$EZBLD^DIALOG(8075)
+5 DO BLD^DIALOG(9037,"","","DIR(""?"")")
+6 SET DIR0=IOSL-1_U_($LENGTH(DIR("A"))+1)_"^3^"_(IOSL-1)_"^0"
+7 DO ^DIR
+8 KILL DIR,DUOUT,DIROUT,DIRUT
+9 ;
+10 IF Y=0!$DATA(DTOUT)!$DATA(DUOUT)
DO QT
QUIT
+11 IF Y=""
SET DDACT="N"
QUIT
+12 IF Y=1
DO EX
+13 QUIT
+14 ;
C ;Close
+1 SET DDACT="Q"
+2 QUIT
+3 ;
N ;Next page
+1 IF DDSNP]""
SET DDSPG=DDSNP
SET DDACT="NP"
+2 QUIT
+3 ;
QT ;Exit, don't save
+1 IF $GET(DDSDN)=1
IF DDO
GOTO ERR3
+2 SET DDACT="Q"
+3 IF DDSSC>1!$GET(DDSSEL)!$PIECE(DDSSC(DDSSC),U,4)
DO MSG1
QUIT
+4 IF 'DDSCHG
QUIT
+5 DO DEL^DDS6
+6 SET DX=0
SET DY=IOSL-1
XECUTE IOXY
+7 WRITE $PIECE(DDGLCLR,DDGLDEL),$SELECT($DATA(DTOUT):$$EZBLD^DIALOG(8076),1:"")_$$EZBLD^DIALOG(8077)
HANG 1
+8 QUIT
+9 ;
EX ;Exit, save
+1 IF $GET(DDSDN)=1
IF DDO
GOTO ERR3
+2 SET DDACT="Q"
+3 IF DDSSC>1!$GET(DDSSEL)!$PIECE(DDSSC(DDSSC),U,4)
DO MSG1
QUIT
+4 DO ^DDS4
IF 'Y
SET DDACT="N"
DO R
IF $DATA(DDSBR)#2
DO BR^DDS2
+5 QUIT
+6 ;
CL ;Close
+1 IF $GET(DDSDN)=1
IF DDO
GOTO ERR3
+2 GOTO E
+3 ;
TO ;Time-out
+1 IF DDO
IF $GET(DDSDN)
SET DDACT="N"
GOTO CURSOR^DDS01
+2 IF DDO
SET DDSOSV=DDO
SET DDO=0
+3 IF '$TEST
DO E
+4 QUIT
+5 ;
MSG1 ;Print closing page message
+1 SET DX=0
SET DY=IOSL-1
XECUTE IOXY
+2 WRITE $PIECE(DDGLCLR,DDGLDEL)_"Closing page..."
HANG 1
+3 QUIT
+4 ;
ERR3 ;
+1 DO MSG^DDSMSG("Since navigation for the block is disabled, that key sequence is disabled.",1)
+2 SET DDACT="N"
+3 QUIT
+4 ;
+5 ;#8075 Save changes before leaving form (Y/N)?
+6 ;#8076 Time out.
+7 ;#8077 Changes not saved!
+8 ;#9037 Enter 'Y' to save before exiting...(3 lines)