Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBECEA4

IBECEA4.m

Go to the documentation of this file.
  1. IBECEA4 ;ALB/CPM - Cancel/Edit/Add... Cancel a Charge ; 11-MAR-93
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ONE ; Cancel a single charge.
  1. D HDR^IBECEAU("C A N C E L")
  1. ;
  1. ; - perform up-front edits
  1. D CED^IBECEAU4(IBN) G:IBY<0 ONEQ
  1. 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
  1. I 'IBH,IBIL="" S IBY="-1^IB024" G ONEQ
  1. ;
  1. REAS ; - ask for the cancellation reason
  1. D REAS^IBECEAU2("C") G:IBCRES<0 ONEQ
  1. ;
  1. ; - okay to proceed?
  1. D PROC^IBECEAU4("cancel") G:IBY<0 ONEQ
  1. ;
  1. ; - handle cancellation transactions
  1. I IBCANTR D G ONEQ
  1. .I IBN=IBPARNT D UPSTAT^IBECEAU4(IBN,1) Q
  1. .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
  1. .S DIE="^IB(",DA=IBN,DR=".1////"_IBCRES_";.11////"_IBIL D ^DIE,PASS K DIE,DA,DR
  1. ;
  1. ; - handle incomplete and regular transactions
  1. D CANC^IBECEAU4(IBN,IBCRES,1) G:IBY<1 ONEQ
  1. ;
  1. ; - handle updating of clock
  1. I "^1^2^3^"'[("^"_IBXA_"^") G ONEQ
  1. I 'IBCHG G ONEQ
  1. 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
  1. D CLOCK^IBECEAU(-IBCHG,+$P(IBCLST,"^",9),-IBUNIT)
  1. ;
  1. ONEQ D ERR^IBECEAU4:IBY<0,PAUSE^IBECEAU
  1. K IBCHG,IBCRES,IBDESC,IBIL,IBND,IBSEQNO,IBTOTL,IBUNIT,IBATYP,IBIDX
  1. K IBN,IBREB,IBY,IBEVDA,IBPARNT,IBH,IBCANTR,IBXA,IBSL,IBFR,IBTO,IBNOS,IBCANC
  1. Q
  1. ;
  1. PASS ; Pass the action to Accounts Receivable.
  1. N IBSERV
  1. W !,"Passing the cancellation action to AR... "
  1. S IBNOS=IBN D ^IBR S IBY=Y W:Y>0 "done."
  1. Q