Ignore:
Timestamp:
May 8, 2015, 7:52:55 AM (10 years ago)
Author:
healthsevak
Message:

Committing the files for first time to this new branch

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/branches/HealthSevak-CPRS/CPRS-Chart/Orders/fOrders.pas

    r829 r1693  
    163163      Section: THeaderSection);
    164164    procedure sptHorzMoved(Sender: TObject);
     165    procedure sptVertMoved(Sender: TObject);
    165166  private
    166167    { Private declarations }
     
    225226    function AllowContextChange(var WhyNot: string): Boolean; override;
    226227    function PlaceOrderForDefaultDialog(ADlgInfo: string; IsDefaultDialog: boolean; AEvent: TOrderDelayEvent): boolean;
    227     function PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean = False): boolean;
     228    function PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean = False; Signing: boolean = False): boolean;
    228229    procedure RefreshToFirstItem;
    229230    procedure ChangesUpdate(APtEvtID: string);
     
    11761177    FCompress := False;
    11771178  end;
    1178 
     1179  //CQ 18660 Orders for events should be modal. Orders for non-event should not be modal
     1180  if AnOrderView.EventDelay.EventIFN = 0 then NeedShowModal := False
     1181  else NeedShowModal := True;
    11791182  if (FCurrentView <> nil) and (AnOrderView.EventDelay.EventIFN <> FCurrentView.EventDelay.EventIFN) and (FCurrentView.EventDelay.EventIFN > 0 ) then
    11801183  begin
     
    13981401      begin
    13991402        result := MixedCase(ProviderName);
    1400         result := Piece(result, ',', 1) + ',' + Copy(Piece(result, ',', 2), 1, 1);
     1403//        result := Piece(result, ',', 1) + ',' + Copy(Piece(result, ',', 2), 1, 1);
     1404// CQ#15915
     1405        result := Piece(result, ',', 1) + ',' + Piece(result, ',', 2);
    14011406      end;
    14021407      5: result := VerNurse;
     
    23502355  ALocation: Integer;
    23512356  AName: string;
    2352 begin
    2353   inherited;
     2357  Delayed: boolean;
     2358begin
     2359  inherited;
     2360  Delayed := False;
    23542361  if NoneSelected(TX_NOSEL_SIGN) then Exit;
    23552362  if not AuthorizedUser then Exit;
     
    23752382  if not LockedForOrdering then Exit;
    23762383
    2377   if (FCurrentView.EventDelay.PtEventIFN>0) and (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName)) then
    2378     Exit;
     2384  //CQ 18392 and CQ 18121 Made changes to this code, PtEVTComplete function and the finally statement at the end to support the fix for these CQs
     2385  if (FCurrentView.EventDelay.PtEventIFN>0) then
     2386      Delayed := (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName, false, true));
     2387  //if (FCurrentView.EventDelay.PtEventIFN>0) and (PtEvtCompleted(FCurrentView.EventDelay.PtEventIFN, FCurrentView.EventDelay.EventName)) then
     2388  //  Exit;
    23792389
    23802390  SelectedList := TList.Create;
     
    24132423    SelectedList.Free;
    24142424    UnlockIfAble;
     2425    //CQ #17491: Added UpdatePtInfoOnRefresh here to allow for the updating of the patient
     2426    //status indicator in the header bar if the patient becomes admitted/discharged.
     2427    frmFrame.UpdatePtInfoOnRefresh;
     2428    if Delayed = True then
     2429      begin
     2430        InitOrderSheetsForEvtDelay;
     2431        lstSheets.ItemIndex := 0;
     2432        lstSheetsClick(self);
     2433        RefreshOrderList(True);
     2434      end;
    24152435  end;
    24162436end;
     
    32433263end;
    32443264
    3245 function TfrmOrders.PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean): boolean;
     3265function TfrmOrders.PtEvtCompleted(APtEvtID: integer; APtEvtName: string; FromMeds: boolean; Signing: boolean): boolean;
    32463266begin
    32473267  Result := False;
     
    32533273      InfoBox('The event "Delayed ' + APtEvtName + '" ' + TX_CMPTEVT, 'Warning', MB_OK or MB_ICONWARNING);
    32543274    GroupChangesUpdate('Delayed ' + APtEvtName);
     3275    if signing = true then
     3276      begin
     3277        Result := True;
     3278        exit;
     3279      end;
    32553280    InitOrderSheetsForEvtDelay;
    32563281    lstSheets.ItemIndex := 0;
     
    33383363        hdrOrders.Sections[i].Width := origWidths[i];
    33393364      lstOrders.Invalidate;
     3365      RefreshOrderList(false);
    33403366    end;
    33413367  end;
     
    34743500end;
    34753501
     3502procedure TfrmOrders.sptVertMoved(Sender: TObject);
     3503begin
     3504  inherited;
     3505  if self.sptVert.Top < self.lstSheets.Constraints.MinHeight then
     3506     self.sptVert.Top := self.lstSheets.Constraints.MinHeight + 1;
     3507 
     3508end;
     3509
    34763510initialization
    34773511  SpecifyFormIsNotADialog(TfrmOrders);
Note: See TracChangeset for help on using the changeset viewer.