source: WorldVistAEHR/trunk/r/INTEGRATED_BILLING-IB-PRQ--IBD--IBQ--PRQS/IBTRC1.m@ 619

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

initial load of WorldVistAEHR

File size: 4.3 KB
Line 
1IBTRC1 ;ALB/AAS - CLAIMS TRACKING - INSURANCE ACTIONS ACTIONS ; 14-JUL-93
2 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5% G EN^IBTRC
6 ;
7AI ; -- Add ins. Action entry
8 N X,Y,I,J,DA,DR,DIC,DIE,DR,DD,DO,IBQUIT,IBTRCDT,DIR,DIRUT,DUOUT
9 ;
10 ; -- select date
11 S DIR(0)="356.2,.01",DIR("A")="Select Insurance Review or Contact Date",DIR("B")="NOW"
12 D ^DIR K DIR
13 I $D(DIRUT)!($D(DUOUT))!(+Y<1) G AIQ
14 S IBTRCDT=+Y
15 ;
16 ; -- if not tracking id allow selecting
17 I '$G(IBTRN) D
18 .S DIC="^IBT(356,",DIC(0)="AEQ",D="ADFN"_DFN
19 .D IX^DIC K DIC
20 .I +Y>1 S IBTRN=+Y
21 ;
22 ; -- add entry
23 D COM^IBTUTL3(IBTRCDT,$G(IBTRN),"",$G(IBTRV))
24 ;
25 ; -- edit based on type/action
26 D QE1
27 D BLD^IBTRC
28 S VALMBCK="R"
29AIQ Q
30 ;
31DT ; -- Delete Insurance Action entry
32 I '$D(^XUSEC("IB CLAIMS SUPERVISOR",DUZ)) D SORRY^IBTRE1 G DTQ
33 N I,J,IBXX,DIR,DIRUT,VALMY
34 D EN^VALM2($G(XQORNOD(0)))
35 I $D(VALMY) D FULL^VALM1 S IBXX=0 F S IBXX=$O(VALMY(IBXX)) Q:'IBXX!$D(DIRUT) D
36 .S IBTRC=$P($G(^TMP("IBTRCDX",$J,+$O(^TMP("IBTRC",$J,"IDX",IBXX,0)))),"^",2)
37 .I $O(^IBT(356.2,"AP",IBTRC,0)) W !,"Must first delete appeals associated with Denials" D PAUSE^VALM1 Q
38 .;
39 .W ! S DIR(0)="Y",DIR("B")="NO",DIR("A")="Are You Sure you want to delete entry #"_IBXX
40 .D ^DIR I Y'=1 W !,"Entry #",IBXX," not Deleted!" Q
41 .D DP1
42 .Q
43DTQ D BLD^IBTRC
44 S VALMBCK="R" Q
45 ;
46DP1 ; -- actual deletion
47 N DA,DIC,DIK
48 ;
49 ; -- delete reviews, communications,
50 S DA=IBTRC,DIK="^IBT(356.2," D ^DIK
51 W !,"Entry ",IBXX," Deleted!"
52 Q
53 ;
54QE ; -- Quick edit Review entry
55 N I,J,IBXX,VALMY
56 D EN^VALM2($G(XQORNOD(0)))
57 I $D(VALMY) S IBXX=0 F S IBXX=$O(VALMY(IBXX)) Q:'IBXX D
58 .S IBTRC=$P($G(^TMP("IBTRCDX",$J,+$O(^TMP("IBTRC",$J,"IDX",IBXX,0)))),"^",2)
59 .D QE1
60QEQ S VALMBCK="R"
61 D BLD^IBTRC
62 Q
63 ;
64QE1 N X,Y,DA,DR,DIC,DIE,IBSEL,IBTLST
65 D EDIT^IBTRCD1("[IBT QUICK EDIT]",1)
66 Q
67 I $$TRTP^IBTRE1(IBTRN)<3 D ;clinical info only on inpt/outpt
68 .; -- diagnosis edit
69 .D EN^IBTRE3(IBTRN) Q:$G(IBSEL)["^"
70 .;
71 .; -- procedure edit / only inpt. / outpt use add/edit
72 .I $$TRTP^IBTRE1(IBTRN)<2 D EN^IBTRE4(IBTRN) Q:$G(IBSEL)["^"
73 .;
74 .; -- provider edit
75 .D EN^IBTRE5(IBTRN)
76 Q
77 ;
78NX(IBTMPNM) ; -- Go to next template
79 ; -- Input template name
80 N I,J,IBXXC,VALMY
81 S IBTSAV("IBTRN")=IBTRN
82 D EN^VALM2($G(XQORNOD(0)))
83 I $D(VALMY) S IBXXC=0 F S IBXXC=$O(VALMY(IBXXC)) Q:'IBXXC D
84 .S IBTRC=$P($G(^TMP("IBTRCDX",$J,+$O(^TMP("IBTRC",$J,"IDX",IBXXC,0)))),"^",2)
85 .D EN^VALM(IBTMPNM)
86 .K IBAMT,IBAPR,IBADG,IBDA,IBDGCR,IBDGCRU1,IBDV,IBETYP,IBETYPD,IBI,IBICD,IBLCNT,IBSEL,IBT,IBTEXT,IBTNOD,VAUTD
87 .K IBAPEAL,IBCDFN,IBCNT,IBDEN,IBDENIAL,IBDENIAL,IBPARNT,IBPEN,IBPENAL,IBTCOD,IBTRDD,IBTRSV,IBTYPE,VAINDT,VA
88 .D KVAR^VADPT
89 .Q
90 S IBTRN=$G(IBTSAV("IBTRN"))
91 I '$D(IBFASTXT) D BLD^IBTRC
92 S VALMBCK="R"
93 Q
94 ;
95EDIT(IBTEMP) ; -- Edit entries
96 N I,J,IBXX,VALMY
97 D EN^VALM2($G(XQORNOD(0)))
98 I $D(VALMY) D FULL^VALM1 S IBXX=0 F S IBXX=$O(VALMY(IBXX)) Q:'IBXX D
99 .S IBTRC=$P($G(^TMP("IBTRCDX",$J,+$O(^TMP("IBTRC",$J,"IDX",IBXX,0)))),"^",2)
100 .W !!,"Editing Entry #",IBXX,!
101 .D EDIT^IBTRCD1(IBTEMP,1)
102 S VALMBCK="R"
103 D BLD^IBTRC
104 Q
105 ;
106PRECRT(IBTRN) ; -- find precert number for a tracking entry
107 ; -- input ibtrn = internal entry of tracking id.
108 ;
109 S PRECERT=""
110 I '$G(IBTRN) G PRECQ
111 S PRECERT=$O(^IBT(356.2,"APRE",IBTRN,0))
112PRECQ Q PRECERT
113 ;
114SHOWSC ; -- display sc conditions
115 N VAEL,TAB,IBTRCSC
116 D FULL^VALM1
117 D ELIG^VADPT
118 W !!,"Patient: ",$$PT^IBTUTL1(DFN)
119 I 'VAEL(3) W !,"Patient Not Service Connected",!! G SHOWQ
120 W !,?5,"Service Connected Percent: "_+$P(VAEL(3),"^",2)_"%"
121 S TAB=5,IBTRCSC=1 D SC^IBTOAT2
122SHOWQ D PAUSE^VALM1
123 S VALMBCK="R"
124 Q
125 ;
126CP ; -- change patient from within insurance reviews
127 N VALMQUIT,IBDFN,IBTRNOLD,IBY
128 D FULL^VALM1
129 S IBDFN=DFN D PAT^IBCNSM
130 I $D(VALMQUIT) S DFN=IBDFN
131 S IBTRNOLD=IBTRN K IBTRN
132 D TRAC^IBTRV
133 I '$G(IBTRN) S DFN=IBDFN,IBTRN=IBTRNOLD
134 S IBTRND=$G(^IBT(356,+IBTRN,0))
135 D BLD^IBTRC,HDR^IBTRC
136 S VALMBCK="R"
137CPQ Q
138 ;
139SCREEN(ACODE,CTYPE) ; -- screen for action field of file 356.2
140 ; -- called by input transform
141 ; input ACODE = piece 3 (action code) of entry being screen in 356.7
142 ; CTYPE = type of review, pointer to 356.11
143 ;
144 S CTYPE=$P($G(^IBE(356.11,+CTYPE,0)),"^",2) I 'CTYPE Q 1
145 Q $S(CTYPE=10:1,CTYPE=20:1,CTYPE=30:1,CTYPE=50&(ACODE<30):1,1:0)
146 ;Q $S(CTYPE=1:1,CTYPE=2&(ACODE'=30):1,CTYPE=3:1,CTYPE=5&(ACODE<30):1,1:0)
Note: See TracBrowser for help on using the repository browser.