| [453] | 1 | //kt -- Modified with SourceScanner on 8/8/2007 | 
|---|
|  | 2 | unit fPCEOther; | 
|---|
|  | 3 |  | 
|---|
|  | 4 | interface | 
|---|
|  | 5 |  | 
|---|
|  | 6 | uses | 
|---|
|  | 7 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, | 
|---|
|  | 8 | fAutoSz, ORFn, ORCtrls, StdCtrls, DKLang; | 
|---|
|  | 9 |  | 
|---|
|  | 10 | type | 
|---|
|  | 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 |  | 
|---|
|  | 30 | procedure OtherLookup(var Code: string; OtherApp: Integer); | 
|---|
|  | 31 |  | 
|---|
|  | 32 | implementation | 
|---|
|  | 33 |  | 
|---|
|  | 34 | {$R *.DFM} | 
|---|
|  | 35 |  | 
|---|
|  | 36 | uses rPCE, fEncounterFrame; | 
|---|
|  | 37 |  | 
|---|
|  | 38 | procedure OtherLookup(var Code: string; OtherApp: Integer); | 
|---|
|  | 39 | var | 
|---|
|  | 40 | frmPCEOther: TfrmPCEOther; | 
|---|
|  | 41 | begin | 
|---|
|  | 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; | 
|---|
|  | 51 | end; | 
|---|
|  | 52 |  | 
|---|
|  | 53 | procedure TfrmPCEOther.SetApp(OtherApp: Integer); | 
|---|
|  | 54 | begin | 
|---|
|  | 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); | 
|---|
|  | 70 | end; | 
|---|
|  | 71 |  | 
|---|
|  | 72 |  | 
|---|
|  | 73 | procedure TfrmPCEOther.cmdOKClick(Sender: TObject); | 
|---|
|  | 74 | begin | 
|---|
|  | 75 | inherited; | 
|---|
|  | 76 | with cboOther do | 
|---|
|  | 77 | begin | 
|---|
|  | 78 | if ItemIndex = -1 then Exit; | 
|---|
|  | 79 | FCode := CboOther.Items[ItemIndex]; | 
|---|
|  | 80 | // | 
|---|
|  | 81 | Close; | 
|---|
|  | 82 | end; | 
|---|
|  | 83 | end; | 
|---|
|  | 84 |  | 
|---|
|  | 85 | procedure TfrmPCEOther.FormCreate(Sender: TObject); | 
|---|
|  | 86 | begin | 
|---|
|  | 87 | inherited; | 
|---|
|  | 88 | FCode := ''; | 
|---|
|  | 89 | end; | 
|---|
|  | 90 |  | 
|---|
|  | 91 |  | 
|---|
|  | 92 | procedure TfrmPCEOther.cmdCancelClick(Sender: TObject); | 
|---|
|  | 93 | begin | 
|---|
|  | 94 | inherited; | 
|---|
|  | 95 | fCode := ''; | 
|---|
|  | 96 | close(); | 
|---|
|  | 97 | end; | 
|---|
|  | 98 |  | 
|---|
|  | 99 | procedure TfrmPCEOther.cboOtherDblClick(Sender: TObject); | 
|---|
|  | 100 | begin | 
|---|
|  | 101 | inherited; | 
|---|
|  | 102 | cmdOKClick(Sender); | 
|---|
|  | 103 | end; | 
|---|
|  | 104 |  | 
|---|
|  | 105 | procedure TfrmPCEOther.cboOtherChange(Sender: TObject); | 
|---|
|  | 106 | begin | 
|---|
|  | 107 | inherited; | 
|---|
|  | 108 | cmdOK.Enabled := (cboOther.ItemIndex >= 0); | 
|---|
|  | 109 | end; | 
|---|
|  | 110 |  | 
|---|
|  | 111 | end. | 
|---|