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

IBACVA2.m

Go to the documentation of this file.
  1. IBACVA2 ;ALB/CPM - BULLETINS FOR CHAMPVA BILLING ; 29-JUL-93
  1. ;;2.0;INTEGRATED BILLING;**27,52,240**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ERRMSG(IBIND,IBMSG) ; Process CHAMPVA/TRICARE Error Messages.
  1. ; Input: IBIND -- 1=>billing 0=>canceling
  1. ; IBMSG -- 1=>CHAMPVA msg 2=> TRICARE msg
  1. K IBT S IBPT=$$PT^IBEFUNC(DFN)
  1. S IBMSGT=$S($G(IBMSG)=1:"CHAMPVA inpatient subsistence",1:"TRICARE Pharmacy copayment")
  1. S XMSUB=$E($P(IBPT,"^"),1,14)_" "_$P(IBPT,"^",3)_" - ERROR ENCOUNTERED"
  1. S IBT(1)="An error occurred while "_$S($G(IBIND):"billing",1:"cancelling")_" the "_IBMSGT_" charge"
  1. S IBT(2)=$S($G(IBIND):"to",1:"for")_" the following patient:"
  1. S IBT(3)=" " S IBC=3
  1. S IBDUZ=DUZ D PAT^IBAERR1
  1. ;S Y=+DGPMA D DD^%DT
  1. ;S IBC=IBC+1,IBT(IBC)="Disc Date: "_Y
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. S IBC=IBC+1,IBT(IBC)="The following error was encountered:"
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. D ERR^IBAERR1
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. S IBC=IBC+1,IBT(IBC)="Please review the circumstances surrounding this error and use the"
  1. S IBC=IBC+1,IBT(IBC)="Cancel/Edit/Add Patient Charges' option to bill or cancel any necessary"
  1. S IBC=IBC+1,IBT(IBC)="charges."
  1. D SEND
  1. Q
  1. ;
  1. ADM ; Send a bulletin when CHAMPVA patients are admitted.
  1. K IBT S IBPT=$$PT^IBEFUNC(DFN)
  1. S XMSUB=$E($P(IBPT,"^"),1,14)_" "_$P(IBPT,"^",3)_" - CHAMPVA PATIENT"
  1. S IBT(1)="The following CHAMPVA patient has been admitted:"
  1. S IBT(2)=" ",IBC=2
  1. S IBDUZ=DUZ D PAT^IBAERR1
  1. S Y=+DGPMA D DD^%DT
  1. S IBC=IBC+1,IBT(IBC)=" Adm Date: "_Y
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. S IBC=IBC+1,IBT(IBC)="This patient will be automatically billed the CHAMPVA inpatient"
  1. S IBC=IBC+1,IBT(IBC)="subsistence charge when discharged."
  1. D SEND
  1. Q
  1. ;
  1. WARN(IBB,IBE) ; Send bulletins when discharges are edited or deleted.
  1. ; Input: IBB -- Discharge date before edit
  1. ; IBE -- Discharge date after edit
  1. K IBT S IBPT=$$PT^IBEFUNC(DFN)
  1. S XMSUB=$E($P(IBPT,"^"),1,14)_" "_$P(IBPT,"^",3)_" - DISCHARGE CHANGED"
  1. S IBT(1)="A discharge was "_$S($G(IBE):"edited",1:"deleted")_" for the following CHAMPVA patient:"
  1. S IBT(2)=" " S IBC=2
  1. S IBDUZ=DUZ D PAT^IBAERR1
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. I $G(IBE) D
  1. .S Y=IBB D DD^%DT S IBC=IBC+1,IBT(IBC)="Prev Discharge Date: "_Y
  1. .S Y=IBE D DD^%DT S IBC=IBC+1,IBT(IBC)=" New Discharge Date: "_Y
  1. .S IBC=IBC+1,IBT(IBC)=" "
  1. S IBC=IBC+1,IBT(IBC)="Please review the circumstances surrounding these movement changes,"
  1. S IBC=IBC+1,IBT(IBC)="and use the 'Cancel/Edit/Add Patient Charges' option to bill or cancel"
  1. S IBC=IBC+1,IBT(IBC)="any necessary charges."
  1. D SEND
  1. Q
  1. ;
  1. DEL(DFN,IBN,IBADM) ; Send bulletins when billed admissions are deleted.
  1. ; Input: DFN -- Pointer to the patient in file #2
  1. ; IBN -- Pointer to the cancelled charge in file #350
  1. ; IBADM -- Admission date/time
  1. K IBT S IBPT=$$PT^IBEFUNC(DFN)
  1. S XMSUB=$E($P(IBPT,"^"),1,14)_" "_$P(IBPT,"^",3)_" - ADMISSION DELETED"
  1. S IBT(1)="A billed admission for the following CHAMPVA patient was deleted:"
  1. S IBT(2)=" " S IBC=2
  1. S IBDUZ=DUZ D PAT^IBAERR1
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. S Y=+IBADM D DD^%DT
  1. S IBC=IBC+1,IBT(IBC)=" Adm Date: "_Y
  1. S IBC=IBC+1,IBT(IBC)=" "
  1. S IBC=IBC+1,IBT(IBC)="The inpatient subsistence charge for this admission has been cancelled"
  1. S IBC=IBC+1,IBT(IBC)="in Billing only. You MUST decrease the receivable "_$P($G(^IB(IBN,0)),"^",11)_" down to $0"
  1. S IBC=IBC+1,IBT(IBC)="in the Accounts Receivable module!!"
  1. D SEND
  1. Q
  1. ;
  1. SEND ; Send bulletin to recipients of the Means Test billing mailgroup.
  1. D MAIL^IBAERR1
  1. K IBC,IBT,IBPT,XMSUB,XMY,XMTEXT,XMDUZ,IBMSGT
  1. Q
  1. ;
  1. ON() ; Is the CHAMPVA billing module fully installed?
  1. N X S X=+$O(^IBE(350.1,"E","CHAMPVA SUBSISTENCE",0))
  1. Q +$P($G(^IBE(350.1,X,0)),"^",3)