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

IB20P150.m

Go to the documentation of this file.
  1. IB20P150 ;LL/ELZ - IB*2.0*150 POST INIT:MILL BILL RX COPAY ;20-FEB-2001
  1. ;;2.0;INTEGRATED BILLING;**150**;21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. POST ;
  1. ;
  1. N X,Y
  1. F X="SPOST","TASK","ERROR","FPOST" S Y=$$NEWCP^XPDUTL(X,X_"^IB20P150")
  1. ;
  1. ; TASK ; task job to init patient accounts
  1. ; ERROR ; new error codes in file 350.8
  1. ;
  1. Q
  1. ;
  1. SPOST ; start post install
  1. N IBA
  1. S IBA(1)="",IBA(2)=" Outpatient Medication Copay Cap Phase I, Post-Install Starting",IBA(3)="" D MES^XPDUTL(.IBA)
  1. Q
  1. ;
  1. FPOST ; finish post install
  1. N IBA
  1. S IBA(1)="",IBA(2)=" Outpatient Medication Copay Cap Phase I, Post-Install Complete",IBA(3)="" D MES^XPDUTL(.IBA)
  1. Q
  1. ;
  1. ;
  1. TASK ; queue off the init task job
  1. N IBA,ZTRTN,ZTDESC,ZTDTH,ZTIO,ZTSK
  1. ;
  1. S IBA(1)=""
  1. ;
  1. ; already scheduled or completed?
  1. I $P(^IBE(350.9,1,0),"^",16) S IBA(2)=" Task already queued or completed!!" G TASKQ
  1. ;
  1. S ZTRTN="ADDPT^IB20P150",ZTDESC="IB initialization of patient accounts"
  1. S ZTDTH="58643,64800",ZTIO="" D ^%ZTLOAD
  1. ;
  1. I ZTSK>0 S $P(^IBE(350.9,1,0),"^",16)=1,IBA(2)=" Initialization proces scheduled task #"_ZTSK
  1. E S IBA(2)=" Initialization process could NOT be scheduled!!"
  1. ;
  1. TASKQ S IBA(3)="" D MES^XPDUTL(.IBA)
  1. Q
  1. ;
  1. ERROR ; add new error coes to 350.8
  1. N DIC,X,Y,IBC,IBX,DO,IBT,DA,IBA,DIK
  1. ;
  1. S IBC=0,(DIC,DIK)="^IBE(350.8,",DIC(0)=""
  1. F IBX=1:1 S IBT=$P($T(TXT+IBX),";",3) Q:'$L(IBT) I '$D(^IBE(350.8,"AC",$P(IBT,"^",3))) K DO S X=$P(IBT,"^") D FILE^DICN I Y>0 S ^IBE(350.8,+Y,0)=IBT,DA=+Y,IBC=IBC+1 D IX^DIK
  1. ;
  1. S IBA(2)=" "_IBC_" entries added to 350.8"
  1. S (IBA(1),IBA(3))=""
  1. ;
  1. ERRORQ ;
  1. D MES^XPDUTL(.IBA)
  1. Q
  1. ;
  1. ADDPT ; Initialize patient's accounts in file #354.7
  1. ;
  1. Q:$P(^IBE(350.9,1,0),"^",16)>1
  1. S $P(^IBE(350.9,1,0),"^",16)=2
  1. ;
  1. N DFN,IBCNT,IBT
  1. ;
  1. ;
  1. S IBCNT=0
  1. ;
  1. S DFN=0 F S DFN=$O(^DPT(DFN)) Q:'DFN D
  1. .;
  1. .; do they have treating facilities?
  1. .S IBT=$$TFL^IBARXMU(DFN,.IBT)
  1. .Q:'IBT
  1. .;
  1. .; - count patients and add account
  1. .S IBCNT=IBCNT+1
  1. .D ADD^IBARXMU(DFN)
  1. ;
  1. MESSAGE ; send a message indicating completed and update flag
  1. ;
  1. N IBSITE,XMSUB,XMDUZ,XMZ,XMY
  1. ;
  1. S IBSITE=$$SITE^VASITE
  1. ;
  1. S XMSUB="COMPLETED INITIALIZATION OF PATIENT ACCOUNTS"
  1. S XMDUZ="INTEGRATED BILLING ("_+IBSITE_")"
  1. D XMZ^XMA2
  1. S ^XMB(3.9,XMZ,2,1,0)="The Integrated Billing package has completed the initialization of the"
  1. S ^XMB(3.9,XMZ,2,2,0)="IB PATIENT COPAY ACCOUNT file (354.7) for station "_$P(IBSITE,"^",2)_" ("_+IBSITE_")."
  1. S ^XMB(3.9,XMZ,2,3,0)=" "
  1. S ^XMB(3.9,XMZ,2,4,0)="There were "_IBCNT_" patients added to the file."
  1. S ^XMB(3.9,XMZ,2,0)="^3.92^"_4_"^"_4_"^"_DT
  1. S XMY("23829@DOMAIN.EXT")=""
  1. S XMY(DUZ)=""
  1. D ENT1^XMD
  1. ;
  1. S $P(^IBE(350.9,1,0),"^",16)=3
  1. Q
  1. ;
  1. ;
  1. TXT ; text of error messages to add
  1. ;;IB CAP UNABLE TO ADD^Unable to add a new rx-copay cap tracking transaction.^IB316^1^2
  1. ;;IB CAP POINTER MISSING^No pointer in 350 transaction to 354.71 file.^IB317^1^2
  1. ;;IB CAP TRAN FILE LOCK^Unable to lock entry in file 354.71.^IB318^1^2
  1. ;;IB CAP PATIENT FILE LOCK^Unable to lock entry in file 354.7.^IB319^1^2