source: cprs/trunk/CPRS-Chart/fDupPts.pas@ 1742

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

Upgrading to version 27

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