source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVMS1.m@ 1608

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

initial load of WorldVistAEHR

File size: 7.8 KB
Line 
1ABSVMS1 ;OAKLAND/DPC-VSS MIGRATION;7/31/2002
2 ;;4.0;VOLUNTARY TIMEKEEPING;**31,33**;Jul 1994
3 ;
4SENDPROC(ABSVMTO,ABSSDA) ;
5 ;Driver for sending data to SQL database.
6 D CLEANXTP^ABSVMUT1
7 D SETUPXTP^ABSVMUT1
8 D LDCDS^ABSVMUT1
9 D SERVSP(.ABSVMTO,.ABSSDA)
10 D ORGSP(.ABSVMTO,.ABSSDA)
11 D VOLSP(.ABSVMTO,.ABSSDA)
12 D OHRSSP(.ABSVMTO,.ABSSDA)
13 D RHRSSP(.ABSVMTO,.ABSSDA)
14 D CLEANXTP^ABSVMUT1
15 Q
16 ;
17SERVSP(ABSVMWHO,ABSSDA) ;
18 ;Process for sending Services. Includes Validation.
19 N FL,EXPORT,TOSEND,TXTFILE
20 N ABSSRES
21 ;
22 W !,"Validating Services"
23 D SRVVAL^ABSVMRV1("S",.ABSSRES)
24 W !,"Errors found in Service Codes: "_ABSSRES("ERRCNT")
25 S ABSSDA(ABSSRES("DA"))=""
26 ;
27 S FL=503332
28 S EXPORT="ABSVM SERVICE CODES EXPORT"
29 S TOSEND="ABSVM SERVICES TOSEND"
30 S TXTFILE="VtkServices"
31 W !,"Sending Services.."
32 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
33 W !
34 Q
35 ;
36ORGSP(ABSVMWHO,ABSSDA) ;
37 ;Send Process for Organizations.
38 N FL,EXPORT,TOSEND,TXTFILE
39 N ABSSRES
40 W !,"Validating Organizations"
41 D ORGVAL^ABSVMRV1("S",.ABSSRES)
42 W !,"Errors found in Organization Codes: "_ABSSRES("ERRCNT")
43 S ABSSDA(ABSSRES("DA"))=""
44 ;
45 W !,"Sending Organizations.."
46 S FL=503334
47 S EXPORT="ABSVM ORGANIZATION EXPORT"
48 S TOSEND="ABSVM ORGANIZATIONS TOSEND"
49 S TXTFILE="VtkOrganizations"
50 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
51 W !
52 Q
53 ;
54VOLSP(ABSVMWHO,ABSSDA) ;
55 ;Send Process for Volunteers
56 N FL,EXPORT,TOSEND,TXTFILE
57 N ABSSRES,EXSITES
58 D EXSITES^ABSVMUT1
59 W !,"Building List of Volunteers with Hours"
60 D BLDVOLLT^ABSVMUT1()
61 W !,"Validating Volunteers"
62 D VALVOL^ABSVMVV1("S",.ABSSRES)
63 W !,"Errors found in Volunteer data: "_ABSSRES("ERRCNT")
64 S ABSSDA(ABSSRES("DA"))=""
65 ;
66 S FL=503330
67 ; Volunteer Master
68 S EXPORT="ABSVM VOL MASTER EXPORT"
69 S TOSEND="ABSVM VOLUNTEER TOSEND"
70 S TXTFILE="VtkVolunteers"
71 W !,"Sending Volunteer Master Information.."
72 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
73 ;CONTACTS
74 S EXPORT="ABSVM VOL CONTACT EXPORT"
75 S TOSEND="ABSVM VOLUNTEER TOSEND"
76 S TXTFILE="VtkVolContacts"
77 W !,"Sending Volunteer Contact Information.."
78 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
79 ;COMBINATION CODES
80 N COMBDIS
81 S EXPORT="ABSVM VOL COMBINATIONS EXPORT"
82 S TOSEND=""
83 S COMBDIS(0)="I $D(^XTMP(""ABSVMVOLCB"",""IEN"",D0))"
84 S TXTFILE="VtkVolCombinations"
85 W !,"Sending Combination code Information.."
86 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,,.COMBDIS)
87 ;PROFILES
88 N PROFDIS
89 S EXPORT="ABSVM PROFILES EXPORT"
90 S TOSEND=""
91 S TXTFILE="VtkVolProfiles"
92 S PROFDIS(0)="I $D(^XTMP(""ABSVMVOLP"",""IEN"",D0))"
93 W !,"Sending Volunteer Profile Information.."
94 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,,.PROFDIS)
95 ;PARKING STICKERS
96 N PARKDIS
97 S EXPORT="ABSVM PARKING EXPORT"
98 S TOSEND=""
99 S TXTFILE="VtkVolParking"
100 S PARKDIS(0)="I $D(^XTMP(""ABSVMVOLPK"",""IEN"",D0))"
101 W !,"Sending Parking Sticker Information.."
102 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,,.PARKDIS)
103 W !
104 Q
105 ;
106OHRSSP(ABSVMWHO,ABSSDA) ;
107 ;Occasional Hours Processing.
108 N FL,EXPORT,TOSEND,TXTFILE
109 N ABSSRES,EXSITES
110 D EXSITES^ABSVMUT1
111 W !,"Validating Occasional Hours"
112 D OHRSVAL^ABSVMHV1("S",.ABSSRES)
113 W !,"Errors found in Occasional Hours: "_ABSSRES("ERRCNT")
114 S ABSSDA(ABSSRES("DA"))=""
115 ;
116 S FL=503336
117 S EXPORT="ABSVM OCCASIONAL EXPORT"
118 S TOSEND="ABSVM OCCASIONAL HOURS TOSEND"
119 S TXTFILE="VtkOccHours"
120 W !,"Sending Occasional Hours.."
121 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
122 W !
123 Q
124 ;
125RHRSSP(ABSVMWHO,ABSSDA) ;
126 ;Regular hours processing.
127 N FL,EXPORT,TOSEND,TXTFILE
128 N ABSSRES,EXSITES
129 D EXSITES^ABSVMUT1
130 W !,"Validating Regular Hours"
131 D RHRSVAL^ABSVMHV1("S",.ABSSRES)
132 W !,"Errors found in Regular Hours: "_ABSSRES("ERRCNT")
133 S ABSSDA(ABSSRES("DA"))=""
134 ;
135 S FL=503331
136 S EXPORT="ABSVM REGULAR HOURS EXPORT"
137 W !,"Sending Regular Hours.."
138 ;97
139 S TOSEND="ABSVM REG HOURS 97Q1 TOSEND"
140 S TXTFILE="VtkRegHours97Q1"
141 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
142 ;97Q2
143 S TOSEND="ABSVM REG HOURS 97Q2 TOSEND"
144 S TXTFILE="VtkRegHours97Q2"
145 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
146 ;97Q3
147 S TOSEND="ABSVM REG HOURS 97Q3 TOSEND"
148 S TXTFILE="VtkRegHours97Q3"
149 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
150 ;97Q4
151 S TOSEND="ABSVM REG HOURS 97Q4 TOSEND"
152 S TXTFILE="VtkRegHours97Q4"
153 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
154 ;98
155 S TOSEND="ABSVM REG HOURS 98Q1 TOSEND"
156 S TXTFILE="VtkRegHours98Q1"
157 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
158 ;98Q2
159 S TOSEND="ABSVM REG HOURS 98Q2 TOSEND"
160 S TXTFILE="VtkRegHours98Q2"
161 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
162 ;98Q3
163 S TOSEND="ABSVM REG HOURS 98Q3 TOSEND"
164 S TXTFILE="VtkRegHours98Q3"
165 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
166 ;98Q4
167 S TOSEND="ABSVM REG HOURS 98Q4 TOSEND"
168 S TXTFILE="VtkRegHours98Q4"
169 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
170 ;99
171 S TOSEND="ABSVM REG HOURS 99Q1 TOSEND"
172 S TXTFILE="VtkRegHours99Q1"
173 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
174 ;99Q2
175 S TOSEND="ABSVM REG HOURS 99Q2 TOSEND"
176 S TXTFILE="VtkRegHours99Q2"
177 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
178 ;99Q3
179 S TOSEND="ABSVM REG HOURS 99Q3 TOSEND"
180 S TXTFILE="VtkRegHours99Q3"
181 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
182 ;99Q4
183 S TOSEND="ABSVM REG HOURS 99Q4 TOSEND"
184 S TXTFILE="VtkRegHours99Q4"
185 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
186 ;00
187 S TOSEND="ABSVM REG HOURS 00Q1 TOSEND"
188 S TXTFILE="VtkRegHours00Q1"
189 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
190 ;00Q2
191 S TOSEND="ABSVM REG HOURS 00Q2 TOSEND"
192 S TXTFILE="VtkRegHours00Q2"
193 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
194 ;00Q3
195 S TOSEND="ABSVM REG HOURS 00Q3 TOSEND"
196 S TXTFILE="VtkRegHours00Q3"
197 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
198 ;00Q4
199 S TOSEND="ABSVM REG HOURS 00Q4 TOSEND"
200 S TXTFILE="VtkRegHours00Q4"
201 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
202 ;01
203 S TOSEND="ABSVM REG HOURS 01Q1 TOSEND"
204 S TXTFILE="VtkRegHours01Q1"
205 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
206 ;01Q2
207 S TOSEND="ABSVM REG HOURS 01Q2 TOSEND"
208 S TXTFILE="VtkRegHours01Q2"
209 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
210 ;01Q3
211 S TOSEND="ABSVM REG HOURS 01Q3 TOSEND"
212 S TXTFILE="VtkRegHours01Q3"
213 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
214 ;01Q4
215 S TOSEND="ABSVM REG HOURS 01Q4 TOSEND"
216 S TXTFILE="VtkRegHours01Q4"
217 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
218 ;02
219 S TOSEND="ABSVM REG HOURS 02Q1 TOSEND"
220 S TXTFILE="VtkRegHours02Q1"
221 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
222 ;02Q2
223 S TOSEND="ABSVM REG HOURS 02Q2 TOSEND"
224 S TXTFILE="VtkRegHours02Q2"
225 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
226 ;02Q3
227 S TOSEND="ABSVM REG HOURS 02Q3 TOSEND"
228 S TXTFILE="VtkRegHours02Q3"
229 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
230 ;02Q4
231 S TOSEND="ABSVM REG HOURS 02Q4 TOSEND"
232 S TXTFILE="VtkRegHours02Q4"
233 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
234 ;03
235 S TOSEND="ABSVM REG HOURS 03Q1 TOSEND"
236 S TXTFILE="VtkRegHours03Q1"
237 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
238 ;03Q2
239 S TOSEND="ABSVM REG HOURS 03Q2 TOSEND"
240 S TXTFILE="VtkRegHours03Q2"
241 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
242 ;03Q3
243 S TOSEND="ABSVM REG HOURS 03Q3 TOSEND"
244 S TXTFILE="VtkRegHours03Q3"
245 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
246 ;03Q4
247 S TOSEND="ABSVM REG HOURS 03Q4 TOSEND"
248 S TXTFILE="VtkRegHours03Q4"
249 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
250 ;04
251 S TOSEND="ABSVM REG HOURS 04Q1 TOSEND"
252 S TXTFILE="VtkRegHours04Q1"
253 D SEND(TXTFILE,.ABSVMWHO,FL,EXPORT,TOSEND)
254 Q
255 ;
256SEND(TEXTFILE,ABSVMWHO,FILE,XPTEMP,SORTTEMP,SCREEN) ;
257 ;Sending data.
258 N ABSVHFS,ABSVDEL,XMDUZ,XMY,XMSUB,XMTEXT,XMZ,%ZIS,IOP,Y
259 ;set MailMan variables
260 M XMY=ABSVMWHO
261 S XMDUZ=DUZ,XMSUB="$Station$ "_$P($G(^DIC(4,+$$KSP^XUPARAM("INST"),99)),U)_" :"_TEXTFILE_" -- "_$$FMTE^XLFDT($$NOW^XLFDT)
262 ;set device handler variables
263 S ABSVHFS="ABSVMIGRATION.DAT",IOP="HFS",%ZIS="",%ZIS("HFSMODE")="W",%ZIS("HFSNAME")=ABSVHFS
264 D EXPORT^DDXP(FILE,XPTEMP,0,$G(SORTTEMP),,,.SCREEN,,IOP)
265 ;create message and get message number
266 F D XMZ^XMA2 Q:XMZ>0 H 1
267 ;import from HFS to message global
268 S Y=$$FTG^%ZISH("",ABSVHFS,$NA(^XMB(3.9,XMZ,2,1,0)),4)
269 ;send message
270 S XMDUZ=DUZ
271 D ENT1^XMD
272 ;delete HFS file
273 S ABSVDEL(ABSVHFS)="",Y=$$DEL^%ZISH("",$NA(ABSVDEL))
274 W !," Message #",XMZ
275 Q
Note: See TracBrowser for help on using the repository browser.