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

PRCOVUP2.m

Go to the documentation of this file.
  1. PRCOVUP2 ;WCAMPUS/-GENERATE MAIL MESSAGE AT END OF CONVERSION ;3/22/95
  1. ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;create a message at completion of the vendor upload
  1. ;the message will summerize the number of active
  1. ;vendors on file and the number that converted
  1. ;
  1. D:'$D(DT) DT^DICRW ;set DT if undef
  1. ;
  1. ;PRVTOT = total number of active vendors in last 2 years
  1. ;PRVFMS = total number of active vendors that converted(fms code)
  1. N I,J,PRVIEN,PRVTOT,PRVFMS,PRVTXT
  1. S I=$$FMADD^XLFDT(DT,-730) ;date two years ago from today
  1. F S I=$O(^PRC(442,"AB",I)) Q:'I D
  1. . S J=0 F S J=$O(^PRC(442,"AB",I,J)) Q:'J S PRVIEN=+$G(^PRC(442,J,1)) I PRVIEN D
  1. .. I $D(^PRC(440,PRVIEN,0)) S:'$D(^TMP($J,"PRCOVUP1",PRVIEN)) ^(PRVIEN)=""
  1. ; ^TMP($J,"PRCOVUP1",PRVIEN) is the active vendors used last 2 yrs
  1. ;
  1. S (PRVTOT,PRVFMS)=0
  1. S I=0 F S I=$O(^TMP($J,"PRCOVUP1",I)) Q:'I S PRVTOT=PRVTOT+1 D
  1. . I $P($G(^PRC(440,I,3)),U,4)]"" S PRVFMS=PRVFMS+1
  1. ;
  1. S PRVTXT(1)="IFCAP Vendor conversion has run to completion."
  1. S PRVTXT(2)=" Summary Statistics"
  1. S PRVTXT(3)=" Total number of active vendors on file : "_PRVTOT
  1. S PRVTXT(4)=" Total number of active vendors converted : "_PRVFMS
  1. ;generate mail message vendor upload complete and give stats
  1. S PRCMG=$S('$D(PRCMG):.5,$E(PRCMG,1,2)'="G.":"G."_PRCMG,1:.5)
  1. S XMY(PRCMG)="",XMDUZ=.5
  1. S XMSUB="IFCAP VENDOR CONVERSION SUMMARY"
  1. S XMTEXT="PRVTXT("
  1. D ^XMD
  1. K XMDUZ,XMSUB,XMY,^TMP($J,"PRCOVUP1")
  1. Q