| 1 | unit fDupPts;
|
|---|
| 2 |
|
|---|
| 3 | interface
|
|---|
| 4 |
|
|---|
| 5 | uses
|
|---|
| 6 | Windows, Messages, SysUtils, Variants, Classes, Graphics,
|
|---|
| 7 | Controls, Forms, Dialogs, StdCtrls, ORCtrls, ExtCtrls, OrFn, fBase508Form,
|
|---|
| 8 | VA508AccessibilityManager;
|
|---|
| 9 |
|
|---|
| 10 | type
|
|---|
| 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 |
|
|---|
| 31 | var
|
|---|
| 32 | frmDupPts: TfrmDupPts;
|
|---|
| 33 |
|
|---|
| 34 | implementation
|
|---|
| 35 |
|
|---|
| 36 | {$R *.dfm}
|
|---|
| 37 |
|
|---|
| 38 | uses rCore, uCore, fPtSel;
|
|---|
| 39 |
|
|---|
| 40 | procedure TfrmDupPts.btnCancelClick(Sender: TObject);
|
|---|
| 41 | begin
|
|---|
| 42 |
|
|---|
| 43 | close;
|
|---|
| 44 |
|
|---|
| 45 | end;
|
|---|
| 46 |
|
|---|
| 47 | procedure TfrmDupPts.FormCreate(Sender: TObject);
|
|---|
| 48 | var
|
|---|
| 49 | theDups: tStringList;
|
|---|
| 50 | begin
|
|---|
| 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);
|
|---|
| 56 | end;
|
|---|
| 57 |
|
|---|
| 58 | procedure TfrmDupPts.btnOKClick(Sender: TObject);
|
|---|
| 59 | begin
|
|---|
| 60 |
|
|---|
| 61 | if not (Length(lboSelPt.ItemID) > 0) then //*DFN*
|
|---|
| 62 | begin
|
|---|
| 63 | infoBox('A patient has not been selected.', 'No Patient Selected', MB_OK);
|
|---|
| 64 | exit;
|
|---|
| 65 | end;
|
|---|
| 66 |
|
|---|
| 67 | fPtSel.DupDFN := lboSelPt.ItemID; //*DFN*
|
|---|
| 68 | close;
|
|---|
| 69 |
|
|---|
| 70 | end;
|
|---|
| 71 |
|
|---|
| 72 | procedure TfrmDupPts.FormKeyDown(Sender: TObject; var Key: Word;
|
|---|
| 73 | Shift: TShiftState);
|
|---|
| 74 | begin
|
|---|
| 75 | inherited;
|
|---|
| 76 | if (key = VK_ESCAPE) then
|
|---|
| 77 | btnCancel.click;
|
|---|
| 78 | end;
|
|---|
| 79 |
|
|---|
| 80 | procedure TfrmDupPts.lboSelPtDblClick(Sender: TObject);
|
|---|
| 81 | begin
|
|---|
| 82 | btnOKClick(btnOK);
|
|---|
| 83 | end;
|
|---|
| 84 |
|
|---|
| 85 | end.
|
|---|