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