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

FBAABT.m

Go to the documentation of this file.
FBAABT ;AISC/CMR - OUTPUT FOR BATCHES ;3/28/2012
 ;;3.5;FEE BASIS;**132**;JAN 30, 1995;Build 17
 ;;Per VHA Directive 2004-038, this routine should not be modified.
 S FBSTAT=0,DIR(0)="YA",DIR("A")="Do you want to print ALL Fee Basis Batch Status':  ",DIR("B")="No" D ^DIR K DIR Q:$D(DIRUT)  I Y S FBSTAT=1 D
 .F J="C","S","O","T","P","A","R" S FBSTAT(J)=$S(J="C":"CLERK CLOSED",J="S":"SUPERVISOR CLOSED",J="O":"OPEN",J="T":"TRANSMITTED",J="P":"FORWARDED TO PRICER",J="A":"ASSIGNED PRICE",J="R":"REVIEWED AFTER PRICER")
 .S FBSTAT("F")="CENTRAL FEE ACCEPTED"
SEL I 'FBSTAT D   D ^DIR K DIR G END:$D(DIRUT) S FBSTAT(Y)=Y(0)
 . S DIR(0)="S^O:OPEN;C:CLERK CLOSED;S:SUPERVISOR CLOSED;P:FORWARDED TO PRICER;A:ASSIGNED PRICE;R:REVIEWED AFTER PRICER;T:TRANSMITTED;F:CENTRAL FEE ACCEPTED"
 . S DIR("A")="Select STATUS to print"
 I 'FBSTAT S DIR(0)="YA",DIR("A")="Do you want to select another STATUS:  ",DIR("B")="No" D ^DIR K DIR G END:$D(DIRUT),SEL:Y
 S (J,VAR,VAL)="" F  S J=$O(FBSTAT(J)) Q:J=""  S VAR="FBSTAT(",VAL=VAR
 S PGM="START^FBAABT" D ZIS^FBAAUTL G END:FBPOP
 ;
START K ^TMP($J,"FBBATO") S (FBST,FBCHK)="",(FBIEN,FBAAOUT)=0,Q="-",$P(Q,"-",17)="-",QQ="=",$P(QQ,"=",80)="=" U IO W:$E(IOST,1,2)["C-" @IOF D HED
 F  S FBST=$O(FBSTAT(FBST)) Q:FBST=""  F  S FBIEN=$O(^FBAA(161.7,"AC",FBST,FBIEN)) Q:FBIEN'>0  D
 .Q:'$D(^FBAA(161.7,FBIEN,0))  S FB(0)=^FBAA(161.7,FBIEN,0),FBBAT=+FB(0),FBDT=+$P(FB(0),"^",4),FBCLK=+$P(FB(0),"^",5),FBTYPE=$P(FB(0),"^",3) S ^TMP($J,"FBBATO",FBST,FBIEN)=FBBAT_"^"_FBDT_"^"_FBCLK_"^"_FBTYPE
 S FBST="",FBIEN=0
 F  S FBST=$O(^TMP($J,"FBBATO",FBST)) Q:FBST=""!(FBAAOUT)  F  S FBIEN=$O(^TMP($J,"FBBATO",FBST,FBIEN)) Q:FBIEN'>0!(FBAAOUT)  D
 .S FB(0)=^TMP($J,"FBBATO",FBST,FBIEN),FBBAT=+FB(0),FBDT=$P(FB(0),"^",2),FBCLK=+$P(FB(0),"^",3),FBTYPE=$P(FB(0),"^",4) D PRINT
END K FBAAOUT,FBSTAT,FBST,FBIEN,FBBAT,FBDT,FBCLK,FB(0),FBCHK,FBTYPE,J,Q,QQ,^TMP($J,"FBBATO") D CLOSE^FBAAUTL
 Q
PRINT I $Y+5>IOSL,($E(IOST,1,2)["C-") S DIR(0)="E" D ^DIR K DIR I 'Y S FBAAOUT=1 Q
 I $Y+5>IOSL W @IOF D HED
 I FBST'=FBCHK D HED1 S FBCHK=FBST
 W !?2,FBBAT,?9,$S(FBTYPE="B3":"MEDICAL & STAT PAYMENTS",FBTYPE="B5":"HOMETOWN PHARMACY PAYMENTS",FBTYPE="B2":"TRAVEL PAYMENTS",FBTYPE="B9":"CH/CNH",1:""),?38,$$DATX^FBAAUTL(FBDT),?50,$P(^VA(200,FBCLK,0),"^")
 Q
HED W !?30,"STATUS OF BATCHES",!?30,Q
 W !!!?1,"BATCH #",?12,"BATCH TYPE",?36,"DATE OPENED",?55,"CLERK",!,QQ
 Q
HED1 W !!,"STATUS:  ",FBSTAT(FBST),!
 Q