DGPTCO2 ;ALB/MJK - Census Status Report ; 15 APR 90
;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
;
DIV ; -- ask for div to print
K DGCHOICE("DIV")
I $D(^DG(43,1,"GL")),'$P(^("GL"),U,2) S DGCHOICE("DIV")=1 G DIVQ
S DIC="^DG(40.8,",VAUTNI=2,VAUTSTR="division",VAUTVB="DGCHOICE(""DIV"")"
D FIRST^VAUTOMA,CHK:Y=-1
DIVQ Q
;
CHK ; -- ask how far to ^ out
I DGCHOICE("DIV")=0,'$O(DGCHOICE("DIV",0)) G CHK1
ASK W !!,"Continue using your selection(s)" S %=2 D YN^DICN G CHKQ:%=1
I '% W !?5,"Answer 'YES' to use selections you made or 'NO' to stop process." G ASK
CHK1 K DGCHOICE("DIV")
CHKQ Q
;
STATUS ; -- ask for status to print
K DGCHOICE("STATUS")
S DIR(0)="SA^0:Open;1:Closed;2:Released;3:Transmitted;9:All",DIR("A")="Census Status: ",DIR("B")="All"
S DIR("?",1)="Select one of the following:"
S DIR("?",2)=" 0 - for only 'Open' records"
S DIR("?",3)=" 1 - for only 'Closed' records"
S DIR("?",4)=" 2 - for only 'Released' records"
S DIR("?",5)=" 3 - for only 'Transmitted' records"
S DIR("?")=" OR 9 - to select ALL statuses"
W ! D ^DIR G STATUSQ:$D(DTOUT)!$D(DUOUT)
S DGCHOICE("STATUS")=$P($P(DIR(0),Y_":",2),";")
STATUSQ K DIR Q
;
DGPTCO2 ;ALB/MJK - Census Status Report ; 15 APR 90
+1 ;;5.3;Registration;**1015**;Aug 13, 1993;Build 21
+2 ;
DIV ; -- ask for div to print
+1 KILL DGCHOICE("DIV")
+2 IF $DATA(^DG(43,1,"GL"))
IF '$PIECE(^("GL"),U,2)
SET DGCHOICE("DIV")=1
GOTO DIVQ
+3 SET DIC="^DG(40.8,"
SET VAUTNI=2
SET VAUTSTR="division"
SET VAUTVB="DGCHOICE(""DIV"")"
+4 DO FIRST^VAUTOMA
IF Y=-1
DO CHK
DIVQ QUIT
+1 ;
CHK ; -- ask how far to ^ out
+1 IF DGCHOICE("DIV")=0
IF '$ORDER(DGCHOICE("DIV",0))
GOTO CHK1
ASK WRITE !!,"Continue using your selection(s)"
SET %=2
DO YN^DICN
IF %=1
GOTO CHKQ
+1 IF '%
WRITE !?5,"Answer 'YES' to use selections you made or 'NO' to stop process."
GOTO ASK
CHK1 KILL DGCHOICE("DIV")
CHKQ QUIT
+1 ;
STATUS ; -- ask for status to print
+1 KILL DGCHOICE("STATUS")
+2 SET DIR(0)="SA^0:Open;1:Closed;2:Released;3:Transmitted;9:All"
SET DIR("A")="Census Status: "
SET DIR("B")="All"
+3 SET DIR("?",1)="Select one of the following:"
+4 SET DIR("?",2)=" 0 - for only 'Open' records"
+5 SET DIR("?",3)=" 1 - for only 'Closed' records"
+6 SET DIR("?",4)=" 2 - for only 'Released' records"
+7 SET DIR("?",5)=" 3 - for only 'Transmitted' records"
+8 SET DIR("?")=" OR 9 - to select ALL statuses"
+9 WRITE !
DO ^DIR
IF $DATA(DTOUT)!$DATA(DUOUT)
GOTO STATUSQ
+10 SET DGCHOICE("STATUS")=$PIECE($PIECE(DIR(0),Y_":",2),";")
STATUSQ KILL DIR
QUIT
+1 ;