source: cprs/branches/foia-cprs/CPRS-Chart/fLaunch.pas@ 611

Last change on this file since 611 was 459, checked in by Kevin Toppenberg, 16 years ago

Adding foia-cprs branch

File size: 1.6 KB
Line 
1unit fLaunch;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 StdCtrls, ExtCtrls;
8
9type
10 TfrmLaunch = class(TForm)
11 grpFontSize: TRadioGroup;
12 cmdShow: TButton;
13 Edit1: TEdit;
14 Label1: TLabel;
15 cmdClose: TButton;
16 cmdNotif: TButton;
17 procedure cmdShowClick(Sender: TObject);
18 procedure FormCreate(Sender: TObject);
19 procedure cmdCloseClick(Sender: TObject);
20 private
21 { Private declarations }
22 public
23 { Public declarations }
24 end;
25
26var
27 frmLaunch: TfrmLaunch;
28
29implementation
30
31{$R *.DFM}
32
33uses ORFn, ORNet, fPtSel, uCore;
34
35procedure TfrmLaunch.FormCreate(Sender: TObject);
36begin
37 if not ConnectToServer('OR CPRS GUI CHART') then
38 begin
39 Close; // need a way to exit without needing the broker (close may call it)
40 Exit;
41 end;
42 User := TUser.Create; // creates the user object defined in uCore
43 Patient := TPatient.Create; // creates the patient object defined in uCore
44 Encounter := TEncounter.Create; // creates the encounter object defined in uCore
45end;
46
47procedure TfrmLaunch.cmdShowClick(Sender: TObject);
48var
49 ASize: Integer;
50 Notif: Boolean;
51begin
52 ASize := 8;
53 case grpFontSize.ItemIndex of
54 0: ASize := 8;
55 1: ASize := 10;
56 2: ASize := 12;
57 3: ASize := 14;
58 4: ASize := 18;
59 end;
60 Notif := TControl(Sender).Tag = 1;
61 SelectPatient(Notif, ASize);
62 Edit1.Text := IntToStr(Patient.DFN) + U + Patient.Name + U + Encounter.LocationName;
63end;
64
65procedure TfrmLaunch.cmdCloseClick(Sender: TObject);
66begin
67 Close;
68end;
69
70end.
Note: See TracBrowser for help on using the repository browser.