1 | unit rOptions;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses SysUtils, Classes, ORNet, ORFn, uCore, rCore, rTIU, rConsults;
|
---|
6 |
|
---|
7 | function rpcGetNotifications: TStrings;
|
---|
8 | function rpcGetOrderChecks: TStrings;
|
---|
9 | function rpcGetNotificationDefaults: String;
|
---|
10 | function rpcGetSurrogateInfo: String;
|
---|
11 | procedure rpcCheckSurrogate(surrogate: Int64; var ok: boolean; var msg: string);
|
---|
12 | procedure rpcSetSurrogateInfo(aString: String);
|
---|
13 | procedure rpcClearNotifications;
|
---|
14 | procedure rpcSetNotifications(aList: TStringList);
|
---|
15 | procedure rpcSetOrderChecks(aList: TStringList);
|
---|
16 | procedure rpcSetOtherStuff(aString: String);
|
---|
17 |
|
---|
18 | function rpcGetOtherTabs: TStrings;
|
---|
19 | function rpcGetOther: String;
|
---|
20 | procedure rpcSetOther(info: String);
|
---|
21 | function rpcGetCosigners(const StartFrom: string; Direction: Integer): TStrings;
|
---|
22 | function rpcGetDefaultCosigner: String;
|
---|
23 | procedure rpcSetDefaultCosigner(value: Int64);
|
---|
24 | function rpcGetSubject: boolean;
|
---|
25 | procedure rpcSetSubject(value: boolean);
|
---|
26 | function rpcGetClasses: TStrings;
|
---|
27 | function rpcGetTitlesForClass(value: integer; const StartFrom: string; Direction: Integer): TStrings;
|
---|
28 | function rpcGetTitlesForUser(value: integer): TStrings;
|
---|
29 | function rpcGetTitleDefault(value: integer): integer;
|
---|
30 | procedure rpcSaveDocumentDefaults(classvalue, titledefault: integer; aList: TStrings);
|
---|
31 |
|
---|
32 | procedure rpcGetLabDays(var InpatientDays: integer; var OutpatientDays: integer);
|
---|
33 | procedure rpcGetLabUserDays(var InpatientDays: integer; var OutpatientDays: integer);
|
---|
34 | procedure rpcGetApptDays(var StartDays: integer; var StopDays: integer);
|
---|
35 | procedure rpcGetApptUserDays(var StartDays: integer; var StopDays: integer);
|
---|
36 | procedure rpcSetDays(InpatientDays, OutpatientDays, StartDays, StopDays: integer);
|
---|
37 | procedure rpcGetImagingDays(var MaxNum: integer; var StartDays: integer; var StopDays: integer);
|
---|
38 | procedure rpcGetImagingUserDays(var MaxNum: integer; var StartDays: integer; var StopDays: integer);
|
---|
39 | procedure rpcSetImagingDays(MaxNum, StartDays, StopDays: integer);
|
---|
40 |
|
---|
41 | procedure rpcGetReminders(Dest: TStrings);
|
---|
42 | procedure rpcSetReminders(aList: TStringList);
|
---|
43 |
|
---|
44 | function rpcGetListOrder: Char;
|
---|
45 | procedure rpcGetClinicUserDays(var StartDays: integer; var StopDays: integer);
|
---|
46 | procedure rpcGetClinicDefaults(var mon, tues, wed, thurs, fri, sat, sun: integer);
|
---|
47 | procedure rpcGetListSourceDefaults(var provider, treating, list, ward: integer);
|
---|
48 | procedure rpcSetClinicDefaults(StartDays, StopDays, mon, tues, wed, thurs, fri, sat, sun: integer);
|
---|
49 | procedure rpcSetPtListDefaults(PLSource, PLSort: Char; prov, spec, team, ward: integer);
|
---|
50 |
|
---|
51 | procedure rpcGetPersonalLists(Dest: TStrings);
|
---|
52 | procedure rpcGetAllTeams(Dest: TStrings);
|
---|
53 | procedure rpcGetTeams(Dest: TStrings);
|
---|
54 | procedure rpcGetATeams(Dest: TStrings);
|
---|
55 | procedure rpcDeleteList(aString: String);
|
---|
56 | function rpcNewList(aString: String): String;
|
---|
57 | procedure rpcSaveListChanges(aList: TStrings; aListIEN: integer);
|
---|
58 | procedure rpcListUsersByTeam(Dest: TStrings; teamid: integer);
|
---|
59 | procedure rpcRemoveList(aListIEN: integer);
|
---|
60 | procedure rpcAddList(aListIEN: integer);
|
---|
61 |
|
---|
62 | function rpcGetCombo: TStrings;
|
---|
63 | procedure rpcSetCombo(aList: TStrings);
|
---|
64 |
|
---|
65 | procedure rpcGetDefaultReportsSetting(var int1: integer; var int2: integer; var int3: integer);
|
---|
66 | procedure rpcDeleteUserLevelReportsSetting;
|
---|
67 | procedure rpcActiveDefaultSetting;
|
---|
68 | procedure rpcSetDefaultReportsSetting(aString: string);
|
---|
69 | procedure rpcSetIndividualReportSetting(aString1:string; aString2:string);
|
---|
70 | procedure rpcRetrieveDefaultSetting(var int1: integer; var int2: integer; var int3: integer; var msg: string);
|
---|
71 |
|
---|
72 | procedure rpcGetRangeForMeds(var startDt, stopDt: TFMDateTime);
|
---|
73 | procedure rpcPutRangeForMeds(TheVal: string);
|
---|
74 | procedure rpcGetRangeForEncs(var StartDays, StopDays: integer; DefaultParams: Boolean);
|
---|
75 | procedure rpcPutRangeForEncs(StartDays, StopDays: string);
|
---|
76 | procedure rpcGetEncFutureDays(var FutureDays: string);
|
---|
77 |
|
---|
78 | implementation
|
---|
79 |
|
---|
80 | //..............................................................................
|
---|
81 |
|
---|
82 | function rpcGetNotifications: TStrings;
|
---|
83 | begin
|
---|
84 | CallV('ORWTPP GETNOT', [nil]);
|
---|
85 | MixedCaseList(RPCBrokerV.Results);
|
---|
86 | result :=RPCBrokerV.Results;
|
---|
87 | end;
|
---|
88 |
|
---|
89 | function rpcGetOrderChecks: TStrings;
|
---|
90 | begin
|
---|
91 | CallV('ORWTPP GETOC', [nil]);
|
---|
92 | MixedCaseList(RPCBrokerV.Results);
|
---|
93 | result :=RPCBrokerV.Results;
|
---|
94 | end;
|
---|
95 |
|
---|
96 | function rpcGetNotificationDefaults: String;
|
---|
97 | begin
|
---|
98 | result := sCallV('ORWTPP GETNOTO', [nil]);
|
---|
99 | end;
|
---|
100 |
|
---|
101 | function rpcGetSurrogateInfo: String;
|
---|
102 | begin
|
---|
103 | result := MixedCase(sCallV('ORWTPP GETSURR', [nil]));
|
---|
104 | end;
|
---|
105 |
|
---|
106 | procedure rpcCheckSurrogate(surrogate: Int64; var ok: boolean; var msg: string);
|
---|
107 | var
|
---|
108 | value: string;
|
---|
109 | begin
|
---|
110 | value := sCallV('ORWTPP CHKSURR', [surrogate]);
|
---|
111 | ok := Piece(value, '^', 1) = '1';
|
---|
112 | msg := Piece(value, '^', 2);
|
---|
113 | end;
|
---|
114 |
|
---|
115 | procedure rpcSetSurrogateInfo(aString: String);
|
---|
116 | begin
|
---|
117 | CallV('ORWTPP SAVESURR', [aString]);
|
---|
118 | end;
|
---|
119 |
|
---|
120 |
|
---|
121 | procedure rpcClearNotifications;
|
---|
122 | begin
|
---|
123 | CallV('ORWTPP CLEARNOT', [nil]);
|
---|
124 | end;
|
---|
125 |
|
---|
126 | procedure rpcSetNotifications(aList: TStringList);
|
---|
127 | begin
|
---|
128 | CallV('ORWTPP SAVENOT', [aList]);
|
---|
129 | end;
|
---|
130 |
|
---|
131 | procedure rpcSetOrderChecks(aList: TStringList);
|
---|
132 | begin
|
---|
133 | CallV('ORWTPP SAVEOC', [aList]);
|
---|
134 | end;
|
---|
135 |
|
---|
136 | procedure rpcSetOtherStuff(aString: String);
|
---|
137 | begin
|
---|
138 | CallV('ORWTPP SAVENOTO', [aString]);
|
---|
139 | end;
|
---|
140 |
|
---|
141 | //..............................................................................
|
---|
142 |
|
---|
143 | function rpcGetOtherTabs: TStrings;
|
---|
144 | begin
|
---|
145 | CallV('ORWTPO GETTABS', [nil]);
|
---|
146 | MixedCaseList(RPCBrokerV.Results);
|
---|
147 | result :=RPCBrokerV.Results;
|
---|
148 | end;
|
---|
149 |
|
---|
150 | function rpcGetOther: String;
|
---|
151 | begin
|
---|
152 | result := sCallV('ORWTPP GETOTHER', [nil]);
|
---|
153 | end;
|
---|
154 |
|
---|
155 | procedure rpcSetOther(info: String);
|
---|
156 | begin
|
---|
157 | CallV('ORWTPP SETOTHER', [info]);
|
---|
158 | end;
|
---|
159 |
|
---|
160 | function rpcGetCosigners(const StartFrom: string; Direction: Integer): TStrings;
|
---|
161 | begin
|
---|
162 | CallV('ORWTPP GETCOS', [StartFrom, Direction]);
|
---|
163 | MixedCaseList(RPCBrokerV.Results);
|
---|
164 | Result := RPCBrokerV.Results;
|
---|
165 | end;
|
---|
166 |
|
---|
167 | function rpcGetDefaultCosigner: String;
|
---|
168 | begin
|
---|
169 | result := sCallV('ORWTPP GETDCOS', [nil]);
|
---|
170 | end;
|
---|
171 |
|
---|
172 | procedure rpcSetDefaultCosigner(value: Int64);
|
---|
173 | begin
|
---|
174 | CallV('ORWTPP SETDCOS', [value])
|
---|
175 | end;
|
---|
176 |
|
---|
177 | function rpcGetSubject: boolean;
|
---|
178 | var
|
---|
179 | value: string;
|
---|
180 | begin
|
---|
181 | value := sCallV('ORWTPP GETSUB', [nil]);
|
---|
182 | if value = '1' then result := true
|
---|
183 | else result := false;
|
---|
184 | end;
|
---|
185 |
|
---|
186 | procedure rpcSetSubject(value: boolean);
|
---|
187 | begin
|
---|
188 | CallV('ORWTPP SETSUB', [value])
|
---|
189 | end;
|
---|
190 |
|
---|
191 | function rpcGetClasses: TStrings;
|
---|
192 | begin
|
---|
193 | CallV('ORWTPN GETCLASS', [nil]);
|
---|
194 | MixedCaseList(RPCBrokerV.Results);
|
---|
195 | result :=RPCBrokerV.Results;
|
---|
196 | end;
|
---|
197 |
|
---|
198 | function rpcGetTitlesForClass(value: integer; const StartFrom: string; Direction: Integer): TStrings;
|
---|
199 | begin
|
---|
200 | (* case value of
|
---|
201 | CLS_PROGRESS_NOTES: CallV('TIU LONG LIST OF TITLES', [value, StartFrom, Direction]);
|
---|
202 | else
|
---|
203 | CallV('ORWTPN GETTC', [value, StartFrom, Direction]); //****** original
|
---|
204 | end;*)
|
---|
205 | CallV('TIU LONG LIST OF TITLES', [value, StartFrom, Direction]);
|
---|
206 | //MixedCaseList(RPCBrokerV.Results);
|
---|
207 | result :=RPCBrokerV.Results;
|
---|
208 | end;
|
---|
209 |
|
---|
210 | function rpcGetTitlesForUser(value: integer): TStrings;
|
---|
211 | begin
|
---|
212 | CallV('ORWTPP GETTU', [value]);
|
---|
213 | //MixedCaseList(RPCBrokerV.Results);
|
---|
214 | result :=RPCBrokerV.Results;
|
---|
215 | end;
|
---|
216 |
|
---|
217 | function rpcGetTitleDefault(value: integer): integer;
|
---|
218 | begin
|
---|
219 | result := strtointdef(sCallV('ORWTPP GETTD', [value]), -1);
|
---|
220 | end;
|
---|
221 |
|
---|
222 | procedure rpcSaveDocumentDefaults(classvalue, titledefault: integer; aList: TStrings);
|
---|
223 | begin
|
---|
224 | CallV('ORWTPP SAVET', [classvalue, titledefault, aList]);
|
---|
225 | end;
|
---|
226 |
|
---|
227 | //..............................................................................
|
---|
228 |
|
---|
229 | procedure rpcGetLabDays(var InpatientDays: integer; var OutpatientDays:integer);
|
---|
230 | var
|
---|
231 | values: string;
|
---|
232 | begin
|
---|
233 | values := sCallV('ORWTPO CSLABD', [nil]);
|
---|
234 | InpatientDays := strtointdef(Piece(values, '^', 1), 0);
|
---|
235 | OutpatientDays := strtointdef(Piece(values, '^', 2), 0);
|
---|
236 | end;
|
---|
237 |
|
---|
238 | procedure rpcGetLabUserDays(var InpatientDays: integer; var OutpatientDays: integer);
|
---|
239 | var
|
---|
240 | values: string;
|
---|
241 | begin
|
---|
242 | values := sCallV('ORWTPP CSLAB', [nil]);
|
---|
243 | InpatientDays := -strtointdef(Piece(values, '^', 1), 0);
|
---|
244 | OutpatientDays := -strtointdef(Piece(values, '^', 2), 0);
|
---|
245 | end;
|
---|
246 |
|
---|
247 | procedure rpcGetApptDays(var StartDays: integer; var StopDays: integer);
|
---|
248 | var
|
---|
249 | values, start, stop: string;
|
---|
250 | begin
|
---|
251 | values := sCallV('ORWTPD1 GETCSDEF', [nil]);
|
---|
252 | start := Piece(values, '^', 1);
|
---|
253 | stop := Piece(values, '^', 2);
|
---|
254 | StartDays := strtointdef(Piece(start, 'T', 2), 0);
|
---|
255 | StopDays := strtointdef(Piece(stop, 'T', 2), 0);
|
---|
256 | end;
|
---|
257 |
|
---|
258 | procedure rpcGetApptUserDays(var StartDays: integer; var StopDays: integer);
|
---|
259 | var
|
---|
260 | values, start, stop: string;
|
---|
261 | begin
|
---|
262 | values := sCallV('ORWTPD1 GETCSRNG', [nil]);
|
---|
263 | start := Piece(values, '^', 1);
|
---|
264 | stop := Piece(values, '^', 2);
|
---|
265 | StartDays := strtointdef(Piece(start, 'T', 2), 0);
|
---|
266 | StopDays := strtointdef(Piece(stop, 'T', 2), 0);
|
---|
267 | end;
|
---|
268 |
|
---|
269 | procedure rpcSetDays(InpatientDays, OutpatientDays, StartDays, StopDays: integer);
|
---|
270 | var
|
---|
271 | values: string;
|
---|
272 | begin
|
---|
273 | values := '';
|
---|
274 | values := values + inttostr(InpatientDays) + '^';
|
---|
275 | values := values + inttostr(OutpatientDays) + '^';
|
---|
276 | values := values + inttostr(StartDays) + '^';
|
---|
277 | values := values + inttostr(StopDays) + '^';
|
---|
278 | CallV('ORWTPD1 PUTCSRNG', [values]);
|
---|
279 | end;
|
---|
280 |
|
---|
281 | procedure rpcGetImagingDays(var MaxNum: integer; var StartDays: integer; var StopDays: integer);
|
---|
282 | var
|
---|
283 | values, max, start, stop: string;
|
---|
284 | begin
|
---|
285 | values := sCallV('ORWTPO GETIMGD', [nil]);
|
---|
286 | //values := 'T-120;T;;;100';
|
---|
287 | start := Piece(values, ';', 1);
|
---|
288 | stop := Piece(values, ';', 2);
|
---|
289 | max := Piece(values, ';', 5);
|
---|
290 | StartDays := strtointdef(Piece(start, 'T', 2), 0);
|
---|
291 | StopDays := strtointdef(Piece(stop, 'T', 2), 0);
|
---|
292 | MaxNum := strtointdef(max, 0);
|
---|
293 | end;
|
---|
294 |
|
---|
295 | procedure rpcGetImagingUserDays(var MaxNum: integer; var StartDays: integer; var StopDays: integer);
|
---|
296 | var
|
---|
297 | values, max, start, stop: string;
|
---|
298 | begin
|
---|
299 | values := sCallV('ORWTPP GETIMG', [nil]);
|
---|
300 | //values := 'T-180;T;;;15';
|
---|
301 | start := Piece(values, ';', 1);
|
---|
302 | stop := Piece(values, ';', 2);
|
---|
303 | max := Piece(values, ';', 5);
|
---|
304 | StartDays := strtointdef(Piece(start, 'T', 2), 0);
|
---|
305 | StopDays := strtointdef(Piece(stop, 'T', 2), 0);
|
---|
306 | MaxNum := strtointdef(max, 0);
|
---|
307 | end;
|
---|
308 |
|
---|
309 | procedure rpcSetImagingDays(MaxNum, StartDays, StopDays: integer);
|
---|
310 | begin
|
---|
311 | CallV('ORWTPP SETIMG', [MaxNum, StartDays, StopDays]);
|
---|
312 | end;
|
---|
313 |
|
---|
314 | //..............................................................................
|
---|
315 |
|
---|
316 | procedure rpcGetReminders(Dest: TStrings);
|
---|
317 | begin
|
---|
318 | CallV('ORWTPP GETREM', [nil]);
|
---|
319 | MixedCaseList(RPCBrokerV.Results);
|
---|
320 | Dest.Assign(RPCBrokerV.Results);
|
---|
321 | end;
|
---|
322 |
|
---|
323 | procedure rpcSetReminders(aList: TStringList);
|
---|
324 | begin
|
---|
325 | CallV('ORWTPP SETREM', [aList]);
|
---|
326 | end;
|
---|
327 |
|
---|
328 | //..............................................................................
|
---|
329 |
|
---|
330 | function rpcGetListOrder: Char;
|
---|
331 | begin
|
---|
332 | result := CharAt(sCallV('ORWTPP SORTDEF', [nil]), 1);
|
---|
333 | end;
|
---|
334 |
|
---|
335 | procedure rpcGetClinicUserDays(var StartDays: integer; var StopDays: integer);
|
---|
336 | var
|
---|
337 | values, start, stop: string;
|
---|
338 | begin
|
---|
339 | values := sCallV('ORWTPP CLRANGE', [nil]);
|
---|
340 | start := Piece(values, '^', 1);
|
---|
341 | stop := Piece(values, '^', 2);
|
---|
342 | StartDays := strtointdef(Piece(start, 'T', 2), 0);
|
---|
343 | StopDays := strtointdef(Piece(stop, 'T', 2), 0);
|
---|
344 | end;
|
---|
345 |
|
---|
346 | procedure rpcGetClinicDefaults(var mon, tues, wed, thurs, fri, sat, sun: integer);
|
---|
347 | var
|
---|
348 | values: string;
|
---|
349 | begin
|
---|
350 | values := sCallV('ORWTPP CLDAYS', [nil]);
|
---|
351 | mon := strtointdef(Piece(values, '^', 1), 0);
|
---|
352 | tues := strtointdef(Piece(values, '^', 2), 0);
|
---|
353 | wed := strtointdef(Piece(values, '^', 3), 0);
|
---|
354 | thurs := strtointdef(Piece(values, '^', 4), 0);
|
---|
355 | fri := strtointdef(Piece(values, '^', 5), 0);
|
---|
356 | sat := strtointdef(Piece(values, '^', 6), 0);
|
---|
357 | sun := strtointdef(Piece(values, '^', 7), 0);
|
---|
358 | end;
|
---|
359 |
|
---|
360 | procedure rpcGetListSourceDefaults(var provider, treating, list, ward: integer);
|
---|
361 | var
|
---|
362 | values: string;
|
---|
363 | begin
|
---|
364 | values := sCallV('ORWTPP LSDEF', [nil]);
|
---|
365 | provider := strtointdef(Piece(values, '^', 1), 0);
|
---|
366 | treating := strtointdef(Piece(values, '^', 2), 0);
|
---|
367 | list := strtointdef(Piece(values, '^', 3), 0);
|
---|
368 | ward := strtointdef(Piece(values, '^', 4), 0);
|
---|
369 | end;
|
---|
370 |
|
---|
371 | procedure rpcSetClinicDefaults(StartDays, StopDays, mon, tues, wed, thurs, fri, sat, sun: integer);
|
---|
372 | var
|
---|
373 | values: string;
|
---|
374 | begin
|
---|
375 | values := '';
|
---|
376 | values := values + inttostr(StartDays) + '^';
|
---|
377 | values := values + inttostr(StopDays) + '^';
|
---|
378 | values := values + inttostr(mon) + '^';
|
---|
379 | values := values + inttostr(tues) + '^';
|
---|
380 | values := values + inttostr(wed) + '^';
|
---|
381 | values := values + inttostr(thurs) + '^';
|
---|
382 | values := values + inttostr(fri) + '^';
|
---|
383 | values := values + inttostr(sat) + '^';
|
---|
384 | values := values + inttostr(sun) + '^';
|
---|
385 | CallV('ORWTPP SAVECD', [values]);
|
---|
386 | end;
|
---|
387 |
|
---|
388 | procedure rpcSetPtListDefaults(PLSource, PLSort: Char; prov, spec, team, ward: integer);
|
---|
389 | var
|
---|
390 | values: string;
|
---|
391 | begin
|
---|
392 | values := '';
|
---|
393 | values := values + PLSource + '^';
|
---|
394 | values := values + PLSort + '^';
|
---|
395 | values := values + inttostr(prov) + '^';
|
---|
396 | values := values + inttostr(spec) + '^';
|
---|
397 | values := values + inttostr(team) + '^';
|
---|
398 | values := values + inttostr(ward) + '^';
|
---|
399 | CallV('ORWTPP SAVEPLD', [values]);
|
---|
400 | end;
|
---|
401 |
|
---|
402 | //..............................................................................
|
---|
403 |
|
---|
404 | procedure rpcGetPersonalLists(Dest: TStrings);
|
---|
405 | begin
|
---|
406 | CallV('ORWTPP PLISTS', [nil]);
|
---|
407 | MixedCaseList(RPCBrokerV.Results);
|
---|
408 | Dest.Assign(RPCBrokerV.Results);
|
---|
409 | end;
|
---|
410 |
|
---|
411 | procedure rpcGetAllTeams(Dest: TStrings);
|
---|
412 | begin
|
---|
413 | CallV('ORWTPP PLTEAMS', [nil]);
|
---|
414 | MixedCaseList(RPCBrokerV.Results);
|
---|
415 | Dest.Assign(RPCBrokerV.Results);
|
---|
416 | end;
|
---|
417 |
|
---|
418 | procedure rpcGetTeams(Dest: TStrings);
|
---|
419 | begin
|
---|
420 | CallV('ORWTPP TEAMS', [nil]);
|
---|
421 | MixedCaseList(RPCBrokerV.Results);
|
---|
422 | Dest.Assign(RPCBrokerV.Results);
|
---|
423 | end;
|
---|
424 |
|
---|
425 | procedure rpcGetATeams(Dest: TStrings);
|
---|
426 | begin
|
---|
427 | CallV('ORWTPT ATEAMS', [nil]);
|
---|
428 | MixedCaseList(RPCBrokerV.Results);
|
---|
429 | Dest.Assign(RPCBrokerV.Results);
|
---|
430 | end;
|
---|
431 |
|
---|
432 | procedure rpcDeleteList(aString: String);
|
---|
433 | begin
|
---|
434 | CallV('ORWTPP DELLIST', [aString]);
|
---|
435 | end;
|
---|
436 |
|
---|
437 | function rpcNewList(aString: String): String;
|
---|
438 | begin
|
---|
439 | result := sCallV('ORWTPP NEWLIST', [aString]);
|
---|
440 | result := MixedCase(result);
|
---|
441 | end;
|
---|
442 |
|
---|
443 | procedure rpcSaveListChanges(aList: TStrings; aListIEN: integer);
|
---|
444 | begin
|
---|
445 | CallV('ORWTPP SAVELIST', [aList, aListIEN]);
|
---|
446 | end;
|
---|
447 |
|
---|
448 | procedure rpcListUsersByTeam(Dest: TStrings; teamid: integer);
|
---|
449 | begin
|
---|
450 | CallV('ORWTPT GETTEAM', [teamid]);
|
---|
451 | MixedCaseList(RPCBrokerV.Results);
|
---|
452 | Dest.Assign(RPCBrokerV.Results);
|
---|
453 | end;
|
---|
454 |
|
---|
455 | procedure rpcRemoveList(aListIEN: integer);
|
---|
456 | begin
|
---|
457 | CallV('ORWTPP REMLIST', [aListIEN]);
|
---|
458 | end;
|
---|
459 |
|
---|
460 | procedure rpcAddList(aListIEN: integer);
|
---|
461 | begin
|
---|
462 | CallV('ORWTPP ADDLIST', [aListIEN]);
|
---|
463 | end;
|
---|
464 |
|
---|
465 | //..............................................................................
|
---|
466 |
|
---|
467 | function rpcGetCombo: TStrings;
|
---|
468 | begin
|
---|
469 | CallV('ORWTPP GETCOMBO', [nil]);
|
---|
470 | MixedCaseList(RPCBrokerV.Results);
|
---|
471 | result := RPCBrokerV.Results;
|
---|
472 | end;
|
---|
473 |
|
---|
474 | procedure rpcSetCombo(aList: TStrings);
|
---|
475 | begin
|
---|
476 | CallV('ORWTPP SETCOMBO', [aList]);
|
---|
477 | end;
|
---|
478 |
|
---|
479 | //..............................................................................
|
---|
480 |
|
---|
481 | procedure rpcGetDefaultReportsSetting(var int1: integer; var int2: integer; var int3: integer);
|
---|
482 | var
|
---|
483 | values: string;
|
---|
484 | startoffset,stopoffset: string;
|
---|
485 | begin
|
---|
486 | values := sCallV('ORWTPD GETDFLT', [nil]);
|
---|
487 | if length(values)=0 then
|
---|
488 | exit;
|
---|
489 | startoffset := Piece(values,';',1);
|
---|
490 | delete(startoffset,1,1);
|
---|
491 | stopoffset := Piece(values,';',2);
|
---|
492 | delete(stopoffset,1,1);
|
---|
493 | int1 := strtointdef(startoffset,0);
|
---|
494 | int2 := strtointdef(stopoffset,0);
|
---|
495 | int3:= strtointdef(Piece(values, ';', 3), 100); // max occurences
|
---|
496 | end;
|
---|
497 |
|
---|
498 | procedure rpcDeleteUserLevelReportsSetting;
|
---|
499 | begin
|
---|
500 | sCallV('ORWTPD DELDFLT',[nil]);
|
---|
501 | end;
|
---|
502 |
|
---|
503 | procedure rpcActiveDefaultSetting;
|
---|
504 | begin
|
---|
505 | sCallV('ORWTPD ACTDF',[nil]);
|
---|
506 | end;
|
---|
507 |
|
---|
508 | procedure rpcSetDefaultReportsSetting(aString: string);
|
---|
509 | begin
|
---|
510 | sCallV('ORWTPD SUDF',[aString]);
|
---|
511 | end;
|
---|
512 |
|
---|
513 | procedure rpcSetIndividualReportSetting(aString1:string; aString2:string);
|
---|
514 | begin
|
---|
515 | sCallV('ORWTPD SUINDV',[aString1,aString2]);
|
---|
516 | end;
|
---|
517 |
|
---|
518 | procedure rpcRetrieveDefaultSetting(var int1: integer; var int2: integer; var int3: integer; var msg: string);
|
---|
519 | var
|
---|
520 | values: string;
|
---|
521 | startoffset,stopoffset: string;
|
---|
522 | begin
|
---|
523 | values := sCallV('ORWTPD RSDFLT',[nil]);
|
---|
524 | if length(values)=0 then
|
---|
525 | begin
|
---|
526 | msg := 'NODEFAULT';
|
---|
527 | exit;
|
---|
528 | end;
|
---|
529 | startoffset := Piece(values,';',1);
|
---|
530 | delete(startoffset,1,1);
|
---|
531 | stopoffset := Piece(values,';',2);
|
---|
532 | delete(stopoffset,1,1);
|
---|
533 | int1 := strtointdef(startoffset,0);
|
---|
534 | int2 := strtointdef(stopoffset,0);
|
---|
535 | int3:= strtointdef(Piece(values, ';', 3), 100); // max occurences
|
---|
536 | end;
|
---|
537 |
|
---|
538 | procedure rpcGetRangeForMeds(var startDt, stopDt: TFMDateTime);
|
---|
539 | var
|
---|
540 | rst,sDt,eDt: string;
|
---|
541 | td: TFMDateTime;
|
---|
542 | begin
|
---|
543 | rst := SCallV('ORWTPD GETOCM',[nil]);
|
---|
544 | sDt := Piece(rst,';',1);
|
---|
545 | if lowerCase(sDt) <> 't' then
|
---|
546 | Delete(sDt,1,1);
|
---|
547 | eDt := Piece(rst,';',2);
|
---|
548 | if lowerCase(eDt) <> 't' then
|
---|
549 | Delete(eDt,1,1);
|
---|
550 | td := FMToday;
|
---|
551 | if Length(sDt)>0 then
|
---|
552 | startDt := FMDateTimeOffsetBy(td, StrToIntDef(sDt,0));
|
---|
553 | if Length(eDt)>0 then
|
---|
554 | stopDt := FMDateTimeOffsetBy(td, StrToIntDef(eDt,0));
|
---|
555 | end;
|
---|
556 |
|
---|
557 | procedure rpcPutRangeForMeds(TheVal: string);
|
---|
558 | begin
|
---|
559 | SCallV('ORWTPD PUTOCM',[TheVal]);
|
---|
560 | end;
|
---|
561 |
|
---|
562 | procedure rpcGetRangeForEncs(var StartDays, StopDays: integer; DefaultParams: Boolean);
|
---|
563 | var
|
---|
564 | Start, Stop, Values: string;
|
---|
565 | begin
|
---|
566 | if DefaultParams then
|
---|
567 | Values := SCallV('ORWTPD1 GETEFDAT',[nil])
|
---|
568 | else
|
---|
569 | Values := SCallV('ORWTPD1 GETEDATS',[nil]);
|
---|
570 | Start := Piece(Values, '^', 1);
|
---|
571 | Stop := Piece(Values, '^', 2);
|
---|
572 | StartDays := StrToIntDef(Start, 0);
|
---|
573 | StopDays := StrToIntDef(Stop, 0);
|
---|
574 | end;
|
---|
575 |
|
---|
576 | procedure rpcPutRangeForEncs(StartDays, StopDays: string);
|
---|
577 | var
|
---|
578 | values: string;
|
---|
579 | begin
|
---|
580 | values := '';
|
---|
581 | values := values + StartDays + '^';
|
---|
582 | values := values + StopDays;
|
---|
583 | CallV('ORWTPD1 PUTEDATS',[values]);
|
---|
584 | end;
|
---|
585 |
|
---|
586 | procedure rpcGetEncFutureDays(var FutureDays: string);
|
---|
587 | begin
|
---|
588 | FutureDays := SCallV('ORWTPD1 GETEAFL',[nil]);
|
---|
589 | end;
|
---|
590 |
|
---|
591 | end.
|
---|