Procedure

LoadOrdersAbbr

Directives

Overload

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

Filter, Specialty, Groups: Integer; var TextView: Integer;
  var CtxtTime: TFMDateTime);

Scope

Interfaced

Declaration

procedure LoadOrdersAbbr(Dest: TList; AView: TOrderView; APtEvtID: string); overload;

Calls Hierarchy


LoadOrdersAbbr
 ├ClearOrders
 ├LoadDGroupMap
 ├ExpiredOrdersStartDT
 ├FMNow
 └SeqOfDGroup
   └LoadDGroupMap

Called-By Hierarchy


                                              LoadOrdersAbbr
                                  CheckForAutoDCDietOrders┤ 
                               TfrmODBase.cmdAcceptClick┤ │ 
                                   ActivateOrderDialog┘ │ │ 
                           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┤   │ │ 
               TfrmOrders.PlaceOrderForDefaultDialog┤   │ │ 
                  TfrmOrders.DisplayDefaultDlgList┤ │   │ │ 
                       TfrmOrders.ResetOrderPage┘ │ │   │ │ 
               TfrmOrders.btnDelayedOrderClick┘   │ │   │ │ 
                                 DisplayEvntDialog┤ │   │ │ 
                             SetDelayEventForMed┘ │ │   │ │ 
                      TfrmMeds.mnuActCopyClick┘   │ │   │ │ 
                                 DisplayEvntDialog┤ │   │ │ 
                                  SetViewForCopy┘ │ │   │ │ 
                    TfrmOrders.mnuActCopyClick┘   │ │   │ │ 
                                 DisplayEvntDialog┘ │   │ │ 
                                ExecuteChangeEvt┘   │   │ │ 
                 TfrmOrders.mnuActChgEvntClick┘     │   │ │ 
                             TfrmMeds.mnuActNewClick┤   │ │ 
                           TfrmOMNavA.ActivateDialog┤   │ │ 
                         TfrmOMNavA.grdMenuKeyDown┤ │   │ │ 
                         TfrmOMNavA.grdMenuMouseUp┘ │   │ │ 
                                TfrmOMSet.DoNextItem┘   │ │ 
                              TfrmOMSet.InsertList┤     │ │ 
                               ActivateOrderList┘ │     │ │ 
                     TfrmRemDlg.btnFinishClick┤   │     │ │ 
                             ActivateOrderHTML┤   │     │ │ 
                    TfrmOrders.lstWriteClick┤ │   │     │ │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┘ │   │     │ │ 
                              ActivateOrderSet┤   │     │ │ 
                   TfrmRemDlg.btnFinishClick┤ │   │     │ │ 
TfrmConsults.mnuActNewConsultRequestClick...┤ │   │     │ │ 
     TfrmConsults.mnuActNewProcedureClick...┤ │   │     │ │ 
                    TfrmOrders.lstWriteClick┤ │   │     │ │ 
    TfrmOrders.PlaceOrderForDefaultDialog...┤ │   │     │ │ 
                     TfrmMeds.mnuActNewClick┤ │   │     │ │ 
                TfrmOMNavA.ActivateDialog...┤ │   │     │ │ 
                     TfrmOMSet.DoNextItem...┘ │   │     │ │ 
                       TfrmOMNavA.DoSelectList┘   │     │ │ 
                     TfrmOMNavA.grdMenuKeyUp┤     │     │ │ 
                   TfrmOMNavA.grdMenuMouseUp┘     │     │ │ 
                                        SkipToNext┤     │ │ 
                         TfrmOMSet.DoNextItem...┘ │     │ │ 
                            TfrmOMSet.UMDelayEvent┘     │ │ 
                                  ActivateOrderDialog...┤ │ 
                                TfrmODDiet.nbkDietChange┘ │ 
                                 TfrmODDiet.InitDialog┤   │ 
                                TfrmODDiet.SetupDialog┤   │ 
                                             ..(rec)..┘   │ 
                               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.PlaceOrderForDefaultDialog...┤ │ │ 
                              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...┘     

Calls

Name Declaration Comments
ClearOrders procedure ClearOrders(AList: TList); -
ExpiredOrdersStartDT function ExpiredOrdersStartDT: TFMDateTime; -
FMNow function FMNow: TFMDateTime; -
LoadDGroupMap procedure LoadDGroupMap; -
SeqOfDGroup function SeqOfDGroup(IEN: Integer): Integer; -

Called-By

Name Declaration Comments
CheckForAutoDCDietOrders procedure CheckForAutoDCDietOrders(EvtID: integer; DispGrp: integer; CurrentText: string; var CancelText: string; Sender: TObject); -
TfrmODActive.LoadActiveOrders procedure LoadActiveOrders; -
TfrmOrders.RefreshOrderList procedure RefreshOrderList(FromServer: Boolean; APtEvtID: string = ''); -


Source

678   procedure LoadOrdersAbbr(Dest: TList; AView: TOrderView; APtEvtID: string);
679   //Filter, Specialty, Groups: Integer; var TextView: Integer;
680   //  var CtxtTime: TFMDateTime);
681   var
682     i: Integer;
683     AnOrder: TOrder;
684     FilterTS: string;
685     AlertedUserOnly: boolean;
686   begin
687     ClearOrders(Dest);
688     if uDGroupMap = nil then LoadDGroupMap;  // to make sure broker not called while looping thru Results
689     FilterTS := IntToStr(AView.Filter) + U + IntToStr(AView.EventDelay.Specialty);
690     AlertedUserOnly := (Notifications.Active and (AView.Filter = 12));
691     CallV('ORWORR AGET', [Patient.DFN, FilterTS, AView.DGroup, AView.TimeFrom, AView.TimeThru, APtEvtID, AlertedUserOnly]);
692     if ((Piece(RPCBrokerV.Results[0], U, 1) = '0') or (Piece(RPCBrokerV.Results[0], U, 1) = '')) and (AView.Filter = 5) then      // if no expiring orders found display expired orders)
693     begin
694       CallV('ORWORR AGET', [Patient.DFN, '27^0', AView.DGroup, ExpiredOrdersStartDT, FMNow, APtEvtID]);
695       AView.ViewName := 'Recently Expired Orders (No Expiring Orders Found) -' + Piece(AView.ViewName, '-', 2);
696     end;
697     {if (Piece(RPCBrokerV.Results[0], U, 1) = '0') or (Piece(RPCBrokerV.Results[0], U, 1) = '') then      // if no orders found (0 element is count)
698     begin
699       AnOrder := TOrder.Create;
700       with AnOrder do
701       begin
702         ID := '0';
703         DGroup := 0;
704         OrderTime := FMNow;
705         Status := 97;
706         Text := 'No orders found.';
707         Retrieved := True;
708       end;
709       Dest.Add(AnOrder);
710       Exit;
711     end;}
712     AView.TextView := StrToIntDef(Piece(RPCBrokerV.Results[0], U, 2), 0);
713     AView.CtxtTime := MakeFMDateTime(Piece(RPCBrokerV.Results[0], U, 3));
714     with RPCBrokerV do for i := 1 to Results.Count - 1 do   // if orders found (skip 0 element)
715     begin
716       if (Piece(RPCBrokerV.Results[i], U, 1) = '0') or (Piece(RPCBrokerV.Results[i], U, 1) = '') then Continue;  
717       if (DelimCount(Results[i],U) = 2) then Continue;  
718       AnOrder := TOrder.Create;
719       with AnOrder do
720       begin
721         ID := Piece(Results[i], U, 1);
722         DGroup := StrToIntDef(Piece(Results[i], U, 2), 0);
723         OrderTime := MakeFMDateTime(Piece(Results[i], U, 3));
724         EventPtr  := Piece(Results[i],U,4);
725         EventName := Piece(Results[i],U,5);
726         DGroupSeq  := SeqOfDGroup(DGroup);
727       end;
728       Dest.Add(AnOrder);
729     end;
730   end;