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

PRCBRCP.m

Go to the documentation of this file.
  1. PRCBRCP ;WISC@ALTOONA/CTB/DL-RECALCULATE ALL CONTROL POINT BALANCES FOR FISCAL ; 1/29/98 1245
  1. V ;;5.1;IFCAP;;Oct 20, 2000
  1. ;Per VHA Directive 10-93-142, this routine should not be modified.
  1. N PRCDUZ
  1. S PRCDUZ=DUZ
  1. I $D(ZTQUEUED) D ALLCP,KILL^%ZTLOAD QUIT
  1. D NOW^%DTC S A=$E(X,2,3),B=$E(X,4,5),PRC("FY")=$E(100+$S(+B>9:A+1,1:A),2,3) K A,B,%,%I,X
  1. D FY^PRCSUT QUIT:PRC("FY")["^"
  1. D EN^DDIOL("Recalculate all stations/control points balances for fiscal year: "_PRC("FY"))
  1. D QT^PRCSUT G V:PRC("QTR")["^"
  1. D YN^PRC0A(.X,.Y,"Submit RECALCULATE ALL CONTROL POINT BALANCES to the TASK MANAGER","O","YES")
  1. QUIT:X["^"!(X="")!(Y<0)
  1. I Y=0 D ALLCP^PRCBRCP QUIT
  1. S A=$$TASK^PRC0B2("ALLCP^PRCBRCP~RECALCULATE ALL CONTROL POINT BALANCES","PRCDUZ~PRC*",1)
  1. I A D EN^DDIOL("RECALCULATE ALL CONTROL POINT BALANCES HAS TASK NUMBER "_$P(A,"^"))
  1. QUIT
  1. ;
  1. MM(PRCA) ;prca free text in the message
  1. N X,Y
  1. S X(1)="IFCAP RECALCULATE "_PRCA_" CONTROL POINT BALANCES DONE!"
  1. S Y(.5)="",Y(PRCDUZ)=""
  1. D MM^PRC0B2("IFCAP RECAL "_PRCA_" FCP BALANCES DONE^Task Manager","X(",.Y)
  1. QUIT
  1. ;
  1. ALLCP ;RECALCULATE ALL CONTROL POINTS FOR CURRENT FISCAL YEAR
  1. W:'$D(ZTQUEUED) @IOF,"RECALCULATING CONTROL POINT BALANCES",!
  1. I $G(PRC("FY"))=""!($G(PRC("QTR"))="") S A=$$DATE^PRC0C(+$H,"H"),PRC("FY")=$E(A,3,4),PRC("QTR")=$P(A,"^",2)
  1. STA F PRC("SITE")=0:0 S PRC("SITE")=$O(^PRC(420,PRC("SITE"))) Q:+PRC("SITE")=0 W:'$D(ZTQUEUED) !,PRC("SITE") D CP
  1. S X="< Recalculation Completed>*" D:'$D(ZTQUEUED) MSG^PRCFQ
  1. D:$D(ZTQUEUED) MM("FY: "_PRC("FY")_" QTR: "_PRC("QTR")_" ALL")
  1. K PRC
  1. QUIT
  1. ;
  1. CP F PRC("CPN")=0:0 S PRC("CPN")=$O(^PRC(420,PRC("SITE"),1,PRC("CPN"))),PRC("CP")="" Q:+PRC("CPN")=0!(PRC("CPN")=9999) I $D(^(PRC("CPN"),0)) S PRC("CP")=$P(^(0)," ") Q:PRC("CP")="" W:'$D(ZTQUEUED) " ",+PRC("CP") D QTR
  1. Q
  1. QTR S N0=PRC("SITE")_"-"_PRC("FY") D CPOBAL^PRCSP1D
  1. Q