47 lines
3.3 KiB
Mathematica
47 lines
3.3 KiB
Mathematica
FBUCSTAT ;AISC/DMK-UNAUTHORIZED CLAIM STATS ;6/27/01
|
|
;;3.5;FEE BASIS;**32,64**;JAN 30, 1995
|
|
;;Per VHA Directive 10-93-142, this routine should not be modified.
|
|
N FBPOP,PGM,Q,VAL,VAR S Q="",$P(Q,"-",80)="-"
|
|
W !!?14,"UNAUTHORIZED CLAIM DISPOSITION AND STATUS STATISTICS",!?14,$E(Q,1,52),!
|
|
; ask if report for just mill-bill (1725) or just non-mill bill claims
|
|
S FB1725R=$$ASKMB^FBUCUTL9 I FB1725R="" G END
|
|
D DATE^FBAAUTL G END:FBPOP S FBBEG=BEGDATE,FBEND=ENDDATE
|
|
S VAR="FBBEG^FBEND^FB1725R",VAL=FBBEG_"^"_FBEND,PGM="START^FBUCSTAT" D ZIS^FBAAUTL G END:FBPOP
|
|
START ;Entry point for tasked job
|
|
U IO S Q="",$P(Q,"-",80)="-"
|
|
S Y=FBBEG D PDF^FBAAUTL S FBSTART=Y,Y=FBEND D PDF^FBAAUTL S FBFINISH=Y D HED
|
|
S FBD(99)=0 F I=1:1:5 S FBD(I)=0 F J=40,70,90 S FBD(I,J)=0
|
|
F I=5,10,20,30,50,55,60,80 S FBD(99,I)=0
|
|
S FBUC=$$FBUC^FBUCUTL2(1)
|
|
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
|
|
.; if user requested just mill-bill (1725) or non-mill bill claims then
|
|
.; check claim and skip when appropriate
|
|
.Q:$S(FB1725R="M"&'+$P(FB(0),U,28):1,FB1725R="N"&+$P(FB(0),U,28):1,1:0)
|
|
.S FBD=+$P(FB(0),"^",11) S PSA=+$P(FB(0),"^",7) S:PSA=0 PSA="OTHER" S:'$D(FB(PSA)) FB(PSA)=0
|
|
.I "^5^10^30^50^55^60^80^"[(U_FBS_U) S FBD(99,FBS)=FBD(99,FBS)+1,FBD(99)=FBD(99)+1
|
|
.I "^40^70^90^"[(U_FBS_U) Q:'FBD S FBD(FBD,FBS)=FBD(FBD,FBS)+1,FBD(FBD)=FBD(FBD)+1
|
|
.;Q:'$$PAY^FBUCUTL(J,"FB583")
|
|
.S FB("PD")=$$AMTPD^FBUCMBS(J)
|
|
.S FB(PSA)=FB(PSA)+FB("PD")
|
|
W !?50,"CATEGORY OF DISPOSITION",!?3,"TYPE OF",?31,"# OF",!?3,"DISPOSITION",?31,"CLAIMS",?45,"INITIAL",?57,"APPEAL",?69,"COVA APPEAL",!,Q,!
|
|
S FBD=0,FB="0^0^0^0"
|
|
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
|
|
.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)
|
|
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)
|
|
W !?5,"TOTAL NOT DISPOSITIONED",?32,$J(FBD(99),5),!?32,"-----",!?16,"TOTAL CLAIMS",?32,$J(FB+FBD(99),5)
|
|
I $P(IOST,"-")="C" W ! D HANG^FBAAUTL1 G END:$D(DIRUT) D HED
|
|
W !!?3,"STATUS OF CLAIMS NOT DISPOSITIONED",!!?3,"STATUS",?40,"# OF CLAIMS",!
|
|
S FBS=0 F S FBS=$O(FBD(99,FBS)) Q:FBS'>0 D
|
|
.I FBS=5,'$P(FBUC,U,7)&(FBD(99,FBS)=0) Q
|
|
.W !?3,$P($G(^FB(162.92,$$STATUS^FBUCUTL(FBS),0)),"^"),?40,$J(FBD(99,FBS),5)
|
|
I $P(IOST,"-")="C" W ! D HANG^FBAAUTL1 G END:$D(DIRUT) D HED
|
|
W !!?3,"TOTAL DOLLARS APPROVED BY PSA:",!
|
|
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
|
|
S X=FB,X2="2$",Y="" D COMMA^%DTC W !?32,"-------------",!?34,X
|
|
END K DIRUT,I,J,Q,X,X2,PSA,FBBEG,FBEND,FBSTART,FBFINISH,FBD,FBUC,BEGDATE,ENDDATE,Y,FBS,FB1725R,FB
|
|
D CLOSE^FBAAUTL Q
|
|
HED W:$P(IOST,"-")="C" @IOF W !?14,"UNAUTHORIZED CLAIM DISPOSITION AND STATUS STATISTICS",!?14,$E(Q,1,52)
|
|
MB I FB1725R'="A" W !?17,$S(FB1725R="M":"for 38 U.S.C. 1725 Claims",1:"excluding 38 U.S.C. 1725 Claims")
|
|
DAT W !?17,"Date Range Selected: ",FBSTART," to ",FBFINISH,!?17,$E(Q,1,41),!
|
|
Q
|