Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Orders/fODRad.pas

    r829 r1679  
    66  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
    77  Forms, Dialogs, StdCtrls, ORCtrls, fODBase, ORFn, ExtCtrls,
    8   ComCtrls, uConst, ORDtTm, VA508AccessibilityManager;
     8  ComCtrls, uConst, ORDtTm, VA508AccessibilityManager, VA508AccessibilityRouter;
    99
    1010type
     
    4949    txtReason: TCaptionEdit;
    5050    pnlRightBase: TORAutoPanel;
     51    Submitlbl508: TVA508StaticText;
     52    VA508ComponentAccessibility1: TVA508ComponentAccessibility;
     53    VA508ComponentAccessibility2: TVA508ComponentAccessibility;
    5154    procedure cboProcedureNeedData(Sender: TObject;
    5255              const StartFrom: string; Direction, InsertAt: Integer);
     
    7174    procedure calPreOpExit(Sender: TObject);
    7275    procedure cboImTypeDropDownClose(Sender: TObject);
     76    procedure pnlMessageExit(Sender: TObject);
     77    procedure VA508ComponentAccessibility1StateQuery(Sender: TObject;
     78      var Text: string);
     79    procedure pnlMessageMouseUp(Sender: TObject; Button: TMouseButton;
     80      Shift: TShiftState; X, Y: Integer);
    7381  private
    7482    FLastRadID: string;
     
    8290    procedure ImageTypeChange;
    8391    procedure FormFirstOpened(Sender: TObject);
     92    procedure setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl);
    8493  protected
    8594    procedure InitDialog; override;
     
    221230   i: integer;
    222231   tmplst: TStringList;
     232   cboSubmitText: String;
    223233begin
    224234  if not FEditCopy then
     
    266276        lblSubmit.Enabled := False;
    267277        cboSubmit.Enabled := False;
     278        //TDP - CQ#19393 cboSubmit 508 changes
     279        cboSubmitText := cboSubmit.Text;
     280        if cboSubmitText = '' then cboSubmitText := 'No Value';
     281        setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
    268282        cboSubmit.Font.Color := clGrayText;
    269283      end
     
    283297            lblSubmit.Enabled := True;
    284298            cboSubmit.Enabled := True;
     299            //TDP - CQ#19393 cboSubmit 508 changes
     300            cboSubmitText := cboSubmit.Text;
     301            if cboSubmitText = '' then cboSubmitText := 'No Value';
     302            setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
    285303            cboSubmit.Font.Color := clWindowText;
    286304          end
     
    290308            lblSubmit.Enabled := False;
    291309            cboSubmit.Enabled := False;
     310            //TDP - CQ#19393 cboSubmit 508 changes
     311            cboSubmitText := cboSubmit.Text;
     312            if cboSubmitText = '' then cboSubmitText := 'No Value';
     313            setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
    292314            cboSubmit.Font.Color := clGrayText;
    293315          end;
     
    301323        lblSubmit.Enabled := False;
    302324        cboSubmit.Enabled := False;
     325        //TDP - CQ#19393 cboSubmit 508 changes
     326        cboSubmitText := cboSubmit.Text;
     327        if cboSubmitText = '' then cboSubmitText := 'No Value';
     328        setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
    303329        cboSubmit.Font.Color := clGrayText;
    304330      end;
     
    311337  cboProcedure.InitLongList('') ;
    312338  StatusText('');
    313  
    314339end;
    315340
     
    349374  else with Encounter do Responses.Update('LOCATION', 1, IntToStr(Location) , LocationName);
    350375  memOrder.Text := Responses.OrderText;
     376end;
     377
     378//TDP - CQ#19393 Made history memobox read text
     379procedure TfrmODRad.VA508ComponentAccessibility1StateQuery(Sender: TObject;
     380  var Text: string);
     381begin
     382  inherited;
     383  Text := memHistory.Text;
    351384end;
    352385
     
    639672  if (Patient.Sex <> 'F') then
    640673  begin
     674    //TDP - CQ#19393 change to allow grpPregnant to be tabbed to if screen reader active
     675    if ScreenReaderSystemActive then grpPregnant.TabStop := True;
    641676    radPregnant.Enabled := False;
    642677    radPregnantNo.Enabled := False;
     
    695730begin
    696731  if (Patient.Sex = 'F') and ((Patient.Age > 55) or (Patient.Age < 12)) then
     732  begin
    697733    radPregnantNo.Checked := True;
     734    grpPregnant.TabStop := False;
     735  end;
    698736end;
    699737
     
    720758end;
    721759
     760//TDP - CQ#19393 cboSubmit 508 changes. Can change in future to be generic if needed. (See fODLab.pas)
     761procedure TfrmODRad.setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl);
     762begin
     763  if ScreenReaderSystemActive and not ctrl.Enabled then begin
     764    lbl.Enabled := True;
     765    lbl.Visible := True;
     766    lbl.Caption := lblSubmit.Caption + '. Read Only. Value is ' + Text;
     767    lbl.Width := lblSubmit.Width + 2;
     768  end else
     769    lbl.Visible := false;
     770end;
     771
    722772procedure TfrmODRad.cboProcedureExit(Sender: TObject);
    723773var
     
    739789    for i := 0 to Items.Count - 1 do
    740790      Responses.Update('MODIFIER',i+1, Piece(Items[i],U,1), Piece(Items[i],U,2));
     791  //TDP - Made Order Message next focus if showing and Tab or Entered was pressed
     792  if (pnlMessage.Showing) AND ((TabIsPressed()) OR (EnterIsPressed())) then memMessage.SetFocus;
    741793end;
    742794
     
    778830begin
    779831  result := not ((radPregnant.Checked) or (radPregnantNo.Checked) or (radPregnantUnknown.Checked));
     832end;
     833
     834{TDP - Added to control where focus went now that pnlMessage was being focused
     835       out of turn after cboProcedure.}
     836procedure TfrmODRad.pnlMessageExit(Sender: TObject);
     837begin
     838  inherited;
     839  if TabIsPressed() then cboAvailMod.SetFocus;
     840  if ShiftTabIsPressed() then cboProcedure.SetFocus;
     841end;
     842
     843{TDP - Added to control where focus went now that pnlMessage was being focused
     844       out of turn after cboProcedure.}
     845procedure TfrmODRad.pnlMessageMouseUp(Sender: TObject; Button: TMouseButton;
     846  Shift: TShiftState; X, Y: Integer);
     847begin
     848  inherited;
     849  cboProcedure.SetFocus;
    780850end;
    781851
Note: See TracChangeset for help on using the changeset viewer.