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

IBARXEX1.m

Go to the documentation of this file.
  1. IBARXEX1 ;ALB/AAS - RX COPAY INCOME EXEMPTION ROUTINE - MANUAL UPDATE OPTION, CONT. ; 16-NOV-92
  1. ;;Version 2.0 ; INTEGRATED BILLING ;**34**; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;
  1. AUTO ; -- auto update of exemption reason file and billing pat file.
  1. ; -- if computes to pending but status is adjudicated quit
  1. N IBOLDAUT,IBFORCE
  1. I $$NETW^IBARXEU1,$P(IBSTAT,"^",5)=130 S X=$$LST^IBARXEU0(DFN,DT),Y=$P($G(^IBE(354.2,$P(X,"^",5),0)),"^",5) I Y=140!(Y=150) Q
  1. ;
  1. ; -- ask if sure
  1. S DIR(0)="Y",DIR("A")="Update Patient Billing Status",DIR("B")="NO" D ^DIR K DIR I $D(DIRUT)!(Y<1) S IBQUIT=1 G AUTOQ
  1. D SELCY^IBARXEX G:IBQUIT AUTOQ
  1. ;
  1. L +^IBA(354,DFN):5 I '$T W !,"Another User accessing Record, Try Again Later." G AUTOQ
  1. S IBCHANGE=1
  1. ;
  1. S (IBEVT,X)=$$STATUS^IBARXEU1(DFN,IBDT)
  1. ;
  1. ; -- not currently autoexempt, see if most recent is auto
  1. S IBOLDAUT=""
  1. I $L($P(^IBE(354.2,+IBEVT,0),"^",5))>2 D OLDAUT(IBEVT)
  1. ;
  1. ; -- first inactivate all entries for day
  1. S IBFORCE=$P(X,"^",2)
  1. ;
  1. ; -- for income, inactivate most recent
  1. D MOSTR^IBARXEU5($P(X,"^",2),+X)
  1. D ADDEX^IBAUTL6(+X,$P(X,"^",2),1,1,$G(IBOLDAUT))
  1. L -^IBA(354,DFN)
  1. ;W !!,"Entry Updated!"
  1. AUTOQ K IBFORCE D PAUSE^IBOUTL
  1. Q
  1. ;
  1. OLDAUT(X1) ; -- not currently autoexempt, most current is auto exempt delete
  1. ; inactivate autoexempt
  1. N X
  1. S X=$$LSTAC^IBARXEU0(DFN) I $L(+X)'=3,$P(X,"^",2)'<$P(X1,"^",2) S IBOLDAUT=$P(X,"^",2)
  1. Q
  1. ;
  1. MANUAL ; -- allow user to do manual change
  1. S DIR(0)="Y",DIR("A")="Do you wish to manually assign a Hardship Copay Exemption",DIR("B")="NO" D ^DIR K DIR I $D(DIRUT)!(Y<1) S IBQUIT=1 G MANUALQ
  1. ;
  1. D SELCY^IBARXEX G:IBQUIT MANUALQ
  1. S IBEXREA=$O(^IBE(354.2,"ACODE",2010,0)) ;only hardships
  1. S IBCODA=2010
  1. ;
  1. ; -- if current exemption is exempt can't give hardship
  1. S X=$$LST^IBARXEU0(DFN,IBDT)
  1. I +X'<(DT-100000),$P(X,"^",4) K IBEXREA W !!,"You can only give a hardship to a Non-Exempt patient",!,*7 G MANUALQ
  1. ;
  1. L +^IBA(354,DFN):5 I '$T W !,"Another User accessing record, Try Again Later." G MANUALQ
  1. S IBCHANGE=1
  1. S DIR(0)="Y",DIR("A")="Are You Sure" D ^DIR K DIR G:$D(DIRUT)!(Y<1) MANUALQ
  1. ;
  1. ; -- get electronic signature code
  1. D SIG^XUSESIG
  1. I X1=""!(X'=X1) W !,"Not your electronic signature" G MANUALQ
  1. S IBASIG=X1
  1. ;
  1. ; -- add new exemption
  1. D ADDEX^IBAUTL6(IBEXREA,IBDT,2,1)
  1. ;
  1. MANUALQ L -^IBA(354,DFN)
  1. D PAUSE^IBOUTL
  1. Q