IBCNSD ;ALB/NLR - BENEFITS USED BY DATE EDIT ; 9-JUN-93
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
EN ; -- main entry point for IBCNS BENEFITS USED BY DATE
K VALMQUIT,VALMEVL,XQORS,^TMP("XQORS",$J),DIC,%DT,IBYR
S IBCHANGE="OKAY"
D EN^VALM("IBCNS BENEFITS USED BY DATE")
ENQ Q
;
INIT ;
K VALMQUIT
S VALMCNT=0,VALMBG=1
I '$G(IBCDFN) S IBCDFN=$P($G(IBPPOL),"^",4)
I $G(IBYR)'?7N K IBYR
I '$G(IBCPOL) D GETPOL^IBCNSA Q:$D(VALMQUIT)
I '$G(IBYR) D GETYR2^IBCNSA Q:$D(VALMQUIT)
S IBCBU=$$BU^IBCNSU1(DFN,IBCPOL,IBYR,IBCDFN,"")
I '$G(IBCBU) S VALMQUIT="" Q
S IBCBUD=$G(^IBA(355.5,+IBCBU,0))
S IBCGN=$$GRP^IBCNS(IBCPOL)
S IBPAT=1
K ^TMP("IBCNSD",$J)
D BLD
Q
BLD ;
S VALMCNT=28
F I=1:1:30 D BLANK(.I)
S IBCBUD=$G(^IBA(355.5,+IBCBU,0))
S IBCBUD1=$G(^IBA(355.5,+IBCBU,1))
D POL,OPT,INPT,USERINF,ADDCOM
Q
POL ; --Policy information region
N START,OFFSET
S START=1,OFFSET=3
D SET^IBCNSP(START,OFFSET+5," Policy Information ",IORVON,IORVOFF)
;D SET^IBCNSP(START+1,OFFSET+12," Group: "_IBCGN)
;D SET^IBCNSP(START+2,OFFSET+10," Patient: "_$P($G(^DPT($P(IBCBUD,U,2),0)),U,1))
S Y=$P(IBCBUD,U,3)
D D^DIQ
S IBYE=Y
;D SET^IBCNSP(START+3,OFFSET+13," Year: "_IBYE)
D SET^IBCNSP(START+1,OFFSET+8," Deduct. Met?: "_$$YN^IBCNSM($P(IBCBUD,U,4)))
;D SET^IBCNSP(START+1,OFFSET+5," Deduct. Met?: "_$S($P($G(IBCBUD),U,8)=1:"YES",$P($G(IBCBUD),U,4)=0:"NO",1:""))
D SET^IBCNSP(START+2,OFFSET+4," Amt. of Ded. Met: "_$P(IBCBUD,U,5))
D SET^IBCNSP(START+3,OFFSET+4," Pre-exist. Cond.: "_$P(IBCBUD,U,15))
D SET^IBCNSP(START+4,OFFSET+1," Coord. of Ben. Data: "_$P(IBCBUD,U,16))
Q
USERINF ;
S IBDUZ=$P(IBCBUD1,U,2)
N START,OFFSET
S START=15,OFFSET=2
D SET^IBCNSP(START,OFFSET+3," User Information ",IORVON,IORVOFF)
D SET^IBCNSP(START+1,OFFSET+6,"Entered By: "_$P($G(^VA(200,+IBDUZ,0)),U))
D SET^IBCNSP(START+2,OFFSET+6,"Entered On: "_$$DAT1^IBOUTL($P(IBCBUD1,U,1)))
S IBDUZ=$P(IBCBUD1,U,6)
D SET^IBCNSP(START+3,OFFSET+1,"Last Updated By: "_$P($G(^VA(200,+IBDUZ,0)),U))
D SET^IBCNSP(START+4,OFFSET+1,"Last Updated On: "_$$DAT1^IBOUTL($P(IBCBUD1,U,5)))
Q
;
CONTACT ; -- Insurance Contact Information
Q
;
OPT ;
N START,OFFSET
S START=1,OFFSET=42
D SET^IBCNSP(START,OFFSET+7," Outpatient Deductibles ",IORVON,IORVOFF)
D SET^IBCNSP(START+1,OFFSET+13,"Deduct. Met?: "_$S($P($G(IBCBUD),U,8)=1:"YES",$P($G(IBCBUD),U,8)=0:"NO",1:""))
D SET^IBCNSP(START+2,OFFSET+9,"Amt. of Ded. Met: "_$P(IBCBUD,U,9))
D SET^IBCNSP(START+3,OFFSET+6,"MH Ded. (Opt.) Met?: "_$S($P($G(IBCBUD),U,13)=1:"YES",$P($G(IBCBUD),U,13)=0:"NO",1:""))
D SET^IBCNSP(START+4,OFFSET+6,"Amt. of MH Ded. Met: "_$P(IBCBUD,U,14))
D SET^IBCNSP(START+5,OFFSET+4,"Amt. Lifet. Max. Used: "_$P(IBCBUD,U,10))
D SET^IBCNSP(START+6,OFFSET+1,"Amt. MH Lifet. Max. Used: "_$P(IBCBUD,U,20))
Q
INPT ;
N START,OFFSET
S START=8,OFFSET=5
D SET^IBCNSP(START,OFFSET+3," Inpatient Deductibles ",IORVON,IORVOFF)
D SET^IBCNSP(START+1,OFFSET+7,"Deduct. Met?: "_$S($P($G(IBCBUD),U,6)=1:"YES",$P($G(IBCBUD),U,6)=0:"NO",1:""))
D SET^IBCNSP(START+2,OFFSET+3,"Amt. of Ded. Met: "_$P(IBCBUD,U,7))
D SET^IBCNSP(START+3,OFFSET-1,"MH Ded. (Inpt.) Met?: "_$S($P($G(IBCBUD),U,11)=1:"YES",$P($G(IBCBUD),U,11)=0:"NO",1:""))
D SET^IBCNSP(START+4,OFFSET,"Amt. of MH Ded. Met: "_$P(IBCBUD,U,12))
D SET^IBCNSP(START+5,OFFSET-1,"Amt. Lifet. Max Used: "_$P(IBCBUD,U,19))
D SET^IBCNSP(START+6,OFFSET-4,"Amt. MH Lifet. Max Used: "_$P(IBCBUD,U,18))
Q
ADDCOM ;
N START,OFFSET
S START=22,OFFSET=7
D SET^IBCNSP(START,OFFSET," Comments ",IORVON,IORVOFF)
D SET^IBCNSP(START+1,OFFSET+3,""_$P(IBCBUD1,U,8))
Q
;
EXIT ;
;
K VALMQUIT,IBCHANGE,IBCAB,IBCABC,IBCABD,IBYR,IBCBU,IBCBUD,IBCBUD1,IBCGN
D CLEAN^VALM10
Q
BLANK(LINE) ;
D SET^VALM10(.LINE,$J("",80))
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HIBCNSD 3878 printed Dec 13, 2024@02:17:05 Page 2
IBCNSD ;ALB/NLR - BENEFITS USED BY DATE EDIT ; 9-JUN-93
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
EN ; -- main entry point for IBCNS BENEFITS USED BY DATE
+1 KILL VALMQUIT,VALMEVL,XQORS,^TMP("XQORS",$JOB),DIC,%DT,IBYR
+2 SET IBCHANGE="OKAY"
+3 DO EN^VALM("IBCNS BENEFITS USED BY DATE")
ENQ QUIT
+1 ;
INIT ;
+1 KILL VALMQUIT
+2 SET VALMCNT=0
SET VALMBG=1
+3 IF '$GET(IBCDFN)
SET IBCDFN=$PIECE($GET(IBPPOL),"^",4)
+4 IF $GET(IBYR)'?7N
KILL IBYR
+5 IF '$GET(IBCPOL)
DO GETPOL^IBCNSA
if $DATA(VALMQUIT)
QUIT
+6 IF '$GET(IBYR)
DO GETYR2^IBCNSA
if $DATA(VALMQUIT)
QUIT
+7 SET IBCBU=$$BU^IBCNSU1(DFN,IBCPOL,IBYR,IBCDFN,"")
+8 IF '$GET(IBCBU)
SET VALMQUIT=""
QUIT
+9 SET IBCBUD=$GET(^IBA(355.5,+IBCBU,0))
+10 SET IBCGN=$$GRP^IBCNS(IBCPOL)
+11 SET IBPAT=1
+12 KILL ^TMP("IBCNSD",$JOB)
+13 DO BLD
+14 QUIT
BLD ;
+1 SET VALMCNT=28
+2 FOR I=1:1:30
DO BLANK(.I)
+3 SET IBCBUD=$GET(^IBA(355.5,+IBCBU,0))
+4 SET IBCBUD1=$GET(^IBA(355.5,+IBCBU,1))
+5 DO POL
DO OPT
DO INPT
DO USERINF
DO ADDCOM
+6 QUIT
POL ; --Policy information region
+1 NEW START,OFFSET
+2 SET START=1
SET OFFSET=3
+3 DO SET^IBCNSP(START,OFFSET+5," Policy Information ",IORVON,IORVOFF)
+4 ;D SET^IBCNSP(START+1,OFFSET+12," Group: "_IBCGN)
+5 ;D SET^IBCNSP(START+2,OFFSET+10," Patient: "_$P($G(^DPT($P(IBCBUD,U,2),0)),U,1))
+6 SET Y=$PIECE(IBCBUD,U,3)
+7 DO D^DIQ
+8 SET IBYE=Y
+9 ;D SET^IBCNSP(START+3,OFFSET+13," Year: "_IBYE)
+10 DO SET^IBCNSP(START+1,OFFSET+8," Deduct. Met?: "_$$YN^IBCNSM($PIECE(IBCBUD,U,4)))
+11 ;D SET^IBCNSP(START+1,OFFSET+5," Deduct. Met?: "_$S($P($G(IBCBUD),U,8)=1:"YES",$P($G(IBCBUD),U,4)=0:"NO",1:""))
+12 DO SET^IBCNSP(START+2,OFFSET+4," Amt. of Ded. Met: "_$PIECE(IBCBUD,U,5))
+13 DO SET^IBCNSP(START+3,OFFSET+4," Pre-exist. Cond.: "_$PIECE(IBCBUD,U,15))
+14 DO SET^IBCNSP(START+4,OFFSET+1," Coord. of Ben. Data: "_$PIECE(IBCBUD,U,16))
+15 QUIT
USERINF ;
+1 SET IBDUZ=$PIECE(IBCBUD1,U,2)
+2 NEW START,OFFSET
+3 SET START=15
SET OFFSET=2
+4 DO SET^IBCNSP(START,OFFSET+3," User Information ",IORVON,IORVOFF)
+5 DO SET^IBCNSP(START+1,OFFSET+6,"Entered By: "_$PIECE($GET(^VA(200,+IBDUZ,0)),U))
+6 DO SET^IBCNSP(START+2,OFFSET+6,"Entered On: "_$$DAT1^IBOUTL($PIECE(IBCBUD1,U,1)))
+7 SET IBDUZ=$PIECE(IBCBUD1,U,6)
+8 DO SET^IBCNSP(START+3,OFFSET+1,"Last Updated By: "_$PIECE($GET(^VA(200,+IBDUZ,0)),U))
+9 DO SET^IBCNSP(START+4,OFFSET+1,"Last Updated On: "_$$DAT1^IBOUTL($PIECE(IBCBUD1,U,5)))
+10 QUIT
+11 ;
CONTACT ; -- Insurance Contact Information
+1 QUIT
+2 ;
OPT ;
+1 NEW START,OFFSET
+2 SET START=1
SET OFFSET=42
+3 DO SET^IBCNSP(START,OFFSET+7," Outpatient Deductibles ",IORVON,IORVOFF)
+4 DO SET^IBCNSP(START+1,OFFSET+13,"Deduct. Met?: "_$SELECT($PIECE($GET(IBCBUD),U,8)=1:"YES",$PIECE($GET(IBCBUD),U,8)=0:"NO",1:""))
+5 DO SET^IBCNSP(START+2,OFFSET+9,"Amt. of Ded. Met: "_$PIECE(IBCBUD,U,9))
+6 DO SET^IBCNSP(START+3,OFFSET+6,"MH Ded. (Opt.) Met?: "_$SELECT($PIECE($GET(IBCBUD),U,13)=1:"YES",$PIECE($GET(IBCBUD),U,13)=0:"NO",1:""))
+7 DO SET^IBCNSP(START+4,OFFSET+6,"Amt. of MH Ded. Met: "_$PIECE(IBCBUD,U,14))
+8 DO SET^IBCNSP(START+5,OFFSET+4,"Amt. Lifet. Max. Used: "_$PIECE(IBCBUD,U,10))
+9 DO SET^IBCNSP(START+6,OFFSET+1,"Amt. MH Lifet. Max. Used: "_$PIECE(IBCBUD,U,20))
+10 QUIT
INPT ;
+1 NEW START,OFFSET
+2 SET START=8
SET OFFSET=5
+3 DO SET^IBCNSP(START,OFFSET+3," Inpatient Deductibles ",IORVON,IORVOFF)
+4 DO SET^IBCNSP(START+1,OFFSET+7,"Deduct. Met?: "_$SELECT($PIECE($GET(IBCBUD),U,6)=1:"YES",$PIECE($GET(IBCBUD),U,6)=0:"NO",1:""))
+5 DO SET^IBCNSP(START+2,OFFSET+3,"Amt. of Ded. Met: "_$PIECE(IBCBUD,U,7))
+6 DO SET^IBCNSP(START+3,OFFSET-1,"MH Ded. (Inpt.) Met?: "_$SELECT($PIECE($GET(IBCBUD),U,11)=1:"YES",$PIECE($GET(IBCBUD),U,11)=0:"NO",1:""))
+7 DO SET^IBCNSP(START+4,OFFSET,"Amt. of MH Ded. Met: "_$PIECE(IBCBUD,U,12))
+8 DO SET^IBCNSP(START+5,OFFSET-1,"Amt. Lifet. Max Used: "_$PIECE(IBCBUD,U,19))
+9 DO SET^IBCNSP(START+6,OFFSET-4,"Amt. MH Lifet. Max Used: "_$PIECE(IBCBUD,U,18))
+10 QUIT
ADDCOM ;
+1 NEW START,OFFSET
+2 SET START=22
SET OFFSET=7
+3 DO SET^IBCNSP(START,OFFSET," Comments ",IORVON,IORVOFF)
+4 DO SET^IBCNSP(START+1,OFFSET+3,""_$PIECE(IBCBUD1,U,8))
+5 QUIT
+6 ;
EXIT ;
+1 ;
+2 KILL VALMQUIT,IBCHANGE,IBCAB,IBCABC,IBCABD,IBYR,IBCBU,IBCBUD,IBCBUD1,IBCGN
+3 DO CLEAN^VALM10
+4 QUIT
BLANK(LINE) ;
+1 DO SET^VALM10(.LINE,$JUSTIFY("",80))
+2 QUIT