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

IBAUTL7.m

Go to the documentation of this file.
  1. IBAUTL7 ;AAS/ALB - RX EXEMPTION UTILITY ROUTINE (CONT.) ; 2-NOV-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. CURREX(IBSTAT,IBDT) ;update current status if current year
  1. ; input : dfn = patient file pointer
  1. ; ibdt = internal form of effective date
  1. ; ibstat = status = 1 if exempt, 0 if not exempt
  1. ;
  1. N X,Y,DIC,DIE,DR,DA
  1. I $S('$D(DFN):1,'$D(IBSTAT):1,IBSTAT=0:0,IBSTAT=1:0,1:1) G CURREXQ
  1. ;
  1. ; -- make sure ibdt > old current date
  1. S X=+$P($G(^IBA(354,DFN,0)),"^",3)
  1. I '$G(IBFORCE),$G(IBOLDAUT)'?7N,X>IBDT G CURREXQ ;only if most recent (I took this out for awhile but don't know why, its needed to keep from updating old over new)
  1. ;
  1. ; -- not greater than today
  1. ;I IBDT>DT G CURREXQ
  1. ;
  1. S DIE="^IBA(354,",DA=DFN,DR="[IB CURRENT STATUS]" D ^DIE ; set status in billing patient file
  1. I $D(Y) S IBEXERR=6,IBWHER=14
  1. ;DR=".04////"_IBSTAT_";.03////"_IBDT_";.05////"_IBEXREA
  1. ;
  1. CURREXQ Q
  1. ;
  1. INACT(IBDT) ; -- must inactivate active exemptions before creating new exemption
  1. ; should only be called from addex so event driver logic works
  1. ;
  1. N IBX,X,Y,DA,DR,DIE,DIC
  1. S IBX=0 F S IBX=$O(^IBA(354.1,"AIVDT",1,DFN,-IBDT,IBX)) Q:'IBX D
  1. .S DA=IBX
  1. .I $P($G(^IBA(354.1,DA,0)),"^",10)'=1 Q
  1. .I '$D(ZTQUEUED),$D(IBTALK) W:IBTALK<2 !,"Deleting Active flag from current entry" S IBTALK=IBTALK+1
  1. .S DA=IBX,DIE="^IBA(354.1,",DR="[IB INACTIVATE EXEMPTION]" D ^DIE K DIC,DIE,DA,DR
  1. .I $D(Y) S IBEXERR=7,IBWHER=15
  1. .;S IBACTION="CHG"
  1. .Q
  1. INACTQ Q
  1. ;
  1. DUPL() ; -- see if entry is a duplicate
  1. N X,Y
  1. S X=0
  1. S Y=$$LST^IBARXEU0(DFN,IBDT)
  1. I IBDT=+Y,+IBEXREA=+$P(Y,"^",5),IBTYPE=$P(Y,"^",3) S X=1
  1. Q X
  1. ;
  1. ;
  1. ALERT() ; -- use alerts or bulletins
  1. ; returns 1 = use alerts
  1. ; 0 = use bulletins
  1. ;
  1. Q $P($G(^IBE(350.9,1,0)),"^",14)