Changeset 829 for cprs/trunk/CPRS-Chart/Orders/fOrdersSign.pas
- Timestamp:
- Jul 7, 2010, 4:31:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Orders/fOrdersSign.pas
r456 r829 9 9 fAutoSz, StdCtrls, ORFn, ORCtrls, AppEvnts, mCoPayDesc, XUDIGSIGSC_TLB, 10 10 ComCtrls, CheckLst, ExtCtrls, uConsults, UBAGlobals,UBACore, UBAMessages, UBAConst, 11 Menus, ORClasses ;11 Menus, ORClasses, fBase508Form, fPrintLocation, VA508AccessibilityManager; 12 12 13 13 type 14 TfrmSignOrders = class(T Form)14 TfrmSignOrders = class(TfrmBase508Form) 15 15 cmdOK: TButton; 16 16 cmdCancel: TButton; 17 17 lblESCode: TLabel; 18 18 txtESCode: TCaptionEdit; 19 fraCoPay: TfraCoPayDesc;20 19 clstOrders: TCaptionCheckListBox; 21 20 laDiagnosis: TLabel; … … 27 26 Diagnosis1: TMenuItem; 28 27 Exit1: TMenuItem; 29 Label2: TStaticText; 28 lblOrderList: TStaticText; 29 fraCoPay: TfraCoPayDesc; 30 30 procedure FormCreate(Sender: TObject); 31 31 procedure cmdOKClick(Sender: TObject); … … 54 54 procedure clstOrdersKeyUp(Sender: TObject; var Key: Word; 55 55 Shift: TShiftState); 56 procedure FormResize(Sender: TObject); 56 57 private 57 58 OKPressed: Boolean; … … 62 63 function ItemsAreChecked: Boolean; 63 64 function GetNumberOfSelectedOrders : byte; 64 procedure ShowTreatmentFactorHints(var pHintText: string; var pCompName: T ORStaticText); // 50865 procedure ShowTreatmentFactorHints(var pHintText: string; var pCompName: TVA508StaticText); // 508 65 66 procedure SetItemTextToState; 66 67 procedure FormatListForScreenReader; … … 72 73 73 74 {Begin BillingAware} 74 { TODO 3 -oKW -cRefinement : Change to dynamic array or other dynamic structure for Billing Awareness Phase II. } 75 TarRect = array[MIN_RECT..MAX_RECT] of TRect; 75 TarRect = array[MIN_RECT..MAX_RECT] of TRect; 76 76 77 77 var … … 105 105 srcIndex: integer; 106 106 CopyBuffer: TBADxRecord; 107 //CopyActive: boolean; //CQ6225108 107 {End BillingAware} 109 108 … … 114 113 uses 115 114 Hash, rCore, rOrders, uConst, fOrdersPrint, uCore, uOrders, uSignItems, fOrders, 116 fPCELex, rPCE, fODConsult, fBALocalDiagnoses, fClinicWardMeds, fFrame; 115 fPCELex, rPCE, fODConsult, fBALocalDiagnoses, fClinicWardMeds, fFrame, rODLab, fRptBox, 116 VAUtils; 117 117 118 118 const … … 141 141 on EListError do 142 142 begin 143 {$ifdef debug}Show Message('EListError in frmSignOrders.GetNumberOfSelectedOrders()');{$endif}143 {$ifdef debug}Show508Message('EListError in frmSignOrders.GetNumberOfSelectedOrders()');{$endif} 144 144 raise; 145 145 end; … … 174 174 itemsList.Clear; 175 175 itemsList := uSigItems.GetSigItems; //Get FItems list 176 177 176 if BILLING_AWARE then 178 177 begin … … 190 189 on EListError do 191 190 begin 192 {$ifdef debug}Show Message('EListError in frmSignOrders.GetCheckBoxStatus()');{$endif}191 {$ifdef debug}Show508Message('EListError in frmSignOrders.GetCheckBoxStatus()');{$endif} 193 192 raise; 194 193 end; … … 198 197 199 198 function ExecuteSignOrders(SelectedList: TList): Boolean; 200 var 201 i, cidx,cnt, theSts: Integer; 199 const 200 VERT_SPACING = 6; 201 202 var 203 i, cidx,cnt, theSts, WardIEN: Integer; 202 204 ShrinkHeight: integer; 203 205 SignList: TStringList; 204 206 Obj: TOrder; 205 DigSigErr, DigStoreErr : Boolean;207 DigSigErr, DigStoreErr, ContainsIMOOrders, DoNotPrint: Boolean; 206 208 x, SigData, SigUser, SigDrugSch, SigDEA: string; 207 cSignature, cHashData, cCrlUrl, cErr : string;209 cSignature, cHashData, cCrlUrl, cErr, WardName: string; 208 210 cProvDUZ: Int64; 209 OrderText : string;211 OrderText, ASvc: string; 210 212 PrintLoc: Integer; 211 // tempOrderID: string; 213 AList, ClinicList, DCList, OrderPrintList, WardList: TStringList; 214 EncLocName, EncLocText: string; 215 EncLocIEN: integer; 216 EncDT: TFMDateTime; 217 EncVC: Char; 212 218 213 219 function FindOrderText(const AnID: string): string; … … 253 259 DigSigErr := True; 254 260 PrintLoc := 0; 261 EncLocIEN := 0; 262 DoNotPrint := False; 255 263 if SelectedList.Count = 0 then Exit; 256 264 if BILLING_AWARE then … … 268 276 cidx := frmSignOrders.clstOrders.Items.AddObject(Obj.Text,Obj); 269 277 SigItems.Add(CH_ORD,Obj.ID, cidx); 270 //HDS6205 allows dx entry for NON CIDC Consult orders 271 // if BILLING_AWARE then //HDS6205 272 // if UBAGlobals.BAConsultOrdersRequireDx.Count > 0 then //HDS6205 273 // begin 274 // tempOrderID := UBACore.SetOrderIDConsultDxRequired(Piece(Obj.ID,';',1) + ';1'); //HDS6205 275 // tempOrderList.Add(tempOrderID); //HDS6205 276 // end 277 // else 278 if BILLING_AWARE then 279 tempOrderList.Add(Obj.ID); 280 278 if BILLING_AWARE then 279 tempOrderList.Add(Obj.ID); 281 280 frmSignOrders.clstOrders.Checked[cidx] := TRUE; 282 281 … … 295 294 {End BillingAware} 296 295 297 ShrinkHeight := frmSignOrders.fraCoPay.Height + 9; 298 frmSignOrders.Height := frmSignOrders.Height - ShrinkHeight; 299 frmSignOrders.Label2.Top := frmSignOrders.Label2.Top - ShrinkHeight; 300 frmSignOrders.clstOrders.Top := frmSignOrders.clstOrders.Top - ShrinkHeight; 301 frmSignOrders.clstOrders.Height := frmSignOrders.clstOrders.Height + ShrinkHeight; 296 with frmSignOrders do begin 297 ShrinkHeight := lblOrderList.Top - VERT_SPACING; 298 Height := Height - ShrinkHeight; 299 lblOrderList.Top := lblOrderList.Top - ShrinkHeight; 300 clstOrders.Top := clstOrders.Top - ShrinkHeight; 301 clstOrders.Height := clstOrders.Height + ShrinkHeight; 302 end; 302 303 end; 303 304 … … 329 330 end; 330 331 331 frmSignOrders.ShowModal;332 frmSignOrders.ShowModal; 332 333 if frmSignOrders.OKPressed then 333 334 begin 334 335 Result := True; 335 336 SignList := TStringList.Create; 337 ClinicList := TStringList.Create; 338 OrderPrintList := TStringList.Create; 339 WardList := TStringList.Create; 340 ContainsIMOOrders := false; 336 341 try 337 342 with SelectedList do for i := 0 to Count - 1 do with TOrder(Items[i]) do … … 346 351 if Length(SigData) < 1 then 347 352 begin 348 ShowM essage(TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 'Digital Signature failed with reason: Unable to get required data from server');353 ShowMsg(TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 'Digital Signature failed with reason: Unable to get required data from server'); 349 354 DigStoreErr := true; 350 355 end; … … 368 373 else 369 374 begin 370 ShowM essage(TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 'Digital Signature failed with reason: '+ piece(Crypto.Reason, '^', 2));375 ShowMsg(TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 'Digital Signature failed with reason: '+ piece(Crypto.Reason, '^', 2)); 371 376 DigStoreErr := true; 372 377 end; … … 374 379 on E: Exception do 375 380 begin 376 ShowM essage(TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 'Crypto raised an error: '+ E.Message);381 ShowMsg(TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 'Crypto raised an error: '+ E.Message); 377 382 DigStoreErr := true; 378 383 end; … … 399 404 if GetPKISite and (Copy(TOrder(SelectedList.Items[i]).DigSigReq,1,1) = '2') then 400 405 begin 401 ShowM essage('ORDER NOT SENT TO PHARMACY' + CRLF + CRLF + TOrder(SelectedList.Items[i]).Text + CRLF + CRLF +406 ShowMsg('ORDER NOT SENT TO PHARMACY' + CRLF + CRLF + TOrder(SelectedList.Items[i]).Text + CRLF + CRLF + 402 407 'This Schedule II medication cannot be electronically entered without a Digital Signature. ' + 403 408 CRLF + 'Please discontinue/cancel this order and create a hand written order for manual processing, or digitally sign the order at a PKI-enabled workstation.'); … … 418 423 if SignList.Count > 0 then 419 424 begin 420 421 //hds7591 Clinic/Ward movement. Patient Admission IMO 422 if not frmFrame.TimedOut then 423 begin 424 if IsValidIMOLoc(uCore.TempEncounterLoc,Patient.DFN) then 425 frmClinicWardMeds.ClinicOrWardLocation(SignList, Encounter.Location,uCore.Encounter.LocationName, PrintLoc) 426 else 427 if (IsValidIMOLoc(Encounter.Location,Patient.DFN)) and ((frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN)) and (Patient.Inpatient = false)) then 428 frmClinicWardMeds.ClinicOrWardLocation(SignList, Encounter.Location,Encounter.LocationName, PrintLoc); 429 end; 430 uCore.TempEncounterLoc := 0; 431 uCore.TempEncounterLocName := ''; 432 //hds7591 Clinic/Ward movement Patient Admission IMO 425 //hds7591 Clinic/Ward movement. Patient Admission IMO 426 if not frmFrame.TimedOut then 427 begin 428 if (Patient.Inpatient = True) and (Encounter.Location <> Patient.Location) then 429 begin 430 DCList := TStringList.Create; 431 EncLocName := Encounter.LocationName; 432 EncLocIEN := Encounter.Location; 433 EncLocText := Encounter.LocationText; 434 EncDT := Encounter.DateTime; 435 EncVC := Encounter.VisitCategory; 436 for i := 0 to SelectedList.Count - 1 do 437 begin 438 cidx := frmSignOrders.clstOrders.Items.IndexOfObject(TOrder(SelectedList.Items[i])); 439 if frmSignOrders.clstOrders.Checked[cidx] = false then continue; 440 if TOrder(SelectedList.Items[i]).DGroupName = 'Clinic Orders' then ContainsIMOOrders := true; 441 if TOrder(SelectedList.Items[i]).DGroupName = '' then continue; 442 if TOrder(SelectedList.Items[i]).EventPtr <> '' then continue; 443 if Pos('DC', TOrder(SelectedList.Items[i]).ActionOn) > 0 then 444 begin 445 DCList.Add(TOrder(SelectedList.Items[i]).ID); 446 Continue; 447 end; 448 OrderPrintList.Add(TOrder(SelectedList.Items[i]).ID + ':' + TOrder(SelectedList.Items[i]).Text); 449 end; 450 if OrderPrintList.Count > 0 then 451 begin 452 frmPrintLocation.PrintLocation(OrderPrintList, EncLocIEN, EncLocName, EncLocText, EncDT, EncVC, ClinicList, 453 WardList, WardIen,WardName, ContainsIMOOrders, true); 454 fframe.frmFrame.OrderPrintForm := false; 455 end 456 else DoNotPrint := True; 457 if (DCList <> nil) and (DCList.Count > 0) then 458 begin 459 for i := 0 to DCList.Count - 1 do 460 WardList.Add(DCList.Strings[i]); 461 if (WardIEN = 0) and (WardName = '') then 462 CurrentLocationForPatient(Patient.DFN, WardIEN, WardName, ASvc); 463 end; 464 if DCList <> nil then DCList.Free; 465 end; 466 end; 467 uCore.TempEncounterLoc := 0; 468 uCore.TempEncounterLocName := ''; 469 //hds7591 Clinic/Ward movement Patient Admission IMO 433 470 434 471 SigItems.SaveSettings; // Save CoPay FIRST! 435 472 SendOrders(SignList, frmSignOrders.ESCode); 436 437 end; 473 end; 438 474 439 475 with SignList do if Count > 0 then for i := 0 to Count - 1 do … … 442 478 begin 443 479 OrderText := FindOrderText(Piece(SignList[i], U, 1)); 480 if Piece(SignList[i],U,4) = 'Invalid Pharmacy order number' then 481 InfoBox(TX_SAVERR1 + Piece(SignList[i], U, 4) + TX_SAVERR2 + OrderText + CRLF + CRLF + 482 'The changes to this order have not been saved. You must contact Pharmacy to complete any action on this order.', 483 TC_SAVERR, MB_OK) 484 else 444 485 InfoBox(TX_SAVERR1 + Piece(SignList[i], U, 4) + TX_SAVERR2 + OrderText, 445 486 TC_SAVERR, MB_OK); 446 487 end; 447 488 if Pos('R', Piece(SignList[i], U, 2)) > 0 then … … 459 500 if theSts = 10 then SignList.Delete(cnt); //signed delayed order should not be printed. 460 501 end; 461 PrintOrdersOnSignRelease(SignList, NO_PROVIDER, PrintLoc); 502 // CQ 10226, PSI-05-048 - advise of auto-change from LC to WC on lab orders 503 AList := TStringList.Create; 504 try 505 CheckForChangeFromLCtoWCOnRelease(AList, Encounter.Location, SignList); 506 if AList.Text <> '' then 507 ReportBox(AList, 'Changed Orders', TRUE); 508 finally 509 AList.Free; 510 end; 511 if(ClinicList.Count > 0) or (WardList.count > 0) then 512 PrintOrdersOnSignReleaseMult(SignList, CLinicList, WardList, NO_PROVIDER, EncLocIEN, WardIEN, EncLocName, wardName) 513 else if DoNotPrint = False then PrintOrdersOnSignRelease(SignList, NO_PROVIDER, PrintLoc); 462 514 finally 463 515 SignList.Free; 516 OrderPrintList.free; 517 WardList.free; 518 ClinicList.free; 464 519 end; 465 520 end; {if frmSignOrders.OKPressed} … … 486 541 if BILLING_AWARE then 487 542 begin 488 clstOrders.Height := 2 34;543 clstOrders.Height := 228; 489 544 clstOrders.Top := (gbdxLookup.top + 65); 490 545 gbDxLookup.Visible := TRUE; 491 l abel2.Top := (gbdxLookup.Top + 48);492 laDiagnosis.Top := Label2.Top;546 lblOrderList.Top := (gbdxLookup.Top + gbdxLookup.Height); 547 laDiagnosis.Top := lblOrderList.Top; 493 548 laDiagnosis.Left := 270; 494 549 laDiagnosis.Visible := TRUE; … … 497 552 else 498 553 begin 499 l abel2.Top := 145;500 l abel2.Left := 8;554 lblOrderList.Top := 158; 555 lblOrderList.Left := 8; 501 556 end; 502 557 {End BillingAware} … … 609 664 begin 610 665 Canvas.FillRect(ARect); 611 Canvas.Pen.Color := clSilver;666 Canvas.Pen.Color := Get508CompliantColor(clSilver); 612 667 Canvas.MoveTo(ARect.Left, ARect.Bottom); 613 668 Canvas.LineTo(ARect.Right, ARect.Bottom); … … 619 674 //Adjust position of 'Diagnosis' column label for font size 620 675 laDiagnosis.Left := ARect.Right + 14; 621 622 //ARect.Right below controls the right-hand side of the Dx Column 623 //Adjust ARect.Right in conjunction with procedure uSignItems.TSigItems.lbDrawItem(), because the 624 //two rectangles overlap each other. 676 if uSignItems.GetAllBtnLeftPos > 0 then 677 laDiagnosis.left := uSignItems.GetAllBtnLeftPos - (laDiagnosis.Width +5); 678 // ARect.Right below controls the right-hand side of the Dx Column 679 // Adjust ARect.Right in conjunction with procedure uSignItems.TSigItems.lbDrawItem(), because the 680 // two rectangles overlap each other. 625 681 if BILLING_AWARE then 626 682 begin … … 631 687 //Win32 API - This call to DrawText draws the text of the ORDER - not the diagnosis code 632 688 DrawText(Canvas.handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 633 {v25 BA} 634 if BILLING_AWARE then 689 if BILLING_AWARE then 635 690 begin 636 691 if Assigned(UBAGlobals.tempDxList) then 637 692 begin 638 tempID := TOrder(clstOrders.Items.Objects[Index]).ID;693 tempID := TOrder(clstOrders.Items.Objects[Index]).ID; 639 694 640 695 if UBAGlobals.tempDxNodeExists(tempID) then … … 646 701 str := Piece(str,':',1); 647 702 DrawText(Canvas.handle, PChar(str), Length(str), arRect[Index], DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 648 if Not UBACore.IsOrderBillable(tempID) then //and 649 // Not UBAGlobals.tempDxNodeExists(tempID) then // if consult is non cidc but requires dx, show it. 703 if Not UBACore.IsOrderBillable(tempID) then 650 704 begin 651 705 Canvas.Font.Color := clBlue; … … 676 730 if Index < Items.Count then 677 731 begin 678 Canvas.FillRect(ARect);679 Canvas.Pen.Color := clSilver;680 Canvas.MoveTo(ARect.Left, ARect.Bottom - 1);681 Canvas.LineTo(ARect.Right, ARect.Bottom - 1);682 X := FilteredString(Items[Index]);683 DrawText(Canvas.handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK);732 Canvas.FillRect(ARect); 733 Canvas.Pen.Color := Get508CompliantColor(clSilver); 734 Canvas.MoveTo(ARect.Left, ARect.Bottom - 1); 735 Canvas.LineTo(ARect.Right, ARect.Bottom - 1); 736 X := FilteredString(Items[Index]); 737 DrawText(Canvas.handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 684 738 end; 685 739 end; … … 761 815 if Checked[i] then 762 816 begin 763 Result := True;764 break;817 Result := True; 818 break; 765 819 end; 766 820 end; … … 795 849 for i := 0 to (tempDxList.Count - 1) do 796 850 begin 797 thisRec := TBADxRecord(tempDxList.Items[i]);851 thisRec := TBADxRecord(tempDxList.Items[i]); 798 852 799 853 if Assigned(thisRec) then … … 815 869 on EListError do 816 870 begin 817 {$ifdef debug}Show Message('EListError in frmSignOrders.clstOrdersMouseMove()');{$endif}871 {$ifdef debug}Show508Message('EListError in frmSignOrders.clstOrdersMouseMove()');{$endif} 818 872 raise; 819 873 end; … … 841 895 {Begin BillingAware} 842 896 897 if (clstOrders.Top + clstOrders.Height) > (lblESCode.Top - 4) then 898 clstOrders.Height := lblESCode.Top - clstOrders.Top - 4; 899 843 900 //INITIALIZATIONS 844 901 Paste1.Enabled := false; … … 859 916 with fraCoPay do 860 917 begin 861 Label24.Caption := 'Service &Connected Condition';862 StaticText4.Caption := 'Combat &Vet (Combat Related)';863 Label18.Caption := 'Agent &Orange Exposure';864 Label16.Caption := 'Ionizing &Radiation Exposure';865 Label14.Caption := '&Environmental Contaminants';866 Label12.Caption := '&MST';918 lblSC2.Caption := 'Service &Connected Condition'; 919 lblCV2.Caption := 'Combat &Vet (Combat Related)'; 920 lblAO2.Caption := 'Agent &Orange Exposure'; 921 lblIR2.Caption := 'Ionizing &Radiation Exposure'; 922 lblSWAC2.Caption := '&Environmental Contaminants'; 923 lblMST2.Caption := '&MST'; 867 924 lblHNC2.Caption := '&Head and/or Neck Cancer'; 868 Label24.ShowAccelChar := true; 869 StaticText4.ShowAccelChar := true; 870 Label18.ShowAccelChar := true; 871 Label16.ShowAccelChar := true; 872 Label14.ShowAccelChar := true; 873 Label12.ShowAccelChar := true; 925 lblSHAD2.Caption := 'Shi&pboard Hazard and Defense'; 926 lblSC2.ShowAccelChar := true; 927 lblCV2.ShowAccelChar := true; 928 lblAO2.ShowAccelChar := true; 929 lblIR2.ShowAccelChar := true; 930 lblSWAC2.ShowAccelChar := true; 931 lblMST2.ShowAccelChar := true; 874 932 lblHNC2.ShowAccelChar := true; 933 lblSHAD2.ShowAccelChar := true; 875 934 end; 876 935 end; //BILLING_AWARE … … 916 975 match := false; 917 976 allBlank := false; 918 //orderIDList := TStringList.Create;919 977 if Assigned (orderIDList) then orderIDList.Clear; 920 978 if Assigned(UBAGlobals.PLFactorsIndexes) then UBAGlobals.PLFactorsIndexes.Clear; … … 952 1010 {$ifdef debug} 953 1011 with UBAGlobals.globalDxRec do 954 //Show Message('globalDxRec:'+#13+FOrderID+#13+FBADxCode+#13+FBASecDx1+#13+FBASecDx2+#13+FBASecDx3);1012 //Show508Message('globalDxRec:'+#13+FOrderID+#13+FBADxCode+#13+FBASecDx1+#13+FBASecDx2+#13+FBASecDx3); 955 1013 {$endif} 956 1014 end; … … 959 1017 except 960 1018 on E: Exception do 961 ShowM essage(E.ClassName+' error raised, with message : '+E.Message);1019 ShowMsg(E.ClassName+' error raised, with message : '+E.Message); 962 1020 end; 963 1021 … … 966 1024 if numSelected = 0 then 967 1025 begin 968 ShowM essage(UBAMessages.BA_NO_ORDERS_SELECTED);1026 ShowMsg(UBAMessages.BA_NO_ORDERS_SELECTED); 969 1027 Exit; 970 1028 end … … 981 1039 982 1040 if ((match and allBlank) or (match and (not allBlank))) then // All selected are blank or matching-not-blank 983 // begin 984 { TODO 3 -oKW -cRefinement : Define a const to replace string literal } 985 frmBALocalDiagnoses.Enter(UBAConst.F_ORDERS_SIGN, orderIDList) 1041 frmBALocalDiagnoses.Enter(UBAConst.F_ORDERS_SIGN, orderIDList) 986 1042 else 987 1043 begin … … 992 1048 Exit 993 1049 else 994 // begin995 1050 if Assigned(UBAGlobals.globalDxRec) then 996 1051 InitializeNewDxRec(UBAGlobals.globalDxRec); … … 1030 1085 if numSelected > 1 then 1031 1086 begin 1032 ShowM essage('Only 1 order at a time may be selected for ''Copying''');1087 ShowMsg('Only 1 order at a time may be selected for ''Copying'''); 1033 1088 Exit; 1034 1089 end; … … 1058 1113 //************************************************************************* 1059 1114 if (NOT UBACore.IsOrderBillable(fOrdersSign.srcOrderID) ) then //and 1060 // (NOT tempDxNodeExists(fOrdersSign.srcOrderID)) then// added to allow copy to NON CIDC consult order the requires a DX. then1115 // added to allow copy to NON CIDC consult order the requires a DX. then 1061 1116 begin 1062 ShowMessage(BA_NA_COPY_DISALLOWED);1063 fOrdersSign.srcOrderID := '';1064 Exit;1117 ShowMsg(BA_NA_COPY_DISALLOWED); 1118 fOrdersSign.srcOrderID := ''; 1119 Exit; 1065 1120 end; 1066 1121 //************************************************************************* … … 1074 1129 on EListError do 1075 1130 begin 1076 ShowMessage('EListError in frmSignOrders.Copy1Click()');1131 ShowMsg('EListError in frmSignOrders.Copy1Click()'); 1077 1132 raise; 1078 1133 end; 1079 1134 end; 1080 1081 //CopyActive := true; //CQ62251082 //Paste1.Enabled := true; //CQ62251083 1135 end; 1084 1136 … … 1101 1153 if (fOrdersSign.frmSignOrders.clstOrders.Selected[i]) then 1102 1154 begin 1103 fOrdersSign.targetOrderID := TChangeItem(fOrdersSign.frmSignOrders.clstOrders.Items.Objects[i]).ID;1155 fOrdersSign.targetOrderID := TChangeItem(fOrdersSign.frmSignOrders.clstOrders.Items.Objects[i]).ID; 1104 1156 1105 1157 if fOrdersSign.targetOrderID = fOrdersSign.srcOrderID then //disallow copying an order to itself … … 1112 1164 if Not UBACore.IsOrderBillable(targetOrderID) then 1113 1165 begin 1114 ShowMessage(BA_NA_PASTE_DISALLOWED);1115 fOrdersSign.targetOrderID := '';1116 Continue;1166 ShowMsg(BA_NA_PASTE_DISALLOWED); 1167 fOrdersSign.targetOrderID := ''; 1168 Continue; 1117 1169 end; 1118 1170 //*************************************************************** … … 1121 1173 with newRec do 1122 1174 begin 1123 FOrderID := fOrdersSign.targetOrderID;1124 FBADxCode := CopyBuffer.FBADxCode;1125 FBASecDx1 := CopyBuffer.FBASecDx1;1126 FBASecDx2 := CopyBuffer.FBASecDx2;1127 FBASecDx3 := CopyBuffer.FBASecDx3;1175 FOrderID := fOrdersSign.targetOrderID; 1176 FBADxCode := CopyBuffer.FBADxCode; 1177 FBASecDx1 := CopyBuffer.FBASecDx1; 1178 FBASecDx2 := CopyBuffer.FBASecDx2; 1179 FBASecDx3 := CopyBuffer.FBASecDx3; 1128 1180 end; 1129 1181 … … 1138 1190 on EListError do 1139 1191 begin 1140 ShowMessage('EListError in frmSignOrders.Paste1Click()'+#13+'for i := 0 to clstOrders.Count - 1 do');1192 ShowMsg('EListError in frmSignOrders.Paste1Click()'+#13+'for i := 0 to clstOrders.Count - 1 do'); 1141 1193 raise; 1142 1194 end; … … 1144 1196 clstOrders.Refresh; //Update grid to show pasted Dx 1145 1197 end; 1146 {1147 //CQ62251148 if CopyActive then1149 begin1150 Paste1.Enabled := false;1151 CopyActive := false;1152 end;1153 //end CQ62251154 }1155 1198 end; 1156 1199 … … 1173 1216 if fOrdersSign.frmSignOrders.clstOrders.Items.Count = 1 then 1174 1217 begin 1175 Copy1.Enabled := false;1176 Paste1.Enabled := false1218 Copy1.Enabled := false; 1219 Paste1.Enabled := false 1177 1220 end 1178 1221 else 1179 1222 begin 1180 Copy1.Enabled := true; 1181 //Paste1.Enabled := true; //commented out for CQ6225 1223 Copy1.Enabled := true; 1182 1224 end; 1183 1225 //End CQ3325 … … 1194 1236 on EListError do 1195 1237 begin 1196 ShowMessage('EListError in frmSignOrders.clstOrdersMouseDown()');1238 ShowMsg('EListError in frmSignOrders.clstOrdersMouseDown()'); 1197 1239 raise; 1198 1240 end; … … 1225 1267 if clstOrders.Selected[i] then 1226 1268 begin 1227 thisChangeItem := TChangeItem(clstOrders.Items.Objects[i]);1228 1229 //Disallow copying of a grid HEADER item on LEFT MOUSE CLICK1269 thisChangeItem := TChangeItem(clstOrders.Items.Objects[i]); 1270 1271 //Disallow copying of a grid HEADER item on LEFT MOUSE CLICK 1230 1272 if thisChangeItem = nil then 1231 1273 begin 1232 Copy1.Enabled := false;1233 buOrdersDiagnosis.Enabled := false;1234 Exit;1274 Copy1.Enabled := false; 1275 buOrdersDiagnosis.Enabled := false; 1276 Exit; 1235 1277 end; 1236 1278 1237 1279 if (thisChangeItem <> nil) then //Blank row - not an order item 1238 1280 begin 1239 thisOrderList.Clear;1240 thisOrderList.Add(thisChangeItem.ID);1241 1242 if IsAllOrdersNA(thisOrderList) then1243 begin1244 Diagnosis1.Enabled := false;1245 buOrdersDiagnosis.Enabled := false;1246 end1281 thisOrderList.Clear; 1282 thisOrderList.Add(thisChangeItem.ID); 1283 1284 if IsAllOrdersNA(thisOrderList) then 1285 begin 1286 Diagnosis1.Enabled := false; 1287 buOrdersDiagnosis.Enabled := false; 1288 end 1247 1289 else 1248 1290 begin … … 1268 1310 j: integer; //CQ5054 1269 1311 begin 1270 1271 if FOSTFHintWndActive then 1272 begin 1273 FOSTFhintWindow.ReleaseHandle ; 1274 FOSTFHintWndActive := False ; 1275 end; 1276 1277 case Key of 1278 67,99: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorSC,fraCoPay.Label24); //C,c 1279 86,118: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorCV,fraCoPay.staticText4); //V,v 1280 79,111: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorAO,fraCoPay.Label18); //O,o 1281 82,114: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorIR,fraCoPay.Label16); //R,r 1282 69,101: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorEC,fraCoPay.Label14); //E,e 1283 77,109: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorMST,fraCoPay.Label12); //M,m 1284 72,104: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorHNC,fraCoPay.lblHNC2); //H,h 1285 //CQ5054 1286 83,115: if (ssAlt in Shift) then 1287 begin 1288 for j := 0 to clstOrders.Items.Count-1 do 1289 clstOrders.Selected[j] := false; 1290 clstOrders.Selected[0] := true; 1291 clstOrders.SetFocus; 1292 end; 1293 //end CQ5054 1294 end; 1312 inherited; 1313 if FOSTFHintWndActive then 1314 begin 1315 FOSTFhintWindow.ReleaseHandle ; 1316 FOSTFHintWndActive := False ; 1317 end; 1318 1319 case Key of 1320 67,99: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorSC,fraCoPay.lblSC2); //C,c 1321 86,118: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorCV,fraCoPay.lblCV2); //V,v 1322 79,111: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorAO,fraCoPay.lblAO2); //O,o 1323 82,114: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorIR,fraCoPay.lblIR2); //R,r 1324 65,97: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorEC,fraCoPay.lblSWAC2); //A,a 1325 77,109: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorMST,fraCoPay.lblMST2); //M,m 1326 78,110: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorHNC,fraCoPay.lblHNC2); //N,n 1327 72,104: if (ssALT in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorSHAD,fraCopay.lblSHAD2); // H,h 1328 //CQ5054 1329 83,115: if (ssAlt in Shift) then 1330 begin 1331 for j := 0 to clstOrders.Items.Count-1 do 1332 clstOrders.Selected[j] := false; 1333 clstOrders.Selected[0] := true; 1334 clstOrders.SetFocus; 1335 end; 1336 //end CQ5054 1337 end; 1295 1338 end; 1296 1339 1297 1340 //BILLING AWARE Procedure 1298 procedure TfrmSignOrders.ShowTreatmentFactorHints(var pHintText: string; var pCompName: T ORStaticText); // 5081341 procedure TfrmSignOrders.ShowTreatmentFactorHints(var pHintText: string; var pCompName: TVA508StaticText); // 508 1299 1342 var 1300 1343 HRect: TRect; … … 1306 1349 if FOSTFhintWndActive then 1307 1350 begin 1308 FOSTFhintWindow.ReleaseHandle;1309 FOSTFhintWndActive := False;1351 FOSTFhintWindow.ReleaseHandle; 1352 FOSTFhintWndActive := False; 1310 1353 end; 1311 1354 except 1312 1355 on E: Exception do 1313 1356 begin 1314 {$ifdef debug}Show Message('Unhandled exception in procedure TfrmSignOrders.ShowTreatmentFactorHints()');{$endif}1357 {$ifdef debug}Show508Message('Unhandled exception in procedure TfrmSignOrders.ShowTreatmentFactorHints()');{$endif} 1315 1358 raise; 1316 1359 end; … … 1329 1372 hrect.Bottom := hrect.Bottom + Y; 1330 1373 1331 if FOSTFHintWndActive then 1332 begin 1333 with fraCoPay do 1334 begin 1335 //Abbreviated captions 1336 Label23.ShowHint := false; 1337 StaticText1.ShowHint := false; 1338 Label17.ShowHint := false; 1339 Label15.ShowHint := false; 1340 Label13.ShowHint := false; 1341 Label11.ShowHint := false; 1342 lblHNC.ShowHint := false; 1343 //Long captions 1344 staticText4.ShowHint := false; 1345 Label17.ShowHint := false; 1346 Label18.ShowHint := false; 1347 Label15.ShowHint := false; 1348 Label16.ShowHint := false; 1349 Label13.ShowHint := false; 1350 Label14.ShowHint := false; 1351 Label11.ShowHint := false; 1352 Label12.ShowHint := false; 1353 lblHNC.ShowHint := false; 1354 lblHNC2.ShowHint := false; 1355 end; 1356 end 1357 else 1358 begin 1359 with fraCoPay do 1360 begin 1361 //Abbreviated captions 1362 Label23.ShowHint := true; 1363 StaticText1.ShowHint := true; 1364 Label17.ShowHint := true; 1365 Label15.ShowHint := true; 1366 Label13.ShowHint := true; 1367 Label11.ShowHint := true; 1368 lblHNC.ShowHint := true; 1369 //Long captions 1370 staticText4.ShowHint := true; 1371 Label17.ShowHint := true; 1372 Label18.ShowHint := true; 1373 Label15.ShowHint := true; 1374 Label16.ShowHint := true; 1375 Label13.ShowHint := true; 1376 Label14.ShowHint := true; 1377 Label11.ShowHint := true; 1378 Label12.ShowHint := true; 1379 lblHNC.ShowHint := true; 1380 lblHNC2.ShowHint := true; 1381 end; 1382 end; 1374 fraCoPay.LabelCaptionsOn(not FOSTFHintWndActive); 1383 1375 1384 1376 FOSTFhintWindow.ActivateHint(hrect, pHintText); … … 1387 1379 on E: Exception do 1388 1380 begin 1389 {$ifdef debug}Show Message('Unhandled exception in procedure TfrmSignOrders.ShowTreatmentFactorHints()');{$endif}1381 {$ifdef debug}Show508Message('Unhandled exception in procedure TfrmSignOrders.ShowTreatmentFactorHints()');{$endif} 1390 1382 raise; 1391 1383 end; … … 1405 1397 on E: Exception do 1406 1398 begin 1407 {$ifdef debug}Show Message('Unhandled exception in procedure TfrmSignOrders.FormMouseMove()');{$endif}1399 {$ifdef debug}Show508Message('Unhandled exception in procedure TfrmSignOrders.FormMouseMove()');{$endif} 1408 1400 raise; 1409 1401 end; … … 1411 1403 end; 1412 1404 1405 procedure TfrmSignOrders.FormResize(Sender: TObject); 1406 begin 1407 inherited; 1408 clstOrders.invalidate; 1409 end; 1410 1413 1411 procedure TfrmSignOrders.fraCoPaylblHNCMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); 1414 1412 begin 1415 if FOSTFHintWndActive then 1416 begin 1417 with fraCoPay do 1418 begin 1419 //Abbreviated captions 1420 Label23.ShowHint := false; 1421 StaticText1.ShowHint := false; 1422 Label17.ShowHint := false; 1423 Label15.ShowHint := false; 1424 Label13.ShowHint := false; 1425 Label11.ShowHint := false; 1426 lblHNC.ShowHint := false; 1427 //Long captions 1428 Label24.ShowHint := false; 1429 staticText4.ShowHint := false; 1430 Label17.ShowHint := false; 1431 Label18.ShowHint := false; 1432 Label15.ShowHint := false; 1433 Label16.ShowHint := false; 1434 Label13.ShowHint := false; 1435 Label14.ShowHint := false; 1436 Label11.ShowHint := false; 1437 Label12.ShowHint := false; 1438 lblHNC.ShowHint := false; 1439 lblHNC2.ShowHint := false; 1440 end; 1441 end 1442 else 1443 begin 1444 with fraCoPay do 1445 begin 1446 //Abbreviated captions 1447 Label23.ShowHint := true; 1448 StaticText1.ShowHint := true; 1449 Label17.ShowHint := true; 1450 Label15.ShowHint := true; 1451 Label13.ShowHint := true; 1452 Label11.ShowHint := true; 1453 lblHNC.ShowHint := true; 1454 //Long captions 1455 Label24.ShowHint := true; 1456 staticText4.ShowHint := true; 1457 Label17.ShowHint := true; 1458 Label18.ShowHint := true; 1459 Label15.ShowHint := true; 1460 Label16.ShowHint := true; 1461 Label13.ShowHint := true; 1462 Label14.ShowHint := true; 1463 Label11.ShowHint := true; 1464 Label12.ShowHint := true; 1465 lblHNC.ShowHint := true; 1466 lblHNC2.ShowHint := true; 1467 end; 1468 end; 1469 1413 fraCoPay.LabelCaptionsOn(not FOSTFHintWndActive) 1470 1414 end; 1471 1415 1472 1416 procedure TfrmSignOrders.fraCoPayLabel23Enter(Sender: TObject); 1473 1417 begin 1474 (Sender as T ORStaticText).Font.Style := [fsBold];1418 (Sender as TVA508StaticText).Font.Style := [fsBold]; 1475 1419 end; 1476 1420 1477 1421 procedure TfrmSignOrders.fraCoPayLabel23Exit(Sender: TObject); 1478 1422 begin 1479 (Sender as T ORStaticText).Font.Style := [];1423 (Sender as TVA508StaticText).Font.Style := []; 1480 1424 end; 1481 1425 … … 1512 1456 1513 1457 procedure TfrmSignOrders.FormatListForScreenReader; 1514 var 1515 ListStateOn : longbool; 1516 Success: longbool; 1517 begin 1518 //Determine if a screen reader is currently being used. 1519 Success := SystemParametersInfo(SPI_GETSCREENREADER, 0, @ListStateOn,0); 1520 if Success and ListStateOn then 1458 begin 1459 if ScreenReaderActive then 1521 1460 SetItemTextToState; 1522 1461 end;
Note:
See TracChangeset
for help on using the changeset viewer.