source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCXVP201.m@ 808

Last change on this file since 808 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 6.7 KB
RevLine 
[613]1RCXVP201 ;DAOU/ALA-AR Data Extraction Post-Install Program ;23-JUL-03
2 ;;4.5;Accounts Receivable;**201,228**;Mar 20, 1995
3 ;
4 ;** Program Description **
5 ; This program will be run on installation of patch
6 ; PRCA*4.5*201 for CBO to ARC Data Extractions
7 ;
8EN ; Entry Point
9 NEW RJ,RCLM,IEN,TXT,VAL
10 ;
11 M XPDQUES=^TMP("RCXVINSTALL")
12 ;
13 ; Set up the maximum number of records in a batch
14 S RCXVUP(342,"1,",20.05)=5000
15 S RCXVUP(342,"1,",20.01)=$S($G(XPDQUES("PRE DIREC"))'="":$G(XPDQUES("PRE DIREC")),1:"PRT$:[SPOOL]")
16 S RCXVUP(342,"1,",20.02)=$S($G(XPDQUES("POS MAIL"))'="":$G(XPDQUES("POS MAIL")),1:"RCXVFTP")
17 S RCXVUP(342,"1,",20.06)=$S($P($$PARAM^HLCS2(),U,3)="P":"PRODUCTION",1:"TEST")
18 S RCXVUP(342,"1,",20.04)="ON"
19 ;
20 D FILE^DIE("E","RCXVUP","ERROR")
21 ;
22 ; Add installer to mail group RCXVFTP
23 D ADDMBRS^XMXAPIG(DUZ,"RCXVFTP",DUZ)
24 ;
25P228 ;Entry point from PRCA*4.5*228 postinit (RCXVP228)
26AC ; Set up the active records into the AR Queue File (#348.4)
27 S RCXVDSC="CBO ACTIVE BILLS"
28 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
29 I 'RCXVFL D
30 . S ZTDESC=RCXVDSC,ZTRTN="ACT^RCXVTSK",ZTIO=""
31 . ;2 lines below changed to automatically queue at 8pm
32 . ;S TIME=$S($G(XPDQUES("PRE HISTM"))'="":$P($G(XPDQUES("PRE HISTM")),".",2),1:"20")
33 . S ZTDTH=$$DT^XLFDT()_".20"
34 . D ^%ZTLOAD
35 ;QUIT Below terminates call from 228 post-init
36 Q
37 ;
38CUR ; Set up records since the end of the Fiscal Year 2003
39 S RCXVDSC="CBO FISCAL YR 2004 (9/26/03-10/31/03)"
40 S RCXVFFD=3030926,RCXVFTD=3031031,RCXVCFLG=1
41 S RFDATE=$$SAT^RCXVUTIL(DT) D TSK
42 ;
43 S RCXVDSC="CBO FISCAL YR 2004 (11/1/03-11/30/03)"
44 S RCXVFFD=3031101,RCXVFTD=3031130,RCXVCFLG=1 D TSK
45 ;
46 S RCXVDSC="CBO FISCAL YR 2004 (12/1/03-12/31/03)"
47 S RCXVFFD=3031201,RCXVFTD=3031231,RCXVCFLG=1 D TSK
48 ;
49 S RCXVDSC="CBO FISCAL YR 2004 (1/1/04-1/31/04)"
50 S RCXVFFD=3040101,RCXVFTD=3040131,RCXVCFLG=1 D TSK
51 ;
52 S RCXVDSC="CBO FISCAL YR 2004 (2/1/04-2/29/04)"
53 S RCXVFFD=3040201,RCXVFTD=3040229,RCXVCFLG=1 D TSK
54 ;
55 S RCXVDSC="CBO FISCAL YR 2004 (3/1/04-3/31/04)"
56 S RCXVFFD=3040301,RCXVFTD=3040331,RCXVCFLG=1 D TSK
57 ;
58 S RCXVDSC="CBO FISCAL YR 2004 (4/1/04-4/30/04)"
59 S RCXVFFD=3040401,RCXVFTD=3040430,RCXVCFLG=1 D TSK
60 ;
61 I $E(DT,4,5)="05" D
62 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
63 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
64 ;
65 I $E(DT,4,5)="06" D
66 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
67 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
68 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
69 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
70 ;
71 I $E(DT,4,5)="07" D
72 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
73 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
74 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
75 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
76 . S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-7/31/04)"
77 . S RCXVFFD=3040701,RCXVFTD=3040731,RCXVCFLG=1 D TSK
78 ;
79 I $E(DT,4,5)="08" D
80 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
81 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
82 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
83 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
84 . S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-7/31/04)"
85 . S RCXVFFD=3040701,RCXVFTD=3040731,RCXVCFLG=1 D TSK
86 . S RCXVDSC="CBO FISCAL YR 2004 (8/1/04-8/31/04)"
87 . S RCXVFFD=3040801,RCXVFTD=3040831,RCXVCFLG=1 D TSK
88 ;
89 I $E(DT,4,5)="09" D
90 . S RCXVDSC="CBO FISCAL YR 2004 (5/1/04-5/31/04)"
91 . S RCXVFFD=3040501,RCXVFTD=3040531,RCXVCFLG=1 D TSK
92 . S RCXVDSC="CBO FISCAL YR 2004 (6/1/04-6/30/04)"
93 . S RCXVFFD=3040601,RCXVFTD=3040630,RCXVCFLG=1 D TSK
94 . S RCXVDSC="CBO FISCAL YR 2004 (7/1/04-7/31/04)"
95 . S RCXVFFD=3040701,RCXVFTD=3040731,RCXVCFLG=1 D TSK
96 . S RCXVDSC="CBO FISCAL YR 2004 (8/1/04-8/31/04)"
97 . S RCXVFFD=3040801,RCXVFTD=3040831,RCXVCFLG=1 D TSK
98 . S RCXVDSC="CBO FISCAL YR 2004 (9/1/04-9/27/04)"
99 . S RCXVFFD=3040901,RCXVFTD=3040927,RCXVCFLG=1 D TSK
100 ;
101F03 ; Historical for Fiscal Year 2003
102 S RCXVDSC="CBO HISTORICAL EXTRACT FY03"
103 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
104 I $G(RFDATE)="" S ZTDTH=$$SAT^RCXVUTIL(DT),RFDATE=$$FMADD^XLFDT(ZTDTH,7)
105 I 'RCXVFL D
106 . S RCXVFFD=3021001,RCXVFTD=3030925
107 . S ZTDESC=RCXVDSC,ZTRTN="HIS^RCXVTSK",ZTIO=""
108 . S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")=""
109 . S ZTDTH=RFDATE_".06",RFDATE=$$FMADD^XLFDT(RFDATE,7)
110 . D ^%ZTLOAD
111 ;
112F02 ; Historical for Fiscal Year 2002
113 S RCXVDSC="CBO HISTORICAL EXTRACT FY02"
114 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
115 I $G(RFDATE)="" S ZTDTH=$$SAT^RCXVUTIL(DT),RFDATE=$$FMADD^XLFDT(ZTDTH,7)
116 I 'RCXVFL D
117 . S RCXVFFD=3011001,RCXVFTD=3020930
118 . S ZTDESC=RCXVDSC,ZTRTN="HIS^RCXVTSK",ZTIO=""
119 . S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")=""
120 . S ZTDTH=RFDATE_".06",RFDATE=$$FMADD^XLFDT(RFDATE,7)
121 . D ^%ZTLOAD
122 ;
123F01 ; Historical for Fiscal Year 2001
124 S RCXVDSC="CBO HISTORICAL EXTRACT FY01"
125 S RCXVFL=$$TASK^RCXVUTIL(RCXVDSC)
126 I $G(RFDATE)="" S ZTDTH=$$SAT^RCXVUTIL(DT),RFDATE=$$FMADD^XLFDT(ZTDTH,7)
127 I 'RCXVFL D
128 . S RCXVFFD=3001001,RCXVFTD=3010930
129 . S ZTDESC=RCXVDSC,ZTRTN="HIS^RCXVTSK",ZTIO=""
130 . S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")=""
131 . S ZTDTH=RFDATE_".06"
132 . D ^%ZTLOAD
133 ;
134FLG ; Update with CBO EXTRACT FLAG
135 F RJ=1:1 S RCLM=$T(TTS+RJ) Q:RCLM=" ;;Q" D
136 . S IEN=$P(RCLM,";",3),TXT=$P(RCLM,";",4),VAL=$P(RCLM,";",5)
137 . I $P(^PRCA(430.3,IEN,0),U,1)=TXT S RCXVUP(430.3,IEN_",",5)=VAL
138 D FILE^DIE("I","RCXVUP","RCERR")
139 ;
140EXIT K RCXVDSC,RTASKS,ZTDESC,ZTRTN,ZTDTH,XPDQUES,RCXVFFD,RCXVFTD
141 K RCXFY03,RCXVFL,RFDATE,TIME
142 K ^TMP("RCXVINSTALL")
143 Q
144 ;
145TSK ; Set up Task for current fiscal year 2004
146 S ZTDESC=RCXVDSC,ZTRTN="CUR^RCXVTSK",ZTIO=""
147 S ZTSAVE("RCXVFFD")="",ZTSAVE("RCXVFTD")="",ZTSAVE("RCXVCFLG")=""
148 S ZTDTH=RFDATE_".06"
149 D ^%ZTLOAD
150 S RFDATE=$$FMADD^XLFDT(RFDATE,7)
151 Q
152 ;
153TTS ; AR TRANSACTION TYPE File (#430.3) Update
154 ;;1;INCREASE ADJUSTMENT;1
155 ;;2;PAYMENT (IN PART);1
156 ;;3;REFER TO RC;1
157 ;;4;REFER TO DOJ;1
158 ;;5;REESTABLISH TO RC/DOJ;1
159 ;;6;RETURNED BY RC/DOJ;1
160 ;;7;CASH COLLECTION BY RC/DOJ;1
161 ;;8;TERM.BY FIS.OFFICER;1
162 ;;9;TERM.BY COMPROMISE;1
163 ;;10;WAIVED IN FULL;1
164 ;;11;WAIVED IN PART;1
165 ;;12;ADMIN.COST CHARGE;1
166 ;;13;INTEREST/ADM. CHARGE;1
167 ;;14;EXEMPT INT/ADM. COST;1
168 ;;15;INCOMPLETE;0
169 ;;16;ACTIVE;1
170 ;;17;IN-ACTIVE;
171 ;;18;NEW BILL;0
172 ;;19;SUSPENSE;1
173 ;;20;PENDING APPROVAL;0
174 ;;21;PENDING CALM CODE;0
175 ;;22;COLLECTED/CLOSED;1
176 ;;23;WRITE-OFF;1
177 ;;24;MARSHAL/COURT COST;1
178 ;;25;REPAYMENT PLAN;0
179 ;;26;CANCELLED BILL;1
180 ;;27;BILL INCOMPLETE;0
181 ;;28;OLD BILL;0
182 ;;29;TERM.BY RC/DOJ;1
183 ;;30;DEBIT VOUCHER (SF 5515);0
184 ;;31;RETURNED FROM AR (NEW);0
185 ;;32;RETURNED FOR AMENDMENT;0
186 ;;33;AMENDED BILL;0
187 ;;34;PAYMENT (IN FULL);1
188 ;;35;DECREASE ADJUSTMENT;1
189 ;;36;DELETE (AMEND);0
190 ;;37;ADD (AMEND);0
191 ;;38;AMEND;0
192 ;;39;CANCELLATION;1
193 ;;40;SUSPENDED;1
194 ;;41;REFUNDED;1
195 ;;42;OPEN;0
196 ;;43;RE-ESTABLISH;1
197 ;;44;REFUND REVIEW;1
198 ;;45;COMMENT;0
199 ;;46;UNSUSPENDED;1
200 ;;47;CHARGE SUSPENDED;1
201 ;;48;PENDING ARCHIVE;0
202 ;;49;ARCHIVED;0
203 ;;Q
Note: See TracBrowser for help on using the repository browser.