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

IBCU1.m

Go to the documentation of this file.
  1. IBCU1 ;ALB/MRL - BILLING UTILITY ROUTINE (CONTINUED) ;01 JUN 88 12:00
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;MAP TO DGCRU1
  1. ;
  1. ;procedure doesn't appear to be used (6/4/93), if it is used, what for??
  1. ;where would multiple provider numbers comde from? ARH
  1. ;BCH ;Blue Cross/Shield Help
  1. W ! S IB01=$P($G(^IBE(350.9,1,1)),"^",6)
  1. I IB01]"" W "CHOOSE FROM",!!?4,"1 - ",$P(IB01,"^",6) F IB00=2,3 I $P(IB01,"^",$S(IB00=2:14,1:15))]"" W !?4,IB00," - ",$P(IB01,"^",$S(IB00=2:14,1:15))
  1. W:IB01']"" "NO BLUE CROSS/SHIELD PROVIDER NUMBERS IDENTIFIED TO SELECT FROM!" W ! W:IB01]"" !,"OR " W "ENTER BLUE CROSS/SHIELD PROVIDER # (BETWEEN 3-13 CHARACTERS)",! K IB00,IB01 Q
  1. ;
  1. RCD ;Revenue Code Display
  1. Q:'$D(^DGCR(399,IBIFN,"RC"))
  1. W @IOF,!,"Revenue Code Listing"
  1. S DGIFN=0 F IBI=0:0 S DGIFN=$O(^DGCR(399,IBIFN,"RC",DGIFN)) Q:'DGIFN I $D(^DGCR(399,IBIFN,"RC",DGIFN,0)) S Z=^(0) D DISRC
  1. I $D(DIC(0)) S DIC(0)=DIC(0)_"N"
  1. Q
  1. DISRC W !?4,DGIFN,?8,$P(^DGCR(399.2,+Z,0),"^"),"-",$E($P(^DGCR(399.2,+Z,0),"^",2),1,20),?35,"Units = ",$P(Z,"^",3),?46 S X=$P(Z,"^",2),X2="2$" D COMMA^%DTC W X I $P(Z,"^",5),$D(^DGCR(399.1,$P(Z,"^",5),0)) W ?59,$E($P(^(0),"^"),1,20)
  1. Q
  1. ;
  1. ORDNXT(IFN) ;CALLED BY TRIGGER ON (362.3,.02) THAT SETS DX PRINT ORDER (362.3,.03),
  1. ;returns the highest print order used on the bill plus 3, returns 3 if no existing print order
  1. ;used for the default print order so that dx's can be printed in order of entry without any input by the user,
  1. ;3 is added to allow spaces for additions, changes, moves
  1. N X,Y S X="" I $D(^DGCR(399,+$G(IFN),0)) S X=3,Y=0 F S Y=$O(^IBA(362.3,"AO",+IFN,Y)) Q:'Y S X=Y+3
  1. Q X
  1. ;
  1. ORDDUP(ORD,DIFN) ;returns true if print order ORD is already defined for a bill (not same entry)
  1. N IBX,IBY S IBY=0
  1. I +$G(ORD) S IBX=$G(^IBA(362.3,+$G(DIFN),0)) I +IBX,+$P(IBX,U,3)'=ORD,$D(^IBA(362.3,"AO",+$P(IBX,U,2),+ORD)) S IBY=1
  1. Q IBY
  1. ;
  1. DXDUP(DX,DIFN,IFN) ;returns true if DX is already defined for a bill (not same entry)
  1. ;either DIFN or IFN can be passed, both are not needed, DIFN is needed during edit so can reenter the same dx
  1. N IBX,IBY S IBY=0 I +$G(DX),'$G(IFN) S IBX=$G(^IBA(362.3,+$G(DIFN),0)),IFN=+$P(IBX,U,2)
  1. I +$G(DX),$D(^IBA(362.3,"AIFN"_+IFN,+DX)),$O(^IBA(362.3,"AIFN"_+IFN,+DX,0))'=+$G(DIFN) S IBY=1
  1. Q IBY
  1. ;
  1. DXBSTAT(DIFN,IFN) ;returns a diagnosis' bill status (either DIFN or IFN can be passed, both are not needed)
  1. N IBX,IBY I '$G(IFN) S IBX=$G(^IBA(362.3,+$G(DIFN),0)),IFN=+$P(IBX,U,2)
  1. S IBY=+$P($G(^DGCR(399,+IFN,0)),U,13)
  1. Q IBY