Ignore:
Timestamp:
Jul 7, 2010, 4:31:10 PM (14 years ago)
Author:
Kevin Toppenberg
Message:

Upgrade to version 27

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Encounter/fProcedure.pas

    r456 r829  
    11unit fProcedure;
     2{Warning: The tab order has been changed in the OnExit event of several controls.
     3 To change the tab order of lbSection, lbxSection, lbMods, and btnOther you must do it programatically.}
    24
    35interface
     
    68  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
    79  fPCEBase, StdCtrls, ComCtrls, CheckLst, ORCtrls, ExtCtrls, Buttons, uPCE, rPCE, ORFn,
    8   fPCELex, fPCEOther, fPCEBaseGrid, fPCEBaseMain;
     10  fPCELex, fPCEOther, fPCEBaseGrid, fPCEBaseMain, VA508AccessibilityManager;
    911
    1012type
     
    3335      Direction, InsertAt: Integer);
    3436    procedure cboProviderChange(Sender: TObject);
     37    procedure lbxSectionExit(Sender: TObject);
     38    procedure lbModsExit(Sender: TObject);
     39    procedure btnOtherExit(Sender: TObject);
    3540  private
    3641    FCheckingCode: boolean;
     
    3843    FLastCPTCodes: string;
    3944    FModsReadOnly: boolean;
     45    FProviderChanging: boolean;
    4046    FModsROChecked: string;
    4147    function MissingProvider: boolean;
     
    5864
    5965uses
    60   fEncounterFrame, uConst, rCore;
     66  fEncounterFrame, uConst, rCore, VA508AccessibilityRouter;
    6167
    6268const
     
    8894      if(lbGrid.Selected[i]) then
    8995        TPCEProc(lbGrid.Items.Objects[i]).Provider := cboProvider.ItemIEN;
    90     GridChanged;
     96    FProviderChanging := TRUE; // CQ 11707
     97    try
     98      GridChanged;
     99    finally
     100      FProviderChanging := FALSE;
     101    end;
    91102  end;
    92103end;
     
    102113  FSectionTabCount := 1;
    103114  FormResize(Self);
     115  lbMods.HideSelection := TRUE;
    104116end;
    105117
     
    170182          txtProcQty.Text := '';
    171183        end;
    172         if(SameProv) then
    173           cboProvider.SetExactByIEN(Prov, ExternalName(Prov, 200))
    174         else
    175           cboProvider.SetExactByIEN(uProviders.PCEProvider, uProviders.PCEProviderName);
    176           //cboProvider.ItemIndex := -1;     v22.8 - RV
     184        if not FProviderChanging then // CQ 11707
     185        begin
     186          if(SameProv) then
     187            cboProvider.SetExactByIEN(Prov, ExternalName(Prov, 200))
     188          else
     189            cboProvider.SetExactByIEN(uProviders.PCEProvider, uProviders.PCEProviderName);
     190            //cboProvider.ItemIndex := -1;     v22.8 - RV
     191        end;
    177192      end
    178193      else
     
    418433end;
    419434
     435procedure TfrmProcedures.lbModsExit(Sender: TObject);
     436begin
     437  inherited;
     438  if TabIsPressed then
     439    if btnOther.CanFocus then
     440      btnOther.SetFocus;
     441end;
     442
    420443procedure TfrmProcedures.lbSectionClick(Sender: TObject);
    421444begin
     
    434457    inherited;
    435458    Sync2Grid;
     459    lbxSection.Selected[Index] := True;
    436460    if(lbxSection.ItemIndex >= 0) and (lbxSection.ItemIndex = Index) and
    437461      (lbxSection.Checked[Index]) then
    438462    begin
    439       UpdateModifierList(lbxSection.Items, Index);
    440       lbxSection.Checked[Index] := TRUE;
     463      UpdateModifierList(lbxSection.Items, Index); // CQ#16439
     464      lbxSection.Checked[Index] := TRUE;   
    441465      for i := 0 to lbGrid.Items.Count-1 do
    442466      begin
     
    456480            Modifiers := Piece(lbxSection.Items[lbxSection.ItemIndex], U, 4);
    457481            GridChanged;
     482            lbxSection.Selected[Index] := True; // CQ#15493
    458483            exit;
    459484          end;
     
    466491end;
    467492
     493procedure TfrmProcedures.lbxSectionExit(Sender: TObject);
     494begin
     495  if TabIsPressed then begin
     496    if lbMods.CanFocus then
     497      lbMods.SetFocus;
     498  end
     499  else if ShiftTabIsPressed then
     500    if lbSection.CanFocus then
     501      lbSection.SetFocus;
     502end;
     503
    468504procedure TfrmProcedures.btnOtherClick(Sender: TObject);
    469505begin
     
    471507  Sync2Grid;
    472508  ShowModifiers;
     509end;
     510
     511procedure TfrmProcedures.btnOtherExit(Sender: TObject);
     512begin
     513  if TabIsPressed then begin
     514    if lbGrid.CanFocus then
     515      lbGrid.SetFocus;
     516  end
     517  else if ShiftTabIsPressed then
     518    if lbMods.CanFocus then
     519      lbMods.SetFocus;   
    473520end;
    474521
     
    537584end;
    538585
     586initialization
     587  SpecifyFormIsNotADialog(TfrmProcedures);
     588
    539589end.
Note: See TracChangeset for help on using the changeset viewer.