IBCNSP3 ;ALB/AAS - INSURANCE MANAGEMENT EDIT ; 06-JUL-93
;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
;;Per VHA Directive 10-93-142, this routine should not be modified.
;
% G ^IBCNSM4
;
SAVEPT(DFN,DA) ; -- Save the global before editing
K ^TMP($J,"IBCNSPT")
S ^TMP($J,"IBCNSPT",2.312,DFN,DA,0)=$G(^DPT(DFN,.312,DA,0))
S ^TMP($J,"IBCNSPT",2.312,DFN,DA,1)=$G(^DPT(DFN,.312,DA,1))
S ^TMP($J,"IBCNSPT",2.312,DFN,DA,2)=$G(^DPT(DFN,.312,DA,2))
Q
;
COMPPT(DFN,DA) ; -- Compare before editing with globals
S IBDIF=0
I $G(^DPT(DFN,.312,DA,0))'=$G(^TMP($J,"IBCNSPT",2.312,DFN,DA,0)) S IBDIF=1 G COMPPTQ
I $G(^DPT(DFN,.312,DA,1))'=$G(^TMP($J,"IBCNSPT",2.312,DFN,DA,1)) S IBDIF=1 G COMPPTQ
I $G(^DPT(DFN,.312,DA,2))'=$G(^TMP($J,"IBCNSPT",2.312,DFN,DA,2)) S IBDIF=1 G COMPPTQ
;
COMPPTQ I IBDIF D:'$D(IBCOVP) COVERED^IBCNSM31(DFN,$P($G(^DPT(DFN,.31)),"^",11))
Q
;
UPDATPT(DFN,DA) ; -- enter date and user if editing has taken place
N DR,DIE,DIC
S DIE="^DPT("_DFN_",.312,",DA(1)=DFN
S DR="1.05///NOW;1.06////"_DUZ
D ^DIE
Q
;
EM ; -- Employer for claims update
D FULL^VALM1 W !!
N IBDIF,DA,DR,DIC,DIE
D SAVEPT(DFN,IBCDFN)
D VARS
L +^DPT(DFN,.312,+$P($G(IBPPOL),"^",4)):5 I '$T D LOCKED^IBTRCD1 G EMQ
S DR="2.01;S:'$P($G(^DPT(DFN,.312,+$G(DA),2)),U) Y=""@999"";W !!,""*** If ROI applies, make sure current consent is signed! ***"",!;2.015;2.02;2.03;2.04;2.05;2.06;2.07;2.08;2.09;@999"
D ^DIE K DIE,DR
I '$P($G(^DPT(DFN,.312,+$G(DA),2)),U) D VARS S DR="2.015///@;2.02///@;2.03///@;2.04///@;2.05///@;2.06///@;2.07///@;2.08///@" D ^DIE
D COMPPT(DFN,IBCDFN)
I IBDIF D UPDATPT(DFN,IBCDFN),BLD^IBCNSP
L -^DPT(DFN,.312,+$P($G(IBPPOL),"^",4))
EMQ S VALMBCK="R" Q
;
AC ; -- Add Comment
D FULL^VALM1 W !!
N IBDIF,DA,DR,DIE,DIC,X,Y
D SAVEPT(DFN,IBCDFN)
W !!,"You may now enter a brief comment about this patient's policy"
D VARS
L +^DPT(DFN,.312,+$P($G(IBPPOL),"^",4)):5 I '$T D LOCKED^IBTRCD1 G ACQ
S DR="1.08" D ^DIE
D COMPPT(DFN,IBCDFN) I IBDIF D UPDATPT(DFN,IBCDFN)
L -^DPT(DFN,.312,+$P($G(IBPPOL),"^",4))
W !!,"You may now enter comments about this Group Plan that pertains to all Patients"
L +^IBA(355.3,+IBCPOL):5 I '$T D LOCKED^IBTRCD1 G ACQ
S DIE="^IBA(355.3,",DA=IBCPOL,DR="11" D ^DIE
D BLD^IBCNSP
L -^IBA(355.3,+IBCPOL)
ACQ S VALMBCK="R" Q
;
BLS(X,Y) ; -- blank a section of lines
N I
F I=X:1:Y D BLANK^IBCNSP(.I)
Q
;
VARS ; -- set vars for call to die for .312 node
S DA(1)=DFN,DA=$P(IBPPOL,"^",4)
S DIE="^DPT("_DA(1)_",.312,"
Q
;
SAVE(IBCPOL) ; -- Save the global before editing
K ^TMP($J,"IBCNSP")
S ^TMP($J,"IBCNSP",355.3,IBCPOL,0)=$G(^IBA(355.3,IBCPOL,0))
S ^TMP($J,"IBCNSP",355.3,IBCPOL,1)=$G(^IBA(355.3,IBCPOL,1))
Q
;
COMP(IBCPOL) ; -- Compare before editing with globals
S IBDIF=0
I $G(^IBA(355.3,IBCPOL,0))'=$G(^TMP($J,"IBCNSP",355.3,IBCPOL,0)) S IBDIF=1 Q
I $G(^IBA(355.3,IBCPOL,1))'=$G(^TMP($J,"IBCNSP",355.3,IBCPOL,1)) S IBDIF=1 Q
Q
;
UPDATE(IBCPOL) ; -- Update last edited by
N DA,DIC,DIE,DR
S DIE="^IBA(355.3,",DA=IBCPOL,DR="1.05///NOW;1.06////"_DUZ
D ^DIE
Q
;
RIDERS ; -- add/edit personal riders
;
D FULL^VALM1
N IBDIF,DA,DR,DIE,DIC,X,Y,IBCDFN,IBPRD,IBPRY
S IBCDFN=$P(IBPPOL,"^",4)
W ! D DISPR W !
;
R1 S DIC="^IBA(355.7,",DIC(0)="AEQML",DLAYGO=355.7
S DIC("DR")=".02////"_DFN_";.03////"_IBCDFN
S DIC("S")="I $P(^(0),U,2)=DFN,$P(^(0),U,3)=IBCDFN"
I $D(IBPRD) S DIC("B")=IBPRD
D ^DIC K DIC,IBPRD
I +Y<1 G RIDERQ
S IBPRY=+Y
L +^IBA(355.7,IBPRY):5 I '$T D LOCKED^IBTRCD1 G RIDERQ
S DIE="^IBA(355.7,",DA=+Y,DR=".01"
D ^DIE K DA,DR,DIE,DIC
L -^IBA(355.7,IBPRY)
W ! G R1
RIDERQ S VALMBCK="R"
Q
;
RD ; -- Add riders/ for multiple policies
D FULL^VALM1
N I,J,IBXX,VALMY
D EN^VALM2($G(XQORNOD(0)))
I $D(VALMY) S IBXX=0 F S IBXX=$O(VALMY(IBXX)) Q:'IBXX D
.S IBPPOL=$G(^TMP("IBNSMDX",$J,$O(^TMP("IBNSM",$J,"IDX",IBXX,0))))
.Q:IBPPOL=""
.D RIDERS
.Q
D BLD^IBCNSM
S VALMBCK="R"
Q
;
DISPR ; -- Display riders
N IBPR,I,J
S I=0
I '$G(IBCDFN)!('$G(DFN)) G DISPRQ
W !,"Current Personal Riders: "
F S I=$O(^IBA(355.7,"APP",DFN,IBCDFN,I)) Q:'I S J=$O(^(I,0)),IBPR=$G(^IBA(355.7,+J,0)) D
.S IBPRD=$$EXPAND^IBTRE(355.7,.01,+IBPR)
.W !?5,IBPRD
I '$D(IBPRD) W !?5,"None Indicated"
DISPRQ Q
IBCNSP3 ;ALB/AAS - INSURANCE MANAGEMENT EDIT ; 06-JUL-93
+1 ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
+2 ;;Per VHA Directive 10-93-142, this routine should not be modified.
+3 ;
% GOTO ^IBCNSM4
+1 ;
SAVEPT(DFN,DA) ; -- Save the global before editing
+1 KILL ^TMP($JOB,"IBCNSPT")
+2 SET ^TMP($JOB,"IBCNSPT",2.312,DFN,DA,0)=$GET(^DPT(DFN,.312,DA,0))
+3 SET ^TMP($JOB,"IBCNSPT",2.312,DFN,DA,1)=$GET(^DPT(DFN,.312,DA,1))
+4 SET ^TMP($JOB,"IBCNSPT",2.312,DFN,DA,2)=$GET(^DPT(DFN,.312,DA,2))
+5 QUIT
+6 ;
COMPPT(DFN,DA) ; -- Compare before editing with globals
+1 SET IBDIF=0
+2 IF $GET(^DPT(DFN,.312,DA,0))'=$GET(^TMP($JOB,"IBCNSPT",2.312,DFN,DA,0))
SET IBDIF=1
GOTO COMPPTQ
+3 IF $GET(^DPT(DFN,.312,DA,1))'=$GET(^TMP($JOB,"IBCNSPT",2.312,DFN,DA,1))
SET IBDIF=1
GOTO COMPPTQ
+4 IF $GET(^DPT(DFN,.312,DA,2))'=$GET(^TMP($JOB,"IBCNSPT",2.312,DFN,DA,2))
SET IBDIF=1
GOTO COMPPTQ
+5 ;
COMPPTQ IF IBDIF
IF '$DATA(IBCOVP)
DO COVERED^IBCNSM31(DFN,$PIECE($GET(^DPT(DFN,.31)),"^",11))
+1 QUIT
+2 ;
UPDATPT(DFN,DA) ; -- enter date and user if editing has taken place
+1 NEW DR,DIE,DIC
+2 SET DIE="^DPT("_DFN_",.312,"
SET DA(1)=DFN
+3 SET DR="1.05///NOW;1.06////"_DUZ
+4 DO ^DIE
+5 QUIT
+6 ;
EM ; -- Employer for claims update
+1 DO FULL^VALM1
WRITE !!
+2 NEW IBDIF,DA,DR,DIC,DIE
+3 DO SAVEPT(DFN,IBCDFN)
+4 DO VARS
+5 LOCK +^DPT(DFN,.312,+$PIECE($GET(IBPPOL),"^",4)):5
IF '$TEST
DO LOCKED^IBTRCD1
GOTO EMQ
+6 SET DR="2.01;S:'$P($G(^DPT(DFN,.312,+$G(DA),2)),U) Y=""@999"";W !!,""*** If ROI applies, make sure current consent is signed! ***"",!;2.015;2.02;2.03;2.04;2.05;2.06;2.07;2.08;2.09;@999"
+7 DO ^DIE
KILL DIE,DR
+8 IF '$PIECE($GET(^DPT(DFN,.312,+$GET(DA),2)),U)
DO VARS
SET DR="2.015///@;2.02///@;2.03///@;2.04///@;2.05///@;2.06///@;2.07///@;2.08///@"
DO ^DIE
+9 DO COMPPT(DFN,IBCDFN)
+10 IF IBDIF
DO UPDATPT(DFN,IBCDFN)
DO BLD^IBCNSP
+11 LOCK -^DPT(DFN,.312,+$PIECE($GET(IBPPOL),"^",4))
EMQ SET VALMBCK="R"
QUIT
+1 ;
AC ; -- Add Comment
+1 DO FULL^VALM1
WRITE !!
+2 NEW IBDIF,DA,DR,DIE,DIC,X,Y
+3 DO SAVEPT(DFN,IBCDFN)
+4 WRITE !!,"You may now enter a brief comment about this patient's policy"
+5 DO VARS
+6 LOCK +^DPT(DFN,.312,+$PIECE($GET(IBPPOL),"^",4)):5
IF '$TEST
DO LOCKED^IBTRCD1
GOTO ACQ
+7 SET DR="1.08"
DO ^DIE
+8 DO COMPPT(DFN,IBCDFN)
IF IBDIF
DO UPDATPT(DFN,IBCDFN)
+9 LOCK -^DPT(DFN,.312,+$PIECE($GET(IBPPOL),"^",4))
+10 WRITE !!,"You may now enter comments about this Group Plan that pertains to all Patients"
+11 LOCK +^IBA(355.3,+IBCPOL):5
IF '$TEST
DO LOCKED^IBTRCD1
GOTO ACQ
+12 SET DIE="^IBA(355.3,"
SET DA=IBCPOL
SET DR="11"
DO ^DIE
+13 DO BLD^IBCNSP
+14 LOCK -^IBA(355.3,+IBCPOL)
ACQ SET VALMBCK="R"
QUIT
+1 ;
BLS(X,Y) ; -- blank a section of lines
+1 NEW I
+2 FOR I=X:1:Y
DO BLANK^IBCNSP(.I)
+3 QUIT
+4 ;
VARS ; -- set vars for call to die for .312 node
+1 SET DA(1)=DFN
SET DA=$PIECE(IBPPOL,"^",4)
+2 SET DIE="^DPT("_DA(1)_",.312,"
+3 QUIT
+4 ;
SAVE(IBCPOL) ; -- Save the global before editing
+1 KILL ^TMP($JOB,"IBCNSP")
+2 SET ^TMP($JOB,"IBCNSP",355.3,IBCPOL,0)=$GET(^IBA(355.3,IBCPOL,0))
+3 SET ^TMP($JOB,"IBCNSP",355.3,IBCPOL,1)=$GET(^IBA(355.3,IBCPOL,1))
+4 QUIT
+5 ;
COMP(IBCPOL) ; -- Compare before editing with globals
+1 SET IBDIF=0
+2 IF $GET(^IBA(355.3,IBCPOL,0))'=$GET(^TMP($JOB,"IBCNSP",355.3,IBCPOL,0))
SET IBDIF=1
QUIT
+3 IF $GET(^IBA(355.3,IBCPOL,1))'=$GET(^TMP($JOB,"IBCNSP",355.3,IBCPOL,1))
SET IBDIF=1
QUIT
+4 QUIT
+5 ;
UPDATE(IBCPOL) ; -- Update last edited by
+1 NEW DA,DIC,DIE,DR
+2 SET DIE="^IBA(355.3,"
SET DA=IBCPOL
SET DR="1.05///NOW;1.06////"_DUZ
+3 DO ^DIE
+4 QUIT
+5 ;
RIDERS ; -- add/edit personal riders
+1 ;
+2 DO FULL^VALM1
+3 NEW IBDIF,DA,DR,DIE,DIC,X,Y,IBCDFN,IBPRD,IBPRY
+4 SET IBCDFN=$PIECE(IBPPOL,"^",4)
+5 WRITE !
DO DISPR
WRITE !
+6 ;
R1 SET DIC="^IBA(355.7,"
SET DIC(0)="AEQML"
SET DLAYGO=355.7
+1 SET DIC("DR")=".02////"_DFN_";.03////"_IBCDFN
+2 SET DIC("S")="I $P(^(0),U,2)=DFN,$P(^(0),U,3)=IBCDFN"
+3 IF $DATA(IBPRD)
SET DIC("B")=IBPRD
+4 DO ^DIC
KILL DIC,IBPRD
+5 IF +Y<1
GOTO RIDERQ
+6 SET IBPRY=+Y
+7 LOCK +^IBA(355.7,IBPRY):5
IF '$TEST
DO LOCKED^IBTRCD1
GOTO RIDERQ
+8 SET DIE="^IBA(355.7,"
SET DA=+Y
SET DR=".01"
+9 DO ^DIE
KILL DA,DR,DIE,DIC
+10 LOCK -^IBA(355.7,IBPRY)
+11 WRITE !
GOTO R1
RIDERQ SET VALMBCK="R"
+1 QUIT
+2 ;
RD ; -- Add riders/ for multiple policies
+1 DO FULL^VALM1
+2 NEW I,J,IBXX,VALMY
+3 DO EN^VALM2($GET(XQORNOD(0)))
+4 IF $DATA(VALMY)
SET IBXX=0
FOR
SET IBXX=$ORDER(VALMY(IBXX))
IF 'IBXX
QUIT
Begin DoDot:1
+5 SET IBPPOL=$GET(^TMP("IBNSMDX",$JOB,$ORDER(^TMP("IBNSM",$JOB,"IDX",IBXX,0))))
+6 IF IBPPOL=""
QUIT
+7 DO RIDERS
+8 QUIT
End DoDot:1
+9 DO BLD^IBCNSM
+10 SET VALMBCK="R"
+11 QUIT
+12 ;
DISPR ; -- Display riders
+1 NEW IBPR,I,J
+2 SET I=0
+3 IF '$GET(IBCDFN)!('$GET(DFN))
GOTO DISPRQ
+4 WRITE !,"Current Personal Riders: "
+5 FOR
SET I=$ORDER(^IBA(355.7,"APP",DFN,IBCDFN,I))
IF 'I
QUIT
SET J=$ORDER(^(I,0))
SET IBPR=$GET(^IBA(355.7,+J,0))
Begin DoDot:1
+6 SET IBPRD=$$EXPAND^IBTRE(355.7,.01,+IBPR)
+7 WRITE !?5,IBPRD
End DoDot:1
+8 IF '$DATA(IBPRD)
WRITE !?5,"None Indicated"
DISPRQ QUIT