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