source: WorldVistAEHR/trunk/r/FEE_BASIS-FB/FBUCSTAT.m@ 1524

Last change on this file since 1524 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 3.3 KB
Line 
1FBUCSTAT ;AISC/DMK-UNAUTHORIZED CLAIM STATS ;6/27/01
2 ;;3.5;FEE BASIS;**32,64**;JAN 30, 1995
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 N FBPOP,PGM,Q,VAL,VAR S Q="",$P(Q,"-",80)="-"
5 W !!?14,"UNAUTHORIZED CLAIM DISPOSITION AND STATUS STATISTICS",!?14,$E(Q,1,52),!
6 ; ask if report for just mill-bill (1725) or just non-mill bill claims
7 S FB1725R=$$ASKMB^FBUCUTL9 I FB1725R="" G END
8 D DATE^FBAAUTL G END:FBPOP S FBBEG=BEGDATE,FBEND=ENDDATE
9 S VAR="FBBEG^FBEND^FB1725R",VAL=FBBEG_"^"_FBEND,PGM="START^FBUCSTAT" D ZIS^FBAAUTL G END:FBPOP
10START ;Entry point for tasked job
11 U IO S Q="",$P(Q,"-",80)="-"
12 S Y=FBBEG D PDF^FBAAUTL S FBSTART=Y,Y=FBEND D PDF^FBAAUTL S FBFINISH=Y D HED
13 S FBD(99)=0 F I=1:1:5 S FBD(I)=0 F J=40,70,90 S FBD(I,J)=0
14 F I=5,10,20,30,50,55,60,80 S FBD(99,I)=0
15 S FBUC=$$FBUC^FBUCUTL2(1)
16 S FBBEG=FBBEG-.1 F I=FBBEG:0 S I=$O(^FB583("B",I)) Q:I'>0!(I>FBEND) F J=0:0 S J=$O(^FB583("B",I,J)) Q:J'>0 I $D(^FB583(J,0)) S FB(0)=^(0),FBS=$$ORDER^FBUCUTL(+$P(FB(0),"^",24)) I FBS D
17 .; if user requested just mill-bill (1725) or non-mill bill claims then
18 .; check claim and skip when appropriate
19 .Q:$S(FB1725R="M"&'+$P(FB(0),U,28):1,FB1725R="N"&+$P(FB(0),U,28):1,1:0)
20 .S FBD=+$P(FB(0),"^",11) S PSA=+$P(FB(0),"^",7) S:PSA=0 PSA="OTHER" S:'$D(FB(PSA)) FB(PSA)=0
21 .I "^5^10^30^50^55^60^80^"[(U_FBS_U) S FBD(99,FBS)=FBD(99,FBS)+1,FBD(99)=FBD(99)+1
22 .I "^40^70^90^"[(U_FBS_U) Q:'FBD S FBD(FBD,FBS)=FBD(FBD,FBS)+1,FBD(FBD)=FBD(FBD)+1
23 .;Q:'$$PAY^FBUCUTL(J,"FB583")
24 .S FB("PD")=$$AMTPD^FBUCMBS(J)
25 .S FB(PSA)=FB(PSA)+FB("PD")
26 W !?50,"CATEGORY OF DISPOSITION",!?3,"TYPE OF",?31,"# OF",!?3,"DISPOSITION",?31,"CLAIMS",?45,"INITIAL",?57,"APPEAL",?69,"COVA APPEAL",!,Q,!
27 S FBD=0,FB="0^0^0^0"
28 F S FBD=$O(^FB(162.91,FBD)) Q:FBD'>0 I $D(^FB(162.91,FBD,0)) W !,?3,$P(^(0),"^"),?32,$J(FBD(FBD),5) S $P(FB,"^")=$P(FB,"^")+FBD(FBD),FBS=0 D
29 .F S FBS=$O(FBD(FBD,FBS)) Q:FBS'>0 W ?$S(FBS=40:45,FBS=70:57,1:69),$J(FBD(FBD,FBS),5) S X=$S(FBS=40:2,FBS=70:3,1:4),$P(FB,"^",X)=$P(FB,"^",X)+FBD(FBD,FBS)
30 W !,?32,"-----",?45,"-----",?57,"-----",?69,"-----",!?9,"TOTAL DISPOSITIONED",?32,$J($P(FB,"^"),5),?45,$J($P(FB,"^",2),5),?57,$J($P(FB,"^",3),5),?69,$J($P(FB,"^",4),5)
31 W !?5,"TOTAL NOT DISPOSITIONED",?32,$J(FBD(99),5),!?32,"-----",!?16,"TOTAL CLAIMS",?32,$J(FB+FBD(99),5)
32 I $P(IOST,"-")="C" W ! D HANG^FBAAUTL1 G END:$D(DIRUT) D HED
33 W !!?3,"STATUS OF CLAIMS NOT DISPOSITIONED",!!?3,"STATUS",?40,"# OF CLAIMS",!
34 S FBS=0 F S FBS=$O(FBD(99,FBS)) Q:FBS'>0 D
35 .I FBS=5,'$P(FBUC,U,7)&(FBD(99,FBS)=0) Q
36 .W !?3,$P($G(^FB(162.92,$$STATUS^FBUCUTL(FBS),0)),"^"),?40,$J(FBD(99,FBS),5)
37 I $P(IOST,"-")="C" W ! D HANG^FBAAUTL1 G END:$D(DIRUT) D HED
38 W !!?3,"TOTAL DOLLARS APPROVED BY PSA:",!
39 S FB=0,PSA=0 F S PSA=$O(FB(PSA)) Q:PSA="PD"!(PSA="") W !?3,$P($G(^DIC(4,PSA,0)),"^") W:PSA="OTHER" PSA S X=FB(PSA),X2="2$",FB=FB+X D COMMA^%DTC W ?34,X
40 S X=FB,X2="2$",Y="" D COMMA^%DTC W !?32,"-------------",!?34,X
41END K DIRUT,I,J,Q,X,X2,PSA,FBBEG,FBEND,FBSTART,FBFINISH,FBD,FBUC,BEGDATE,ENDDATE,Y,FBS,FB1725R,FB
42 D CLOSE^FBAAUTL Q
43HED W:$P(IOST,"-")="C" @IOF W !?14,"UNAUTHORIZED CLAIM DISPOSITION AND STATUS STATISTICS",!?14,$E(Q,1,52)
44MB I FB1725R'="A" W !?17,$S(FB1725R="M":"for 38 U.S.C. 1725 Claims",1:"excluding 38 U.S.C. 1725 Claims")
45DAT W !?17,"Date Range Selected: ",FBSTART," to ",FBFINISH,!?17,$E(Q,1,41),!
46 Q
Note: See TracBrowser for help on using the repository browser.