ACHSEBAT ; IHS/ITSC/PMF - PRINT EOBRS BY BATCH DATE ; [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
;
W $G(IORVON),!!,"THIS REPORT WILL ONLY INCLUDE PROCESSED DOCUMENTS. ANY UNPROCESSED",!,"DOCUMENT WILL HAVE TO BE PRINTED USING ANOTHER OPTION.",$G(IORVOFF),!!
K ACHSSEL ;KILL SELECTION ARRAY
S (ACHSBAT,ACHSX)=0
I '$D(ACHSFC) D ^ACHSVAR
BATCH ;
F S ACHSBAT=$O(^ACHSF(DUZ(2),"EOBD",ACHSBAT)) Q:ACHSBAT="" S ACHSX=ACHSX+1,ACHSSEL(ACHSX)=ACHSBAT
BATSEL ;
I ACHSX=0 D BATNO Q
I ACHSX=1 S ACHSBAT=ACHSSEL(1) S ACHSDIEN=0 D START Q
W !
S ACHSY=0
F I=1:1:ACHSX W !?25,$J(I_".",3),?35,$$FMTE^XLFDT(9999999-ACHSSEL(I)) S ACHSY=ACHSY+1 I ACHSY#10=0 W !!,"Press <RETURN> To Continue or '^'",!! D READ^ACHSFU Q:Y?1N.N!($D(DUOUT))
S Y=$$DIR^XBDIR("LO^1:"_ACHSY,"ENTER NUMBER OF SELECTION","","","","",1)
I Y=""!($D(DUOUT))!($D(DTOUT))!($D(DIRUT)) D BATEND Q
S ACHSBAT=ACHSSEL(+Y)
DEV ;
W !!
S %ZIS="P"
D ^%ZIS
S ACHSEOIO=IO
I POP D BATEND Q
S IOSL=66
D BRPT^ACHSFU ;ASKS FOR DEVICE (%ZIS)
K ACHSSEL ;KILL THE SELECTION ARRAY
D START
Q
START ;
S ACHSDIEN=0
BATPRT ;
F S ACHSDIEN=$O(^ACHSF(DUZ(2),"EOBD",ACHSBAT,ACHSDIEN)) Q:+ACHSDIEN=0 D
.S ACHSTIEN=0
.F S ACHSTIEN=$O(^ACHSF(DUZ(2),"EOBD",ACHSBAT,ACHSDIEN,ACHSTIEN)) Q:+ACHSTIEN=0 D
..D ^ACHSEOBA,^ACHSEOB2
D BATEND
Q
BATNO ;
W !!,"NO EOBRS PROCESSED FOR THIS DATE",!!
D RTRN^ACHS
;
BATEND ;
D ^%ZISC,EN^XBVK("ACHS"),^ACHSVAR
Q
;
ACHSEBAT ; IHS/ITSC/PMF - PRINT EOBRS BY BATCH DATE ; [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
+2 ;
+3 WRITE $GET(IORVON),!!,"THIS REPORT WILL ONLY INCLUDE PROCESSED DOCUMENTS. ANY UNPROCESSED",!,"DOCUMENT WILL HAVE TO BE PRINTED USING ANOTHER OPTION.",$GET(IORVOFF),!!
+4 ;KILL SELECTION ARRAY
KILL ACHSSEL
+5 SET (ACHSBAT,ACHSX)=0
+6 IF '$DATA(ACHSFC)
DO ^ACHSVAR
BATCH ;
+1 FOR
SET ACHSBAT=$ORDER(^ACHSF(DUZ(2),"EOBD",ACHSBAT))
IF ACHSBAT=""
QUIT
SET ACHSX=ACHSX+1
SET ACHSSEL(ACHSX)=ACHSBAT
BATSEL ;
+1 IF ACHSX=0
DO BATNO
QUIT
+2 IF ACHSX=1
SET ACHSBAT=ACHSSEL(1)
SET ACHSDIEN=0
DO START
QUIT
+3 WRITE !
+4 SET ACHSY=0
+5 FOR I=1:1:ACHSX
WRITE !?25,$JUSTIFY(I_".",3),?35,$$FMTE^XLFDT(9999999-ACHSSEL(I))
SET ACHSY=ACHSY+1
IF ACHSY#10=0
WRITE !!,"Press <RETURN> To Continue or '^'",!!
DO READ^ACHSFU
IF Y?1N.N!($DATA(DUOUT))
QUIT
+6 SET Y=$$DIR^XBDIR("LO^1:"_ACHSY,"ENTER NUMBER OF SELECTION","","","","",1)
+7 IF Y=""!($DATA(DUOUT))!($DATA(DTOUT))!($DATA(DIRUT))
DO BATEND
QUIT
+8 SET ACHSBAT=ACHSSEL(+Y)
DEV ;
+1 WRITE !!
+2 SET %ZIS="P"
+3 DO ^%ZIS
+4 SET ACHSEOIO=IO
+5 IF POP
DO BATEND
QUIT
+6 SET IOSL=66
+7 ;ASKS FOR DEVICE (%ZIS)
DO BRPT^ACHSFU
+8 ;KILL THE SELECTION ARRAY
KILL ACHSSEL
+9 DO START
+10 QUIT
START ;
+1 SET ACHSDIEN=0
BATPRT ;
+1 FOR
SET ACHSDIEN=$ORDER(^ACHSF(DUZ(2),"EOBD",ACHSBAT,ACHSDIEN))
IF +ACHSDIEN=0
QUIT
Begin DoDot:1
+2 SET ACHSTIEN=0
+3 FOR
SET ACHSTIEN=$ORDER(^ACHSF(DUZ(2),"EOBD",ACHSBAT,ACHSDIEN,ACHSTIEN))
IF +ACHSTIEN=0
QUIT
Begin DoDot:2
+4 DO ^ACHSEOBA
DO ^ACHSEOB2
End DoDot:2
End DoDot:1
+5 DO BATEND
+6 QUIT
BATNO ;
+1 WRITE !!,"NO EOBRS PROCESSED FOR THIS DATE",!!
+2 DO RTRN^ACHS
+3 ;
BATEND ;
+1 DO ^%ZISC
DO EN^XBVK("ACHS")
DO ^ACHSVAR
+2 QUIT
+3 ;