Index: cprs/trunk/CPRS-Chart/Orders/fODRad.pas
===================================================================
--- cprs/trunk/CPRS-Chart/Orders/fODRad.pas	(revision 829)
+++ cprs/trunk/CPRS-Chart/Orders/fODRad.pas	(revision 1679)
@@ -6,5 +6,5 @@
   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
   Forms, Dialogs, StdCtrls, ORCtrls, fODBase, ORFn, ExtCtrls,
-  ComCtrls, uConst, ORDtTm, VA508AccessibilityManager;
+  ComCtrls, uConst, ORDtTm, VA508AccessibilityManager, VA508AccessibilityRouter;
 
 type
@@ -49,4 +49,7 @@
     txtReason: TCaptionEdit;
     pnlRightBase: TORAutoPanel;
+    Submitlbl508: TVA508StaticText;
+    VA508ComponentAccessibility1: TVA508ComponentAccessibility;
+    VA508ComponentAccessibility2: TVA508ComponentAccessibility;
     procedure cboProcedureNeedData(Sender: TObject;
               const StartFrom: string; Direction, InsertAt: Integer);
@@ -71,4 +74,9 @@
     procedure calPreOpExit(Sender: TObject);
     procedure cboImTypeDropDownClose(Sender: TObject);
+    procedure pnlMessageExit(Sender: TObject);
+    procedure VA508ComponentAccessibility1StateQuery(Sender: TObject;
+      var Text: string);
+    procedure pnlMessageMouseUp(Sender: TObject; Button: TMouseButton;
+      Shift: TShiftState; X, Y: Integer);
   private
     FLastRadID: string;
@@ -82,4 +90,5 @@
     procedure ImageTypeChange;
     procedure FormFirstOpened(Sender: TObject);
+    procedure setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl);
   protected
     procedure InitDialog; override;
@@ -221,4 +230,5 @@
    i: integer;
    tmplst: TStringList;
+   cboSubmitText: String;
 begin
   if not FEditCopy then
@@ -266,4 +276,8 @@
         lblSubmit.Enabled := False;
         cboSubmit.Enabled := False;
+        //TDP - CQ#19393 cboSubmit 508 changes
+        cboSubmitText := cboSubmit.Text;
+        if cboSubmitText = '' then cboSubmitText := 'No Value';
+        setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
         cboSubmit.Font.Color := clGrayText;
       end
@@ -283,4 +297,8 @@
             lblSubmit.Enabled := True;
             cboSubmit.Enabled := True;
+            //TDP - CQ#19393 cboSubmit 508 changes
+            cboSubmitText := cboSubmit.Text;
+            if cboSubmitText = '' then cboSubmitText := 'No Value';
+            setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
             cboSubmit.Font.Color := clWindowText;
           end
@@ -290,4 +308,8 @@
             lblSubmit.Enabled := False;
             cboSubmit.Enabled := False;
+            //TDP - CQ#19393 cboSubmit 508 changes
+            cboSubmitText := cboSubmit.Text;
+            if cboSubmitText = '' then cboSubmitText := 'No Value';
+            setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
             cboSubmit.Font.Color := clGrayText;
           end;
@@ -301,4 +323,8 @@
         lblSubmit.Enabled := False;
         cboSubmit.Enabled := False;
+        //TDP - CQ#19393 cboSubmit 508 changes
+        cboSubmitText := cboSubmit.Text;
+        if cboSubmitText = '' then cboSubmitText := 'No Value';
+        setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
         cboSubmit.Font.Color := clGrayText;
       end;
@@ -311,5 +337,4 @@
   cboProcedure.InitLongList('') ;
   StatusText('');
-  
 end;
 
@@ -349,4 +374,12 @@
   else with Encounter do Responses.Update('LOCATION', 1, IntToStr(Location) , LocationName);
   memOrder.Text := Responses.OrderText;
+end;
+
+//TDP - CQ#19393 Made history memobox read text
+procedure TfrmODRad.VA508ComponentAccessibility1StateQuery(Sender: TObject;
+  var Text: string);
+begin
+  inherited;
+  Text := memHistory.Text;
 end;
 
@@ -639,4 +672,6 @@
   if (Patient.Sex <> 'F') then
   begin
+    //TDP - CQ#19393 change to allow grpPregnant to be tabbed to if screen reader active
+    if ScreenReaderSystemActive then grpPregnant.TabStop := True;
     radPregnant.Enabled := False;
     radPregnantNo.Enabled := False;
@@ -695,5 +730,8 @@
 begin
   if (Patient.Sex = 'F') and ((Patient.Age > 55) or (Patient.Age < 12)) then
+  begin
     radPregnantNo.Checked := True;
+    grpPregnant.TabStop := False;
+  end;
 end;
 
@@ -720,4 +758,16 @@
 end;
 
+//TDP - CQ#19393 cboSubmit 508 changes. Can change in future to be generic if needed. (See fODLab.pas)
+procedure TfrmODRad.setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl);
+begin
+  if ScreenReaderSystemActive and not ctrl.Enabled then begin
+    lbl.Enabled := True;
+    lbl.Visible := True;
+    lbl.Caption := lblSubmit.Caption + '. Read Only. Value is ' + Text;
+    lbl.Width := lblSubmit.Width + 2;
+  end else
+    lbl.Visible := false;
+end;
+
 procedure TfrmODRad.cboProcedureExit(Sender: TObject);
 var
@@ -739,4 +789,6 @@
     for i := 0 to Items.Count - 1 do
       Responses.Update('MODIFIER',i+1, Piece(Items[i],U,1), Piece(Items[i],U,2));
+  //TDP - Made Order Message next focus if showing and Tab or Entered was pressed
+  if (pnlMessage.Showing) AND ((TabIsPressed()) OR (EnterIsPressed())) then memMessage.SetFocus;
 end;
 
@@ -778,4 +830,22 @@
 begin
   result := not ((radPregnant.Checked) or (radPregnantNo.Checked) or (radPregnantUnknown.Checked));
+end;
+
+{TDP - Added to control where focus went now that pnlMessage was being focused
+       out of turn after cboProcedure.}
+procedure TfrmODRad.pnlMessageExit(Sender: TObject);
+begin
+  inherited;
+  if TabIsPressed() then cboAvailMod.SetFocus;
+  if ShiftTabIsPressed() then cboProcedure.SetFocus;
+end;
+
+{TDP - Added to control where focus went now that pnlMessage was being focused
+       out of turn after cboProcedure.}
+procedure TfrmODRad.pnlMessageMouseUp(Sender: TObject; Button: TMouseButton;
+  Shift: TShiftState; X, Y: Integer);
+begin
+  inherited;
+  cboProcedure.SetFocus;
 end;
 
