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/BA/fBALocalDiagnoses.pas

    r456 r829  
    77  Dialogs, fAutoSz, StdCtrls, ORCtrls, ExtCtrls,fPCELex, uConsults, ORFn,
    88  rPCE,DBCtrls, DB, DBClient, uPCE, fEncounterFrame, ComCtrls, Grids, UBAGlobals,
    9   Buttons, Menus, UBACore, UCore;
     9  Buttons, Menus, UBACore, UCore, VA508AccessibilityManager;
    1010
    1111type
     
    2323    lbSections: TORListBox;
    2424    pnlBottom: TORAutoPanel;
    25     lvDxGrid: TListView;
    2625    cbAddToPDList: TCheckBox;
    2726    cbAddToPL: TCheckBox;
     
    3332    btnOther: TButton;
    3433    lbDiagnosis: TORListBox;
    35     ORStaticText1: TORStaticText;
    36     ORStaticText2: TORStaticText;
    37     ORStaticText3: TORStaticText;
    38     ORStaticText4: TORStaticText;
     34    lblDiagSect: TLabel;
     35    lblDiagCodes: TLabel;
    3936    lblPatientName: TStaticText;
     37    gbProvDiag: TGroupBox;
     38    lvDxGrid: TListView;
    4039    procedure buOKClick(Sender: TObject);
    4140    procedure buCancelClick(Sender: TObject);
     
    6564    procedure lbOrdersMouseMove(Sender: TObject; Shift: TShiftState; X,
    6665      Y: Integer);
    67     procedure ORStaticText1Enter(Sender: TObject);
    68     procedure ORStaticText1Exit(Sender: TObject);
    69     procedure ORStaticText3Enter(Sender: TObject);
    70     procedure ORStaticText3Exit(Sender: TObject);
     66    procedure FormKeyPress(Sender: TObject; var Key: Char);
    7167
    7268  private
     
    105101    function  PersonalListDxFound(pDxCode:string):boolean;
    106102    procedure ReSetCheckBoxStatus(pDxCode:String);
     103    procedure DeleteSelectedDx;
     104    function  IsCtrlDown: boolean;
    107105
    108106  public
     
    110108     procedure Enter(theCaller: smallint; pOrderIDList: TStringList);
    111109     procedure LoadTempRec(var thisRec: TBADxRecord; thisOrderID: string);
     110
    112111  end;
    113112
     
    137136
    138137uses rCore, rODMeds, rODBase, rOrders, fRptBox, fODMedOIFA,
    139   uAccessibleStringGrid,ORNet, fProbs, fOrdersSign, UBAConst,
    140   UBAMessages, fReview, uSignItems, fODConsult, fFrame;
     138  ORNet, fProbs, fOrdersSign, UBAConst,
     139  UBAMessages, fReview, uSignItems, fODConsult, fFrame, VAUtils;
    141140
    142141var
     
    176175end;
    177176
     177procedure TfrmBALocalDiagnoses.FormKeyPress(Sender: TObject; var Key: Char);
     178begin
     179  inherited;
     180   if frmBALocalDiagnoses.IsCtrlDown then
     181   begin
     182     if ( Key = #10 ) then
     183        frmBALocalDiagnoses.buOK.Click;
     184   end;
     185   
     186end;
     187
    178188procedure TfrmBALocalDiagnoses.ListDiagnosisSections(Dest: TStrings);
    179189{ return section names in format: ListIndex^SectionName (sections begin with '^') }
     
    195205    ECFDiagnosis := TStringList.Create;
    196206    uProblems := TStringList.Create;
    197     lblPatientName.Caption := Patient.Name;
     207    lblPatientName.Caption := Patient.Name + ' Selected Orders';
    198208    DeselectGridItems;
    199209   
     
    501511      begin
    502512         a :=  Piece(BADiagnosis[j], U, 2) + U + Piece(BADiagnosis[j], U, 1) + U + '        ' + Piece(BADiagnosis[j], U, 3) ;
    503          if a = '' then showmessage('found nothing');
     513         if a = '' then ShowMsg('found nothing');
    504514            lbDiagnosis.Items.Add(a);
    505515      end;
     
    578588  inherited;
    579589  deleteDX := True;
    580   lvDxGrid.DeleteSelected;
     590  frmBALocalDiagnoses.DeleteSelectedDX;
    581591  ClearAndDisableCBoxes;
    582592  DeselectGridItems;
    583593  EnsurePrimary;
    584594  deleteDX := False;
    585                                 // if all dx's removed, clear out displaycode
     595  // if all dx's removed, clear out displaycode
    586596  if lvDxGrid.items.Count = 0 then FODConsult.displayDXCode := '';
    587597end;
     
    627637    begin
    628638       DeselectGridItems;
    629        ShowMessage(BA_MAX_DX); //** max  4 diagnoses per order
     639       ShowMsg(BA_MAX_DX); //** max  4 diagnoses per order
    630640    end;
    631641end;
     
    812822    NewList.Clear;
    813823    // ** Add Diagnosis to Problem List if flagged with 'Add' in First Col.
    814     with lvDxGrid do
     824    with frmBALocalDiagnoses.lvDxGrid do
    815825    begin
    816826       for i := 0 to Items.Count-1 do
     
    861871   i : integer;
    862872   tempStr1,tempStr2, tempStr3: string;
    863    tempFactor1,x: string;
     873   tempFactor1: string;
    864874   tempStrList: TStringList;
    865875begin
     
    877887   tempFactor1 := '';
    878888
    879    if lvDxGrid.Items.Count > 0 then
    880    with lvDxGrid do
     889   if frmBALocalDiagnoses.lvDxGrid.Items.Count > 0 then
     890   with frmBALocalDiagnoses.lvDxGrid do
    881891   begin
    882892      for i := 0 to Items.Count-1 do
    883893      begin
    884          x := lvDxGrid.Items[i].Subitems[0];
    885          x := lvDxGrid.Items[i].Subitems[1];
    886          x:= lvDxGrid.Items[i].Subitems[0] + '^' + lvDxGrid.Items[i].Subitems[1];
     894     //    x := lvDxGrid.Items[i].Subitems[0];
     895     //    x := lvDxGrid.Items[i].Subitems[1];
     896     //    x:= lvDxGrid.Items[i].Subitems[0] + '^' + lvDxGrid.Items[i].Subitems[1];
    887897         tempStrList.Add(lvDxGrid.Items[i].Subitems[0] + '^' + lvDxGrid.Items[i].Subitems[1]);
    888898      end;
     
    11211131      on EListError do
    11221132         begin
    1123          {$ifdef debug}ShowMessage('EListError in frmBALocalDiagnoses.ListSelectedOrders()');{$endif}
     1133         {$ifdef debug}Show508Message('EListError in frmBALocalDiagnoses.ListSelectedOrders()');{$endif}
    11241134         raise;
    11251135         end;
     
    11481158      on EListError do
    11491159         begin
    1150          {$ifdef debug}ShowMessage('EListError in frmBALocalDiagnoses.AddDiagnosisToPersonalDiagnosesListClick()');{$endif}
     1160         {$ifdef debug}Show508Message('EListError in frmBALocalDiagnoses.AddDiagnosisToPersonalDiagnosesListClick()');{$endif}
    11511161         raise;
    11521162         end;
     
    11561166       if UBACore.rpcAddToPersonalDxList(User.DUZ,selectedList) then
    11571167       begin
    1158           ShowMessage(UBAMessages.BA_PERSONAL_LIST_UPDATED);
     1168          ShowMsg(UBAMessages.BA_PERSONAL_LIST_UPDATED);
    11591169          LoadEncounterForm;
    11601170          Refresh;
     
    11791189  if UBACore.rpcAddToPersonalDxList(User.DUZ,selectedList) then
    11801190  begin
    1181      ShowMessage(UBAMessages.BA_PERSONAL_LIST_UPDATED);
     1191     ShowMsg(UBAMessages.BA_PERSONAL_LIST_UPDATED);
    11821192     LoadEncounterForm;
    11831193     Refresh;
     
    12671277  (Control as TListBox).Canvas.TextOut(Rect.Left+2, Rect.Top+1, (Control as
    12681278              TListBox).Items[Index]); {** display the text }
     1279
    12691280end;
    12701281
     
    15261537end;
    15271538
    1528 procedure TfrmBALocalDiagnoses.ORStaticText1Enter(Sender: TObject);
    1529 begin
    1530   inherited;
    1531   (Sender as TORStaticText).Font.Style := [fsBold];
    1532 end;
    1533 
    1534 procedure TfrmBALocalDiagnoses.ORStaticText1Exit(Sender: TObject);
    1535 begin
    1536   inherited;
    1537   (Sender as TORStaticText).Font.Style := [];
    1538 end;
    1539 
    1540 procedure TfrmBALocalDiagnoses.ORStaticText3Enter(Sender: TObject);
    1541 begin
    1542   inherited;
    1543   (Sender as TORStaticText).Font.Style := [fsBold];
    1544 end;
    1545 
    1546 procedure TfrmBALocalDiagnoses.ORStaticText3Exit(Sender: TObject);
    1547 begin
    1548   inherited;
    1549   (Sender as TORStaticText).Font.Style := [];
    1550 end;
    1551 
    15521539procedure TfrmBALocalDiagnoses.ResetCheckBoxStatus(pDxCode:string);
    15531540begin
     
    15561543 if  Not PersonalListDxFound(pDxCode) then
    15571544    cbAddToPDList.Enabled  := True;
    1558 
    1559 
    1560 end;
     1545end;
     1546
     1547procedure TfrmBALocalDiagnoses.DeleteSelectedDx;
     1548var
     1549  I: Integer;
     1550begin
     1551  frmBALocalDiagnoses.lvDxGrid.Items.BeginUpdate;
     1552  try
     1553    for I := frmBALocalDiagnoses.lvDxGrid.Items.Count - 1 downto 0 do
     1554      if  frmBALocalDiagnoses.lvDxGrid.Items[I].Selected then
     1555        frmBALocalDiagnoses.lvdxGrid.Items[I].delete;
     1556  finally
     1557    lvDxGrid.Items.EndUpdate;
     1558  end;
     1559
     1560end;
     1561
     1562function  TfrmBALocalDiagnoses.IsCtrlDown: boolean;
     1563var
     1564  State: TKeyboardState;
     1565begin { isCtrlDown }
     1566  GetKeyboardState(State);
     1567  Result := ((State[VK_CONTROL] and 128)<>0); // Ctrl-button
     1568end; { isCtrlDown }
     1569
     1570
    15611571
    15621572
Note: See TracChangeset for help on using the changeset viewer.