source: cprs/trunk/WVEHR-Lib/rWVEHR.pas@ 1243

Last change on this file since 1243 was 829, checked in by Kevin Toppenberg, 14 years ago

Upgrade to version 27

File size: 938 bytes
Line 
1unit rWVEHR;
2
3interface
4
5uses 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
10function GetPatientLongAge(ADFN: string): string;
11function GetPatientBriefAge(ADFN: string): string;
12
13const
14 PERIOD: array[1..7] of string[1] = ('y','m','w','d','h','m','s');
15
16implementation
17
18function GetPatientLongAge(ADFN: string): string;
19begin
20 Result := sCallv('VWTIME LONG AGE', [ADFN]);
21end;
22
23function GetPatientBriefAge(ADFN: string): string;
24var
25 AgePieces, BriefAge: string;
26 i: integer;
27begin
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;
37end;
38
39end.
Note: See TracBrowser for help on using the repository browser.