Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Orders/fOrdersSign.pas

    r829 r1679  
    77uses
    88  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,
    1010  ComCtrls, CheckLst, ExtCtrls, uConsults, UBAGlobals,UBACore, UBAMessages, UBAConst,
    1111  Menus, ORClasses, fBase508Form, fPrintLocation, VA508AccessibilityManager;
     
    211211  OrderText, ASvc: string;
    212212  PrintLoc: Integer;
    213   AList, ClinicList, DCList, OrderPrintList, WardList: TStringList;
     213  AList, ClinicList, OrderPrintList, WardList: TStringList;
    214214  EncLocName, EncLocText: string;
    215215  EncLocIEN: integer;
    216216  EncDT: TFMDateTime;
    217217  EncVC: Char;
     218  //ChangeItem: TChangeItem;
    218219
    219220  function FindOrderText(const AnID: string): string;
     
    330331    end;
    331332
    332       frmSignOrders.ShowModal;
     333     frmSignOrders.ShowModal;
    333334      if frmSignOrders.OKPressed then
    334335      begin
     
    428429               if (Patient.Inpatient = True) and (Encounter.Location <> Patient.Location) then
    429430                   begin
    430                      DCList := TStringList.Create;
    431431                     EncLocName := Encounter.LocationName;
    432432                     EncLocIEN  := Encounter.Location;
     
    440440                         if TOrder(SelectedList.Items[i]).DGroupName = 'Clinic Orders' then ContainsIMOOrders := true;
    441441                         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
     442                         if (Pos('DC', TOrder(SelectedList.Items[i]).ActionOn) > 0) or
     443                            (TOrder(SelectedList.Items[i]).IsOrderPendDC = true) then
    444444                           begin
    445                              DCList.Add(TOrder(SelectedList.Items[i]).ID);
     445                             WardList.Add(TOrder(SelectedList.Items[i]).ID);
    446446                             Continue;
    447447                           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;                         
    448452                         OrderPrintList.Add(TOrder(SelectedList.Items[i]).ID + ':' + TOrder(SelectedList.Items[i]).Text);
    449453                       end;
     
    452456                          frmPrintLocation.PrintLocation(OrderPrintList, EncLocIEN, EncLocName, EncLocText, EncDT, EncVC, ClinicList,
    453457                                                        WardList, WardIen,WardName, ContainsIMOOrders, true);
    454                           fframe.frmFrame.OrderPrintForm := false;
     458                          //fframe.frmFrame.OrderPrintForm := false;
    455459                        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);
    463462                        end;
    464                       if DCList <> nil then DCList.Free;
    465                    end;
    466463            end;
    467464            uCore.TempEncounterLoc := 0;
     
    473470          end;
    474471
     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
    475474            with SignList do if Count > 0 then for i := 0 to Count - 1 do
    476475            begin
     
    478477                begin
    479478                  OrderText := FindOrderText(Piece(SignList[i], U, 1));
    480                   if Piece(SignList[i],U,4) = 'Invalid Pharmacy order number' then
     479                  if Piece(SignList[i],U,4) = TX_SAVERR_PHARM_ORD_NUM_SEARCH_STRING then
    481480                  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)
    484485                  else
    485486                  InfoBox(TX_SAVERR1 + Piece(SignList[i], U, 4) + TX_SAVERR2 + OrderText,
Note: See TracChangeset for help on using the changeset viewer.