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

RCXVP201.m

Go to the documentation of this file.
RCXVP201 ;DAOU/ALA-AR Data Extraction Post-Install Program ;23-JUL-03
 ;;4.5;Accounts Receivable;**201,228**;Mar 20, 1995
 ;
 ;** Program Description **
 ;  This program will be run on installation of patch
 ;  PRCA*4.5*201 for CBO to ARC Data Extractions
 ;
EN ; Entry Point
 NEW RJ,RCLM,IEN,TXT,VAL
 ;
 M XPDQUES=^TMP("RCXVINSTALL")
 ;
 ;  Set up the maximum number of records in a batch
 S RCXVUP(342,"1,",20.05)=5000
 S RCXVUP(342,"1,",20.01)=$S($G(XPDQUES("PRE DIREC"))'="":$G(XPDQUES("PRE DIREC")),1:"PRT$:[SPOOL]")
 S RCXVUP(342,"1,",20.02)=$S($G(XPDQUES("POS MAIL"))'="":$G(XPDQUES("POS MAIL")),1:"RCXVFTP")
 S RCXVUP(342,"1,",20.06)=$S($P($$PARAM^HLCS2(),U,3)="P":"PRODUCTION",1:"TEST")
 S RCXVUP(342,"1,",20.04)="ON"
 ;
 D FILE^DIE("E","RCXVUP","ERROR")
 ;
 ;  Add installer to mail group RCXVFTP
 D ADDMBRS^XMXAPIG(DUZ,"RCXVFTP",DUZ)
 ;
P228 ;Entry point from PRCA*4.5*228 postinit (RCXVP228)
AC ;  Set up the active records into the AR Queue File (#348.4)
 S RCXVDSC="CBO ACTIVE BILLS"
 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
 I 'RCXVFL D
 . S ZTDESC=RCXVDSC,ZTRTN="ACT^RCXVTSK",ZTIO=""
 . ;2 lines below changed to automatically queue at 8pm
 . ;S TIME=$S($G(XPDQUES("PRE HISTM"))'="":$P($G(XPDQUES("PRE HISTM")),".",2),1:"20")
 . S ZTDTH=$$DT^XLFDT()_".20"
 . D ^%ZTLOAD
 ;QUIT Below terminates call from 228 post-init
 Q
 ;
CUR ;  Set up records since the end of the Fiscal Year 2003
 S RCXVDSC="CBO FISCAL YR 2004 (9/26/03-10/31/03)"
 S RCXVFFD=3030926,RCXVFTD=3031031,RCXVCFLG=1
 S RFDATE=$$SAT^RCXVUTIL(DT) D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (11/1/03-11/30/03)"
 S RCXVFFD=3031101,RCXVFTD=3031130,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (12/1/03-12/31/03)"
 S RCXVFFD=3031201,RCXVFTD=3031231,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (1/1/04-1/31/04)"
 S RCXVFFD=3040101,RCXVFTD=3040131,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (2/1/04-2/29/04)"
 S RCXVFFD=3040201,RCXVFTD=3040229,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (3/1/04-3/31/04)"
 S RCXVFFD=3040301,RCXVFTD=3040331,RCXVCFLG=1 D TSK
 ;
 S RCXVDSC="CBO FISCAL YR 2004 (4/1/04-4/30/04)"
 S RCXVFFD=3040401,RCXVFTD=3040430,RCXVCFLG=1 D TSK
 ;
 I $E(DT,4,5)="05" D
 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
 ;
 I $E(DT,4,5)="06" D
 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
 ;
 I $E(DT,4,5)="07" D
 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-7/31/04)"
 . S RCXVFFD=3040701,RCXVFTD=3040731,RCXVCFLG=1 D TSK
 ;
 I $E(DT,4,5)="08" D
 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-7/31/04)"
 . S RCXVFFD=3040701,RCXVFTD=3040731,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (8/1/04-8/31/04)"
 . S RCXVFFD=3040801,RCXVFTD=3040831,RCXVCFLG=1 D TSK
 ;
 I $E(DT,4,5)="09" D
 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-7/31/04)"
 . S RCXVFFD=3040701,RCXVFTD=3040731,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (8/1/04-8/31/04)"
 . S RCXVFFD=3040801,RCXVFTD=3040831,RCXVCFLG=1 D TSK
 . S RCXVDSC="CBO FISCAL YR 2004 (9/1/04-9/27/04)"
 . S RCXVFFD=3040901,RCXVFTD=3040927,RCXVCFLG=1 D TSK
 ;
F03 ;  Historical for Fiscal Year 2003
 S RCXVDSC="CBO HISTORICAL EXTRACT FY03"
 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
 I $G(RFDATE)="" S ZTDTH=$$SAT^RCXVUTIL(DT),RFDATE=$$FMADD^XLFDT(ZTDTH,7)
 I 'RCXVFL D
 . S RCXVFFD=3021001,RCXVFTD=3030925
 . S ZTDESC=RCXVDSC,ZTRTN="HIS^RCXVTSK",ZTIO=""
 . S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")=""
 . S ZTDTH=RFDATE_".06",RFDATE=$$FMADD^XLFDT(RFDATE,7)
 . D ^%ZTLOAD
 ;
F02 ;  Historical for Fiscal Year 2002
 S RCXVDSC="CBO HISTORICAL EXTRACT FY02"
 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
 I $G(RFDATE)="" S ZTDTH=$$SAT^RCXVUTIL(DT),RFDATE=$$FMADD^XLFDT(ZTDTH,7)
 I 'RCXVFL D
 . S RCXVFFD=3011001,RCXVFTD=3020930
 . S ZTDESC=RCXVDSC,ZTRTN="HIS^RCXVTSK",ZTIO=""
 . S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")=""
 . S ZTDTH=RFDATE_".06",RFDATE=$$FMADD^XLFDT(RFDATE,7)
 . D ^%ZTLOAD
 ;
F01 ;  Historical for Fiscal Year 2001
 S RCXVDSC="CBO HISTORICAL EXTRACT FY01"
 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
 I $G(RFDATE)="" S ZTDTH=$$SAT^RCXVUTIL(DT),RFDATE=$$FMADD^XLFDT(ZTDTH,7)
 I 'RCXVFL D
 . S RCXVFFD=3001001,RCXVFTD=3010930
 . S ZTDESC=RCXVDSC,ZTRTN="HIS^RCXVTSK",ZTIO=""
 . S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")=""
 . S ZTDTH=RFDATE_".06"
 . D ^%ZTLOAD
 ;
FLG ;  Update with CBO EXTRACT FLAG
 F RJ=1:1 S RCLM=$T(TTS+RJ) Q:RCLM=" ;;Q"  D
 . S IEN=$P(RCLM,";",3),TXT=$P(RCLM,";",4),VAL=$P(RCLM,";",5)
 . I $P(^PRCA(430.3,IEN,0),U,1)=TXT S RCXVUP(430.3,IEN_",",5)=VAL
 D FILE^DIE("I","RCXVUP","RCERR")
 ;
EXIT K RCXVDSC,RTASKS,ZTDESC,ZTRTN,ZTDTH,XPDQUES,RCXVFFD,RCXVFTD
 K RCXFY03,RCXVFL,RFDATE,TIME
 K ^TMP("RCXVINSTALL")
 Q
 ;
TSK ;  Set up Task for current fiscal year 2004
 S ZTDESC=RCXVDSC,ZTRTN="CUR^RCXVTSK",ZTIO=""
 S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")="",ZTSAVE("RCXVCFLG")=""
 S ZTDTH=RFDATE_".06"
 D ^%ZTLOAD
 S RFDATE=$$FMADD^XLFDT(RFDATE,7)
 Q
 ;
TTS ;  AR TRANSACTION TYPE File (#430.3) Update
 ;;1;INCREASE ADJUSTMENT;1
 ;;2;PAYMENT (IN PART);1
 ;;3;REFER TO RC;1
 ;;4;REFER TO DOJ;1
 ;;5;REESTABLISH TO RC/DOJ;1
 ;;6;RETURNED BY RC/DOJ;1
 ;;7;CASH COLLECTION BY RC/DOJ;1
 ;;8;TERM.BY FIS.OFFICER;1
 ;;9;TERM.BY COMPROMISE;1
 ;;10;WAIVED IN FULL;1
 ;;11;WAIVED IN PART;1
 ;;12;ADMIN.COST CHARGE;1
 ;;13;INTEREST/ADM. CHARGE;1
 ;;14;EXEMPT INT/ADM. COST;1
 ;;15;INCOMPLETE;0
 ;;16;ACTIVE;1
 ;;17;IN-ACTIVE;
 ;;18;NEW BILL;0
 ;;19;SUSPENSE;1
 ;;20;PENDING APPROVAL;0
 ;;21;PENDING CALM CODE;0
 ;;22;COLLECTED/CLOSED;1
 ;;23;WRITE-OFF;1
 ;;24;MARSHAL/COURT COST;1
 ;;25;REPAYMENT PLAN;0
 ;;26;CANCELLED BILL;1
 ;;27;BILL INCOMPLETE;0
 ;;28;OLD BILL;0
 ;;29;TERM.BY RC/DOJ;1
 ;;30;DEBIT VOUCHER (SF 5515);0
 ;;31;RETURNED FROM AR (NEW);0
 ;;32;RETURNED FOR AMENDMENT;0
 ;;33;AMENDED BILL;0
 ;;34;PAYMENT (IN FULL);1
 ;;35;DECREASE ADJUSTMENT;1
 ;;36;DELETE (AMEND);0
 ;;37;ADD (AMEND);0
 ;;38;AMEND;0
 ;;39;CANCELLATION;1
 ;;40;SUSPENDED;1
 ;;41;REFUNDED;1
 ;;42;OPEN;0
 ;;43;RE-ESTABLISH;1
 ;;44;REFUND REVIEW;1
 ;;45;COMMENT;0
 ;;46;UNSUSPENDED;1
 ;;47;CHARGE SUSPENDED;1
 ;;48;PENDING ARCHIVE;0
 ;;49;ARCHIVED;0
 ;;Q