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

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

initial load of FOIAVistA 6/30/08 version

File size: 3.9 KB
Line 
1IBTOUR4 ;ALB/AAS - CLAIMS TRACKING UR ACTIVITY REPORT ; 27-OCT-93
2 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
3 ;
4% I '$D(DT) D DT^DICRW
5INS ; -- print data
6 ; -- ^tmp($j,"ibtour",primary sort,secondary sort,patient, ibtrc)=ibtrcd
7 ;
8 N IBCNT
9 D HDR
10 I $O(^TMP($J,"IBTOUR",""))="" W !!,"No Insurance Reviews Found in Date Range." G PRINTQ
11 ;
12 S IBH="" F S IBH=$O(^TMP($J,"IBTOUR",IBH)) Q:IBH=""!(IBQUIT) D
13 .D SUBHDR^IBTOUR5
14 .S IBI="" F S IBI=$O(^TMP($J,"IBTOUR",IBH,IBI)) Q:IBI=""!(IBQUIT) D
15 ..D SSUBHDR^IBTOUR5
16 ..S IBJ="" F S IBJ=$O(^TMP($J,"IBTOUR",IBH,IBI,IBJ)) Q:IBJ=""!(IBQUIT) D
17 ...S IBTRC="" F S IBTRC=$O(^TMP($J,"IBTOUR",IBH,IBI,IBJ,IBTRC)) Q:IBTRC=""!(IBQUIT) S IBTRCD=^(IBTRC) D ONE
18 ;
19PRINTQ I 'IBQUIT,$E(IOST,1,2)="C-" D PAUSE^VALM1 I $D(DIRUT) S IBQUIT=1
20 Q
21 ;
22ONE ; -- print one entry
23 ; -- ^tmp($j,"ibtour",primary sort,secondary sort,ibtrc)=^IBT(IBTRC)
24 ;
25 S IBAPL=$$APPEAL^IBTODD1(IBTRC)
26 ;
27 I IOSL<($Y+4) D HDR Q:IBQUIT
28 S DFN=+$P(IBTRCD,"^",5) D PID^VADPT
29 S IBTRCD=$G(^IBT(356.2,+IBTRC,0))
30L1 W !,$E($P(^DPT(DFN,0),"^"),1,22),?25,VA("PID")
31 S IBCDT=$$CDT^IBTODD1($P(IBTRCD,"^",2))
32 W ?38,$$DAT1^IBOUTL(+IBCDT\1) W:$P(IBCDT,"^",2) " to"
33 W ?50,$P($G(^IBE(356.11,+$P(IBTRCD,"^",4),0)),"^",3) ;review type abbrev
34 W ?64,$$DAT1^IBOUTL(+IBTRCD) ;review date
35 W ?78,$E($$EXPAND^IBTRE(356.2,.08,$P(IBTRCD,"^",8)),1,20) ; ins co
36 W ?100,$E($$EXPAND^IBTRE(356.2,.11,$P(IBTRCD,"^",11)),1,10) ;ins co action
37 W ?112,$E($$EXPAND^IBTRE(356.2,1.04,$P($G(^IBT(356.2,+IBTRC,1)),"^",4)),1,19) ; last reviewer
38 ;
39L2 W !?38,$$DAT1^IBOUTL($P(IBCDT,"^",2)\1,"2P")
40 Q
41 ;
42HDR ; -- Print header for billing report
43 Q:IBQUIT
44 I $E(IOST,1,2)="C-",IBPAG D PAUSE^VALM1 I $D(DIRUT) S IBQUIT=1 Q
45 I $E(IOST,1,2)="C-"!(IBPAG) W @IOF
46 S IBPAG=IBPAG+1
47 W !,"UR Insurance Review Activity Report",?(IOM-33),"Page ",IBPAG," ",IBHDT
48 W !,"For Insurance Reviews Dated ",$$DAT1^IBOUTL(IBBDT)," to ",$$DAT1^IBOUTL(IBEDT)
49 W !!,?38,"Dates of",?64,"Review"
50 W !,"Patient",?25,"Pt. ID",?38,"Care",?50,"Review Type",?64,"Date",?78,"Ins. Co.",?100," Action",?112,"Last Reviewer"
51 W !,$TR($J(" ",IOM)," ","-")
52 Q
53 ;
54HOSP ; -- print hospital report
55 N IBCNT
56 D HHDR
57 I $O(^TMP($J,"IBTOUR3",""))="" W !!,"No Hospital Reviews Found in Date Range." G HOSPQ
58 ;
59 S IBH="" F S IBH=$O(^TMP($J,"IBTOUR3",IBH)) Q:IBH=""!(IBQUIT) D
60 .D SUBHDR^IBTOUR5
61 .S IBI="" F S IBI=$O(^TMP($J,"IBTOUR3",IBH,IBI)) Q:IBI=""!(IBQUIT) D
62 ..D SSUBHDR^IBTOUR5
63 ..S IBJ="" F S IBJ=$O(^TMP($J,"IBTOUR3",IBH,IBI,IBJ)) Q:IBJ=""!(IBQUIT) D
64 ...S IBTRN="" F S IBTRN=$O(^TMP($J,"IBTOUR3",IBH,IBI,IBJ,IBTRN)) Q:IBTRN=""!(IBQUIT) S IBDATA=^(IBTRN) D HOSPONE
65 ;
66HOSPQ I 'IBQUIT,$E(IOST,1,2)="C-" D PAUSE^VALM1 I $D(DIRUT) S IBQUIT=1
67 Q
68 ;
69HOSPONE ; -print one case line
70 I IOSL<($Y+4) D HHDR Q:IBQUIT
71 S IBTRND=$G(^IBT(356,+IBTRN,0))
72 S DFN=+$P(IBTRND,"^",2) D PID^VADPT
73HL1 W !,$E($P(^DPT(DFN,0),"^"),1,22),?25,VA("PID")
74 S IBCDT=$$CDT^IBTODD1(IBTRN)
75 W ?38,$$DAT1^IBOUTL(+IBCDT\1) W:$P(IBCDT,"^",2) " to"
76 S TYPE="" I $P(IBTRND,"^",25) S TYPE="RANDOM"
77 I $P(IBTRND,"^",26) S:$L(TYPE) TYPE=TYPE_"/" S TYPE=TYPE_$$EXPAND^IBTRE(356,.26,$P(IBTRND,"^",26))
78 I $P(IBTRND,"^",27) S:$L(TYPE) TYPE=TYPE_"/LOCAL"
79 W ?51,TYPE
80 W ?70,$S($P(IBDATA,"^"):"YES",$P(IBDATA,"^")=0:"NO",1:"")
81 W ?84,$J($P(IBDATA,"^",2),8)
82 W ?98,$J($P(IBDATA,"^",3),8)
83 ;
84 W ?112,$E($$EXPAND^IBTRE(356,1.05,$P($G(^IBT(356,+IBTRN,1)),"^",5)),1,19) ; last reviewer
85 ;
86HL2 I $P(IBCDT,"^",2)'="" W !?38,$$DAT1^IBOUTL($P(IBCDT,"^",2)\1,"2P")
87 W ! Q
88 ;
89HHDR ; -- hospital review header
90 Q:IBQUIT
91 I $E(IOST,1,2)="C-",IBPAG D PAUSE^VALM1 I $D(DIRUT) S IBQUIT=1 Q
92 I $E(IOST,1,2)="C-"!(IBPAG) W @IOF
93 S IBPAG=IBPAG+1
94 W !,"UR Hospital Review Activity Report",?(IOM-33),"Page ",IBPAG," ",IBHDT
95 W !,"For Hospital Reviews Dated ",$$DAT1^IBOUTL(IBBDT)," to ",$$DAT1^IBOUTL(IBEDT)
96 W !!,?38,"Dates of",?69,"Admission",?84,"Days Met",?98,"Days Not Met"
97 W !,"Patient",?25,"Pt. ID",?38,"Care",?51,"Review Type",?69,"Met Criteria",?84,"Criteria",?98,"Criteria",?112,"Assigned Reviewer"
98 W !,$TR($J(" ",IOM)," ","-")
99 Q
Note: See TracBrowser for help on using the repository browser.