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

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

initial load of FOIAVistA 6/30/08 version

File size: 4.4 KB
Line 
1IBCEOB21 ;ALB/TMP - EOB MAINTENANCE ACTIONS ;18-FEB-99
2 ;;2.0;INTEGRATED BILLING;**137,155**;21-MAR-94
3 Q
4 ;
5EDIT ; Edit a previously entered manual EOB
6 N IBDA,IB0,DIE,DR,X,Y,DA
7 ;
8 D FULL^VALM1
9 S IBDA=$$SEL()
10 G:'IBDA EDITQ
11 ;
12 S IB0=$G(^IBM(361.1,IBDA,0))
13 I $P(IB0,U,17)'=1 D G EDITQ
14 . W !,*7,"Cannot edit an EOB that was not entered manually!!"
15 . D PAUSE^VALM1
16 ;
17 I $P(IB0,U,15)'=$$COBN^IBCEF(IBIFN) D G EDITQ
18 . W !,*7,"Can only edit an EOB for the current insurance sequence"
19 . D PAUSE^VALM1
20 ;
21 S DIE="^IBM(361.1,",DA=IBDA
22 S DR="100.03///"_DUZ_";100.04///^S X=""NOW"";.06;.13;.16//^S X=$$EXTERNAL^DILFD(361.1,.16,,3)"_$S($$AMTCHG(DA):";1.01",1:"")_";21"
23 D ^DIE
24 ;
25 D BLD^IBCEOB2
26 ;
27 D PAUSE^VALM1
28EDITQ S VALMBCK="R"
29 Q
30 ;
31DELETE ; Delete a previously entered manual EOB
32 N IB0,IBDA,IBE,DIR,X,Y,DA,DIK
33 ;
34 D FULL^VALM1
35 S IBDA=$$SEL(.IBE)
36 G:'IBDA DELQ
37 ;
38 S IB0=$G(^IBM(361.1,IBDA,0))
39 I $P(IB0,U,17)'=1 D G DELQ
40 . W !,*7,"Cannot delete an EOB that was not entered manually!!"
41 . D PAUSE^VALM1
42 ;
43 I $P(IB0,U,15)'=$$COBN^IBCEF(IBIFN) D G DELQ
44 . W !,*7,"Cannot only edit an EOB for the current insurance sequence"
45 . D PAUSE^VALM1
46 ;
47 W !!,IBE,!
48 S DIR("A")="ARE YOU REALLY SURE YOU WANT TO DELETE THIS EOB?: ",DIR("B")="NO",DIR(0)="YA" D ^DIR K DIR
49 G:Y'=1 DELQ
50 ;
51 S DIK="^IBM(361.1,",DA=IBDA D ^DIK
52 W !!,"EOB Deleted!!",!
53 ;
54 D BLD^IBCEOB2
55 ;
56 D PAUSE^VALM1
57DELQ S VALMBCK="R"
58 Q
59 ;
60NEW ; Add a manual EOB for the current COB sequence for the claim
61 N DO,DD,DIC,DIE,DLAYGO,Y,X,IBEOB,IBOK,IB364
62 ;
63 D FULL^VALM1
64 ;
65 K DO,DD
66 S IB364=$$LAST364^IBCEF4(IBIFN)
67 S DIC="^IBM(361.1,",DIC(0)="L",X=IBIFN,DLAYGO=361.1
68 S DIC("DR")=".15////"_$$COBN^IBCEF(IBIFN)_";.04////0;.05////"_$$NOW^XLFDT_";.17////1;.18///"_DUZ_$S(IB364:";.19////"_IB364,1:"")
69 D FILE^DICN K DO,DD,DLAYGO,DIC
70 G:Y<0 NEWQ
71 S DIE="^IBM(361.1,",DA=+Y,DR=".06//^S X=""NOW"";S DIE(""NO^"")="""";.13//^S X=$$EXTERNAL^DILFD(361.1,.13,,1);.16//^S X=$$EXTERNAL^DILFD(361.1,.16,,3);K DIE(""NO^"");1.01;21"
72 W ! D ^DIE K DIE
73 S IBEOB=$P($G(^IBM(361.1,DA,0)),U,6),IBOK=1
74 I IBEOB D
75 . I $P($G(^IBM(361.1,DA,1)),U,1)="" D
76 .. S DIR(0)="YA",DIR("A",1)="Nothing entered for payer amt paid",DIR("A")="Are you sure you want to file this EOB?: ",DIR("B")="NO"
77 .. W ! D ^DIR W ! K DIR
78 .. I Y'=1 S (IBEOB,IBOK)=0
79 . I IBOK W !,"EOB added",!
80 I 'IBEOB D
81 . Q:DA'>0
82 . S DIK="^IBM(361.1," D ^DIK
83 . I IBOK W !!,"EOB Date/Time needed, not entered"
84 . W !,"No EOB added!!",!
85 D BLD^IBCEOB2
86NEWQ D PAUSE^VALM1
87 S VALMBCK="R"
88 Q
89 ;
90VIEW ; View an MRA
91 N IBDA,IBSEL,IBIFN,IBEOBIFN,IBIFNSAV
92 ;
93 D FULL^VALM1
94 D SEL(.IBDA,1) ; select a bill from the main list
95 S IBSEL=+$O(IBDA(0)) I 'IBSEL G VIEWQ ; list#
96 S IBIFN=$P($G(IBDA(IBSEL)),U,1) I 'IBIFN G VIEWQ ; bill#
97 S IBEOBIFN=$P($G(IBDA(IBSEL)),U,3) I 'IBEOBIFN G VIEWQ ; eob ien
98 ;
99 ; If only one MRA on file, then call the Listman and quit
100 I $$MRACNT^IBCEMU1(IBIFN)=1 D EN^VALM("IBCEM VIEW EOB") G VIEWQ
101 ;
102VLOOP ; Multiple MRA's on file. Allow user to select the MRA to view
103 D FULL^VALM1
104 S IBEOBIFN=$$SEL^IBCEMU1(IBIFN,1)
105 I 'IBEOBIFN G VIEWQ
106 S IBIFNSAV=IBIFN ; save off the bill#
107 D EN^VALM("IBCEM VIEW EOB") ; call the Listman
108 S IBIFN=IBIFNSAV ; restore the bill# (just in case)
109 G VLOOP
110 ;
111VIEWQ ;
112 S VALMBCK="R"
113 Q
114 ;
115AMTCHG(DA) ; Function to determine if amt on EOB can be modified
116 ; DA = ien of EOB entry (file 361.1)
117 ; Function returns 1 if OK to change, 0 if the next bill in COB
118 ; sequence has already been sent or the bill has been closed.
119 N IBOK,IBIFN,IBCOBN,IB0,IBNB
120 S IBOK=1
121 S IBIFN=+$G(^IBM(361.1,+DA,0)),IB0=$G(^DGCR(399,IBIFN,0))
122 I $P(IB0,U,13)=6 S IBOK=0 G AMTQ ; Bill is closed...can't change EOB amt
123 S IBCOBN=$$COBN^IBCEF(IBIFN)
124 I IBCOBN=3 G AMTQ ; Already the last bill
125 S IBNB=+$P($G(^DGCR(399,IBIFN,"M")),U,IBCOBN+5) ; Get next bill #
126 I 'IBNB G AMTQ ; No next bill
127 I $P($G(^DGCR(399,IBNB,0)),U,13)<3 G AMTQ
128 S IBOK=0
129 ;
130AMTQ Q IBOK
131 ;
132SEL(IBDA,ONE) ; Select entry(s) from list
133 ; IBDA = array returned if selections made
134 ; ONE = if set to 1, only one selection can be made at a time
135 N VALMY
136 K IBDA
137 D EN^VALM2($G(XQORNOD(0)),$S('$G(ONE):"",1:"S"))
138 S IBDA=0 F S IBDA=$O(VALMY(IBDA)) Q:'IBDA S IBDA(IBDA)=$P($G(^TMP("IBCECOB",$J,+IBDA)),U,2,6)
139 Q
140 ;
141CHANGE ; Select another bill to display
142 N IBNULL,IBIFN1
143 D FULL^VALM1
144 K VALMQUIT
145 S IBIFN1=IBIFN
146 S IBIFN=$$BILL^IBCEOB2(.VALMQUIT,.IBNULL)
147 I '$G(IBNULL) S IBIFN=IBIFN1 K VALMQUIT
148 I '$D(VALMQUIT) S VALMBCK="R"
149 Q
150 ;
Note: See TracBrowser for help on using the repository browser.