Changeset 1679 for cprs/trunk/CPRS-Chart/Orders/fOrdersSign.pas
- Timestamp:
- May 7, 2015, 12:34:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cprs/trunk/CPRS-Chart/Orders/fOrdersSign.pas
r829 r1679 7 7 uses 8 8 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, 9 fAutoSz, StdCtrls, ORFn, ORCtrls, AppEvnts, mCoPayDesc, XUDIGSIGSC_TLB,9 fAutoSz, StdCtrls, StrUtils, ORFn, ORCtrls, AppEvnts, mCoPayDesc, XUDIGSIGSC_TLB, 10 10 ComCtrls, CheckLst, ExtCtrls, uConsults, UBAGlobals,UBACore, UBAMessages, UBAConst, 11 11 Menus, ORClasses, fBase508Form, fPrintLocation, VA508AccessibilityManager; … … 211 211 OrderText, ASvc: string; 212 212 PrintLoc: Integer; 213 AList, ClinicList, DCList,OrderPrintList, WardList: TStringList;213 AList, ClinicList, OrderPrintList, WardList: TStringList; 214 214 EncLocName, EncLocText: string; 215 215 EncLocIEN: integer; 216 216 EncDT: TFMDateTime; 217 217 EncVC: Char; 218 //ChangeItem: TChangeItem; 218 219 219 220 function FindOrderText(const AnID: string): string; … … 330 331 end; 331 332 332 333 frmSignOrders.ShowModal; 333 334 if frmSignOrders.OKPressed then 334 335 begin … … 428 429 if (Patient.Inpatient = True) and (Encounter.Location <> Patient.Location) then 429 430 begin 430 DCList := TStringList.Create;431 431 EncLocName := Encounter.LocationName; 432 432 EncLocIEN := Encounter.Location; … … 440 440 if TOrder(SelectedList.Items[i]).DGroupName = 'Clinic Orders' then ContainsIMOOrders := true; 441 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) > 0then442 if (Pos('DC', TOrder(SelectedList.Items[i]).ActionOn) > 0) or 443 (TOrder(SelectedList.Items[i]).IsOrderPendDC = true) then 444 444 begin 445 DCList.Add(TOrder(SelectedList.Items[i]).ID);445 WardList.Add(TOrder(SelectedList.Items[i]).ID); 446 446 Continue; 447 447 end; 448 //ChangeItem := Changes.Locate(20,TOrder(SelectedList.Items[i]).ID); 449 //if ChangeItem = nil then continue; 450 //if ChangeItem.Delay = true then continue; 451 if TOrder(SelectedList.Items[i]).IsDelayOrder = true then continue; 448 452 OrderPrintList.Add(TOrder(SelectedList.Items[i]).ID + ':' + TOrder(SelectedList.Items[i]).Text); 449 453 end; … … 452 456 frmPrintLocation.PrintLocation(OrderPrintList, EncLocIEN, EncLocName, EncLocText, EncDT, EncVC, ClinicList, 453 457 WardList, WardIen,WardName, ContainsIMOOrders, true); 454 fframe.frmFrame.OrderPrintForm := false;458 //fframe.frmFrame.OrderPrintForm := false; 455 459 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); 460 else if (clinicList.count = 0) and (wardList.Count = 0) then DoNotPrint := True; 461 if (WardIEN = 0) and (WardName = '') then CurrentLocationForPatient(Patient.DFN, WardIEN, WardName, ASvc); 463 462 end; 464 if DCList <> nil then DCList.Free;465 end;466 463 end; 467 464 uCore.TempEncounterLoc := 0; … … 473 470 end; 474 471 472 //CQ #15813 Modified code to look for error string mentioned in CQ and change strings to conts - JCS 473 //CQ #15813 Adjusted code to handle error message properly - TDP 475 474 with SignList do if Count > 0 then for i := 0 to Count - 1 do 476 475 begin … … 478 477 begin 479 478 OrderText := FindOrderText(Piece(SignList[i], U, 1)); 480 if Piece(SignList[i],U,4) = 'Invalid Pharmacy order number'then479 if Piece(SignList[i],U,4) = TX_SAVERR_PHARM_ORD_NUM_SEARCH_STRING then 481 480 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) 481 TX_SAVERR_PHARM_ORD_NUM, TC_SAVERR, MB_OK) 482 else if AnsiContainsStr(Piece(SignList[i],U,4), TX_SAVERR_IMAGING_PROC_SEARCH_STRING) then 483 InfoBox(TX_SAVERR1 + Piece(SignList[i], U, 4) + TX_SAVERR2 + OrderText + CRLF + CRLF + 484 TX_SAVERR_IMAGING_PROC, TC_SAVERR, MB_OK) 484 485 else 485 486 InfoBox(TX_SAVERR1 + Piece(SignList[i], U, 4) + TX_SAVERR2 + OrderText,
Note:
See TracChangeset
for help on using the changeset viewer.