IBCNSP0 ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ; 05-MAR-1993
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
;
CONTACT ; -- Insurance Contact Information
N OFFSET,START
S START=22,OFFSET=42
N IBTRC,IBTRCD,IBTCOD
S IBTCOD=$O(^IBE(356.11,"ACODE",85,0))
;
S IBTRC=0,IBTRCD=""
F S IBTRC=$O(^IBT(356.2,"D",DFN,IBTRC)) Q:'IBTRC D
.Q:$P($G(^IBT(356.2,+IBTRC,1)),"^",5)'=IBCDFN ; must be same policy
.Q:$P($G(^IBT(356.2,+IBTRC,0)),"^",4)'=IBTCOD ; must be ins. ver. type
.S IBTRCD=$G(^IBT(356.2,+IBTRC,0))
.;S IBLCNT=IBLCNT+1
.;D SET(START
;
D SET(START,OFFSET," Insurance Contact (last) ",IORVON,IORVOFF)
D SET(START+1,OFFSET," Person Contacted: "_$$EXPAND^IBTRE(356.2,.06,$P(IBTRCD,"^",6)))
D SET(START+2,OFFSET,"Method of Contact: "_$$EXPAND^IBTRE(356.2,.17,$P(IBTRCD,"^",17)))
D SET(START+3,OFFSET," Contact's Phone: "_$$EXPAND^IBTRE(356.2,.07,$P(IBTRCD,"^",7)))
D SET(START+4,OFFSET," Call Ref. No.: "_$$EXPAND^IBTRE(356.2,.09,$P(IBTRCD,"^",9)))
D SET(START+4,OFFSET," Contact Date: "_$$EXPAND^IBTRE(356.2,.01,$P(IBTRCD,"^")))
Q
;
POLICY ; -- Policy Region
; -- if pointer to policy file exists get data from policy file
N OFFSET,START,IBP
S START=1,OFFSET=2
D SET(START,OFFSET," Plan Information ",IORVON,IORVOFF)
D SET(START+1,OFFSET," Is Group Plan: "_$S($P(IBCPOLD,"^",2)=1:"YES",1:"NO"))
D SET(START+2,OFFSET," Group Name: "_$P(IBCPOLD,"^",3))
D SET(START+3,OFFSET," Group Number: "_$P(IBCPOLD,"^",4))
D SET(START+4,OFFSET," Type of Plan: "_$P($G(^IBE(355.1,+$P(IBCPOLD,"^",9),0)),"^"))
; -- in case pointer is missing
I '$G(^IBA(355.3,+$P(IBCDFND,"^",18),0)) D
.D SET(START+1,OFFSET,"Insurance Number: "_$P(IBCDFND,"^",2))
.D SET(START+2,OFFSET," Group Name: "_$P(IBCDFND,"^",15))
.D SET(START+3,OFFSET," Group Number: "_$P(IBCDFND,"^",3))
.Q
Q
;
INS ; -- Insurance Co. Region
N OFFSET,START,IBADD,IBCDFNDA
S START=1,OFFSET=45
D SET(START,OFFSET," Insurance Company ",IORVON,IORVOFF)
D SET(START+1,OFFSET," Company: "_$P($G(^DIC(36,+IBCDFND,0)),"^"))
S IBCDFNDA=$G(^DIC(36,+IBCDFND,.11))
G:IBCDFNDA="" INSQ
D SET(START+2,OFFSET," Street: "_$P(IBCDFNDA,"^")) S IBADD=1
I $P(IBCDFNDA,"^",2)'="" D SET(START+3,OFFSET," Street 2: "_$P(IBCDFNDA,"^",2)) S IBADD=2
I $P(IBCDFNDA,"^",3)'="" D SET(START+4,OFFSET," Street 3: "_$P(IBCDFNDA,"^",3)) S IBADD=3
D SET(START+2+IBADD,OFFSET,"City/State: "_$E($P(IBCDFNDA,"^",4),1,15)_$S($P(IBCDFNDA,"^",4)="":"",1:", ")_$P($G(^DIC(5,+$P(IBCDFNDA,"^",5),0)),"^",2)_" "_$E($P(IBCDFNDA,"^",6),1,5))
;
INSQ Q
;
BLANK(LINE) ; -- Build blank line
D SET^VALM10(.LINE,$J("",80))
Q
;
SET(LINE,COL,TEXT,ON,OFF) ; -- set display info in array
D:'$D(@VALMAR@(LINE,0)) BLANK(.LINE)
D SET^VALM10(.LINE,$$SETSTR^VALM1(.TEXT,@VALMAR@(LINE,0),.COL,$L(TEXT)))
D:$G(ON)]""!($G(OFF)]"") CNTRL^VALM10(.LINE,.COL,$L(TEXT),$G(ON),$G(OFF))
W:'(LINE#5) "."
Q
IBCNSP0 ;ALB/AAS - INSURANCE MANAGEMENT - EXPANDED POLICY ; 05-MAR-1993
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
+4 ;
CONTACT ; -- Insurance Contact Information
+1 NEW OFFSET,START
+2 SET START=22
SET OFFSET=42
+3 NEW IBTRC,IBTRCD,IBTCOD
+4 SET IBTCOD=$ORDER(^IBE(356.11,"ACODE",85,0))
+5 ;
+6 SET IBTRC=0
SET IBTRCD=""
+7 FOR
SET IBTRC=$ORDER(^IBT(356.2,"D",DFN,IBTRC))
IF 'IBTRC
QUIT
Begin DoDot:1
+8 ; must be same policy
IF $PIECE($GET(^IBT(356.2,+IBTRC,1)),"^",5)'=IBCDFN
QUIT
+9 ; must be ins. ver. type
IF $PIECE($GET(^IBT(356.2,+IBTRC,0)),"^",4)'=IBTCOD
QUIT
+10 SET IBTRCD=$GET(^IBT(356.2,+IBTRC,0))
+11 ;S IBLCNT=IBLCNT+1
+12 ;D SET(START
End DoDot:1
+13 ;
+14 DO SET(START,OFFSET," Insurance Contact (last) ",IORVON,IORVOFF)
+15 DO SET(START+1,OFFSET," Person Contacted: "_$$EXPAND^IBTRE(356.2,.06,$PIECE(IBTRCD,"^",6)))
+16 DO SET(START+2,OFFSET,"Method of Contact: "_$$EXPAND^IBTRE(356.2,.17,$PIECE(IBTRCD,"^",17)))
+17 DO SET(START+3,OFFSET," Contact's Phone: "_$$EXPAND^IBTRE(356.2,.07,$PIECE(IBTRCD,"^",7)))
+18 DO SET(START+4,OFFSET," Call Ref. No.: "_$$EXPAND^IBTRE(356.2,.09,$PIECE(IBTRCD,"^",9)))
+19 DO SET(START+4,OFFSET," Contact Date: "_$$EXPAND^IBTRE(356.2,.01,$PIECE(IBTRCD,"^")))
+20 QUIT
+21 ;
POLICY ; -- Policy Region
+1 ; -- if pointer to policy file exists get data from policy file
+2 NEW OFFSET,START,IBP
+3 SET START=1
SET OFFSET=2
+4 DO SET(START,OFFSET," Plan Information ",IORVON,IORVOFF)
+5 DO SET(START+1,OFFSET," Is Group Plan: "_$SELECT($PIECE(IBCPOLD,"^",2)=1:"YES",1:"NO"))
+6 DO SET(START+2,OFFSET," Group Name: "_$PIECE(IBCPOLD,"^",3))
+7 DO SET(START+3,OFFSET," Group Number: "_$PIECE(IBCPOLD,"^",4))
+8 DO SET(START+4,OFFSET," Type of Plan: "_$PIECE($GET(^IBE(355.1,+$PIECE(IBCPOLD,"^",9),0)),"^"))
+9 ; -- in case pointer is missing
+10 IF '$GET(^IBA(355.3,+$PIECE(IBCDFND,"^",18),0))
Begin DoDot:1
+11 DO SET(START+1,OFFSET,"Insurance Number: "_$PIECE(IBCDFND,"^",2))
+12 DO SET(START+2,OFFSET," Group Name: "_$PIECE(IBCDFND,"^",15))
+13 DO SET(START+3,OFFSET," Group Number: "_$PIECE(IBCDFND,"^",3))
+14 QUIT
End DoDot:1
+15 QUIT
+16 ;
INS ; -- Insurance Co. Region
+1 NEW OFFSET,START,IBADD,IBCDFNDA
+2 SET START=1
SET OFFSET=45
+3 DO SET(START,OFFSET," Insurance Company ",IORVON,IORVOFF)
+4 DO SET(START+1,OFFSET," Company: "_$PIECE($GET(^DIC(36,+IBCDFND,0)),"^"))
+5 SET IBCDFNDA=$GET(^DIC(36,+IBCDFND,.11))
+6 IF IBCDFNDA=""
GOTO INSQ
+7 DO SET(START+2,OFFSET," Street: "_$PIECE(IBCDFNDA,"^"))
SET IBADD=1
+8 IF $PIECE(IBCDFNDA,"^",2)'=""
DO SET(START+3,OFFSET," Street 2: "_$PIECE(IBCDFNDA,"^",2))
SET IBADD=2
+9 IF $PIECE(IBCDFNDA,"^",3)'=""
DO SET(START+4,OFFSET," Street 3: "_$PIECE(IBCDFNDA,"^",3))
SET IBADD=3
+10 DO SET(START+2+IBADD,OFFSET,"City/State: "_$EXTRACT($PIECE(IBCDFNDA,"^",4),1,15)_$SELECT($PIECE(IBCDFNDA,"^",4)="":"",1:", ")_$PIECE($GET(^DIC(5,+$PIECE(IBCDFNDA,"^",5),0)),"^",2)_" "_$EXTRACT($PIECE(IBCDFNDA,"^",6),1,5))
+11 ;
INSQ QUIT
+1 ;
BLANK(LINE) ; -- Build blank line
+1 DO SET^VALM10(.LINE,$JUSTIFY("",80))
+2 QUIT
+3 ;
SET(LINE,COL,TEXT,ON,OFF) ; -- set display info in array
+1 IF '$DATA(@VALMAR@(LINE,0))
DO BLANK(.LINE)
+2 DO SET^VALM10(.LINE,$$SETSTR^VALM1(.TEXT,@VALMAR@(LINE,0),.COL,$LENGTH(TEXT)))
+3 IF $GET(ON)]""!($GET(OFF)]"")
DO CNTRL^VALM10(.LINE,.COL,$LENGTH(TEXT),$GET(ON),$GET(OFF))
+4 IF '(LINE#5)
WRITE "."
+5 QUIT