Changeset 830 for cprs/trunk/CPRS-Chart/fEncnt.pas
- Timestamp:
- Jul 7, 2010, 4:51:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fEncnt.pas
r456 r830 13 13 uses 14 14 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 15 StdCtrls, ORCtrls, ORDtTm, ORFn, ExtCtrls, ComCtrls, ORDtTmRng, fAutoSz, rOptions; 15 StdCtrls, ORCtrls, ORDtTm, ORFn, ExtCtrls, ComCtrls, ORDtTmRng, fAutoSz, rOptions, fBase508Form, 16 VA508AccessibilityManager, fFrame; 16 17 17 18 type 18 TfrmEncounter = class(T Form)19 TfrmEncounter = class(TfrmBase508Form) 19 20 cboPtProvider: TORComboBox; 20 21 lblProvider: TLabel; … … 62 63 procedure FormResize(Sender: TObject); 63 64 procedure FormShow(Sender: TObject); 65 procedure pgeVisitMouseDown(Sender: TObject; Button: TMouseButton; 66 Shift: TShiftState; X, Y: Integer); 64 67 private 65 68 CLINIC_TXT : String; … … 82 85 var HintInfo: THintInfo); 83 86 procedure SetVisitCat; 87 function AllowAutoFocusChange: Boolean; 84 88 public 85 89 { Public declarations } … … 94 98 {$R *.DFM} 95 99 96 uses rCore, uCore, uConst, fReview, uPCE, rPCE; 100 uses rCore, uCore, uConst, fReview, uPCE, rPCE, VA508AccessibilityRouter, 101 VAUtils; 97 102 98 103 const … … 155 160 begin 156 161 CanChange := True; 162 // if (fframe.frmFrame.DoNotChangeEncWindow = true) and (encounter.Location <> frmEncounter.FLocation) then 163 // fframe.frmFrame.DoNotChangeEncWindow := false; 157 164 if (PersonFilter <> NPF_SUPPRESS) and 158 165 (((Encounter.Provider = User.DUZ) and (FProvider <> User.DUZ)) or … … 249 256 begin 250 257 ListApptAll(lstClinic.Items, Patient.DFN, FFromDate, FThruDate); 251 ActiveControl := lstClinic; 258 if AllowAutoFocusChange then 259 ActiveControl := lstClinic; 252 260 end; 253 261 if (pgeVisit.ActivePage = tabAdmit) and (lstAdmit.Items.Count = 0) then 254 262 begin 255 263 ListAdmitAll(lstAdmit.Items, Patient.DFN); 256 ActiveControl := lstAdmit; 264 if AllowAutoFocusChange then 265 ActiveControl := lstAdmit; 257 266 end; 258 267 if pgeVisit.ActivePage = tabNewVisit then … … 276 285 with calVisitDate do if FDateTime <> 0 then FMDateTime := FDateTime else Text := 'NOW'; 277 286 FFromSelf := False; 278 ActiveControl := cboNewVisit; 287 if AllowAutoFocusChange then 288 ActiveControl := cboNewVisit; 279 289 end 280 290 else if FVisitCategory = 'E' then 281 291 begin 282 292 ckbHistorical.Checked := True; 283 ActiveControl := cboNewVisit; 293 if AllowAutoFocusChange then 294 ActiveControl := cboNewVisit; 284 295 end 285 296 else 286 297 begin 287 298 cboNewVisit.InitLongList(''); 288 //ActiveControl := cboPtProvider;289 299 end; 290 //ckbHistorical.Checked := FVisitCategory = 'E';291 //ActiveControl := cboNewVisit;292 300 end; {if cboNewVisit} 293 301 end; {if pgeVisit.ActivePage} 302 if ScreenReaderSystemActive then 303 ActiveControl := pgeVisit; 304 end; 305 306 procedure TfrmEncounter.pgeVisitMouseDown(Sender: TObject; 307 Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 308 begin 309 inherited; 310 if pgeVisit.ActivePage = tabNewVisit then 311 if cboNewVisit.CanFocus then 312 cboNewVisit.SetFocus; 294 313 end; 295 314 … … 457 476 end; 458 477 478 function TfrmEncounter.AllowAutoFocusChange: Boolean; 479 begin 480 if ScreenReaderSystemActive or 481 Boolean(Hi(GetKeyState(VK_TAB))) or 482 Boolean(Hi(GetKeyState(VK_LEFT))) or 483 Boolean(Hi(GetKeyState(VK_RIGHT))) then 484 Result := FALSE 485 else 486 Result := TRUE; 487 end; 488 459 489 procedure TfrmEncounter.FormClose(Sender: TObject; 460 490 var Action: TCloseAction); … … 536 566 cmdCancel.Top := cmdOK.Top + cmdOK.Height + 1; 537 567 //end CQ7118 568 if Not User.IsProvider then 569 if cboPtProvider.CanFocus then 570 cboPtProvider.SetFocus; 538 571 end; 539 572
Note:
See TracChangeset
for help on using the changeset viewer.