Changeset 829 for cprs/trunk/CPRS-Chart/BA/fBALocalDiagnoses.pas
- Timestamp:
- Jul 7, 2010, 4:31:10 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/BA/fBALocalDiagnoses.pas
r456 r829 7 7 Dialogs, fAutoSz, StdCtrls, ORCtrls, ExtCtrls,fPCELex, uConsults, ORFn, 8 8 rPCE,DBCtrls, DB, DBClient, uPCE, fEncounterFrame, ComCtrls, Grids, UBAGlobals, 9 Buttons, Menus, UBACore, UCore ;9 Buttons, Menus, UBACore, UCore, VA508AccessibilityManager; 10 10 11 11 type … … 23 23 lbSections: TORListBox; 24 24 pnlBottom: TORAutoPanel; 25 lvDxGrid: TListView;26 25 cbAddToPDList: TCheckBox; 27 26 cbAddToPL: TCheckBox; … … 33 32 btnOther: TButton; 34 33 lbDiagnosis: TORListBox; 35 ORStaticText1: TORStaticText; 36 ORStaticText2: TORStaticText; 37 ORStaticText3: TORStaticText; 38 ORStaticText4: TORStaticText; 34 lblDiagSect: TLabel; 35 lblDiagCodes: TLabel; 39 36 lblPatientName: TStaticText; 37 gbProvDiag: TGroupBox; 38 lvDxGrid: TListView; 40 39 procedure buOKClick(Sender: TObject); 41 40 procedure buCancelClick(Sender: TObject); … … 65 64 procedure lbOrdersMouseMove(Sender: TObject; Shift: TShiftState; X, 66 65 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); 71 67 72 68 private … … 105 101 function PersonalListDxFound(pDxCode:string):boolean; 106 102 procedure ReSetCheckBoxStatus(pDxCode:String); 103 procedure DeleteSelectedDx; 104 function IsCtrlDown: boolean; 107 105 108 106 public … … 110 108 procedure Enter(theCaller: smallint; pOrderIDList: TStringList); 111 109 procedure LoadTempRec(var thisRec: TBADxRecord; thisOrderID: string); 110 112 111 end; 113 112 … … 137 136 138 137 uses 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; 141 140 142 141 var … … 176 175 end; 177 176 177 procedure TfrmBALocalDiagnoses.FormKeyPress(Sender: TObject; var Key: Char); 178 begin 179 inherited; 180 if frmBALocalDiagnoses.IsCtrlDown then 181 begin 182 if ( Key = #10 ) then 183 frmBALocalDiagnoses.buOK.Click; 184 end; 185 186 end; 187 178 188 procedure TfrmBALocalDiagnoses.ListDiagnosisSections(Dest: TStrings); 179 189 { return section names in format: ListIndex^SectionName (sections begin with '^') } … … 195 205 ECFDiagnosis := TStringList.Create; 196 206 uProblems := TStringList.Create; 197 lblPatientName.Caption := Patient.Name ;207 lblPatientName.Caption := Patient.Name + ' Selected Orders'; 198 208 DeselectGridItems; 199 209 … … 501 511 begin 502 512 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'); 504 514 lbDiagnosis.Items.Add(a); 505 515 end; … … 578 588 inherited; 579 589 deleteDX := True; 580 lvDxGrid.DeleteSelected;590 frmBALocalDiagnoses.DeleteSelectedDX; 581 591 ClearAndDisableCBoxes; 582 592 DeselectGridItems; 583 593 EnsurePrimary; 584 594 deleteDX := False; 585 595 // if all dx's removed, clear out displaycode 586 596 if lvDxGrid.items.Count = 0 then FODConsult.displayDXCode := ''; 587 597 end; … … 627 637 begin 628 638 DeselectGridItems; 629 ShowM essage(BA_MAX_DX); //** max 4 diagnoses per order639 ShowMsg(BA_MAX_DX); //** max 4 diagnoses per order 630 640 end; 631 641 end; … … 812 822 NewList.Clear; 813 823 // ** Add Diagnosis to Problem List if flagged with 'Add' in First Col. 814 with lvDxGrid do824 with frmBALocalDiagnoses.lvDxGrid do 815 825 begin 816 826 for i := 0 to Items.Count-1 do … … 861 871 i : integer; 862 872 tempStr1,tempStr2, tempStr3: string; 863 tempFactor1 ,x: string;873 tempFactor1: string; 864 874 tempStrList: TStringList; 865 875 begin … … 877 887 tempFactor1 := ''; 878 888 879 if lvDxGrid.Items.Count > 0 then880 with lvDxGrid do889 if frmBALocalDiagnoses.lvDxGrid.Items.Count > 0 then 890 with frmBALocalDiagnoses.lvDxGrid do 881 891 begin 882 892 for i := 0 to Items.Count-1 do 883 893 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]; 887 897 tempStrList.Add(lvDxGrid.Items[i].Subitems[0] + '^' + lvDxGrid.Items[i].Subitems[1]); 888 898 end; … … 1121 1131 on EListError do 1122 1132 begin 1123 {$ifdef debug}Show Message('EListError in frmBALocalDiagnoses.ListSelectedOrders()');{$endif}1133 {$ifdef debug}Show508Message('EListError in frmBALocalDiagnoses.ListSelectedOrders()');{$endif} 1124 1134 raise; 1125 1135 end; … … 1148 1158 on EListError do 1149 1159 begin 1150 {$ifdef debug}Show Message('EListError in frmBALocalDiagnoses.AddDiagnosisToPersonalDiagnosesListClick()');{$endif}1160 {$ifdef debug}Show508Message('EListError in frmBALocalDiagnoses.AddDiagnosisToPersonalDiagnosesListClick()');{$endif} 1151 1161 raise; 1152 1162 end; … … 1156 1166 if UBACore.rpcAddToPersonalDxList(User.DUZ,selectedList) then 1157 1167 begin 1158 ShowM essage(UBAMessages.BA_PERSONAL_LIST_UPDATED);1168 ShowMsg(UBAMessages.BA_PERSONAL_LIST_UPDATED); 1159 1169 LoadEncounterForm; 1160 1170 Refresh; … … 1179 1189 if UBACore.rpcAddToPersonalDxList(User.DUZ,selectedList) then 1180 1190 begin 1181 ShowM essage(UBAMessages.BA_PERSONAL_LIST_UPDATED);1191 ShowMsg(UBAMessages.BA_PERSONAL_LIST_UPDATED); 1182 1192 LoadEncounterForm; 1183 1193 Refresh; … … 1267 1277 (Control as TListBox).Canvas.TextOut(Rect.Left+2, Rect.Top+1, (Control as 1268 1278 TListBox).Items[Index]); {** display the text } 1279 1269 1280 end; 1270 1281 … … 1526 1537 end; 1527 1538 1528 procedure TfrmBALocalDiagnoses.ORStaticText1Enter(Sender: TObject);1529 begin1530 inherited;1531 (Sender as TORStaticText).Font.Style := [fsBold];1532 end;1533 1534 procedure TfrmBALocalDiagnoses.ORStaticText1Exit(Sender: TObject);1535 begin1536 inherited;1537 (Sender as TORStaticText).Font.Style := [];1538 end;1539 1540 procedure TfrmBALocalDiagnoses.ORStaticText3Enter(Sender: TObject);1541 begin1542 inherited;1543 (Sender as TORStaticText).Font.Style := [fsBold];1544 end;1545 1546 procedure TfrmBALocalDiagnoses.ORStaticText3Exit(Sender: TObject);1547 begin1548 inherited;1549 (Sender as TORStaticText).Font.Style := [];1550 end;1551 1552 1539 procedure TfrmBALocalDiagnoses.ResetCheckBoxStatus(pDxCode:string); 1553 1540 begin … … 1556 1543 if Not PersonalListDxFound(pDxCode) then 1557 1544 cbAddToPDList.Enabled := True; 1558 1559 1560 end; 1545 end; 1546 1547 procedure TfrmBALocalDiagnoses.DeleteSelectedDx; 1548 var 1549 I: Integer; 1550 begin 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 1560 end; 1561 1562 function TfrmBALocalDiagnoses.IsCtrlDown: boolean; 1563 var 1564 State: TKeyboardState; 1565 begin { isCtrlDown } 1566 GetKeyboardState(State); 1567 Result := ((State[VK_CONTROL] and 128)<>0); // Ctrl-button 1568 end; { isCtrlDown } 1569 1570 1561 1571 1562 1572
Note:
See TracChangeset
for help on using the changeset viewer.