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

IBCNSD.m

Go to the documentation of this file.
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