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