Last change
on this file since 954 was 829, checked in by Kevin Toppenberg, 14 years ago |
Upgrade to version 27
|
File size:
938 bytes
|
Line | |
---|
1 | unit rWVEHR;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses SysUtils, Classes, ORNet, ORFn, ORClasses;
|
---|
6 |
|
---|
7 | { record types used to return data from the RPC's. Generally, the delimited strings returned
|
---|
8 | by the RPC are mapped into the records defined below. }
|
---|
9 |
|
---|
10 | function GetPatientLongAge(ADFN: string): string;
|
---|
11 | function GetPatientBriefAge(ADFN: string): string;
|
---|
12 |
|
---|
13 | const
|
---|
14 | PERIOD: array[1..7] of string[1] = ('y','m','w','d','h','m','s');
|
---|
15 |
|
---|
16 | implementation
|
---|
17 |
|
---|
18 | function GetPatientLongAge(ADFN: string): string;
|
---|
19 | begin
|
---|
20 | Result := sCallv('VWTIME LONG AGE', [ADFN]);
|
---|
21 | end;
|
---|
22 |
|
---|
23 | function GetPatientBriefAge(ADFN: string): string;
|
---|
24 | var
|
---|
25 | AgePieces, BriefAge: string;
|
---|
26 | i: integer;
|
---|
27 | begin
|
---|
28 | AgePieces := sCallv('VWTIME BRIEF AGE', [ADFN]);
|
---|
29 | for i := 1 to 7 do
|
---|
30 | if Piece(AgePieces, U, i) <> '' then
|
---|
31 | BriefAge := BriefAge + Piece(AgePieces, U, i) + PERIOD[i]
|
---|
32 | else
|
---|
33 | begin
|
---|
34 | Result := BriefAge;
|
---|
35 | exit;
|
---|
36 | end;
|
---|
37 | end;
|
---|
38 |
|
---|
39 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.