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

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

initial load of WorldVistAEHR

File size: 2.1 KB
Line 
1IBECEA4 ;ALB/CPM - Cancel/Edit/Add... Cancel a Charge ;11-MAR-93
2 ;;2.0;INTEGRATED BILLING;**27,52,150,240**;21-MAR-94
3 ;;Per VHA Directive 10-93-142, this routine should not be modified.
4 ;
5ONE ; Cancel a single charge.
6 D HDR^IBECEAU("C A N C E L")
7 ;
8 ; - perform up-front edits
9 D CED^IBECEAU4(IBN) G:IBY<0 ONEQ
10 I IBXA=6!(IBXA=7) D G ONEQ:$G(IBCC),REAS
11 .I IBCANTR!($P(IBND,"^",5)=10) S IBCC=1 W !,"This transaction has already been cancelled.",!
12 I IBCANTR!($P(IBND,"^",5)=10) W !,$S(IBH:"Please note that this cancellation action has not yet been passed to AR.",1:"This transaction has already been cancelled."),! G ONEQ:'IBH,REAS
13 I 'IBH,IBIL="" S IBY="-1^IB024" G ONEQ
14 ;
15REAS ; - ask for the cancellation reason
16 D REAS^IBECEAU2("C") G:IBCRES<0 ONEQ
17 ;
18 ; - okay to proceed?
19 D PROC^IBECEAU4("cancel") G:IBY<0 ONEQ
20 ;
21 ; - handle CHAMPVA/TRICARE charges
22 I IBXA=6!(IBXA=7) D CANC^IBECEAU4(IBN,IBCRES,1) G ONEQ
23 ;
24 ; - handle cancellation transactions
25 I IBCANTR D G ONEQ
26 .I IBN=IBPARNT D UPSTAT^IBECEAU4(IBN,1) Q
27 .I 'IBIL S IBIL=$P($G(^IB(IBPARNT,0)),"^",11) I 'IBIL W !!,"There is no bill number associated with this charge.",!,"The charge cannot be cancelled." Q
28 .S DIE="^IB(",DA=IBN,DR=".1////"_IBCRES_";.11////"_IBIL D ^DIE,PASS K DIE,DA,DR
29 ;
30 ; - update 354.71 and 354.7 (cap info)
31 I $P(IBND,"^",19) S IBAMC=$$CANCEL^IBARXMN(DFN,$P(IBND,"^",19),.IBY) G:IBY<1 ONEQ I IBAMC D FOUND^IBARXMA(.IBY,IBAMC)
32 ;
33 ; - handle incomplete and regular transactions
34 D CANC^IBECEAU4(IBN,IBCRES,1) G:IBY<1 ONEQ
35 ;
36 ; - handle updating of clock
37 I "^1^2^3^"'[("^"_IBXA_"^") G ONEQ
38 I 'IBCHG G ONEQ
39 D CLSTR^IBECEAU1(DFN,IBFR) I 'IBCLDA W !!,"Please note that there is no billing clock which would cover this charge.",!,"Be sure that this patient's billing clock is correct." G ONEQ
40 D CLOCK^IBECEAU(-IBCHG,+$P(IBCLST,"^",9),-IBUNIT)
41 ;
42ONEQ D ERR^IBECEAU4:IBY<0,PAUSE^IBECEAU
43 K IBCHG,IBCRES,IBDESC,IBIL,IBND,IBSEQNO,IBTOTL,IBUNIT,IBATYP,IBIDX,IBCC
44 K IBN,IBREB,IBY,IBEVDA,IBPARNT,IBH,IBCANTR,IBXA,IBSL,IBFR,IBTO,IBNOS,IBCANC,IBAMC
45 Q
46 ;
47PASS ; Pass the action to Accounts Receivable.
48 N IBSERV
49 W !,"Passing the cancellation action to AR... "
50 S IBNOS=IBN D ^IBR S IBY=Y W:Y>0 "done."
51 Q
Note: See TracBrowser for help on using the repository browser.