source: cprs/branches/tmg-cprs/CPRS-Chart/Encounter/fPCEOther.pas@ 1531

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 2.8 KB
RevLine 
[453]1//kt -- Modified with SourceScanner on 8/8/2007
2unit fPCEOther;
3
4interface
5
6uses
7 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
8 fAutoSz, ORFn, ORCtrls, StdCtrls, DKLang;
9
10type
11 TfrmPCEOther = class(TfrmAutoSz)
12 cmdCancel: TButton;
13 cmdOK: TButton;
14 cboOther: TORComboBox;
15 DKLanguageController1: TDKLanguageController;
16 procedure cmdOKClick(Sender: TObject);
17 procedure FormCreate(Sender: TObject);
18 procedure cmdCancelClick(Sender: TObject);
19 procedure cboOtherDblClick(Sender: TObject);
20 procedure cboOtherChange(Sender: TObject);
21 private
22 fOtherApp: Integer;
23 FCode: string;
24 procedure SetApp(OtherApp: Integer);
25 public
26 { Public declarations }
27 end;
28
29
30procedure OtherLookup(var Code: string; OtherApp: Integer);
31
32implementation
33
34{$R *.DFM}
35
36uses rPCE, fEncounterFrame;
37
38procedure OtherLookup(var Code: string; OtherApp: Integer);
39var
40 frmPCEOther: TfrmPCEOther;
41begin
42 frmPCEOther := TfrmPCEOther.Create(Application);
43 try
44 ResizeFormToFont(TForm(frmPCEOther));
45 frmPCEOther.SetApp(OtherApp);
46 frmPCEOther.ShowModal;
47 Code := frmPCEOther.FCode;
48 finally
49 frmPCEOther.Free;
50 end;
51end;
52
53procedure TfrmPCEOther.SetApp(OtherApp: Integer);
54begin
55 fOtherApp := OtherApp;
56 case OtherApp of
57// PCE_IMM: Caption := 'Other Immunizations'; <-- original line. //kt 8/8/2007
58 PCE_IMM: Caption := DKLangConstW('fPCEOther_Other_Immunizations'); //kt added 8/8/2007
59// PCE_SK: Caption := 'Other Skin Tests'; <-- original line. //kt 8/8/2007
60 PCE_SK: Caption := DKLangConstW('fPCEOther_Other_Skin_Tests'); //kt added 8/8/2007
61// PCE_PED: Caption := 'Other Education Topics'; <-- original line. //kt 8/8/2007
62 PCE_PED: Caption := DKLangConstW('fPCEOther_Other_Education_Topics'); //kt added 8/8/2007
63// PCE_HF: Caption := 'Other Health Factors';
64// PCE_XAM: Caption := 'Other Examinations'; <-- original line. //kt 8/8/2007
65 PCE_XAM: Caption := DKLangConstW('fPCEOther_Other_Examinations'); //kt added 8/8/2007
66
67 end;
68 cboOther.Caption := Caption;
69 LoadcboOther(cboOther.Items, uEncPCEData.Location, OtherApp);
70end;
71
72
73procedure TfrmPCEOther.cmdOKClick(Sender: TObject);
74begin
75 inherited;
76 with cboOther do
77 begin
78 if ItemIndex = -1 then Exit;
79 FCode := CboOther.Items[ItemIndex];
80//
81 Close;
82 end;
83end;
84
85procedure TfrmPCEOther.FormCreate(Sender: TObject);
86begin
87 inherited;
88 FCode := '';
89end;
90
91
92procedure TfrmPCEOther.cmdCancelClick(Sender: TObject);
93begin
94 inherited;
95 fCode := '';
96 close();
97end;
98
99procedure TfrmPCEOther.cboOtherDblClick(Sender: TObject);
100begin
101 inherited;
102 cmdOKClick(Sender);
103end;
104
105procedure TfrmPCEOther.cboOtherChange(Sender: TObject);
106begin
107 inherited;
108 cmdOK.Enabled := (cboOther.ItemIndex >= 0);
109end;
110
111end.
Note: See TracBrowser for help on using the repository browser.