Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: ACHSEBAT

ACHSEBAT.m

Go to the documentation of this file.
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
 ;