Function

CloseOrdering

Module

uOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

function CloseOrdering: Boolean;

Called-By Hierarchy


                                          CloseOrdering
                                     ReadyForNewOrder┤ 
                          TfrmRemDlg.btnFinishClick┤ │ 
          TfrmConsults.mnuActNewConsultRequestClick┤ │ 
                  TfrmConsults.cmdNewConsultClick┘ │ │ 
               TfrmConsults.mnuActNewProcedureClick┤ │ 
                     TfrmConsults.cmdNewProcClick┘ │ │ 
                                       ChangeOrders┤ │ 
                     TfrmOrders.mnuActChangeClick┤ │ │ 
                       TfrmMeds.mnuActChangeClick┘ │ │ 
                                    ChangeOrdersEvt┤ │ 
                                         CopyOrders┤ │ 
                       TfrmOrders.mnuActCopyClick┤ │ │ 
                         TfrmMeds.mnuActCopyClick┤ │ │ 
                          TfrmODActive.btnOKClick┘ │ │ 
                                     TransferOrders┤ │ 
                       TfrmOrders.mnuActCopyClick┤ │ │ 
                         TfrmMeds.mnuActCopyClick┤ │ │ 
                          TfrmODActive.btnOKClick┘ │ │ 
                           TfrmOrders.lstWriteClick┤ │ 
                            TfrmMeds.mnuActNewClick┘ │ 
                                    ReadyForNewOrder1┤ 
              TfrmOrders.PlaceOrderForDefaultDialog┘ │ 
                 TfrmOrders.DisplayDefaultDlgList┤   │ 
                      TfrmOrders.ResetOrderPage┘ │   │ 
              TfrmOrders.btnDelayedOrderClick┘   │   │ 
                                DisplayEvntDialog┤   │ 
                            SetDelayEventForMed┘ │   │ 
                     TfrmMeds.mnuActCopyClick┘   │   │ 
                                DisplayEvntDialog┤   │ 
                                 SetViewForCopy┘ │   │ 
                   TfrmOrders.mnuActCopyClick┘   │   │ 
                                DisplayEvntDialog┘   │ 
                               ExecuteChangeEvt┘     │ 
                TfrmOrders.mnuActChgEvntClick┘       │ 
                        TfrmOrders.AllowContextChange┤ 
                    TfrmFrame.AllowContextChangeAll┘ │ 
                         TfrmFrame.FormCloseQuery┤   │ 
                       TfrmFrame.mnuFileNextClick┤   │ 
                     TfrmFrame.mnuFileOpenClick┤ │   │ 
                         TfrmFrame.UMInitiate┤ │ │   │ 
                TfrmFrame.mnuFileNextClick...┤ │ │   │ 
                TfrmFrame.mnuFileRefreshClick┤ │ │   │ 
                TfrmOrders.CheckOrderStatus┤ │ │ │   │ 
            TfrmOrders.mnuActChgEvntClick┤ │ │ │ │   │ 
               TfrmOrders.mnuActHoldClick┤ │ │ │ │   │ 
             TfrmOrders.mnuActUnholdClick┤ │ │ │ │   │ 
              TfrmOrders.mnuActRenewClick┤ │ │ │ │   │ 
             TfrmOrders.mnuActChangeClick┤ │ │ │ │   │ 
               TfrmOrders.mnuActCopyClick┘ │ │ │ │   │ 
                     TfrmMeds.mnuActDCClick┤ │ │ │   │ 
                    TfrmMeds.CheckMedStatus┘ │ │ │   │ 
                 TfrmMeds.mnuActHoldClick┤   │ │ │   │ 
                TfrmMeds.mnuActRenewClick┤   │ │ │   │ 
               TfrmMeds.mnuActUnholdClick┤   │ │ │   │ 
               TfrmMeds.mnuActChangeClick┤   │ │ │   │ 
                 TfrmMeds.mnuActCopyClick┤   │ │ │   │ 
               TfrmMeds.mnuActRefillClick┘   │ │ │   │ 
                           TfrmFrame.ViewInfo┘ │ │   │ 
                        TfrmDCSumm.ViewInfo┤   │ │   │ 
                      TfrmConsults.ViewInfo┤   │ │   │ 
              TfrmFrame.pnlRemindersMouseUp┤   │ │   │ 
               TfrmFrame.RemindersChanged┘ │   │ │   │ 
                   TfrmFrame.FormCreate┘   │   │ │   │ 
                     TfrmFrame.pnlCIRNClick┤   │ │   │ 
               TfrmFrame.pnlVistaWebClick┤ │   │ │   │ 
                    TfrmFrame.FormKeyDown┘ │   │ │   │ 
                  TfrmFrame.pnlPatientClick┤   │ │   │ 
                    TfrmFrame.pnlVisitClick┤   │ │   │ 
              TfrmFrame.pnlPrimaryCareClick┤   │ │   │ 
                TfrmFrame.pnlRemindersClick┤   │ │   │ 
                 TfrmFrame.pnlPostingsClick┤   │ │   │ 
                     TfrmFrame.pnlFlagClick┤   │ │   │ 
                       TfrmFrame.laMHVClick┤   │ │   │ 
                      TfrmFrame.laVAA2Click┤   │ │   │ 
                        TfrmOrders.ViewInfo┤   │ │   │ 
                          TfrmMeds.ViewInfo┤   │ │   │ 
                       TfrmSurgery.ViewInfo┤   │ │   │ 
                         TfrmNotes.ViewInfo┤   │ │   │ 
                      TfrmProblems.ViewInfo┘   │ │   │ 
              TfrmFrame.mnuFileNotifRemoveClick┤ │   │ 
                      TfrmFrame.NextButtonClick┘ │   │ 
                    TfrmFrame.SetUpNextButton┘   │   │ 
              TfrmFrame.mnuFileOpenClick...┤     │   │ 
                       TfrmFrame.FormResize┘     │   │ 
                     TfrmFrame.ChangeFont┘       │   │ 
             TfrmFrame.LoadSizesForUser┤         │   │ 
        TfrmFrame.LoadUserPreferences┘ │         │   │ 
               TfrmFrame.UMInitiate┘   │         │   │ 
             TfrmFrame.mnuFontSizeClick┘         │   │ 
                    TfrmFrame.mnuFileOpenClick...┤   │ 
                    TfrmFrame.ctxContextorPending┤   │ 
                   TfrmFrame.StartCCOWContextor┘ │   │ 
                         TfrmFrame.FormCreate┘   │   │ 
                  TfrmFrame.ctxContextorCommitted┤   │ 
                TfrmFrame.StartCCOWContextor...┘ │   │ 
           TfrmFrame.mnuFileResumeContextGetClick┤   │ 
           TfrmFrame.mnuFileResumeContextSetClick┘   │ 
                            TfrmOrders.lstSheetsClick┤ 
                       TfraEvntDelayList.CheckMatch┤ │ 
                          TfrmOrdersTS.cmdOKClick┘ │ │ 
TfrmOrdersTS.fraEvntDelayListmlstEventsDblClick┤   │ │ 
                       TfrmOrdersTS.FormKeyDown┘   │ │ 
                 TfraEvntDelayList.mlstEventsChange┤ │ 
   TfrmOrdersTS.fraEvntDelayListcboEvntListChange┤ │ │ 
    TfrmOrdersTS.fraEvntDelayListmlstEventsChange┤ │ │ 
    TfrmMedCopy.fraEvntDelayListcboEvntListChange┤ │ │ 
     TfrmMedCopy.fraEvntDelayListmlstEventsChange┤ │ │ 
 TfrmCopyOrders.fraEvntDelayListcboEvntListChange┤ │ │ 
  TfrmCopyOrders.fraEvntDelayListmlstEventsChange┘ │ │ 
                    TfrmOrders.mnuViewDfltShowClick┤ │ 
                           TfrmOrders.DisplayPage┘ │ │ 
                                          ..(rec)..┤ │ 
                           TfrmOrders.lstWriteClick┤ │ 
                         TfrmOrders.mnuActCopyClick┤ │ 
                         TfrmOrders.mnuActSignClick┤ │ 
                       TfrmOrders.ResetOrderPage...┤ │ 
           TfrmOrders.PlaceOrderForDefaultDialog...┤ │ 
                           TfrmOrders.ClickLstSheet┤ │ 
            TfraEvntDelayList.mlstEventsChange...┤ │ │ 
                     TfrmOrders.ResetOrderPage...┤ │ │ 
                        ExecuteReleaseEventOrders┘ │ │ 
                      TfrmOrders.mnuActRelClick┘   │ │ 
                        TfrmOrders.InitOrderSheets2┤ │ 
                     TfrmFrame.mnuFileReviewClick┘ │ │ 
                          TfrmOrders.PtEvtCompleted┤ │ 
                       TfrmFrame.DetermineNextTab┤ │ │ 
                  TfrmFrame.mnuFileOpenClick...┤ │ │ │ 
                    TfrmFrame.UpdateCCOWContext┘ │ │ │ 
                TfrmFrame.mnuFileOpenClick...┤   │ │ │ 
           TfrmFrame.ctxContextorCommitted...┤   │ │ │ 
       TfrmFrame.mnuFileResumeContextGetClick┘   │ │ │ 
                     TfrmFrame.mnuFileReviewClick┤ │ │ 
                     TfrmOrders.lstSheetsClick...┤ │ │ 
                         TfrmOrders.lstWriteClick┤ │ │ 
                         TfrmOrders.mnuActDCClick┤ │ │ 
                    TfrmOrders.mnuActChgEvntClick┤ │ │ 
                       TfrmOrders.mnuActHoldClick┤ │ │ 
                       TfrmOrders.mnuActFlagClick┤ │ │ 
                    TfrmOrders.mnuActCommentClick┤ │ │ 
                     TfrmOrders.mnuActChangeClick┤ │ │ 
                       TfrmOrders.mnuActCopyClick┤ │ │ 
                       TfrmOrders.mnuActSignClick┤ │ │ 
                  TfrmOrders.btnDelayedOrderClick┤ │ │ 
                         TfrmMeds.mnuActCopyClick┤ │ │ 
                          TfrmODActive.btnOKClick┘ │ │ 
                            TfrmOrders.UMEventOccur┤ │ 
                           TfrmMeds.mnuActCopyClick┤ │ 
                            TfrmMeds.mnuActNewClick┤ │ 
                             SetDelayEventForMed...┤ │ 
                                  SetViewForCopy...┤ │ 
                          TfrmCopyOrders.cmdOKClick┤ │ 
                      TfrmCopyOrders.UMStillDelay┤ │ │ 
TfrmCopyOrders.fraEvntDelayListmlstEventsDblClick┤ │ │ 
                       TfrmCopyOrders.FormKeyDown┘ │ │ 
                                ExecuteChangeEvt...┤ │ 
                                    ExecuteDCOrders┘ │ 
                         TfrmOrders.mnuActDCClick┤   │ 
                           TfrmMeds.mnuActDCClick┘   │ 
                      TfrmOrders.btnDelayedOrderClick┘ 

Called-By

Name Declaration Comments
TfrmOrders.AllowContextChange function AllowContextChange(var WhyNot: string): Boolean; override; -
TfrmOrders.btnDelayedOrderClick procedure btnDelayedOrderClick(Sender: TObject); -
TfrmOrders.lstSheetsClick procedure lstSheetsClick(Sender: TObject); -
ReadyForNewOrder function ReadyForNewOrder(AnEvent: TOrderDelayEvent): Boolean; -
ReadyForNewOrder1 function ReadyForNewOrder1(AnEvent: TOrderDelayEvent): Boolean; -


Source

1533  function CloseOrdering: Boolean;
1534  begin
1535    Result := False;
1536    { if an order set is being processed, see if want to interupt }
1537    if uOrderSet <> nil then
1538    begin
1539      uOrderSet.Close;
1540      Application.ProcessMessages;
1541      if uOrderSet <> nil then Exit;
1542    end;
1543    { if another ordering dialog is showing, make sure it is closed first }
1544    if uOrderDialog <> nil then
1545    begin
1546      uOrderDialog.Close;
1547      Application.ProcessMessages;  // allow close to finish
1548      if uOrderDialog <> nil then Exit;
1549    end;
1550    if uOrderHTML <> nil then
1551    begin
1552      uOrderHTML.Close;
1553      Application.ProcessMessages;  // allow browser to close
1554      Assert(uOrderHTML = nil);
1555    end;
1556    { close any open ordering menu }
1557    if uOrderMenu <> nil then
1558    begin
1559      uOrderMenu.Close;
1560      Application.ProcessMessages;  // allow menu to close
1561      Assert(uOrderMenu = nil);
1562    end;
1563    if uOrderAction <> nil then
1564    begin
1565      uOrderAction.Close;
1566      Application.ProcessMessages;
1567      if uOrderAction <> nil then Exit;
1568    end;
1569    if frmARTAllergy <> nil then   //SMT Add to account for allergies.
1570    begin
1571      frmARTAllergy.Close;
1572      Application.ProcessMessages;
1573      if frmARTAllergy <> nil then Exit;
1574    end;
1575  
1576    Result := True;
1577  end;