1 | unit fODRadApproval;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
---|
6 | Buttons, ORCtrls, ORfn, ExtCtrls, fBase508Form, VA508AccessibilityManager;
|
---|
7 |
|
---|
8 | type
|
---|
9 | TfrmODRadApproval = class(TfrmBase508Form)
|
---|
10 | cmdOK: TButton;
|
---|
11 | cmdCancel: TButton;
|
---|
12 | cboRadiologist: TORComboBox;
|
---|
13 | SrcLabel: TLabel;
|
---|
14 | pnlBase: TORAutoPanel;
|
---|
15 | procedure cmdOKClick(Sender: TObject);
|
---|
16 | procedure cmdCancelClick(Sender: TObject);
|
---|
17 | private
|
---|
18 | FRadiologist: string ;
|
---|
19 | FChanged: Boolean;
|
---|
20 | end;
|
---|
21 |
|
---|
22 | procedure SelectApprovingRadiologist(FontSize: Integer; var Radiologist: string) ;
|
---|
23 |
|
---|
24 | implementation
|
---|
25 |
|
---|
26 | {$R *.DFM}
|
---|
27 |
|
---|
28 | uses rODRad, rCore, uCore;
|
---|
29 |
|
---|
30 | const
|
---|
31 | TX_RAD_TEXT = 'Select radiologist or press Cancel.';
|
---|
32 | TX_RAD_CAP = 'No Radiologist Selected';
|
---|
33 |
|
---|
34 | procedure SelectApprovingRadiologist(FontSize: Integer; var Radiologist: string);
|
---|
35 | { displays radiologist selection form and returns a record of the selection }
|
---|
36 | var
|
---|
37 | frmODRadApproval: TfrmODRadApproval;
|
---|
38 | W, H: Integer;
|
---|
39 | begin
|
---|
40 | frmODRadApproval := TfrmODRadApproval.Create(Application);
|
---|
41 | try
|
---|
42 | with frmODRadApproval do
|
---|
43 | begin
|
---|
44 | Font.Size := FontSize;
|
---|
45 | W := ClientWidth;
|
---|
46 | H := ClientHeight;
|
---|
47 | ResizeToFont(FontSize, W, H);
|
---|
48 | ClientWidth := W; pnlBase.Width := W;
|
---|
49 | ClientHeight := H; pnlBase.Height := H;
|
---|
50 | FChanged := False;
|
---|
51 | FastAssign(SubsetOfRadiologists, cboRadiologist.Items);
|
---|
52 | ShowModal;
|
---|
53 | Radiologist := FRadiologist ;
|
---|
54 | end; {with frmODRadApproval}
|
---|
55 | finally
|
---|
56 | frmODRadApproval.Release;
|
---|
57 | end;
|
---|
58 | end;
|
---|
59 |
|
---|
60 | procedure TfrmODRadApproval.cmdCancelClick(Sender: TObject);
|
---|
61 | begin
|
---|
62 | Close;
|
---|
63 | end;
|
---|
64 |
|
---|
65 | procedure TfrmODRadApproval.cmdOKClick(Sender: TObject);
|
---|
66 | begin
|
---|
67 | if cboRadiologist.ItemIEN = 0 then
|
---|
68 | begin
|
---|
69 | InfoBox(TX_RAD_TEXT, TX_RAD_CAP, MB_OK or MB_ICONWARNING);
|
---|
70 | FChanged := False ;
|
---|
71 | Exit;
|
---|
72 | end;
|
---|
73 | FChanged := True;
|
---|
74 | FRadiologist := cboRadiologist.Items[cboRadiologist.ItemIndex] ;
|
---|
75 | Close;
|
---|
76 | end;
|
---|
77 |
|
---|
78 | end.
|
---|