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

IBRREL.m

Go to the documentation of this file.
  1. IBRREL ;ALB/CPM - RELEASE MEANS TEST CHARGES 'ON HOLD' ; 03-MAR-92
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. EN ; Entry point for stand-alone 'release' option
  1. I '$D(^IB("AH")) W !!,"There are no patients with charges 'on hold' at this time.",! Q
  1. ;
  1. D HOME^%ZIS
  1. W !!,"This option is used to release Means Test/Category C charges which have been"
  1. W !,"placed 'on hold.' Please enter a patient with charges 'on hold,' and these"
  1. W !,"charges will be displayed and may be selected to be released to Accounts",!,"Receivable.",!
  1. ;
  1. ASK ;
  1. ;***
  1. ;I $D(XRT0) S:'$D(XRTN) XRTN="IBRREL" D T1^%ZOSV ;stop rt clock
  1. ;S XRTL=$ZU(0),XRTN="IBRREL-1" D T0^%ZOSV ;start rt clock
  1. ;
  1. R !,"Select PATIENT NAME: ",X:DTIME G END:"^"[$E(X)
  1. I $E(X,1,2)="??" D HLP1 G ASK
  1. I $E(X)="?" D HLP G ASK
  1. S DIC="^DPT(",DIC(0)="QME" D ^DIC K DIC G ASK:Y<1 S DFN=+Y
  1. ;
  1. K IBA,PRCABN
  1. S IBI=0 F IBNUM=1:1 S IBI=$O(^IB("AH",DFN,IBI)) Q:'IBI S IBA(IBNUM)=IBI
  1. I '$D(IBA) W !!,"This patient does not have any charges 'on hold.'",! G ASK
  1. ;
  1. S IBPT=$$PT^IBEFUNC(DFN) W @IOF,$P(IBPT,"^")," Pt ID: ",$P(IBPT,"^",2),! S I="",$P(I,"-",80)="" W I K I
  1. ;
  1. ; - display header and list charges
  1. RESUME W !!,"The following IB Actions ",$S($D(PRCABN):"associated with this bill",1:"for this patient")," are ON HOLD:" D HDR
  1. S IBQ=0 F IBNUM=1:1 Q:'$D(IBA(IBNUM)) D:'(IBNUM#15) Q:IBQ S IBN=IBA(IBNUM) D LST
  1. . R !,"Enter RETURN to continue or '^' to stop: ",X:DTIME S:X["^"!('$T) IBQ=1 Q
  1. ;
  1. ; - prompt user to select IB Actions
  1. S DIR(0)="LA^1:"_(IBNUM-1)_"^K:X[""."" X",DIR("A")="Select IB Action"_$E("s",IBNUM>2)_" (REF #) to release (or '^' to exit): ",DIR("?")="^D HELP^IBRREL"
  1. W ! D ^DIR K DIR I $D(DIRUT)!($D(DUOUT)) G END:$D(PRCABN) D END W ! G ASK
  1. ;
  1. S IBRANGE=Y,IBSEQNO=1,IBDUZ=DUZ
  1. ;
  1. S DIR(0)="Y",DIR("A")="OK to pass "_$S($P(Y,",",2):"these charges",1:"this charge")_" to Accounts Receivable"
  1. D ^DIR K DIR I 'Y!($D(DIRUT))!($D(DUOUT)) G END:$D(PRCABN) D END W ! G ASK
  1. ;
  1. ; - pass charges to Accounts Receivable
  1. W !!,"Passing charges to Accounts Receivable...",! D HDR
  1. F IBCTR=1:1 S IBNUM=$P(IBRANGE,",",IBCTR) Q:'IBNUM I $D(IBA(IBNUM)) S IBNOS=IBA(IBNUM) D ^IBR,ERR:Y<1 I Y>0 S IBN=IBA(IBNUM) D LST
  1. W !!,"The charge"_$E("s",$P(IBRANGE,",",2)>0)_" listed above "_$S($P(IBRANGE,",",2):"have",1:"has")_" been passed to Accounts Receivable.",!
  1. ;
  1. I '$D(PRCABN) W !! S DIR(0)="E" D ^DIR K DIR D END W ! G ASK
  1. ;
  1. END K DIC,DIRUT,DUOUT,DTOUT,IBA,IBAFY,IBARTYP,IBATYP,IBCTR,IBN,IBDA,IBDUZ
  1. K IBFAC,IBI,IBIL,IBRANGE,IBNOS,IBNUM,IBPT,IBQ,IBSEQNO,IBSERV,IBSITE
  1. K IBTOTL,IBTRAN,IBWHER,VA,VAERR,VADM
  1. K:'$D(PRCABN) DFN
  1. ;***
  1. ;I $D(XRT0) S:'$D(XRTN) XRTN="IBRREL" D T1^%ZOSV ;stop rt clock
  1. Q
  1. ;
  1. ;
  1. HDR ; Display charge header.
  1. N IBLINE S $P(IBLINE,"=",81)=""
  1. W !,IBLINE,!," REF Action ID Bill Type",?42,"Bill #",?53,"From",?64,"To",?73,"Charge"
  1. W !,IBLINE Q
  1. ;
  1. LST ; Display individual IB Action.
  1. N IBND S IBND=$G(^IB(IBN,0))
  1. W !?1,$J(IBNUM,2),?7,$J(+IBND,9),?18,$P($G(^IBE(350.1,+$P(IBND,"^",3),0)),"^",8)
  1. W ?42,$P($P(IBND,"^",11),"-",2),?51,$$DAT1^IBOUTL($P(IBND,"^",14)),?61,$$DAT1^IBOUTL($P(IBND,"^",15))
  1. W ?70,$J(+$P(IBND,"^",7),9,2)
  1. Q
  1. ;
  1. ERR ; Display error message.
  1. W !?1,$J(IBNUM,2),?7,"Error encountered - a separate bulletin has been posted"
  1. Q
  1. ;
  1. HLP ; Display basic help message.
  1. W !!,"Enter: the name of a patient with charges 'on hold,' or"
  1. W !?10,"'??' -- to see all patients with charges 'on hold,' or"
  1. W !?10,"'^' -- to quit this option.",!
  1. Q
  1. ;
  1. HLP1 ; Display all patients with charges 'on hold.'
  1. N DFN,I,IBQ,PID
  1. W !!,"The following patients have charges 'on hold:'"
  1. S (DFN,IBQ)=0 F I=1:1 S DFN=$O(^IB("AH",DFN)) Q:'DFN D:'(I#15) Q:IBQ S PID=$$PT^IBEFUNC(DFN) W !?3,$P(PID,"^"),$J("",10),$P(PID,"^",2)
  1. . R !,"Enter RETURN to continue or '^' to stop: ",X:DTIME S:X["^"!('$T) IBQ=1 Q
  1. W ! Q
  1. ;
  1. HELP ; Help for the 'Select' prompt.
  1. W !!?4,"Please enter a list or range of IB Actions (i.e. 1,3,5 or 2-4,8), none"
  1. W !?4,"greater than ",IBNUM-1,", to be passed to Accounts Receivable, or '^' to quit."
  1. Q
  1. ;
  1. ;
  1. AR ; Accounts Receivable entry point to release charges.
  1. ; Input: PRCABN -- ien of Bill/Accounts Receivable
  1. Q:$D(PRCABN)[0 Q:'$$IB^IBRUTL(PRCABN,1) G RESUME