DGMTO ;ALB/CAW - AGREE TO PAY DEDUCTABLE PRINT ; 8/12/92
;;5.3;Registration;;Aug 13, 1993
;
EN I '$$RANGE(.DGYRAGO,.DGTODAY) G ENQ
S %ZIS="PMQ" D ^%ZIS I POP G ENQ
I '$D(IO("Q")) D START^DGMTO1 G ENQ
S Y=$$QUE
ENQ D:'$D(ZTQUEUED) ^%ZISC
K DGCAT,DGLINE,DGP,DGPAGE,DGSTOP,DGTODAY,DGYRAGO,DGX,VAERR Q
;
RANGE(DGYRAGO,DGTODAY) ; select date range
; input: none
; output: DGYRAGO := begin date
; DGTODAY := end date
; return: was selection made [ 1|yes 0|no]
DATE S (DGYRAGO,DGTODAY)=0
S %DT="PAEX",%DT("A")="Select Beginning Date: "
W ! D ^%DT K %DT G RANGEQ:Y'>0 S DGYRAGO=Y
I DGYRAGO>(DT_.9999) W !," Future dates are not allowed.",*7 K DGBEG G DATE
S %DT="PAEX",%DT("A")="Select Ending Date: "
D ^%DT K %DT G RANGEQ:Y'>0 S DGTODAY=Y_".2359"
I DGTODAY>(DT_.9999) W !," Future dates are not allowed.",*7 K DGBEG G DATE
I DGTODAY<DGYRAGO W !!,"Beginning Date must be prior to Ending Date" G DATE
RANGEQ Q DGTODAY
;
QUE() ; -- que job
; return: did job que [ 1|yes 0|no ]
;
K ZTSK,IO("Q")
S ZTDESC="Agreed to Pay Deductible Listing",ZTRTN="START^DGMTO1"
F X="DGYRAGO","DGTODAY" S ZTSAVE(X)=""
D ^%ZTLOAD W:$D(ZTSK) " (Task: ",ZTSK,")"
Q $D(ZTSK)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HDGMTO 1222 printed Nov 22, 2024@17:55 Page 2
DGMTO ;ALB/CAW - AGREE TO PAY DEDUCTABLE PRINT ; 8/12/92
+1 ;;5.3;Registration;;Aug 13, 1993
+2 ;
EN IF '$$RANGE(.DGYRAGO,.DGTODAY)
GOTO ENQ
+1 SET %ZIS="PMQ"
DO ^%ZIS
IF POP
GOTO ENQ
+2 IF '$DATA(IO("Q"))
DO START^DGMTO1
GOTO ENQ
+3 SET Y=$$QUE
ENQ if '$DATA(ZTQUEUED)
DO ^%ZISC
+1 KILL DGCAT,DGLINE,DGP,DGPAGE,DGSTOP,DGTODAY,DGYRAGO,DGX,VAERR
QUIT
+2 ;
RANGE(DGYRAGO,DGTODAY) ; select date range
+1 ; input: none
+2 ; output: DGYRAGO := begin date
+3 ; DGTODAY := end date
+4 ; return: was selection made [ 1|yes 0|no]
DATE SET (DGYRAGO,DGTODAY)=0
+1 SET %DT="PAEX"
SET %DT("A")="Select Beginning Date: "
+2 WRITE !
DO ^%DT
KILL %DT
if Y'>0
GOTO RANGEQ
SET DGYRAGO=Y
+3 IF DGYRAGO>(DT_.9999)
WRITE !," Future dates are not allowed.",*7
KILL DGBEG
GOTO DATE
+4 SET %DT="PAEX"
SET %DT("A")="Select Ending Date: "
+5 DO ^%DT
KILL %DT
if Y'>0
GOTO RANGEQ
SET DGTODAY=Y_".2359"
+6 IF DGTODAY>(DT_.9999)
WRITE !," Future dates are not allowed.",*7
KILL DGBEG
GOTO DATE
+7 IF DGTODAY<DGYRAGO
WRITE !!,"Beginning Date must be prior to Ending Date"
GOTO DATE
RANGEQ QUIT DGTODAY
+1 ;
QUE() ; -- que job
+1 ; return: did job que [ 1|yes 0|no ]
+2 ;
+3 KILL ZTSK,IO("Q")
+4 SET ZTDESC="Agreed to Pay Deductible Listing"
SET ZTRTN="START^DGMTO1"
+5 FOR X="DGYRAGO","DGTODAY"
SET ZTSAVE(X)=""
+6 DO ^%ZTLOAD
if $DATA(ZTSK)
WRITE " (Task: ",ZTSK,")"
+7 QUIT $DATA(ZTSK)