Procedure

SetOrderFromResults

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Scope

Interfaced

Declaration

procedure SetOrderFromResults(AnOrder: TOrder);

Calls Hierarchy


SetOrderFromResults
 └SetOrderFields
   ├TOrder.Clear
   ├SeqOfDGroup
   │ └LoadDGroupMap
   └TopNameOfDGroup
     └LoadDGroupMap

Called-By Hierarchy


                                           SetOrderFromResults
                                                  RenewOrder┤ 
                                        ExecuteRenewOrders┘ │ 
                             TfrmOrders.mnuActRenewClick┤   │ 
                               TfrmMeds.mnuActRenewClick┘   │ 
                                                   HoldOrder┤ 
                                         ExecuteHoldOrders┘ │ 
                              TfrmOrders.mnuActHoldClick┤   │ 
                                TfrmMeds.mnuActHoldClick┘   │ 
                                            ReleaseOrderHold┤ 
                                       ExecuteUnholdOrders┘ │ 
                            TfrmOrders.mnuActUnholdClick┤   │ 
                              TfrmMeds.mnuActUnholdClick┘   │ 
                                                     DCOrder┤ 
                                    TfrmOrders.NotifyOrder┤ │ 
                                    TfrmFrame.UMNewOrder┘ │ │ 
                                           ExecuteDCOrders┘ │ 
                                TfrmOrders.mnuActDCClick┤   │ 
                                  TfrmMeds.mnuActDCClick┘   │ 
                                                   FlagOrder┤ 
                                          ExecuteFlagOrder┘ │ 
                              TfrmOrders.mnuActFlagClick┘   │ 
                                                 UnflagOrder┤ 
                                        ExecuteUnflagOrder┘ │ 
                            TfrmOrders.mnuActUnflagClick┘   │ 
                                               CompleteOrder┤ 
                                     ExecuteCompleteOrders┘ │ 
                          TfrmOrders.mnuActCompleteClick┘   │ 
                                                 VerifyOrder┤ 
                                       ExecuteVerifyOrders┘ │ 
                            TfrmOrders.mnuActVerifyClick┤   │ 
                          TfrmOrders.mnuActChartRevClick┘   │ 
                                      VerifyOrderChartReview┤ 
                                    ExecuteVerifyOrders...┘ │ 
                                     SaveChangesOnRenewOrder┤ 
                                              ChangeOrders┘ │ 
                            TfrmOrders.mnuActChangeClick┤   │ 
                              TfrmMeds.mnuActChangeClick┘   │ 
                                               OrderLateTray┘ 
                                             LateTrayOrder┘   
                               TfrmODBase.cmdAcceptClick┤     
                                   ActivateOrderDialog┘ │     
                           TfrmRemDlg.btnFinishClick┤   │     
           TfrmConsults.mnuActNewConsultRequestClick┤   │     
                   TfrmConsults.cmdNewConsultClick┘ │   │     
                TfrmConsults.mnuActNewProcedureClick┤   │     
                      TfrmConsults.cmdNewProcClick┘ │   │     
                                     ChangeOrders...┤   │     
                                     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┘     │     
                               TfrmODDiet.cmdAcceptClick┘     
                            TfrmODDiet.nbkDietChanging┘       

Calls

Name Declaration Comments
SetOrderFields procedure SetOrderFields(AnOrder: TOrder; const x, y, z: string); -

Called-By

Name Declaration Comments
CompleteOrder procedure CompleteOrder(AnOrder: TOrder; const ESCode: string); -
DCOrder procedure DCOrder(AnOrder: TOrder; AReason: Integer; NewOrder: boolean; var DCType: Integer); -
FlagOrder procedure FlagOrder(AnOrder: TOrder; const FlagReason: string; AlertRecip: Int64); -
HoldOrder procedure HoldOrder(AnOrder: TOrder); -
OrderLateTray procedure OrderLateTray(NewOrder: TOrder; Meal: Char; const MealTime: string; Bagged: Boolean); -
ReleaseOrderHold procedure ReleaseOrderHold(AnOrder: TOrder); -
RenewOrder procedure RenewOrder(AnOrder: TOrder; RenewFields: TOrderRenewFields; IsComplex: integer; AnIMOOrderAppt: double; OCList: TStringList); -
SaveChangesOnRenewOrder procedure SaveChangesOnRenewOrder(var AnOrder: TOrder; AnID, TheRefills, ThePickup: string; IsTxtOrder: integer); -
UnflagOrder procedure UnflagOrder(AnOrder: TOrder; const AComment: string); -
VerifyOrder procedure VerifyOrder(AnOrder: TOrder; const ESCode: string); -
VerifyOrderChartReview procedure VerifyOrderChartReview(AnOrder: TOrder; const ESCode: string); -


Source

1423  procedure SetOrderFromResults(AnOrder: TOrder);
1424  var
1425    x, y, z: string;
1426  begin
1427    with RPCBrokerV do while Results.Count > 0 do
1428    begin
1429      x := Results[0];
1430      Results.Delete(0);
1431      if CharAt(x, 1) <> '~' then Continue;        // only happens if out of synch
1432      y := '';
1433      while (Results.Count > 0) and (CharAt(Results[0], 1) <> '~') and (CharAt(Results[0], 1) <> '|') do
1434      begin
1435        y := y + Copy(Results[0], 2, Length(Results[0])) + CRLF;
1436        Results.Delete(0);
1437      end;
1438      if Length(y) > 0 then y := Copy(y, 1, Length(y) - 2);  // take off last CRLF
1439      z := '';
1440      if (Results.Count > 0) and (Results[0] = '|') then
1441        begin
1442          Results.Delete(0);
1443          while (Results.Count > 0) and (CharAt(Results[0], 1) <> '~') and (CharAt(Results[0], 1) <> '|') do
1444            begin
1445              z := z + Copy(Results[0], 2, Length(Results[0])); //PKI Change
1446              Results.Delete(0);
1447            end;
1448        end;
1449      SetOrderFields(AnOrder, x, y, z);
1450    end;
1451  end;