source: FOIAVistA/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTOTR.m@ 940

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

initial load of FOIAVistA 6/30/08 version

File size: 3.3 KB
Line 
1IBTOTR ;ALB/AAS - CLAIMS TRACKING INQUIRY ; 27-OCT-93
2 ;;2.0; INTEGRATED BILLING ;**40,199**; 21-MAR-94
3 ;
4% I '$D(DT) D DT^DICRW
5 W !!,"Claims Tracking Inquiry"
6 ;
7PAT ; -- Select patient
8 W !! D END
9 S DIC="^DPT(",DIC(0)="AEQM"
10 N DPTNOFZY S DPTNOFZY=1 ;Suppress PATIENT file fuzzy lookups
11 D ^DIC K DIC I +Y<1 G END
12 S DFN=+Y
13 ;
14VSIT ;
15 ; -- get claims tracking visit entry
16 D TRAC^IBTRV K IBY
17 I '$G(IBTRN) G END
18 ;
19DEV ; -- select device, run option
20 W !
21 S %ZIS="QM" D ^%ZIS G:POP END
22 I $D(IO("Q")) S ZTRTN="DQ^IBTOTR",ZTSAVE("IB*")="",ZTSAVE("DFN")="",ZTDESC="IB - Inquire to Claims Tracking" D ^%ZTLOAD K IO("Q"),ZTSK D HOME^%ZIS G PAT
23 ;
24 U IO
25 D ONE,END G PAT
26 Q
27 ;
28END ; -- Clean up
29 I $D(ZTQUEUED) S ZTREQ="@" Q
30 D ^%ZISC
31 K I,J,X,Y,DFN,%ZIS,VA,IBTRN,IBTRND,IBTRND1,IBPAG,IBHDT,IBDISDT,IBETYP,IBQUIT,IBTAG,IBI,IBJ,IBII,IBTRTP,IBNAR,IBCNT
32 D KVAR^VADPT
33 Q
34 ;
35DQ ; -- entry print from task man
36 D ONE G END
37 Q
38 ;
39ONE ; -- print one billing report from ct
40 I $D(ZTQUEUED) S ZTREQ="@"
41 S IBPAG=0,IBHDT=$$HTE^XLFDT($H,1),IBQUIT=0
42 D PID^VADPT
43 S IBTRND=$G(^IBT(356,+IBTRN,0)),IBTRND1=$G(^(1))
44 S IBETYP=$G(^IBE(356.6,+$P(IBTRND,"^",18),0))
45 D HDR,SECT1^IBTOBI
46 W ! D BI1^IBTOBI1,CLIN
47 ;
48 I ($Y+11)>IOSL D HDR Q:IBQUIT
49 W !!," Insurance Review Information "
50 N I,J,IBTRC,IBTRCD,IBD,IBACTION,TCODE
51 S IBCNT=0
52 S IBII="" F S IBII=$O(^IBT(356.2,"ATIDT",IBTRN,IBII)) Q:'IBII!(IBQUIT) S IBTRC=0 F S IBTRC=$O(^IBT(356.2,"ATIDT",IBTRN,IBII,IBTRC)) Q:'IBTRC!(IBQUIT) D
53 .N IBD
54 .S IBCNT=IBCNT+1
55 .D IR1^IBTOBI2
56 .D IR2^IBTOBI2
57 .S IBJ=0 F S IBJ=$O(IBD(IBJ)) Q:'IBJ W !,$E($G(IBD(IBJ,1)),1,39),?40,$E($G(IBD(IBJ,2)),1,39)
58 .W !
59 .I ($Y+9)>IOSL D HDR Q:IBQUIT
60 I IBCNT<1 W !,"None on file.",!
61 ;
62 I ($Y+11)>IOSL D HDR Q:IBQUIT
63 W !," Hospital Review Information "
64 N I,J,IBTRV,IBTRVD,IBD
65 S IBCNT=0
66 S IBII="" F S IBII=$O(^IBT(356.1,"ATIDT",IBTRN,IBII)) Q:'IBII!(IBQUIT) S IBTRV=0 F S IBTRV=$O(^IBT(356.1,"ATIDT",IBTRN,IBII,IBTRV)) Q:'IBTRV!(IBQUIT) D
67 .N IBD
68 .S IBCNT=IBCNT+1
69 .D HR1^IBTOBI3
70 .D HR2^IBTOBI3
71 .; Patch #40 pick up Special Unit SI or IS
72 .D UNIT^IBTOBI3
73 .S IBJ=0 F S IBJ=$O(IBD(IBJ)) Q:'IBJ W !,$E($G(IBD(IBJ,1)),1,40),?40,$E($G(IBD(IBJ,2)),1,39)
74 .W !
75 .I ($Y+9)>IOSL D HDR Q:IBQUIT
76 I IBCNT<1 W !,"None on file.",!
77 Q
78 ;
79HDR ; -- Print header for billing report
80 Q:IBQUIT
81 I $E(IOST,1,2)="C-",IBPAG D PAUSE^VALM1 I $D(DIRUT) S IBQUIT=1 Q
82 I $E(IOST,1,2)="C-"!(IBPAG) W @IOF
83 S IBPAG=IBPAG+1
84 W !,"Claim Tracking Inquiry",?(IOM-33),"Page ",IBPAG," ",IBHDT
85 W !,$E($P($G(^DPT(DFN,0)),"^"),1,25),?28,VA("PID"),?50,"DOB: ",$$FMTE^XLFDT($P($G(^DPT(DFN,0)),"^",3),1)
86 W !,$$EXPAND^IBTRE(356,.18,$P(IBTRND,"^",18))," on ",$$FMTE^XLFDT($P(IBTRND,"^",6),1)
87 W !,$TR($J(" ",IOM)," ","-")
88 Q
89 ;
90CLIN ; -- output clinical information
91 N IBOE,DGPM
92 ;
93 I $P(IBETYP,"^",3)=1 S DGPM=$P(^IBT(356,+IBTRN,0),"^",5) I 'DGPM Q
94 I $P(IBETYP,"^",3)=2 S IBOE=$P(^IBT(356,+IBTRN,0),"^",4)
95 F IBTAG="DIAG","PROC","PROV" D @IBTAG Q:IBQUIT
96 Q
97 ;
98DIAG ; -- print diagnosis information
99 I '$G(DGPM),('$G(IBOE)) Q
100 Q:$P(IBETYP,"^",3)>2
101 I ($Y+9)>IOSL D HDR Q:IBQUIT
102 D DIAG1^IBTOBI4
103 Q
104 ;
105PROC ; -- print procedure information
106 Q:$P(IBETYP,"^",3)>2
107 I ($Y+9)>IOSL D HDR Q:IBQUIT
108 D PROC1^IBTOBI4
109 Q
110 ;
111PROV ; -- print provider information
112 I '$G(DGPM),('$G(IBOE)) Q
113 Q:$P(IBETYP,"^",3)>2
114 I ($Y+9)>IOSL D HDR Q:IBQUIT
115 D PROV1^IBTOBI4
116 Q
Note: See TracBrowser for help on using the repository browser.