AQAOAPC ; IHS/ORDC/LJF - REOPEN CLOSED ACTION PLANS ;
;;1.01;QAI MANAGEMENT;;OCT 05, 1995
;
;This rtn contains code for reopening a closed or deleted action
;plan. An action plan is closed or deleted in rtn ^AQAOAPA during
;the edit action plan process.
;
Q
;
EXIT ; >> eoj
D KILL^AQAOUTIL Q
;
;
REOPEN ;ENTRY POINT for option to reopen a closed action plan
;called by option AQAO ACTPLAN REOPEN
;
; >>> ask user to select an action plan to reopen
W !! K DIC S DIC="^AQAO(5,",DIC(0)="AEMZQ",AQAOINAC=""
S DIC("S")="D ACTCHK^AQAOSEC I $D(AQAOCHK(""OK""))"
S DIC("A")="Enter ACTION PLAN NUMBER: "
D ^DIC K AQAOCHK("OK") W ! G EXIT:X="",EXIT:X=U,REOPEN:Y=-1
S AQAOPLAN=+Y K AQAOINAC
;
; >>> drop user into editing the action plan
W !! L +^AQAO(5,AQAOPLAN):1 I '$T D G REOPEN
.W !!,"CANNOT REOPEN; ANOTHER USER HAS ENTRY LOCKED. TRY AGAIN!",!
K DIE S DIE="^AQAO(5,",DA=AQAOPLAN,DR="[AQAO ACT REOPEN]" D ^DIE
L -^AQAO(5,AQAOPLAN) G EXIT:$D(DTOUT),EXIT:$D(DUOUT),REOPEN
;
;
;
MSG1 ;ENTRY POINT for message on deleted plans
;called by input template AQAO ACT REOPEN
W !!,"CANNOT REOPEN DELETED ACTION PLAN!!"
W !!,"USE UPDATE OPTION TO CHANGE PLAN STATUS TO OTHER THAN DELETED!"
W ! Q
;
;
;
MSG2 ;ENTRY POINT for message about reopening action plan
;called by input template AQAO ACT REOPEN
W !!,"REOPENING ACTION PLAN . . ."
W !,"DELETING DATE CLOSED . . ."
W !,"DELETING CLOSED OUT BY . . ."
W !,"ACTION PLAN IS NOW AVAILABLE FOR EDITING. USE UPDATE OPTION."
W ! Q
;
;
;
MSG3 ;ENTRY POINT for messge that plan is not a closed one
;called by input template AQAOACT REOPEN
W !!,"This Action Plan is NOT CLOSED. No need to reopen.",! Q
AQAOAPC ; IHS/ORDC/LJF - REOPEN CLOSED ACTION PLANS ;
+1 ;;1.01;QAI MANAGEMENT;;OCT 05, 1995
+2 ;
+3 ;This rtn contains code for reopening a closed or deleted action
+4 ;plan. An action plan is closed or deleted in rtn ^AQAOAPA during
+5 ;the edit action plan process.
+6 ;
+7 QUIT
+8 ;
EXIT ; >> eoj
+1 DO KILL^AQAOUTIL
QUIT
+2 ;
+3 ;
REOPEN ;ENTRY POINT for option to reopen a closed action plan
+1 ;called by option AQAO ACTPLAN REOPEN
+2 ;
+3 ; >>> ask user to select an action plan to reopen
+4 WRITE !!
KILL DIC
SET DIC="^AQAO(5,"
SET DIC(0)="AEMZQ"
SET AQAOINAC=""
+5 SET DIC("S")="D ACTCHK^AQAOSEC I $D(AQAOCHK(""OK""))"
+6 SET DIC("A")="Enter ACTION PLAN NUMBER: "
+7 DO ^DIC
KILL AQAOCHK("OK")
WRITE !
IF X=""
GOTO EXIT
IF X=U
GOTO EXIT
IF Y=-1
GOTO REOPEN
+8 SET AQAOPLAN=+Y
KILL AQAOINAC
+9 ;
+10 ; >>> drop user into editing the action plan
+11 WRITE !!
LOCK +^AQAO(5,AQAOPLAN):1
IF '$TEST
Begin DoDot:1
+12 WRITE !!,"CANNOT REOPEN; ANOTHER USER HAS ENTRY LOCKED. TRY AGAIN!",!
End DoDot:1
GOTO REOPEN
+13 KILL DIE
SET DIE="^AQAO(5,"
SET DA=AQAOPLAN
SET DR="[AQAO ACT REOPEN]"
DO ^DIE
+14 LOCK -^AQAO(5,AQAOPLAN)
IF $DATA(DTOUT)
GOTO EXIT
IF $DATA(DUOUT)
GOTO EXIT
GOTO REOPEN
+15 ;
+16 ;
+17 ;
MSG1 ;ENTRY POINT for message on deleted plans
+1 ;called by input template AQAO ACT REOPEN
+2 WRITE !!,"CANNOT REOPEN DELETED ACTION PLAN!!"
+3 WRITE !!,"USE UPDATE OPTION TO CHANGE PLAN STATUS TO OTHER THAN DELETED!"
+4 WRITE !
QUIT
+5 ;
+6 ;
+7 ;
MSG2 ;ENTRY POINT for message about reopening action plan
+1 ;called by input template AQAO ACT REOPEN
+2 WRITE !!,"REOPENING ACTION PLAN . . ."
+3 WRITE !,"DELETING DATE CLOSED . . ."
+4 WRITE !,"DELETING CLOSED OUT BY . . ."
+5 WRITE !,"ACTION PLAN IS NOW AVAILABLE FOR EDITING. USE UPDATE OPTION."
+6 WRITE !
QUIT
+7 ;
+8 ;
+9 ;
MSG3 ;ENTRY POINT for messge that plan is not a closed one
+1 ;called by input template AQAOACT REOPEN
+2 WRITE !!,"This Action Plan is NOT CLOSED. No need to reopen.",!
QUIT