source: cprs/branches/tmg-cprs/CPRS-Chart/Orders/fODRadApproval.pas@ 973

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 2.5 KB
RevLine 
[453]1//kt -- Modified with SourceScanner on 8/8/2007
2unit fODRadApproval;
3
4interface
5
6uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
7 Buttons, ORCtrls, ORfn, ExtCtrls, DKLang;
8
9type
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
24procedure SelectApprovingRadiologist(FontSize: Integer; var Radiologist: string) ;
25
26implementation
27
28{$R *.DFM}
29
30uses 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
36var
37 TX_RAD_TEXT : string; //kt
38 TX_RAD_CAP : string; //kt
39
40procedure SetupVars;
41//kt Added entire function to replace constant declarations 8/8/2007
42begin
43 TX_RAD_TEXT := DKLangConstW('fODRadApproval_Select_radiologist_or_press_Cancelx');
44 TX_RAD_CAP := DKLangConstW('fODRadApproval_No_Radiologist_Selected');
45end;
46
47procedure SelectApprovingRadiologist(FontSize: Integer; var Radiologist: string);
48{ displays radiologist selection form and returns a record of the selection }
49var
50 frmODRadApproval: TfrmODRadApproval;
51 W, H: Integer;
52begin
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;
71end;
72
73procedure TfrmODRadApproval.cmdCancelClick(Sender: TObject);
74begin
75 Close;
76end;
77
78procedure TfrmODRadApproval.cmdOKClick(Sender: TObject);
79begin
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;
90end;
91
92end.
Note: See TracBrowser for help on using the repository browser.