Changeset 830 for cprs/trunk/CPRS-Chart/fReview.pas
- Timestamp:
- Jul 7, 2010, 4:51:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/fReview.pas
r456 r830 9 9 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 10 10 StdCtrls, checklst, uConst, ExtCtrls, uCore, mCoPayDesc, XUDIGSIGSC_TLB, 11 ORCtrls, Menus, UBACore, ORClasses; 11 ORCtrls, Menus, UBACore, ORClasses,fBase508Form, fPrintLocation, 12 VA508AccessibilityManager; 12 13 13 14 type 14 TfrmReview = class(T Form)15 TfrmReview = class(TfrmBase508Form) 15 16 cmdOK: TButton; 16 17 cmdCancel: TButton; … … 65 66 X, Y: Integer); 66 67 procedure FormClose(Sender: TObject; var Action: TCloseAction); 67 procedure fraCoPayLabel23Enter(Sender: TObject);68 procedure fraCoPayLabel23Exit(Sender: TObject);69 68 procedure lstReviewKeyUp(Sender: TObject; var Key: Word; 70 69 Shift: TShiftState); 71 70 procedure FormKeyUp(Sender: TObject; var Key: Word; 72 71 Shift: TShiftState); 72 procedure FormResize(Sender: TObject); 73 73 74 74 private … … 94 94 function IsSignatureRequired:boolean; 95 95 function GetNumberOfSelectedOrders : byte; 96 procedure ShowTreatmentFactorHints(var pHintText: string; var pCompName: TORStaticText); // 50896 procedure ShowTreatmentFactorHints(var pHintText: string; var pCompName: TVA508StaticText); // 508 97 97 procedure SetItemTextToState; 98 98 procedure FormatListForScreenReader; … … 137 137 uses ORFn, rCore, fNotes, fConsults, fOrders, rOrders, Hash, fDCSumm, fOCSession, uOrders, 138 138 fSignItem, fOrdersPrint, fLkUpLocation, fFrame, uSignItems, fSurgery, 139 fBALocalDiagnoses, UBAConst, UBAMessages, fOrdersSign, fClinicWardMeds; 139 fBALocalDiagnoses, UBAConst, UBAMessages, fOrdersSign, fClinicWardMeds, 140 rODLab, fRptBox, VAUtils; 140 141 141 142 const … … 250 251 { display changes made to chart for this encounter, allow changes to be saved, signed, etc. } 251 252 var 252 253 i: integer; 253 254 begin 254 255 Result := True; … … 361 362 if ChangeItem.GroupName = '' then 362 363 begin 363 if StrPos(PChar(ChangeItem.Text),PChar(NonVAMedTxt)) <> nil then 364 //if StrPos(PChar(ChangeItem.Text),PChar(NonVAMedTxt)) <> nil then 365 if ChangeItem.OrderDG = NONVAMEDGROUP then 364 366 lstReview.State[Result] := cbGrayed; 365 367 end; … … 402 404 ChangeItem: TChangeItem; 403 405 LabelHeight: integer; 404 PrevGrpName: string; 406 PrevGrpName, temp: string; 407 displayHeader, displaySpacer, otherUserOrders: boolean; 405 408 406 409 begin … … 442 445 if(FullList) then 443 446 begin 447 //otherUserOrders := False; 448 displaySpacer := False; 444 449 with Changes do 445 450 if Orders.Count > 0 then 446 451 begin 447 452 OrderGrp.Sorted := True; 453 otherUserOrders := False; 448 454 for GrpIndex := 0 to OrderGrp.Count - 1 do 449 455 begin 456 displayHeader := True; 450 457 if (GrpIndex > 0 ) and (AnsiCompareText(PrevGrpName,OrderGrp[GrpIndex])=0) then 451 458 Continue; 452 AddHeader('Orders - ' + OrderGrp[GrpIndex]); 459 if OrderGrp[GrpIndex] = '' then Temp := 'My Unsigned Orders - This Session' 460 else if OrderGrp[GrpIndex] = 'Other Unsigned' then Temp := 'My Unsigned Orders - Previous Sessions' 461 else Temp := 'Orders - ' + OrderGrp[GrpIndex]; 462 //AddHeader('Orders - ' + Temp); 453 463 {billing aware} 454 464 if BILLING_AWARE then … … 461 471 begin 462 472 ChangeItem := Orders[ChgIndex]; 463 if ChangeItem.GroupName = OrderGrp[GrpIndex]then473 if (ChangeItem.GroupName = OrderGrp[GrpIndex]) and ((ChangeItem.User = 0) or (ChangeItem.User = User.DUZ)) then 464 474 begin 475 if displayHeader = True then 476 begin 477 AddHeader(Temp); 478 displayHeader := False; 479 displaySpacer := True; 480 end; 465 481 lbIdx := AddItem(ChangeItem); 466 482 SigItems.Add(CH_ORD, ChangeItem.ID, lbIdx); 467 end; 483 end 484 else if ((ChangeItem.User > 0) and (ChangeItem.User <> User.DUZ)) then 485 otherUserOrders := True; 468 486 end; 469 AddHeader(' ');487 if displayHeader = False then AddHeader(' '); 470 488 PrevGrpName := OrderGrp[GrpIndex]; 471 end; 472 end; {if Orders} 489 end; 490 //AGP fix for CQ 10073 491 if otherUserOrders = True then 492 begin 493 if displaySpacer = True then AddHeader(' '); 494 AddHeader('Others'' Unsigned Orders Orders - All Sessions'); 495 for ChgIndex := 0 to Orders.Count - 1 do 496 begin 497 ChangeItem := Orders[ChgIndex]; 498 if (ChangeItem.GroupName = 'Other Unsigned') and ((ChangeItem.User >0) and (ChangeItem.User <> User.DUZ)) then 499 begin 500 lbIdx := AddItem(ChangeItem); 501 SigItems.Add(CH_ORD, ChangeItem.ID, lbIdx); 502 end; 503 end; 504 end; 505 end; {if Orders} 473 506 // determine the appropriate panel to display 474 507 case User.OrderRole of … … 659 692 var 660 693 x: string; 661 ARect : TRect;662 i : integer;694 ARect, TextRecord: TRect; 695 i, dy: integer; 663 696 tempID: string; 664 697 thisRec: UBAGlobals.TBADxRecord; … … 668 701 {End BillingAware} 669 702 703 procedure UpdateTextRecord(r: TRect); 704 begin 705 TextRecord := r; 706 inc(TextRecord.Top, dy); 707 dec(TextRecord.Bottom, dy); 708 end; 709 670 710 begin 671 711 inherited; 672 712 dy := SIG_ITEM_VERTICAL_PAD div 2; 673 713 x := ''; 674 714 ARect := Rect; … … 682 722 if Items.Objects[Index] = nil then 683 723 ARect.Left := 0; 684 Canvas.Pen.Color := clSilver;685 //Canvas.Brush.Color := clLime;724 Canvas.Pen.Color := Get508CompliantColor(clSilver); 725 //Canvas.Brush.Color := Get508CompliantColor(clLime); 686 726 Canvas.FillRect(ARect); 687 727 … … 691 731 692 732 if (ARect.Left = 0) and ( Length(x)>0 ) then 693 Canvas.TextOut(ARect.Left + 2, ARect.Top , x)733 Canvas.TextOut(ARect.Left + 2, ARect.Top + dy, x) 694 734 else 695 735 if (ARect.Left > 0 ) and ( Length(x)>0 ) then … … 706 746 707 747 //Draw ORDER TEXT 708 DrawText(Canvas.handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 748 UpdateTextRecord(ARect); 749 DrawText(Canvas.handle, PChar(x), Length(x), TextRecord, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 709 750 710 751 if BILLING_AWARE then 711 752 begin 712 753 //Dx Column lines 713 Canvas.Pen.Color := clSilver;754 Canvas.Pen.Color := Get508CompliantColor(clSilver); 714 755 Canvas.MoveTo(DxRect.Left-1, ARect.Top); 715 756 Canvas.LineTo(DxRect.Left-1, ARect.Bottom); 716 757 //Adjust position of 'Diagnosis' column label for font size 717 758 laDiagnosis.Left := DxRect.Left + 14; 759 if uSignItems.GetAllBtnLeftPos > 0 then 760 laDiagnosis.left := uSignItems.GetAllBtnLeftPos - (laDiagnosis.Width +5); 718 761 laDiagnosis.Top := lblSig.Top; 719 762 //Assign DxRect for drawing Dx column and Dx string … … 742 785 str := Piece(thisRec.FBADxCode, '^', 1); // Display Dx text only - not the ICD-9 code 743 786 str := Piece(str, ':', 1); //in case has : vs. ^ 744 DrawText(Canvas.handle, PChar(str), Length(str), arRect[Index], DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 787 UpdateTextRecord(arRect[Index]); 788 DrawText(Canvas.handle, PChar(str), Length(str), TextRecord, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 745 789 746 790 if (Not UBACore.IsOrderBillable(tempID)) then// and 747 791 // (Not UBAGlobals.tempDxNodeExists(tempID) ) then // if consult is non cidc but requires dx, show it. 748 792 begin 749 Canvas.Font.Color := clBlue ; 750 DrawText(Canvas.handle, PChar(NOT_APPLICABLE), Length(NOT_APPLICABLE) , arRect[Index], DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 793 Canvas.Font.Color := Get508CompliantColor(clBlue); 794 UpdateTextRecord(arRect[Index]); 795 DrawText(Canvas.handle, PChar(NOT_APPLICABLE), Length(NOT_APPLICABLE) , TextRecord, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 751 796 end; 752 797 end … … 756 801 if Not UBACore.IsOrderBillable(tempID) then 757 802 begin 758 Canvas.Font.Color := clBlue ; 759 DrawText(Canvas.handle, PChar(NOT_APPLICABLE), Length(NOT_APPLICABLE) , arRect[Index], DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 803 Canvas.Font.Color := Get508CompliantColor(clBlue); 804 UpdateTextRecord(arRect[Index]); 805 DrawText(Canvas.handle, PChar(NOT_APPLICABLE), Length(NOT_APPLICABLE) , TextRecord, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 760 806 end; 761 807 end; … … 780 826 781 827 if (ARect.Left = 0) and ( Length(x) > 0 ) then 782 Canvas.TextOut(ARect.Left + 2, ARect.Top , x)828 Canvas.TextOut(ARect.Left + 2, ARect.Top + dy, x) 783 829 else 784 830 if (ARect.Left > 0 ) and ( Length(x)>0 ) then 785 831 begin 786 Canvas.Pen.Color := clSilver;832 Canvas.Pen.Color := Get508CompliantColor(clSilver); 787 833 Canvas.MoveTo(0, ARect.Bottom-1); 788 834 Canvas.LineTo(ARect.Right, ARect.Bottom-1); 789 DrawText(Canvas.handle, PChar(x), Length(x), ARect, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 835 UpdateTextRecord(ARect); 836 DrawText(Canvas.handle, PChar(x), Length(x), TextRecord, DT_LEFT or DT_NOPREFIX or DT_WORDBREAK); 790 837 end; 791 838 end; … … 838 885 TC_SAVERR = 'Error Saving Order'; 839 886 var 840 i, idx, AType, PrintLoc, theSts : Integer;887 i, idx, AType, PrintLoc, theSts, wardIEN: Integer; 841 888 SigSts, RelSts, Nature: Char; 842 889 ESCode, AnID, AnErrMsg: string; 843 ChangeItem : TChangeItem;844 OrderList : TStringList;890 ChangeItem, TempChangeItem: TChangeItem; 891 OrderList, OrderPrintList: TStringList; 845 892 SaveCoPay: boolean; 846 DigSigErr, DigStoreErr, CryptoChecked : Boolean;893 DigSigErr, DigStoreErr, CryptoChecked, displayEncSwitch: Boolean; 847 894 SigData, SigUser, SigDrugSch, SigDEA: string; 848 cSignature, cHashData, cCrlUrl, cErr : string;895 cSignature, cHashData, cCrlUrl, cErr, WardName, ASvc: string; 849 896 cProvDUZ: Int64; 897 AList, ClinicList, DCList, WardList: TStringList; 898 IsOk, ContainsIMOOrders, DoNotPrint : Boolean; 899 EncLocName, EncLocText: string; 900 EncLocIEN: integer; 901 EncDT: TFMDateTime; 902 EncVC: Char; 850 903 851 904 function OrdersSignedOrReleased: Boolean; … … 884 937 885 938 begin 939 IsOk := True; 886 940 ESCode := ''; 887 941 SaveCoPay := FALSE; 888 942 PrintLoc := 0; 943 EncLocIEN := 0; 944 DoNotPrint := False; 889 945 if BILLING_AWARE then 890 946 begin … … 910 966 { save/sign orders } 911 967 OrderList := TStringList.Create; 968 OrderPrintList := TStringList.create; 969 ClinicList := TStringList.Create; 970 WardList := TStringList.Create; 912 971 DigSigErr := True; 913 972 CryptoChecked := False; 973 ContainsIMOOrders := False; 914 974 try 915 975 Nature := NO_PROVIDER; … … 1023 1083 if Length(SigData) < 1 then 1024 1084 begin 1025 ShowM essage(ChangeItem.Text + CRLF + CRLF + 'Digital Signature failed with reason: Unable to get required data from server');1085 ShowMsg(ChangeItem.Text + CRLF + CRLF + 'Digital Signature failed with reason: Unable to get required data from server'); 1026 1086 DigStoreErr := true; 1027 1087 end; … … 1045 1105 else 1046 1106 begin 1047 ShowM essage(ChangeItem.Text + CRLF + CRLF + 'Digital Signature failed with reason: '+ piece(Crypto.Reason, '^', 2));1107 ShowMsg(ChangeItem.Text + CRLF + CRLF + 'Digital Signature failed with reason: '+ piece(Crypto.Reason, '^', 2)); 1048 1108 DigStoreErr := true; 1049 1109 end; … … 1051 1111 on E: Exception do 1052 1112 begin 1053 ShowM essage(ChangeItem.Text + CRLF + CRLF + 'Crypto raised an error: '+ E.Message);1113 ShowMsg(ChangeItem.Text + CRLF + CRLF + 'Crypto raised an error: '+ E.Message); 1054 1114 DigStoreErr := true; 1055 1115 end; … … 1069 1129 if GetPKISite and (OrderRequiresDigitalSignature(ChangeItem.ID)) then 1070 1130 begin 1071 ShowM essage('ORDER NOT SENT TO PHARMACY' + CRLF + CRLF + ChangeItem.Text + CRLF + CRLF +1131 ShowMsg('ORDER NOT SENT TO PHARMACY' + CRLF + CRLF + ChangeItem.Text + CRLF + CRLF + 1072 1132 'This Schedule II medication cannot be electronically entered without a Digital Signature. ' + 1073 1133 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.'); … … 1126 1186 else 1127 1187 begin 1128 if BILLING_AWARE then 1129 InfoBox(TX_Order_Error, 'Review/Sign Orders', MB_OK) 1130 else 1131 InfoBox(TC_Order_Error, 'Review/Sign Orders', MB_OK); 1188 InfoBox(TX_Order_Error, 'Review/Sign Orders', MB_OK); 1132 1189 Exit; 1133 1190 end … … 1158 1215 if (User.OrderRole in [OR_NOKEY..OR_STUDENT]) and (OrderList.Count > 0) and LockedForOrdering then 1159 1216 begin 1160 ExecuteSessionOrderChecks(OrderList); // any cancelled orders will be removed from OrderList1217 IsOk := ExecuteSessionOrderChecks(OrderList); // any cancelled orders will be removed from OrderList 1161 1218 StatusText('Sending Orders to Service(s)...'); 1162 1219 if OrderList.Count > 0 then 1163 1220 begin 1164 1165 1221 //hds7591 Clinic/Ward movement. Nurse orders 1166 1222 if (cmdOk.Caption = 'Sign') or (cmdOK.Caption = 'OK') and (not frmFrame.TimedOut) then 1167 1223 begin 1168 if IsValidIMOLoc(uCore.TempEncounterLoc,Patient.DFN) then 1169 frmClinicWardMeds.ClinicOrWardLocation(OrderList, uCore.TempEncounterLoc,uCore.TempEncounterLocName, PrintLoc) 1170 else 1171 if (IsValidIMOLoc(Encounter.Location,Patient.DFN)) and ((frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN)) and (Patient.Inpatient = false)) then 1172 frmClinicWardMeds.ClinicOrWardLocation(OrderList, Encounter.Location,Encounter.LocationName, PrintLoc); 1224 if ((Patient.Inpatient = false) and (frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN))) or 1225 ((Patient.Inpatient = True) and (Encounter.Location <> Patient.Location)) or 1226 ((Patient.Inpatient = True) and (Encounter.Location = Patient.Location) and 1227 (encounter.Location <> uCore.TempEncounterLoc) and (uCore.TempEncounterLoc <> 0)) then 1228 //or ((frmFrame.DoNotChangeEncWindow = true) and (encounter.Location = uCore.TempOutEncounterLoc)) then 1229 begin 1230 if Encounter.Location <> Patient.Location then 1231 begin 1232 EncLocName := Encounter.LocationName; 1233 EncLocIEN := Encounter.Location; 1234 EncLocText := Encounter.LocationText; 1235 EncDT := Encounter.DateTime; 1236 EncVC := Encounter.VisitCategory; 1237 end 1238 else 1239 begin 1240 EncLocName := UCore.TempEncounterLocName; 1241 EncLocIEN := UCore.TempEncounterLoc; 1242 EncLocText := uCore.TempEncounterText; 1243 EncDT := uCore.TempEncounterDateTime; 1244 EncVC := uCore.TempEncounterVistCat; 1245 end; 1246 if frmFrame.mnuFile.Tag = 0 then displayEncSwitch := false 1247 else displayEncSwitch := true; 1248 1249 (*displayEncSwitch := False; 1250 if (frmFrame.mnuFile.Items[frmFrame.mnuFile.menuIndex].Caption = 'Refresh Patient &Information') or 1251 (frmFrame.mnuFile.Items[frmFrame.mnuFile.menuIndex].Caption = '&Review/Sign Changes...') then 1252 displayEncSwitch := True; *) 1253 DCList := TStringList.Create; 1254 for i := 0 to lstReview.Items.Count-1 do 1255 begin 1256 if (lstReview.Checked[i] = false) and (lstReview.State[i] <> cbGrayed) then continue; 1257 TempChangeItem := TChangeItem(lstReview.Items.Objects[i]); 1258 if TempChangeItem.DCOrder = True then 1259 begin 1260 DCList.Add(tempChangeItem.ID); 1261 continue; 1262 end; 1263 if TempChangeItem.OrderDG = NONVAMEDGROUP then continue; 1264 if TempChangeItem.OrderDG = 'Clinic Orders' then ContainsIMOORders := true; 1265 if (tempChangeItem.OrderDG = '') then continue; 1266 if tempChangeItem.Delay = True then continue; 1267 OrderPrintList.Add(tempChangeItem.ID + ':' + tempChangeItem.Text); 1268 end; 1269 if OrderPrintList.Count > 0 then 1270 frmPrintLocation.PrintLocation(OrderPrintList, EncLocIEN, EncLocName, EncLocText, EncDT, EncVC, ClinicList, 1271 WardList, wardIEN, wardName, ContainsIMOOrders, displayEncSwitch) 1272 else 1273 begin 1274 frmPrintLocation.SwitchEncounterLoction(EncLocIEN, EncLocName, EncLocText, EncDT, EncVC); 1275 fframe.frmFrame.OrderPrintForm := True; 1276 DoNotPrint := True; 1277 end; 1278 1279 if DCList.Count > 0 then 1280 begin 1281 for i := 0 to DCList.Count - 1 do 1282 WardList.Add(DCList.Strings[i]); 1283 if (WardIEN = 0) and (WardName = '') then 1284 CurrentLocationForPatient(Patient.DFN, WardIEN, WardName, ASvc); 1285 end; 1286 if DCList <> nil then DCList.Free; 1287 end; 1173 1288 end; 1289 if (cmdOk.Caption = 'Don''t Sign') and (not frmFrame.TimedOut) then 1290 begin 1291 if ((Patient.Inpatient = false) and (frmClinicWardMeds.rpcIsPatientOnWard(patient.DFN))) or 1292 ((Patient.Inpatient = True) and (Encounter.Location <> Patient.Location)) or 1293 ((Patient.Inpatient = True) and (Encounter.Location = Patient.Location) and 1294 (encounter.Location <> uCore.TempEncounterLoc) and (uCore.TempEncounterLoc <> 0)) then 1295 //or ((frmFrame.DoNotChangeEncWindow = true) and (encounter.Location = uCore.TempOutEncounterLoc)) then 1296 begin 1297 if Encounter.Location <> Patient.Location then 1298 begin 1299 EncLocName := Encounter.LocationName; 1300 EncLocIEN := Encounter.Location; 1301 EncLocText := Encounter.LocationText; 1302 EncDT := Encounter.DateTime; 1303 EncVC := Encounter.VisitCategory; 1304 end 1305 else 1306 begin 1307 EncLocName := UCore.TempEncounterLocName; 1308 EncLocIEN := UCore.TempEncounterLoc; 1309 EncLocText := uCore.TempEncounterText; 1310 EncDT := uCore.TempEncounterDateTime; 1311 EncVC := uCore.TempEncounterVistCat; 1312 end; 1313 frmPrintLocation.SwitchEncounterLoction(EncLocIEN, EncLocName, EncLocText, EncDT, EncVC); 1314 fframe.frmFrame.OrderPrintForm := True; 1315 end; 1316 end; 1174 1317 uCore.TempEncounterLoc := 0; 1175 1318 uCore.TempEncounterLocName := ''; … … 1186 1329 begin 1187 1330 ChangeItem := Changes.Locate(CH_ORD, Piece(OrderList[i], U, 1)); 1188 if not FSilent then InfoBox(TX_SAVERR1 + Piece(OrderList[i], U, 4) + TX_SAVERR2 + ChangeItem.Text, 1331 if not FSilent then 1332 begin 1333 if Piece(OrderList[i],U,4) = 'Invalid Pharmacy order number' then 1334 InfoBox(TX_SAVERR1 + Piece(OrderList[i], U, 4) + TX_SAVERR2 + ChangeItem.Text + CRLF + CRLF + 1335 'The changes to this order have not been saved. You must contact Pharmacy to complete any action on this order.', 1336 TC_SAVERR, MB_OK) 1337 else 1338 InfoBox(TX_SAVERR1 + Piece(OrderList[i], U, 4) + TX_SAVERR2 + ChangeItem.Text, 1189 1339 TC_SAVERR, MB_OK); 1340 end; 1190 1341 end; 1191 1342 if Pos('R', Piece(OrderList[i], U, 2)) > 0 then … … 1204 1355 if theSts = 10 then OrderList.Delete(idx); //signed delayed order should not be printed. 1205 1356 end; 1206 PrintOrdersOnSignRelease(OrderList, Nature, PrintLoc); 1357 // CQ 10226, PSI-05-048 - advise of auto-change from LC to WC on lab orders 1358 AList := TStringList.Create; 1359 try 1360 CheckForChangeFromLCtoWCOnRelease(AList, Encounter.Location, OrderList); 1361 if AList.Text <> '' then 1362 ReportBox(AList, 'Changed Orders', TRUE); 1363 finally 1364 AList.Free; 1365 end; 1366 if (ClinicList.Count > 0) or (WardList.Count > 0) then 1367 PrintOrdersOnSignReleaseMult(OrderList, CLinicList, WardList, Nature, EncLocIEN, WardIEN, EncLocName, wardName) 1368 else if DoNotPrint = false then PrintOrdersOnSignRelease(OrderList, Nature, PrintLoc); 1207 1369 end; 1208 1370 StatusText(''); … … 1219 1381 finally 1220 1382 FreeAndNil(OrderList); 1383 FreeAndNil(OrderPrintList); 1384 FreeAndNil(ClinicList); 1385 FreeAndNil(WardList); 1221 1386 end; 1222 1387 crypto := nil; … … 1262 1427 end; 1263 1428 UnlockIfAble; 1264 FOKPressed := True;1429 FOKPressed := IsOk; 1265 1430 Close; 1266 1431 end; … … 1302 1467 Canvas.FillRect(ARect); 1303 1468 x := FilteredString(Items[Index]); 1304 AHeight := WrappedTextHeightByFont( lstReview.Canvas, Font, x, ARect) ;1469 AHeight := WrappedTextHeightByFont( lstReview.Canvas, Font, x, ARect) + SIG_ITEM_VERTICAL_PAD; 1305 1470 if AHeight > 255 then AHeight := 255; 1306 1471 //------------------- … … 1375 1540 on EListError do 1376 1541 begin 1377 {$ifdef debug}Show Message('EListError in fReview.lstReviewMouseMove()');{$endif}1542 {$ifdef debug}Show508Message('EListError in fReview.lstReviewMouseMove()');{$endif} 1378 1543 raise; 1379 1544 end; … … 1439 1604 end; 1440 1605 //********************************* 1441 thisOrderID := TChangeItem(fReview.frmReview.lstReview.Items.Objects[i]).ID;1606 thisOrderID := TChangeItem(fReview.frmReview.lstReview.Items.Objects[i]).ID; 1442 1607 {BAV25 Code} //Used to pass selected orders to Lookup DX form 1443 1608 BAtmpOrderList.Add(TChangeItem(fReview.frmReview.lstReview.Items.Objects[i]).TEXT); … … 1468 1633 on EListError do 1469 1634 begin 1470 {$ifdef debug}Show Message('EListError in fReview.buDiagnosisClick()');{$endif}1635 {$ifdef debug}Show508Message('EListError in fReview.buDiagnosisClick()');{$endif} 1471 1636 raise; 1472 1637 end; … … 1477 1642 if numSelected = 0 then 1478 1643 begin 1479 ShowM essage(UBAMessages.BA_NO_ORDERS_SELECTED);1644 ShowMsg(UBAMessages.BA_NO_ORDERS_SELECTED); 1480 1645 Exit; 1481 1646 end … … 1591 1756 on EListError do 1592 1757 begin 1593 {$ifdef debug}Show Message('EListError in fReview.lstReviewClick()');{$endif}1758 {$ifdef debug}Show508Message('EListError in fReview.lstReviewClick()');{$endif} 1594 1759 raise; 1595 1760 end; … … 1681 1846 if numSelected > 1 then 1682 1847 begin 1683 ShowM essage('Only 1 order at a time may be selected for ''Copying''');1848 ShowMsg('Only 1 order at a time may be selected for ''Copying'''); 1684 1849 Exit; 1685 1850 end; … … 1712 1877 if Not UBACore.IsOrderBillable(fReview.srcOrderID) then 1713 1878 begin 1714 ShowM essage(BA_NA_COPY_DISALLOWED);1879 ShowMsg(BA_NA_COPY_DISALLOWED); 1715 1880 //Continue; 1716 1881 fReview.srcOrderID := ''; … … 1727 1892 on EListError do 1728 1893 begin 1729 {$ifdef debug}Show Message('EListError in fReview.Copy1Click()');{$endif}1894 {$ifdef debug}Show508Message('EListError in fReview.Copy1Click()');{$endif} 1730 1895 raise 1731 1896 end; … … 1771 1936 if (NOT UBACore.IsOrderBillable(fReview.targetOrderID) ) then 1772 1937 begin 1773 ShowM essage(BA_NA_PASTE_DISALLOWED);1938 ShowMsg(BA_NA_PASTE_DISALLOWED); 1774 1939 fReview.targetOrderID := ''; 1775 1940 Continue; … … 1800 1965 on EListError do 1801 1966 begin 1802 {$ifdef debug}Show Message('EListError in fReview.Paste1Click()');{$endif}1967 {$ifdef debug}Show508Message('EListError in fReview.Paste1Click()');{$endif} 1803 1968 raise; 1804 1969 end; … … 1828 1993 on EListError do 1829 1994 begin 1830 {$ifdef debug}Show Message('EListError in fReview.ClearDiagnoses1Click()');{$endif}1995 {$ifdef debug}Show508Message('EListError in fReview.ClearDiagnoses1Click()');{$endif} 1831 1996 raise; 1832 1997 end; … … 1851 2016 Inc(howMany); 1852 2017 end; 1853 1854 2018 Result := howMany; 1855 2019 end; … … 1857 2021 procedure TfrmReview.FormShow(Sender: TObject); 1858 2022 var 1859 numOrderItems: integer; 1860 begin 1861 //INITIALIZATIONS 1862 Paste1.Enabled := false; 2023 BottomEdge, numOrderItems: integer; 2024 begin 2025 if pnlSignature.Visible then 2026 BottomEdge := pnlSignature.Top 2027 else 2028 if pnlOrderAction.Visible then 2029 BottomEdge := pnlOrderAction.Top 2030 else 2031 BottomEdge := cmdOK.Top; 2032 dec(BottomEdge, 4); 2033 if (lstReview.Top + lstReview.Height) > BottomEdge then 2034 lstReview.Height := BottomEdge - lstReview.Top; 2035 //INITIALIZATIONS 2036 Paste1.Enabled := false; 1863 2037 fReview.srcOrderID := ''; 1864 2038 fReview.srcDx := ''; 1865 2039 1866 //begin BillingAware1867 2040 if BILLING_AWARE then 1868 2041 frmReview.lstReview.Multiselect := true; 1869 //end BillingAware1870 2042 1871 2043 FormatListForScreenReader; … … 1905 2077 j: integer; //CQ5054 1906 2078 begin 2079 inherited; 1907 2080 currentlySelectedItem := frmReview.lstReview.ItemIndex; //CQ5063 1908 2081 1909 2082 case Key of 1910 67,99: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorSC,fraCoPay.Label24); //C,c 1911 86,118: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorCV,fraCoPay.staticText4); //V,v 1912 79,111: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorAO,fraCoPay.Label18); //O,o 1913 82,114: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorIR,fraCoPay.Label16); //R,r 1914 69,101: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorEC,fraCoPay.Label14); //E,e 1915 77,109: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorMST,fraCoPay.Label12); //M,m 1916 72,104: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorHNC,fraCoPay.lblHNC2); //H,h 2083 67,99: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorSC,fraCoPay.lblSC2); //C,c 2084 86,118: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorCV,fraCoPay.lblCV2); //V,v 2085 79,111: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorAO,fraCoPay.lblAO2); //O,o 2086 82,114: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorIR,fraCoPay.lblIR2); //R,r 2087 65,97: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorEC,fraCoPay.lblSWAC2); //A,a 2088 77,109: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorMST,fraCoPay.lblMST2); //M,m 2089 78,110: if (ssAlt in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorHNC,fraCoPay.lblHNC2); //N,n 2090 72,104: if (ssALT in Shift) then ShowTreatmentFactorHints(BAFactorsRec.FBAFactorSHAD,fraCopay.lblSHAD2); // H,h 1917 2091 //CQ5054 1918 2092 83,115: if (ssAlt in Shift) then … … 1949 2123 1950 2124 //BILLING AWARE Procedure 1951 procedure TfrmReview.ShowTreatmentFactorHints(var pHintText: string; var pCompName: T ORStaticText); // 5082125 procedure TfrmReview.ShowTreatmentFactorHints(var pHintText: string; var pCompName: TVA508StaticText); // 508 1952 2126 var 1953 2127 HRect: TRect; … … 1973 2147 hrect.Bottom := hrect.Bottom + Y; 1974 2148 1975 if FRVTFHintWindowActive then 1976 begin 1977 with fraCoPay do 1978 begin 1979 //Abbreviated captions 1980 Label23.ShowHint := false; 1981 StaticText1.ShowHint := false; 1982 Label17.ShowHint := false; 1983 Label15.ShowHint := false; 1984 Label13.ShowHint := false; 1985 Label11.ShowHint := false; 1986 lblHNC.ShowHint := false; 1987 //Long captions 1988 staticText4.ShowHint := false; 1989 Label17.ShowHint := false; 1990 Label18.ShowHint := false; 1991 Label15.ShowHint := false; 1992 Label16.ShowHint := false; 1993 Label13.ShowHint := false; 1994 Label14.ShowHint := false; 1995 Label11.ShowHint := false; 1996 Label12.ShowHint := false; 1997 lblHNC.ShowHint := false; 1998 lblHNC2.ShowHint := false; 1999 end; 2000 end 2001 else 2002 begin 2003 with fraCoPay do 2004 begin 2005 //Abbreviated captions 2006 Label23.ShowHint := true; 2007 StaticText1.ShowHint := true; 2008 Label17.ShowHint := true; 2009 Label15.ShowHint := true; 2010 Label13.ShowHint := true; 2011 Label11.ShowHint := true; 2012 lblHNC.ShowHint := true; 2013 //Long captions 2014 staticText4.ShowHint := true; 2015 Label17.ShowHint := true; 2016 Label18.ShowHint := true; 2017 Label15.ShowHint := true; 2018 Label16.ShowHint := true; 2019 Label13.ShowHint := true; 2020 Label14.ShowHint := true; 2021 Label11.ShowHint := true; 2022 Label12.ShowHint := true; 2023 lblHNC.ShowHint := true; 2024 lblHNC2.ShowHint := true; 2025 end; 2026 end; 2149 fraCoPay.LabelCaptionsOn(not FRVTFHintWindowActive); 2027 2150 2028 2151 FRVTFHintWindow.ActivateHint(hrect, pHintText); … … 2034 2157 Y: Integer); 2035 2158 begin 2036 // IF BILLING_AWARE then2037 2159 if FRVTFHintWindowActive then 2038 2160 begin … … 2042 2164 end; 2043 2165 2166 procedure TfrmReview.FormResize(Sender: TObject); 2167 begin 2168 inherited; 2169 lstReview.Invalidate; 2170 end; 2171 2044 2172 procedure TfrmReview.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer); 2045 2173 begin … … 2054 2182 procedure TfrmReview.fraCoPayLabel24MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); 2055 2183 begin 2056 if FRVTFHintWindowActive then 2057 begin 2058 with fraCoPay do 2059 begin 2060 //Abbreviated captions 2061 Label23.ShowHint := false; 2062 StaticText1.ShowHint := false; 2063 Label17.ShowHint := false; 2064 Label15.ShowHint := false; 2065 Label13.ShowHint := false; 2066 Label11.ShowHint := false; 2067 lblHNC.ShowHint := false; 2068 //Long captions 2069 Label24.ShowHint := false; 2070 staticText4.ShowHint := false; 2071 Label17.ShowHint := false; 2072 Label18.ShowHint := false; 2073 Label15.ShowHint := false; 2074 Label16.ShowHint := false; 2075 Label13.ShowHint := false; 2076 Label14.ShowHint := false; 2077 Label11.ShowHint := false; 2078 Label12.ShowHint := false; 2079 lblHNC.ShowHint := false; 2080 lblHNC2.ShowHint := false; 2081 end; 2082 end 2083 else 2084 begin 2085 with fraCoPay do 2086 begin 2087 //Abbreviated captions 2088 Label23.ShowHint := true; 2089 StaticText1.ShowHint := true; 2090 Label17.ShowHint := true; 2091 Label15.ShowHint := true; 2092 Label13.ShowHint := true; 2093 Label11.ShowHint := true; 2094 lblHNC.ShowHint := true; 2095 //Long captions 2096 Label24.ShowHint := true; 2097 staticText4.ShowHint := true; 2098 Label17.ShowHint := true; 2099 Label18.ShowHint := true; 2100 Label15.ShowHint := true; 2101 Label16.ShowHint := true; 2102 Label13.ShowHint := true; 2103 Label14.ShowHint := true; 2104 Label11.ShowHint := true; 2105 Label12.ShowHint := true; 2106 lblHNC.ShowHint := true; 2107 lblHNC2.ShowHint := true; 2108 end; 2109 end; 2184 fraCoPay.LabelCaptionsOn(not FRVTFHintWindowActive); 2110 2185 end; 2111 2186 … … 2120 2195 with fraCopay do 2121 2196 begin 2122 Label24.ShowHint := false; 2123 staticText4.ShowHint := false; 2124 Label18.ShowHint := false; 2125 Label16.ShowHint := false; 2126 Label14.ShowHint := false; 2127 Label12.ShowHint := false; 2128 lblHNC2.ShowHint := false; 2197 //Long captions 2198 lblSC.ShowHint := false; 2199 lblCV.ShowHint := false; 2200 lblAO.ShowHint := false; 2201 lblIR.ShowHint := false; 2202 lblSWAC.ShowHint := false; 2203 lblHNC.ShowHint := false; 2204 lblHNC2.ShowHint := false; 2205 lblSHAD2.ShowHint := false; 2129 2206 end; 2130 2207 end; … … 2140 2217 end; 2141 2218 end; 2142 {End BillingAware}2143 2144 end;2145 2146 procedure TfrmReview.fraCoPayLabel23Enter(Sender: TObject);2147 begin2148 (Sender as TORStaticText).Font.Style := [fsBold];2149 end;2150 2151 procedure TfrmReview.fraCoPayLabel23Exit(Sender: TObject);2152 begin2153 (Sender as TORStaticText).Font.Style := [];2154 2219 end; 2155 2220 … … 2181 2246 2182 2247 procedure TfrmReview.FormatListForScreenReader; 2183 var 2184 ListStateOn : longbool; 2185 Success: longbool; 2186 begin 2187 //Determine if a screen reader is currently being used. 2188 Success := SystemParametersInfo(SPI_GETSCREENREADER, 0, @ListStateOn,0); 2189 if Success and ListStateOn then 2248 begin 2249 if ScreenReaderActive then 2190 2250 SetItemTextToState; 2191 2251 end;
Note:
See TracChangeset
for help on using the changeset viewer.