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

PRCB1GE.m

Go to the documentation of this file.
  1. PRCB1GE ;OI&T/PLT-LKG-YEAR TO DATE ACCRUAL EXTRACT ;11/5/21 10:09
  1. V ;;5.1;IFCAP;**225**;Oct 20, 2000;Build 3
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. QUIT ;invalid entry
  1. ;
  1. EN ;year to date detail accrual
  1. N PRCA,PRCRI,PRCDUZ,PRC,PRCTD,PRCF,%
  1. N A,B,C,E,X,Y
  1. Q1 ;station
  1. S PRCF("X")="AS" D ^PRCFSITE G:'$G(%) EXIT
  1. S PRCRI(420)=+PRC("SITE")
  1. Q4 ;prompt fiscal year
  1. S A=$$DATE^PRC0C("T","E"),PRCTD=$P(A,"^",1,2)
  1. S E="O^2:4^K:X'?2N&(X'?4N) X",Y(1)="Enter a fiscal year in format: YY OR YYYY. For example: 96 or 1996"
  1. D FT^PRC0A(.X,.Y,"For Fiscal Year",E,$P(PRCTD,"^"))
  1. G:X["^"!(X="")!(Y'?2.4N) EXIT
  1. S:Y?2N Y=$$YEAR^PRC0C(Y) I Y>PRCTD D EN^DDIOL("Too early to run this extract") G Q4
  1. S A=$$QTRDATE^PRC0D(Y,$S(+PRCTD=Y:$P(PRCTD,"^",2),1:4)),PRCA=A W " Fiscal Year: ",$P(PRCA,"^")
  1. S $P(PRCA,"^",11)=$P(PRCA,"^",8)_"-"_PRC("SITE")
  1. I $O(^PRCH(440.6,"ST","N~",0)) D EN^DDIOL("Warning: An unregistered card exists in your file. Contact the P.C. Coordinator.")
  1. Q5 ;
  1. D ACCR
  1. S:$D(ZTQUEUED) ZTREQ="@"
  1. ;
  1. EXIT QUIT
  1. ;
  1. ;
  1. ACCR ;start accrual
  1. N PRCDUZ,ZTRTN,ZTDESC,ZTSAVE,ZTIO,ZTSK
  1. S PRCDUZ=DUZ
  1. S ZTDESC="IFCAP YTD Detail Accrual for Fiscal Year: "_$P(PRCA,"^")
  1. S ZTIO=""
  1. S ZTRTN="TMEN^PRCB1GE1" F A="PRCA","PRCTD","PRCDUZ","DUZ*" S ZTSAVE(A)=""
  1. D ^%ZTLOAD
  1. D:$G(ZTSK) EN^DDIOL("Compilation is queued task #"_ZTSK,"","!!")
  1. QUIT
  1. ;
  1. TASKED(PRCFY,PRCSITE) ; Module to task extraction from other application
  1. D EN^DDIOL("Generating YTD Accrual Data Extract...","","!!")
  1. N A,PRCTD,PRCA,PRCDUZ,ZTRTN,ZTDESC,ZTSAVE,ZTIO,ZTSK
  1. S PRCTD=$P($$DATE^PRC0C("T","E"),"^",1,2)
  1. S PRCA=$$QTRDATE^PRC0D(PRCFY,$S(+PRCTD=PRCFY:$P(PRCTD,"^",2),1:4))
  1. S $P(PRCA,"^",11)=$P(PRCA,"^",8)_"-"_PRCSITE
  1. S PRCDUZ=DUZ,ZTDESC="IFCAP YTD Detail Accrual for Fiscal Year: "_PRCFY
  1. S ZTIO="",ZTRTN="TMEN^PRCB1GE1"
  1. F A="PRCA","PRCTD","PRCDUZ","DUZ*" S ZTSAVE(A)=""
  1. D ^%ZTLOAD
  1. QUIT