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/fODLab.pas

    r829 r1679  
    66  SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
    77  Forms, Dialogs, StdCtrls, ORCtrls, ORfn, fODBase, ExtCtrls, ComCtrls, uConst,
    8   ORDtTm, Buttons, Menus, VA508AccessibilityManager;
     8  ORDtTm, Buttons, Menus, VA508AccessibilityManager, VA508AccessibilityRouter;
    99
    1010type
     
    5757    MessagePopup: TPopupMenu;
    5858    ViewinReportWindow1: TMenuItem;
     59    Frequencylbl508: TVA508StaticText;
     60    HowManyDayslbl508: TVA508StaticText;
     61    specimenlbl508: TVA508StaticText;
     62    CollSamplbl508: TVA508StaticText;
    5963    procedure FormCreate(Sender: TObject);
    6064    procedure ControlChange(Sender: TObject);
     
    107111    procedure ReadServerVariables;
    108112    procedure DisplayChangedOrders(ACollType: string);
     113    procedure setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl; lbl2: string);
    109114  public
    110115    procedure SetupDialog(OrderAction: Integer; const ID: string); override;
     
    206211procedure TfrmODLab.FormCreate(Sender: TObject);
    207212var
    208   i, n: integer;
     213  i, n, HMD508: integer;
    209214  AList: TStringList;
    210215begin
     
    263268      if cboAvailTest.Items.Count > 0 then cboAvailTest.InsertSeparator;
    264269      cboAvailTest.InitLongList('');
     270      //TDP - CQ#19396 HMD508 added to guarantee 508 label did not change width
     271      HMD508 := HowManyDayslbl508.Width;
    265272      SetControl(cboFrequency, 'Schedules');
     273      HowManydayslbl508.Width := HMD508;
    266274      with cboFrequency do
    267275        begin
     
    271279      lblHowManyDays.Enabled := False;                 { have this call change event in case }
    272280      txtDays.Enabled := False;                         { the default is not 'one time'?      }
     281      //TDP - CQ#19396 Following line does not appear to be needed
     282      //setup508Label(HowManyText, HowManyDayslbl508, txtDays, lblHowManyDays.Caption);
    273283    end;
    274284    if EvTDelayLoc>0 then
     
    283293        Font.Color := clGrayText;
    284294        lblFrequency.Enabled := False;
     295        setup508Label(Text, Frequencylbl508, cboFrequency, lblFrequency.Caption);
    285296      end;
    286297    PreserveControl(cboAvailTest);
     
    294305    AList.Free;
    295306  end;
     307end;
     308
     309{TDP - CQ#19396 Added to address 508 related changes. I modified slightly to
     310       change lbl.Caption and retain lbl.Width}
     311procedure TfrmODLab.setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl; lbl2: string);
     312var
     313Width: integer;
     314begin
     315  if ScreenReaderSystemActive and not ctrl.Enabled then begin
     316    lbl.Enabled := True;
     317    lbl.Visible := True;
     318    Width := lbl.Width;
     319    lbl.Caption := lbl2 +'. Read Only. Value is ' + Text;
     320    lbl.Width := Width;
     321  end else
     322    lbl.Visible := false;
    296323end;
    297324
     
    745772procedure TLabTest.LoadUrgency(CollType: string; AComboBox:TORComboBox);
    746773var
    747   i: integer;
     774  i, PreviousSelectionIndex: integer;
     775  PreviousSelectionString: String;
    748776begin
    749777  with AComboBox do
    750778    begin
     779    PreviousSelectionIndex := -1;
     780    PreviousSelectionString := SelText;
     781
    751782      Clear;
    752       for i := 0 to UrgencyList.Count - 1 do
     783      for i := 0 to UrgencyList.Count - 1 do begin
    753784         if (CollType = 'LC') and (Piece(UrgencyList[i], U, 3) = '') then
    754785           Continue
    755786         else
    756787           Items.Add(UrgencyList[i]);
     788         if (PreviousSelectionString <> '') and (PreviousSelectionString = Piece(UrgencyList[i], U, 2)) then
     789           PreviousSelectionIndex := i;
     790      end;
     791
    757792      if (LRFURG <> '') and (ALabTest.ObtainUrgency) then
    758793        SelectByID(LRFURG)
     794      else if PreviousSelectionIndex > -1 then
     795        ItemIndex := PreviousSelectionIndex
    759796      else
    760797        SelectByIEN(uDfltUrgency);
     
    12921329        lblCollSamp.Enabled := True;
    12931330        cboCollSamp.Enabled := True;
     1331        //TDP - CQ#19396 Added cboCollSamp 508 changes
     1332        setup508Label(cboCollSamp.Text, collsamplbl508, cboCollSamp, lblCollSamp.Caption);
    12941333      end
    12951334    else
     
    13061345        lblCollSamp.Enabled := False;
    13071346        cboCollSamp.Enabled := False;
     1347        //TDP - CQ#19396 Added cboCollSamp 508 changes
     1348        setup508Label(cboCollSamp.Text, collsamplbl508, cboCollSamp, lblCollSamp.Caption);
    13081349      end;
    13091350    if ObtainSpecimen then
     
    13111352      lblSpecimen.Enabled:= True;
    13121353      cboSpecimen.Enabled:= True;
     1354      setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption);
    13131355    end else
    13141356    begin
    13151357      lblSpecimen.Enabled:= False;
    13161358      cboSpecimen.Enabled:= False;
     1359      setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption);
    13171360    end;
    13181361    if ObtainUrgency then
     
    13601403      lblSpecimen.Enabled:= True;
    13611404      cboSpecimen.Enabled:= True;
     1405      setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption);
    13621406     end else
    13631407     begin
    13641408      lblSpecimen.Enabled:= False;
    13651409      cboSpecimen.Enabled:= False;
     1410      setup508Label(cboSpecimen.Text, specimenlbl508, cboSpecimen, lblSpecimen.Caption);
    13661411     end;
    13671412    if ObtainComment then
     
    14191464procedure TfrmODLab.cboFrequencyChange(Sender: TObject);
    14201465var
    1421   x: string;
     1466  x, HowManyText: string;
    14221467const
    14231468  HINT_TEXT1 = 'Enter a number of days';
     
    14341479          txtDays.Hint := '';
    14351480        txtDays.Enabled := True;
     1481        //TDP - txtDays 508 changes
     1482        if txtDays.Text = '' then HowManyText := 'no value'
     1483        else HowManyText := txtDays.Text;
     1484        setup508Label(HowManyText, HowManyDayslbl508, txtDays, lblHowManyDays.Caption);
    14361485        txtDays.Showhint := True;
    14371486      end
     
    14411490        lblHowManyDays.Enabled := False;
    14421491        txtDays.Enabled := False;
     1492        //TDP - txtDays 508 changes
     1493        HowManyText := 'no value';
     1494        setup508Label(HowManyText, HowManyDayslbl508, txtDays, lblHowManyDays.Caption);
    14431495        txtDays.ShowHint := False;
    14441496      end;
     
    20252077
    20262078end.
    2027 
    2028 
Note: See TracChangeset for help on using the changeset viewer.