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

BPS27POST.m

Go to the documentation of this file.
  1. BPS27POST ;AITC/PD - Post-install for BPS*1.0*27; 01/15/2020
  1. ;;1.0;E CLAIMS MGMT ENGINE;**27**;JUN 2004;Build 15
  1. ;;Per VA Directive 6402, this routine should not be modified.
  1. ;
  1. Q
  1. ;
  1. ; Post-install to add entries to the queue used for
  1. ; transmitting claims to TAS. Queue = ^BPSTL("C")
  1. ; Database: BPS LOG OF TRANSACTIONS (#9002313.57)
  1. ; Field: MCCF EDI TAS PROGRESS (#20)
  1. ;
  1. ; Routine will calculate the starting date to be 10/01
  1. ; of the current fiscal year.
  1. ;
  1. ;
  1. EN ; Post-install Entry Point
  1. ;
  1. D MES^XPDUTL(" Starting post-install of BPS*1.0*27")
  1. ;
  1. ; Initialize ^BPSTL("C") index
  1. I $D(^BPSTL("C")) D INIT
  1. ; Add entries to ^BPSTL("C")
  1. D ADD
  1. ; Add proxy users
  1. D PROXY
  1. ;
  1. D MES^XPDUTL(" Finished post-install of BPS*1.0*27")
  1. Q
  1. ;
  1. INIT ; Clear ^BPSTL("C") index
  1. ;
  1. N BPS1,BPS57
  1. ;
  1. S BPS1=""
  1. F S BPS1=$O(^BPSTL("C",BPS1)) Q:'BPS1 D
  1. . S BPS57=0
  1. . F S BPS57=$O(^BPSTL("C",BPS1,BPS57)) Q:'BPS57 D
  1. . . N BPSA,BPSFN,BPSREC
  1. . . S BPSFN=9002313.57
  1. . . S BPSREC=BPS57_","
  1. . . S BPSA(BPSFN,BPSREC,20)=""
  1. . . D FILE^DIE("","BPSA","")
  1. Q
  1. ;
  1. ADD ; Add new entries to ^BPSTL("C")
  1. ; Using the AH index and the calculated date, add entries
  1. ; to the queue that are not already in the queue. Set
  1. ; the value to 1.
  1. ;
  1. N BPS57,BPSDATE,COUNT
  1. ;
  1. S BPSDATE=3191001
  1. ;
  1. D MES^XPDUTL(" - Updating BPS LOG OF TRANSACTIONS")
  1. S COUNT=0
  1. ;
  1. F S BPSDATE=$O(^BPSTL("AH",BPSDATE)) Q:'BPSDATE D
  1. . S BPS57=0
  1. . F S BPS57=$O(^BPSTL("AH",BPSDATE,BPS57)) Q:'BPS57 D
  1. . . ; Don't include entries where SUBMIT DATE is less than 3191001
  1. . . I $$GET1^DIQ(9002313.57,BPS57,6,"I")<3191001 Q
  1. . . ; Don't include entries with Field #20 already set
  1. . . I $$GET1^DIQ(9002313.57,BPS57,20)'="" Q
  1. . . ; Don't include non-billable transactions
  1. . . I $$GET1^DIQ(9002313.57,BPS57,19,"I")'="N" D
  1. . . . N BPSA,BPSFN,BPSREC
  1. . . . S BPSFN=9002313.57
  1. . . . S BPSREC=BPS57_","
  1. . . . S BPSA(BPSFN,BPSREC,20)=1
  1. . . . D FILE^DIE("","BPSA","")
  1. . . . S COUNT=COUNT+1
  1. ;
  1. D MES^XPDUTL(" - "_COUNT_" entries updated")
  1. D MES^XPDUTL(" - Done with BPS LOG OF TRANSACTIONS")
  1. D MES^XPDUTL(" ")
  1. ;
  1. Q
  1. ;
  1. PROXY ; Add proxy users if they don't already exist
  1. ;
  1. I '$O(^VA(200,"B","BPSTAS,APPLICATION PROXY",0)) D
  1. . N X
  1. . S X=$$CREATE^XUSAP("BPSTAS,APPLICATION PROXY","","BPS EPHARMACY RPCS")
  1. ;
  1. I '$O(^VA(200,"B","IBTAS,APPLICATION PROXY",0)) D
  1. . N X
  1. . S X=$$CREATE^XUSAP("IBTAS,APPLICATION PROXY","","IBTAS EBILLING RPCS")
  1. ;
  1. Q
  1. ;