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

IBCRBG1.m

Go to the documentation of this file.
  1. IBCRBG1 ;ALB/ARH - RATES: BILL SOURCE EVENTS (OPT,CPT) ; 5/21/96
  1. ;;2.0;INTEGRATED BILLING;**52,106,148,245**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. OPTVD(IBIFN,ARR) ; outpatient visit dates on a bill
  1. ; returns ARR = cnt of visit dates found
  1. ; ARR(DA of visit) = date
  1. ;
  1. N IBI,IBX K ARR S ARR=0,IBIFN=+$G(IBIFN)
  1. S IBI=0 F S IBI=$O(^DGCR(399,IBIFN,"OP",IBI)) Q:'IBI D
  1. . S IBX=+$G(^DGCR(399,IBIFN,"OP",IBI,0))
  1. . I +IBX S ARR=ARR+1,ARR(+IBI)=IBX
  1. Q
  1. ;
  1. CPT(IBIFN,ARR) ; find all CPT codes for a bill (excludes ICD9)
  1. ; returns ARR = cnt of CPT's found
  1. ; ARR(CPT,DA of CPT) = date ^ modifiers ^ division ^ provider ^ clinic ^ ptr to 409.68 ^ minutes ^ miles ^ hours
  1. ;
  1. N IBI,IBX K ARR S ARR=0,IBIFN=+$G(IBIFN)
  1. S IBI=0 F S IBI=$O(^DGCR(399,IBIFN,"CP",IBI)) Q:'IBI D
  1. . S IBX=$G(^DGCR(399,IBIFN,"CP",IBI,0))
  1. . I +IBX,IBX[";ICPT(" S ARR=ARR+1,ARR(+IBX,IBI)=$P(IBX,U,2)_U_$$GETMOD^IBEFUNC(IBIFN,IBI)_U_$P(IBX,U,6)_U_$P(IBX,U,18)_U_$P(IBX,U,7)_U_$P(IBX,U,20)_U_$P(IBX,U,16)_U_$P(IBX,U,21)_U_$P(IBX,U,22)
  1. Q