Function

ForwardChrono

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Global

Declaration

function ForwardChrono(Item1, Item2: Pointer): Integer;

Called-By Hierarchy


                                              ForwardChrono
                                               SortOrders┘ 
                            TfrmOrders.RefreshOrderList┤   
                               TfrmOrders.NotifyOrder┤ │   
                               TfrmFrame.UMNewOrder┘ │ │   
                              TfrmOrders.SetOrderView┤ │   
                      TfrmOrders.mnuViewActiveClick┤ │ │   
                     TfrmOrders.mnuViewCurrentClick┤ │ │   
                    TfrmOrders.mnuViewExpiringClick┤ │ │   
                     TfrmOrders.mnuViewExpiredClick┤ │ │   
                    TfrmOrders.mnuViewUnsignedClick┤ │ │   
                  TfrmOrders.ProcessNotifications┘ │ │ │   
                         TfrmOrders.DisplayPage┘   │ │ │   
                       TfrmOrders.ViewAlertedOrders┘ │ │   
               TfrmOrders.ProcessNotifications...┘   │ │   
                        TfrmOrders.mnuViewCustomClick┤ │   
                      TfrmOrders.mnuViewDfltShowClick┤ │   
                             TfrmOrders.DisplayPage┘ │ │   
                            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...┤ │ │   
                                          ..(rec)..┤ │ │   
                           TfrmOrders.lstWriteClick┤ │ │   
                         TfrmOrders.mnuActCopyClick┤ │ │   
                         TfrmOrders.mnuActSignClick┤ │ │   
                          TfrmOrders.ResetOrderPage┤ │ │   
                  TfrmOrders.btnDelayedOrderClick┘ │ │ │   
              TfrmOrders.PlaceOrderForDefaultDialog┤ │ │   
                 TfrmOrders.DisplayDefaultDlgList┤ │ │ │   
                   TfrmOrders.ResetOrderPage...┘ │ │ │ │   
                                DisplayEvntDialog┤ │ │ │   
                            SetDelayEventForMed┘ │ │ │ │   
                     TfrmMeds.mnuActCopyClick┘   │ │ │ │   
                                DisplayEvntDialog┤ │ │ │   
                                 SetViewForCopy┘ │ │ │ │   
                   TfrmOrders.mnuActCopyClick┘   │ │ │ │   
                                DisplayEvntDialog┘ │ │ │   
                               ExecuteChangeEvt┘   │ │ │   
                TfrmOrders.mnuActChgEvntClick┘     │ │ │   
                           TfrmOrders.ClickLstSheet┤ │ │   
            TfraEvntDelayList.mlstEventsChange...┤ │ │ │   
                     TfrmOrders.ResetOrderPage...┤ │ │ │   
                        ExecuteReleaseEventOrders┘ │ │ │   
                      TfrmOrders.mnuActRelClick┘   │ │ │   
                        TfrmOrders.InitOrderSheets2┤ │ │   
                     TfrmFrame.mnuFileReviewClick┘ │ │ │   
                          TfrmOrders.PtEvtCompleted┤ │ │   
                       TfrmFrame.DetermineNextTab┤ │ │ │   
                     TfrmFrame.mnuFileOpenClick┤ │ │ │ │   
                         TfrmFrame.UMInitiate┤ │ │ │ │ │   
                   TfrmFrame.mnuFileNextClick┤ │ │ │ │ │   
              TfrmFrame.mnuFileOpenClick...┤ │ │ │ │ │ │   
          TfrmFrame.mnuFileNotifRemoveClick┤ │ │ │ │ │ │   
                  TfrmFrame.NextButtonClick┘ │ │ │ │ │ │   
                TfrmFrame.SetUpNextButton┘   │ │ │ │ │ │   
          TfrmFrame.mnuFileOpenClick...┤     │ │ │ │ │ │   
                   TfrmFrame.FormResize┘     │ │ │ │ │ │   
                 TfrmFrame.ChangeFont┘       │ │ │ │ │ │   
         TfrmFrame.LoadSizesForUser┤         │ │ │ │ │ │   
    TfrmFrame.LoadUserPreferences┘ │         │ │ │ │ │ │   
           TfrmFrame.UMInitiate┘   │         │ │ │ │ │ │   
         TfrmFrame.mnuFontSizeClick┘         │ │ │ │ │ │   
                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.UpdateCCOWContext┘ │ │ │ │   
                TfrmFrame.mnuFileOpenClick...┤   │ │ │ │   
              TfrmFrame.ctxContextorCommitted┤   │ │ │ │   
               TfrmFrame.StartCCOWContextor┘ │   │ │ │ │   
                     TfrmFrame.FormCreate┘   │   │ │ │ │   
       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.SaveSignOrders┤ │   
                          TfrmOrders.NotifyOrder...┘ │ │   
                           TfrmOrders.mnuActSignClick┤ │   
                 TfrmOrders.EventRealeasedOrder1Click┤ │   
                         TfrmOrders.ResetOrderPage...┤ │   
                         TfrmOrders.PtEvtCompleted...┤ │   
                        TfrmOrders.RefreshToFirstItem┤ │   
                              TfrmOrders.UMEventOccur┤ │   
                          TfrmOrders.hdrOrdersMouseUp┘ │   
                          TfrmODActive.LoadActiveOrders┘   
                              CopyActiveOrdersToEvent┘     
                       TfrmOrders.ResetOrderPage...┤       
                TfrmOrders.DisplayDefaultDlgList...┘       

Called-By

Name Declaration Comments
SortOrders procedure SortOrders(AList: TList; ByGroup, InvChron: Boolean); -


Source

997   function ForwardChrono(Item1, Item2: Pointer): Integer;
998   var
999     Order1, Order2: TOrder;
1000    IFN1, IFN2: Integer;
1001  begin
1002    Order1 := TOrder(Item1);
1003    Order2 := TOrder(Item2);
1004    if Order1.OrderTime < Order2.OrderTime then Result := -1
1005    else if Order1.OrderTime > Order2.OrderTime then Result := 1
1006    else Result := 0;
1007    if Result = 0 then
1008    begin
1009      IFN1 := StrToIntDef(Piece(Order1.ID, ';', 1), 0);
1010      IFN2 := StrToIntDef(Piece(Order2.ID, ';', 1), 0);
1011      if IFN1 < IFN2 then Result := -1;
1012      if IFN1 > IFN2 then Result := 1;
1013    end;
1014  end;