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

IBAGMT.m

Go to the documentation of this file.
  1. IBAGMT ;WOIFO/AAT-GEOGRAPHIC MEANS TEST UTILITIES ;7-JUN-02
  1. ;;2.0;INTEGRATED BILLING;**179,183,202**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. Q
  1. ;
  1. ;GMT Effective Date
  1. ;~~~~~~~~~~~~~~~~~~
  1. GMTEFD() Q 3021001
  1. ;
  1. ;
  1. ;Is this a GMT Action Type?
  1. ;~~~~~~~~~~~~~~~~~~~~~~~~~~
  1. ;Input: IBATYP - IEN of Action Type file (#350.1)
  1. ;Output: 1- yes, 0-no
  1. ISGMTTYP(IBATYP) N IBBG ; Billing group
  1. S IBBG=+$P($G(^IBE(350.1,+$G(IBATYP),0)),"^",11)
  1. ;All Inpatient Means Test Billing Groups:
  1. ;IBBG=1: INPT/NHCU FEE SERVICE
  1. ;IBBG=2: INPT/NHCU COPAY
  1. ;IBBG=3: INPT/NHCU PER DIEM
  1. Q (IBBG>0)&(IBBG<4) ; Return 'true' for MT Inpatient types
  1. ;
  1. ;
  1. ;Does the patient have GMT Copayment Status?
  1. ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1. ;Input: DFN - IEN of the Patient
  1. ; IBDT - date of status
  1. ;Output: Boolean value (1- yes, 0-no)
  1. ISGMTPT(DFN,IBDT) N IBGMT ;
  1. S DFN=+DFN
  1. I '$G(IBDT) S IBDT=DT
  1. I IBDT<$$GMTEFD() Q 0 ;Prior to the GMT effective date
  1. I $T(GMT^DGMTUB)="" Q 0
  1. S IBGMT=$$GMT^DGMTUB(DFN,IBDT)
  1. Q $S(IBGMT<0:0,1:IBGMT)
  1. ;
  1. ; Is the bill GMT-related? (That means 'True' if at least one charge is GMT-related).
  1. ; ~~~~~~~~~~~~~~~~~~~~~~~~
  1. ; Input: IBNAM - the Bill's Name (not IEN !)
  1. ; Output: 1 - Yes, 0 - No
  1. ISGMTBIL(IBNAM) N IBACT,IBRES
  1. S IBRES=0 ;Default Result
  1. I IBNAM'="" S IBACT=0 F S IBACT=$O(^IB("ABIL",IBNAM,IBACT)) Q:'IBACT D Q:IBRES
  1. . I $P($G(^IB(IBACT,0)),"^",21) S IBRES=1
  1. Q IBRES
  1. ;
  1. HOLD(X) ;The function is disabled
  1. Q 0 ; Stub function
  1. ;
  1. ; The rule to convert MT Charge to GMT rate (20%, rounded).
  1. ; Input: MT Charge
  1. ; Output: GMT Charge
  1. REDUCE(IBCRG) Q +$J(IBCRG*.2,"",2)
  1. ;
  1. ;
  1. ; The API Call, used by Enrollment during the GMT Comversion, disabled.
  1. RELHOLD(DFN,IBFORCE) N IBACT,IBDT,X,IBODT,IBGMTEFD,IBLIMIT,IBCNT
  1. Q "-1^The function is disabled"