source: cprs/trunk/CPRS-Chart/Encounter/fPCEOther.pas@ 924

Last change on this file since 924 was 829, checked in by Kevin Toppenberg, 14 years ago

Upgrade to version 27

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