Procedure

TfrmOrders.InitOrderSheets

Module

fOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

Sets up list of order sheets based on what orders are on the server in delayed status for pt

Visibility

Private

Owner

TfrmOrders

Declaration

procedure InitOrderSheets;

Calls Hierarchy


TfrmOrders.InitOrderSheets
 ├TfrmOrders.ClearOrderSheets
 ├LoadOrderSheetsED
 ├DGroupAll
 └EventInfo

Called-By Hierarchy


                               TfrmOrders.InitOrderSheets
                                 TfrmOrders.DisplayPage┤ 
                  TfrmOrders.InitOrderSheetsForEvtDelay┤ 
                            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.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.lstWriteClick┤ │ 
                           TfrmOrders.mnuActCopyClick┤ │ 
                           TfrmOrders.mnuActSignClick┤ │ 
                         TfrmOrders.PtEvtCompleted...┤ │ 
                        TfrmOrders.RefreshToFirstItem┤ │ 
                              TfrmOrders.UMEventOccur┤ │ 
                             TfrmMeds.mnuActCopyClick┤ │ 
                                            Highlight┤ │ 
                             SetDelayEventForMed...┘ │ │ 
                                            Highlight┤ │ 
                                  SetViewForCopy...┘ │ │ 
                         ExecuteReleaseEventOrders...┤ │ 
                                  ExecuteChangeEvt...┤ │ 
                               TfrmChgEvent.Highlight┤ │ 
                                ExecuteChangeEvt...┘ │ │ 
                                   ExecuteDCOrders...┘ │ 
                         TfrmOrders.InitOrderSheets2...┘ 

Calls

Name Declaration Comments
TfrmOrders.ClearOrderSheets procedure ClearOrderSheets; -
DGroupAll function DGroupAll: Integer; -
EventInfo function EventInfo(APtEvtID: string): string; -
LoadOrderSheetsED procedure LoadOrderSheetsED(Dest: TStrings); -

Called-By

Name Declaration Comments
TfrmOrders.DisplayPage procedure DisplayPage; override; -
TfrmOrders.InitOrderSheets2 procedure InitOrderSheets2(AnItem: string = ''); -
TfrmOrders.InitOrderSheetsForEvtDelay procedure InitOrderSheetsForEvtDelay; -


Source

1113  procedure TfrmOrders.InitOrderSheets;
1114  { sets up list of order sheets based on what orders are on the server in delayed status for pt }
1115  var
1116    i: Integer;
1117    AnEventInfo: String;
1118    AnOrderView: TOrderView;
1119  begin
1120    ClearOrderSheets;
1121    LoadOrderSheetsED(lstSheets.Items);
1122    // the 1st item in lstSheets should always be the 'Current' view
1123    if CharAt(lstSheets.Items[0], 1) <> 'C' then Exit;
1124    AnOrderView := TOrderView.Create;
1125    AnOrderView.Filter    := STS_ACTIVE;
1126    AnOrderView.DGroup    := DGroupAll;
1127    AnOrderView.ViewName  := 'All Services, Active';
1128    AnOrderView.InvChrono := True;
1129    AnOrderView.ByService := True;
1130    AnOrderView.CtxtTime  := 0;
1131    AnOrderView.TextView  := 0;
1132    AnOrderView.EventDelay.EventType := 'C';
1133    AnOrderView.EventDelay.Specialty := 0;
1134    AnOrderView.EventDelay.Effective := 0;
1135    AnOrderView.EventDelay.EventIFN  := 0;
1136    AnOrderView.EventDelay.EventName := 'All Services, Active';
1137    lstSheets.Items.Objects[0] := AnOrderView;
1138    FCurrentView := AnOrderView;
1139    FOrderViewForActiveOrders := AnOrderView;
1140    // now setup the event-delayed views in lstSheets, each with its own TOrderView object
1141    with lstSheets do for i := 1 to Items.Count - 1 do
1142    begin
1143      AnOrderView := TOrderView.Create;
1144      AnOrderView.DGroup := DGroupAll;
1145      AnEventInfo := EventInfo(Piece(Items[i],'^',1));
1146      AnOrderView.EventDelay.EventType := CharAt(AnEventInfo, 1);
1147      AnOrderView.EventDelay.EventIFN  := StrToInt(Piece(AnEventInfo,'^',2));
1148      AnOrderView.EventDelay.EventName := Piece(AnEventInfo,'^',3);
1149      AnOrderView.EventDelay.Specialty := 0;
1150      AnOrderView.EventDelay.Effective := 0;
1151      case AnOrderView.EventDelay.EventType of
1152      'A': AnOrderView.Filter := 15;
1153      'D': AnOrderView.Filter := 16;
1154      'T': AnOrderView.Filter := 17;
1155      end;
1156      AnOrderView.ViewName  := DisplayText[i] + ' Orders';
1157      AnOrderView.InvChrono := FCurrentView.InvChrono;
1158      AnOrderView.ByService := FCurrentView.ByService;
1159      AnOrderView.CtxtTime  := 0;
1160      AnOrderView.TextView  := 0;
1161      Items.Objects[i] := AnOrderView;
1162    end; {for}
1163    lblWrite.Caption := 'Write Orders';
1164    lstWrite.Caption := lblWrite.Caption;
1165  end;