PRCAP404 ;EDE/SAB - PRCA*4.5*378 POST INSTALL;02/11/21
;;4.5;Accounts Receivable;**404**;Mar 20, 1995;Build 7
;Per VA Directive 6402, this routine should not be modified.
Q
;
EN ; entry point
D BMES^XPDUTL(" >> Start of the Post-Installation routine for PRCA*4.5*404")
D UPDAUTO
D BMES^XPDUTL(" >> End of the Post-Installation routine for PRCA*4.5*404")
Q
;
UPDAUTO ;Update the Auto Add Field to set all active plans to Yes
;
N RCI,RCDATA,RCSTAT ; RPP variables
N X,Y,DIE,DA,DR,DTOUT ; ^DIE variables
D MES^XPDUTL("Activating New Bill AUTO ADD functionality for all active Repayment Plans ... ")
S RCI=0
F S RCI=$O(^RCRP(340.5,RCI)) Q:'RCI D
. S RCDATA=$G(^RCRP(340.5,RCI,0))
. S RCSTAT=$P(RCDATA,U,7)
. Q:RCSTAT>5 ;status is not Terminated, Closed, or PAID IN FULL
. ; Update the Auto-Add flag
. S DIE="^RCRP(340.5,",DA=RCI,DR=".12///1"
. D ^DIE
. K DR,DA,DIE
;
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRCAP404 940 printed Sep 11, 2024@02:01:05 Page 2
PRCAP404 ;EDE/SAB - PRCA*4.5*378 POST INSTALL;02/11/21
+1 ;;4.5;Accounts Receivable;**404**;Mar 20, 1995;Build 7
+2 ;Per VA Directive 6402, this routine should not be modified.
+3 QUIT
+4 ;
EN ; entry point
+1 DO BMES^XPDUTL(" >> Start of the Post-Installation routine for PRCA*4.5*404")
+2 DO UPDAUTO
+3 DO BMES^XPDUTL(" >> End of the Post-Installation routine for PRCA*4.5*404")
+4 QUIT
+5 ;
UPDAUTO ;Update the Auto Add Field to set all active plans to Yes
+1 ;
+2 ; RPP variables
NEW RCI,RCDATA,RCSTAT
+3 ; ^DIE variables
NEW X,Y,DIE,DA,DR,DTOUT
+4 DO MES^XPDUTL("Activating New Bill AUTO ADD functionality for all active Repayment Plans ... ")
+5 SET RCI=0
+6 FOR
SET RCI=$ORDER(^RCRP(340.5,RCI))
if 'RCI
QUIT
Begin DoDot:1
+7 SET RCDATA=$GET(^RCRP(340.5,RCI,0))
+8 SET RCSTAT=$PIECE(RCDATA,U,7)
+9 ;status is not Terminated, Closed, or PAID IN FULL
if RCSTAT>5
QUIT
+10 ; Update the Auto-Add flag
+11 SET DIE="^RCRP(340.5,"
SET DA=RCI
SET DR=".12///1"
+12 DO ^DIE
+13 KILL DR,DA,DIE
End DoDot:1
+14 ;
+15 QUIT
+16 ;