source: FOIAVistA/trunk/r/FEE_BASIS-FB/FBFPCI.m@ 1540

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

initial load of FOIAVistA 6/30/08 version

File size: 3.2 KB
Line 
1FBFPCI ;WOIFO/SAB-FPPS AUDIT REPORT ;8/6/2003
2 ;;3.5;FEE BASIS;**61**;JAN 30, 1995
3 ;
4ASKCI ; ask FPPS CLAIM ID
5 K DA
6 S DIR(0)="162.7,32"
7 D ^DIR K DIR I $D(DIRUT) S FBQUIT=1 G EXIT
8 S FBFPPSC=Y
9 ;
10 ; ask device
11 S %ZIS="QM" D ^%ZIS I POP S FBQUIT=1 G EXIT
12 I $D(IO("Q")) D S FBQUIT=0 G EXIT
13 . S ZTRTN="QEN^FBFPCI",ZTDESC="FPPS Claim Inquiry"
14 . F FBX="FBFPPSC" S ZTSAVE(FBX)=""
15 . D ^%ZTLOAD,HOME^%ZIS K ZTSK
16 ;
17QEN ; queued entry
18 U IO
19 ;
20GATHER ; collect and sort data
21 S FBQUIT=0
22 K ^TMP($J)
23 ;
24 ; check inpatient invoices
25 F FBDA=0 F S FBDA=$O(^FBAAI("AFC",FBFPPSC,FBDA)) Q:'FBDA D
26 . S FBY0=$G(^FBAAI(FBDA,0))
27 . S FBAAIN=$P(FBY0,U)
28 . S FBPROG=$P(FBY0,U,12)
29 . I FBAAIN]"" S ^TMP($J,162.5,FBAAIN)=FBPROG
30 ;
31 ; check outpatient/ancillary invoices
32 S FBDA3=0
33 F S FBDA3=$O(^FBAAC("AFC",FBFPPSC,FBDA3)) Q:'FBDA3 D
34 .S FBDA2=0
35 .F S FBDA2=$O(^FBAAC("AFC",FBFPPSC,FBDA3,FBDA2)) Q:'FBDA2 D
36 ..S FBDA1=0
37 ..F S FBDA1=$O(^FBAAC("AFC",FBFPPSC,FBDA3,FBDA2,FBDA1)) Q:'FBDA1 D
38 ...S FBDA=0
39 ...F S FBDA=$O(^FBAAC("AFC",FBFPPSC,FBDA3,FBDA2,FBDA1,FBDA)) Q:'FBDA D
40 ....S FBY0=$G(^FBAAC(FBDA3,1,FBDA2,1,FBDA1,1,FBDA,0))
41 ....S FBAAIN=$P(FBY0,U,16)
42 ....I FBAAIN]"" S ^TMP($J,162.03,FBAAIN,FBDA3,FBDA2,FBDA1,FBDA)=""
43 ;
44 ; check pharmacy invoices
45 S FBDA=0 F S FBDA=$O(^FBAA(162.1,"AFC",FBFPPSC,FBDA)) Q:'FBDA D
46 . S FBY0=$G(^FBAA(162.1,FBDA,0))
47 . S FBAAIN=$P(FBY0,U)
48 . I FBAAIN]"" S ^TMP($J,162.1,FBAAIN)=""
49 ;
50 ; check unauthorized claims
51 S FBDA=0 F S FBDA=$O(^FB583("AFC",FBFPPSC,FBDA)) Q:'FBDA D
52 . S FBY0=$G(^FB583(FBDA,0))
53 . S FBPN=$$GET1^DIQ(162.7,FBDA_",",2)
54 . S FBVN=$$GET1^DIQ(162.7,FBDA_",",1)
55 . S FBDT=$$GET1^DIQ(162.7,FBDA_",",.01)
56 . S ^TMP($J,162.7,FBDT,FBDA)=FBPN_U_FBVN
57 ;
58PRINT ; report data
59 S FBPG=0 D NOW^%DTC S Y=% D DD^%DT S FBDTR=Y
60 K FBDL S FBDL="",$P(FBDL,"-",IOM)=""
61 ;
62 D HD
63 ;
64 ; show invoices
65 F FBFILE=162.5,162.03,162.1 D
66 . S FBAAIN="" F S FBAAIN=$O(^TMP($J,FBFILE,FBAAIN)) Q:FBAAIN="" D
67 . . I $Y+7>IOSL D HD Q:FBQUIT
68 . . I FBFILE=162.5 D
69 . . . S FBPROG=$P($G(^TMP($J,FBFILE,FBAAIN)),U)
70 . . . W !,"Inpatient ("
71 . . . W $S(FBPROG=6:"CH",FBPROG=7:"CNH",1:"")
72 . . . W ") Invoice: ",FBAAIN
73 . . I FBFILE=162.03 W !,"Outpatient/Ancillary Invoice: ",FBAAIN
74 . . I FBFILE=162.1 W !,"Pharmacy Invoice: ",FBAAIN
75 ;
76 ; show unauthorized claims
77 S FBDT="" F S FBDT=$O(^TMP($J,162.7,FBDT)) Q:FBDT="" D
78 . S FBDA=0 F S FBDA=$O(^TMP($J,162.7,FBDT,FBDA)) Q:'FBDA D
79 . . I $Y+7>IOSL D HD Q:FBQUIT
80 . . S FBX=$G(^TMP($J,162.7,FBDT,FBDA))
81 . . W !,"Unauthorized Claim: ",$P(FBX,U)," ",$P(FBX,U,2)," ",FBDT
82 ;
83 I '$D(^TMP($J)) W !,"No VistA invoices found with specified FPPS CLAIM ID."
84 ;
85 I FBQUIT W !!,"REPORT STOPPED AT USER REQUEST"
86 ;
87 I 'FBQUIT,$E(IOST,1,2)="C-" S DIR(0)="E" D ^DIR K DIR I 'Y S FBQUIT=1
88 D ^%ZISC
89 ;
90EXIT ;
91 I $D(ZTQUEUED) S ZTREQ="@"
92 K ^TMP($J)
93 K FBAAIN,FBDA,FBDA1,FBDA2,FBDA3,FBDL,FBDT,FBDTR,FBFILE
94 K FBPN,FBFPPSC,FBPG,FBPROG,FBVN,FBX,FBY0
95 K %,DIC,DIR,DIROUT,DIRUT,DTOUT,DUOUT,I,J,POP,X,Y
96 I 'FBQUIT,$E(IOST,1,2)="C-" W ! G ASKCI
97 K FBQUIT
98 Q
99HD ; page header
100 I $D(ZTQUEUED),$$S^%ZTLOAD S ZTSTOP=1,FBQUIT=1 Q
101 I $E(IOST,1,2)="C-",FBPG S DIR(0)="E" D ^DIR K DIR I 'Y S FBQUIT=1 Q
102 I $E(IOST,1,2)="C-"!FBPG W @IOF
103 S FBPG=FBPG+1
104 W !,"FPPS Claim Inquiry for ID: ",FBFPPSC,?49,FBDTR,?72,"page ",FBPG
105 W !,FBDL
106 Q
107 ;
108 ;FBFPCI
Note: See TracBrowser for help on using the repository browser.