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

IBCNSP1.m

Go to the documentation of this file.
IBCNSP1	;ALB/AAS - INSURANCE MANAGEMENT - policy actions ; 22-OCT-92
	;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
	;;Per VHA Directive 10-93-142, this routine should not be modified.
	;
%	G EN^IBCNSP
	;
EA	; -- Edit all
	N IBCDFN,IBTRC,IBTRN
	D FULL^VALM1 W !!
	S IBCDFN=$P($G(IBPPOL),"^",4) I 'IBCDFN W !!,"Can't identify the policy!" G EAQ
	S IBCNSEH=1 D PAT^IBCNSEH
	;
	D PATPOL^IBCNSM3(IBCDFN)
	;
	; -- edit policy data
	D POL^IBCNSEH
	D EDPOL^IBCNSM3(IBCDFN)
	;
	W !! D AI
	;
EAQ	D:$G(IBTRC) AIP^IBCNSP02(IBTRC)
	D BLD^IBCNSP
	S VALMBCK="R"
	Q
	;
AB	; -- Annual Benefits
	I '$D(IBCPOL),$D(IBPPOL) S IBCNS=$P(IBPPOL,"^",5),IBCPOL=$P(IBPPOL,"^",22)
	I '$G(IBCPOL) W !!,"Can't identify the policy!" S VALMBCK="" G ABQ
	D FULL^VALM1 W !!
	D EN^VALM("IBCNS ANNUAL BENEFITS")
	S VALMBCK="R"
ABQ	Q
	;
BU	; -- Benefits Used
	I '$D(IBCPOL),$D(IBPPOL) S IBCNS=$P(IBPPOL,"^",5),IBCPOL=$P(IBPPOL,"^",22)
	I '$G(IBCPOL) W !!,"Can't identify the policy!" S VALMBCK="" G BUQ
	D FULL^VALM1 W !!
	D EN^VALM("IBCNS BENEFITS USED BY DATE")
	S VALMBCK="R"
BUQ	Q
	;
PI	; -- edit policy information
	D FULL^VALM1 W !!
	N IBDIF,DA,DR,DIC,DIE
	S IBCDFN=$P($G(IBPPOL),"^",4)
	;
	S IBCPOL=$P($G(^DPT(DFN,.312,IBCDFN,0)),"^",18)
	I IBCPOL="" S IBCPOL=$$CHIP^IBCNSU($G(^DPT(DFN,.312,IBCDFN,0))) I IBCPOL D  ;Stuff in file
	.S DIE="^DPT("_DFN_",.312,",DR=".18////"_IBCPOL
	.S DA=IBCDFN,DA(1)=DFN
	.D ^DIE
	.K DA,DR,DIE,DIC
	.Q
	;
	; -- Edit the policy specific info
	D SAVE^IBCNSP3(IBCPOL)
	L +^IBA(355.3,+IBCPOL):5 I '$T D LOCKED^IBTRCD1 G PIQ
	S DIE="^IBA(355.3,",DR=".02;.03;.04;.09",DA=IBCPOL
	D ^DIE K DIC,DIE,DA,DR
	D COMP^IBCNSP3(IBCPOL)
	I IBDIF D UPDATE^IBCNSP3(IBCPOL),UPDATPT^IBCNSP3(DFN,IBCDFN),BLD^IBCNSP
	L -^IBA(355.3,+IBCPOL)
PIQ	S VALMBCK="R"
	Q
	;
IT	; -- edit insurance type info
	D FULL^VALM1 W !!
	N IBDIF,DA,DR,DIC,DIE
	D SAVE^IBCNSP3(IBCPOL)
	L +^IBA(355.3,+IBCPOL):5 I '$T D LOCKED^IBTRCD1 G ITQ
	S DA=IBCPOL,DIE="^IBA(355.3,",DR=".05;.06;.07;.08"
	D ^DIE K DIC,DIE,DA,DR
	D COMP^IBCNSP3(IBCPOL)
	I IBDIF D UPDATE^IBCNSP3(IBCPOL),UPDATPT^IBCNSP3(DFN,IBCDFN),BLD^IBCNSP
	L -^IBA(355.3,+IBCPOL)
ITQ	S VALMBCK="R" Q
	;
ED	; -- Edit effective dates
	D FULL^VALM1 W !!
	N IBDIF,DA,DR,DIE,DIC
	D SAVEPT^IBCNSP3(DFN,IBCDFN)
	L +^DPT(DFN,.312,+$P($G(IBPPOL),"^",4)):5 I '$T D LOCKED^IBTRCD1 G EDQ
	D VARS^IBCNSP3
	S DR="8;3"
	D ^DIE K DIC,DIE,DA,DR
	D COMPPT^IBCNSP3(DFN,IBCDFN) I IBDIF D UPDATPT^IBCNSP3(DFN,IBCDFN),BLD^IBCNSP
	L -^DPT(DFN,.312,+$P($G(IBPPOL),"^",4))
EDQ	S VALMBCK="R" Q
	;
VC	; -- Verify Coverage
	D FULL^VALM1 W !!
	D VFY^IBCNSM2
	D BLD^IBCNSP
	S VALMBCK="R" Q
	;
SU	; -- Subscriber Update
	D FULL^VALM1 W !!
	N IBDIF,DA,DR,DIC,DIE
	D SAVEPT^IBCNSP3(DFN,IBCDFN)
	D VARS^IBCNSP3
	L +^DPT(DFN,.312,+$P($G(IBPPOL),"^",4)):5 I '$T D LOCKED^IBTRCD1 G SUQ
	S DR="6;S IBAD=X;I IBAD'=""v"" S Y=""@10"";17///^S X=""`""_DFN;16///^S X=""01"";S Y=""@20"";@10;17;16//^S X=$S(IBAD=""s"":""02"",1:"""");@20;1;.2;"
	D ^DIE K DIC,DIE,DA,DR
	D COMPPT^IBCNSP3(DFN,IBCDFN)
	I IBDIF D UPDATPT^IBCNSP3(DFN,IBCDFN),BLD^IBCNSP
	L -^DPT(DFN,.312,+$P($G(IBPPOL),"^",4))
SUQ	S VALMBCK="R" Q
	;
IC	; -- Insurance Contact Information
	D FULL^VALM1 W !!
	N IBDIF,DA,DR,DIC,DIE,IBTRC,DIR,DUOUT,DTOUT,DIRUT,IBTRN
	D AI
	D:$G(IBTRC) AIP^IBCNSP02(IBTRC),BLD^IBCNSP
	S VALMBCK="R" Q
	Q
AI	; -- Add ins. verification entry
	N X,Y,I,J,DA,DR,DIC,DIE,DR,DD,DO,VA,VAIN,VAERR,IBQUIT,IBXIFN,IBTRN,DUOUT,IBX,IBQUIT,DTOUT
	Q:'$G(DFN)
	Q:'$G(IBCDFN)  S IBQUIT=0
	D AI^IBCNSP02
	Q