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

RCXVP228.m

Go to the documentation of this file.
RCXVP228 ;DAOU/ALA-AR Data Extraction Post-Install Program ;23-JUL-03
 ;;4.5;Accounts Receivable;**228**;Mar 20, 1995
 ;
 ;** Program Description **
 ;  This program will be run on installation of patch
 ;  PRCA*4.5*228 for CBO to ARC Data Extractions (FY05)
 ;
EN ; Entry Point
 NEW RCXVX,RCXVCFLG,X,RCXVOID
 ;
 S:'$G(RCQDT) RCQDT=DT
 ; Reset CBO Flag field to for bills in OPEN status to "INCLUDE"
 S $P(^PRCA(430.3,42,0),U,6)=1
 ;
ACT ;Queue up active bill transmission
 D P228^RCXVP201
CUR ;  Set up records from installation date until end of Fiscal Year 2004
 N VALUE,DIERR,Z,X,Y
 S VALUE="PRCA*4.5*201"
 D FIND^DIC(9.7,"","@;.01;17IE","P",VALUE,"","","","","Z")
 S RCXVX=0,RCXVFFD="",RCXVOID=""
 F  S RCXVX=$O(Z("DILIST",RCXVX)) Q:'RCXVX  D  Q:RCXVFFD
 .  S RCXVFFD=$P(Z("DILIST",RCXVX,0),U,3)
 .  Q:'RCXVFFD
 .  S RCXVFFD=$P(RCXVFFD,".")
 .  Q
 I 'RCXVFFD!(RCXVFFD>3040927) S RCXVFFD=3040825
 S (RCXVOID,X)=RCXVFFD
 S RCXVDSC="CBO FISCAL YR 2004 ("_+$E(X,4,5)_"/"_+$E(X,6,7)_"/"_$E(X,2,3)_"-9/27/04)"
 S RCXVFTD=3040927,RFDATE=$$SAT^RCXVUTIL(DT),RCXVCFLG=1 D TSK
 ;
 ;  Set up records since the end of the Fiscal Year 2004
 S RCXVDSC="CBO FISCAL YR 2005 (9/28/04-12/31/04)"
 S RCXVFFD=3040928,RCXVFTD=3041231,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2005 (1/1/05-3/31/05)"
 S RCXVFFD=3050101,RCXVFTD=3050331,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2005 (4/1/05-6/30/05)"
 S RCXVFFD=3050401,RCXVFTD=3050630,RCXVCFLG=1 D TSK
 G FY04:RCQDT<3050701
 ;
 S RCXVDSC="CBO FISCAL YR 2005 (7/1/05-"_+$E(RCQDT,4,5)_"/"_+$E(RCQDT,6,7)_"/"_$E(RCQDT,2,3)_")"
 S RCXVFFD=3050701,RCXVFTD=RCQDT,RCXVCFLG=1 D TSK
 ;
FY04 ;
 S RCXVDSC="CBO FISCAL YR 2004 (9/26/03-12/31/03)"
 S RCXVFFD=3030927,RCXVFTD=3031231,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (1/1/04-3/31/04)"
 S RCXVFFD=3040101,RCXVFTD=3040331,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (4/1/04-6/30/04)"
 S RCXVFFD=3040401,RCXVFTD=3040630,RCXVCFLG=1 D TSK
 ;
 S X1=RCXVOID,X2=-1 D C^%DTC
 S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-"_+$E(X,4,5)_"/"_+$E(X,6,7)_"/"_$E(X,2,3)_")"
 S RCXVFFD=3040701,RCXVFTD=3040927,RCXVCFLG=1 D TSK
EXIT K RCXVDSC,RTASKS,ZTDESC,ZTRTN,ZTDTH,XPDQUES,RCXVFFD,RCXVFTD
 K RCXFY03,RCXVFL,RFDATE,TIME,ZTSAVE,ZTIO,RCXVCFLG,RCQDT
 Q
 ;
TSK ;  Set up Task for current fiscal year 2005
 S ZTDESC=RCXVDSC,ZTRTN="CUR^RCXVTSK",ZTIO=""
 S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")="",ZTSAVE("RCXVCFLG")=""
 S ZTDTH=RFDATE_".06"
 D ^%ZTLOAD
 I RCXVFTD=3050630,RCQDT>3050630 S RFDATE=$$FMADD^XLFDT(RFDATE,1) Q
 I RCXVFTD=RCQDT,RCQDT>3050630 S RFDATE=$$FMADD^XLFDT(RFDATE,6) Q
 S RFDATE=$$FMADD^XLFDT(RFDATE,7)
 Q
 ;