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

RCP332.m

Go to the documentation of this file.
  1. RCP332 ;AITC/CJE,hrubovcak - ePayment Lockbox Post-Installation Processing ;4 Oct 2018 10:29:18
  1. ;;4.5;Accounts Receivable;**332**;Oct 4, 2018;Build 40
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. Q
  1. ;
  1. POST ;
  1. N RCMSG,X,Y
  1. D BMES^XPDUTL("PRCA*4.5*332 post-installation work "_$$HTE^XLFDT($H)) ; add date/time to log
  1. ;
  1. ;(#.13) TRICARE EFT POST PREVENT DAYS [13N] update is idempotent if value is in-bounds
  1. S RCMSG="TRICARE EFT POST PREVENT DAYS" D ; RCMSG holds action performed
  1. . S X(344.61,0)=$G(^RCY(344.61,1,0)),Y=$P(X(344.61,0),U,13),RCMSG("prev")=Y
  1. . ; minimum is 14 days, maximum is 60
  1. . I (Y>13)&(Y<61) S RCMSG=RCMSG_" value is "_Y_" days. No action taken." K RCMSG("prev") Q ; minimum is 14 days, maximum is 60
  1. . L +^RCY(344.61,1):DILOCKTM E D Q ; exclusive access
  1. .. S RCMSG="Error, unable to update "_RCMSG_" Cannot LOCK entry."
  1. . ; set default to 30
  1. . N RCFDA,RCFMERR
  1. . S RCFDA(344.61,"1,",.13)=30 ; only 1 entry in 344.61
  1. . D FILE^DIE("","RCFDA","RCFMERR")
  1. . I $D(RCFMERR) D Q ; handle FileMan error
  1. .. S RCMSG=RCMSG_" not updated due to error."
  1. .. S X="RCFMERR" F S X=$Q(@X) Q:X="" S Y=@X D BMES^XPDUTL(Y) ; put error text into log
  1. . S X(344.61,0)=$G(^RCY(344.61,1,0)),Y=+$P(X(344.61,0),U,13)
  1. . L -^RCY(344.61,1) S RCMSG=RCMSG_" set to "_Y_" days."
  1. ;
  1. K X,Y D BMES^XPDUTL(RCMSG)
  1. D:$D(RCMSG("prev")) MES^XPDUTL("The previous value was "_$C(34)_RCMSG("prev")_$C(34)_".")
  1. ; end TRICARE EFT POST PREVENT DAYS update
  1. ;
  1. ; (#.07) PHARMACY EFT POST PREVENT DAYS [7N] update is idempotent if value null or in-bounds
  1. K RCMSG
  1. S RCMSG="PHARMACY EFT POST PREVENT DAYS" D ; RCMSG holds action performed
  1. . S X(344.61,0)=$G(^RCY(344.61,1,0)),Y=$P(X(344.61,0),U,7),RCMSG("prev")=Y
  1. . I Y="" S RCMSG=RCMSG_" value has not been entered. No action taken." Q ; field is null, nothing to do
  1. . I (Y>20)&(Y<100) S RCMSG=RCMSG_" value is "_Y_" days. No action taken." K RCMSG("prev") Q ; minimum is 21 days, maximum is 99
  1. . L +^RCY(344.61,1):DILOCKTM E D Q ; exclusive access
  1. .. S RCMSG="Error, unable to update "_RCMSG_" Cannot LOCK entry."
  1. . ; value is out-of-bounds, fix it
  1. . N RCFDA,RCFMERR
  1. . S RCFDA(344.61,"1,",.07)=$S(Y<21:21,1:99) ; only 1 entry in 344.61
  1. . D FILE^DIE("","RCFDA","RCFMERR")
  1. . I $D(RCFMERR) D Q ; handle FileMan error
  1. .. S RCMSG=RCMSG_" not updated due to error."
  1. .. S X="RCFMERR" F S X=$Q(@X) Q:X="" S Y=@X D BMES^XPDUTL(Y) ; put error text into log
  1. . S X(344.61,0)=$G(^RCY(344.61,1,0)),Y=+$P(X(344.61,0),U,7)
  1. . L -^RCY(344.61,1) S RCMSG=RCMSG_" set to "_Y_" days."
  1. ;
  1. K X,Y D:$L(RCMSG) BMES^XPDUTL(RCMSG) ; if RCMSG null nothing was updated
  1. D:$D(RCMSG("prev")) MES^XPDUTL("The previous value was "_$C(34)_RCMSG("prev")_$C(34)_".")
  1. ; end PHARMACY EFT POST PREVENT DAYS update
  1. ;
  1. D BMES^XPDUTL("Fixing ERA numbers...")
  1. D FIX3444
  1. ;
  1. D BMES^XPDUTL("PRCA*4.5*332 post-installation finished "_$$HTE^XLFDT($H))
  1. Q
  1. ;
  1. ;
  1. FIX3444 ; Repair Internal Entry Numbers in 344.4 where IEN is not equal to .01
  1. N IEN,ENTRY
  1. S IEN=0
  1. F S IEN=$O(^RCY(344.4,IEN)) Q:'IEN D ;
  1. . S ENTRY=$P($G(^RCY(344.4,IEN,0)),"^",1)
  1. . I 'ENTRY Q
  1. . I ENTRY'=IEN D ;
  1. . . N FDA
  1. . . S FDA(344.4,IEN_",",.01)=IEN
  1. . . D FILE^DIE("","FDA")
  1. Q