source: cprs/branches/foia-cprs/CPRS-Chart/fDupPts.pas@ 1071

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

Adding foia-cprs branch

File size: 1.7 KB
Line 
1unit fDupPts;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Variants, Classes, Graphics,
7 Controls, Forms, Dialogs, StdCtrls, ORCtrls, ExtCtrls, OrFn;
8
9type
10 TfrmDupPts = class(TForm)
11 pnlDupPts: TPanel;
12 btnOK: TButton;
13 btnCancel: TButton;
14 pnlSelDupPt: TPanel;
15 lboSelPt: TORListBox;
16 lblDupPts: TLabel;
17 lblSelDupPts: TLabel;
18 procedure btnCancelClick(Sender: TObject);
19 procedure FormCreate(Sender: TObject);
20 procedure btnOKClick(Sender: TObject);
21 procedure FormKeyDown(Sender: TObject; var Key: Word;
22 Shift: TShiftState);
23 procedure lboSelPtDblClick(Sender: TObject);
24 private
25 { Private declarations }
26 public
27 { Public declarations }
28 end;
29
30var
31 frmDupPts: TfrmDupPts;
32
33implementation
34
35{$R *.dfm}
36
37uses rCore, uCore, fPtSel;
38
39procedure TfrmDupPts.btnCancelClick(Sender: TObject);
40begin
41
42close;
43
44end;
45
46procedure TfrmDupPts.FormCreate(Sender: TObject);
47var
48 theDups: tStringList;
49begin
50 fPtSel.DupDFN := 'Cancel'; // Pre-set as default.
51 theDups := tStringList.create;
52 theDups.assign(fPtSel.PtStrs);
53 lboSelPt.items.assign(theDups);
54 ResizeAnchoredFormToFont(self);
55end;
56
57procedure TfrmDupPts.btnOKClick(Sender: TObject);
58begin
59
60if not (Length(lboSelPt.ItemID) > 0) then //*DFN*
61begin
62 infoBox('A patient has not been selected.', 'No Patient Selected', MB_OK);
63 exit;
64end;
65
66fPtSel.DupDFN := lboSelPt.ItemID; //*DFN*
67close;
68
69end;
70
71procedure TfrmDupPts.FormKeyDown(Sender: TObject; var Key: Word;
72 Shift: TShiftState);
73begin
74
75// Check for "Esc" keypress:
76if (key = 27) then // ESC key.
77 btnCancel.click;
78
79end;
80
81procedure TfrmDupPts.lboSelPtDblClick(Sender: TObject);
82begin
83 btnOKClick(btnOK);
84end;
85
86end.
Note: See TracBrowser for help on using the repository browser.