Procedure

SetOrderFields

Module

rOrders

Last Modified

7/15/2014 3:26:42 PM

Comments

1   2    3     4      5     6   7   8   9    10    11    12    13    14     15     16  17    18    19     20         21          22              23               24
{Pieces: ~IFN^Grp^ActTm^StrtTm^StopTm^Sts^Sig^Nrs^Clk^PrvID^PrvNam^ActDA^Flag^DCType^ChrtRev^DEA#^VA#^DigSig^IMO^DCOrigOrder^ISDCOrder^IsDelayOrder^IsControlledSubstance^IsDetox

Scope

Interfaced

Declaration

procedure SetOrderFields(AnOrder: TOrder; const x, y, z: string);

Calls Hierarchy


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

Called-By Hierarchy


                                                SetOrderFields
                                                  LoadOrders┤ 
                                         RetrieveOrderFields┤ 
                                  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)..┘   │ │ 
                                         RetrieveOrderText┤ │ 
                             IsValidActionOnComplexOrder┤ │ │ 
                           TfrmOrders.ValidateSelected┤ │ │ │ 
                            TfrmOrders.mnuActDCClick┤ │ │ │ │ 
                           TfrmOrders.mnuActRelClick┤ │ │ │ │ 
                       TfrmOrders.mnuActChgEvntClick┤ │ │ │ │ 
                          TfrmOrders.mnuActHoldClick┤ │ │ │ │ 
                        TfrmOrders.mnuActUnholdClick┤ │ │ │ │ 
                         TfrmOrders.mnuActRenewClick┤ │ │ │ │ 
                         TfrmOrders.mnuActAlertClick┤ │ │ │ │ 
                      TfrmOrders.mnuActCompleteClick┤ │ │ │ │ 
                        TfrmOrders.mnuActVerifyClick┤ │ │ │ │ 
                      TfrmOrders.mnuActChartRevClick┤ │ │ │ │ 
                        TfrmOrders.mnuActChangeClick┤ │ │ │ │ 
                          TfrmOrders.mnuActCopyClick┤ │ │ │ │ 
                       TfrmOrders.mnuActReleaseClick┤ │ │ │ │ 
                       TfrmOrders.mnuActOnChartClick┤ │ │ │ │ 
                          TfrmOrders.mnuActSignClick┘ │ │ │ │ 
                             TfrmMeds.ValidateSelected┘ │ │ │ 
                              TfrmMeds.mnuActDCClick┤   │ │ │ 
                            TfrmMeds.mnuActHoldClick┤   │ │ │ 
                           TfrmMeds.mnuActRenewClick┤   │ │ │ 
                          TfrmMeds.mnuActUnholdClick┤   │ │ │ 
                          TfrmMeds.mnuActChangeClick┤   │ │ │ 
                          TfrmMeds.mnuActRefillClick┘   │ │ │ 
                                  ActivateOrderDialog...┤ │ │ 
                                           CopyOrders...┤ │ │ 
                                       TransferOrders...┤ │ │ 
                                     IMOActionValidation┤ │ │ 
                                ActivateOrderDialog...┤ │ │ │ 
                                    ExecuteRenewOrders┘ │ │ │ 
                         TfrmOrders.mnuActRenewClick┤   │ │ │ 
                           TfrmMeds.mnuActRenewClick┘   │ │ │ 
                               ExecuteChangeRenewedOrder┤ │ │ 
                                       ChangeOrders...┘ │ │ │ 
                              TfrmChgEvent.updateChanges┘ │ │ 
                                   ExecuteChangeEvt...┘   │ │ 
                          TfrmOrders.RetrieveVisibleOrders┤ │ 
                         TfrmOrders.lstOrdersMeasureItem┘ │ │ 
                        TfrmODActive.RetrieveVisibleOrders┘ │ 
                 TfrmODActive.lstActiveOrdersMeasureItem┘   │ 
                                         SetOrderFromResults┤ 
                                                RenewOrder┤ │ 
                                   ExecuteRenewOrders...┘ │ │ 
                                                 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...┘ │ │ 
                                             OrderLateTray┘ │ 
                                           LateTrayOrder┘   │ 
                          TfrmODBase.cmdAcceptClick...┤     │ 
                             TfrmODDiet.cmdAcceptClick┘     │ 
                          TfrmODDiet.nbkDietChanging┘       │ 
                                               GetOrderByIFN┤ 
                               TfrmOrders.mnuActRenewClick┤ │ 
                                 TfrmMeds.mnuActRenewClick┤ │ 
                                 TfrmMeds.MakeSelectedList┤ │ 
                                  TfrmMeds.mnuActDCClick┤ │ │ 
                                TfrmMeds.mnuActHoldClick┤ │ │ 
                               TfrmMeds.mnuActRenewClick┤ │ │ 
                              TfrmMeds.mnuActUnholdClick┤ │ │ 
                              TfrmMeds.mnuActChangeClick┤ │ │ 
                                TfrmMeds.mnuActCopyClick┤ │ │ 
                              TfrmMeds.mnuActRefillClick┘ │ │ 
                    TfrmActivateDeactive.fActivateDeactive┘ │ 
                          TfrmMeds.ActivateDeactiveRenew┘   │ 
                                TfrmMeds.mnuActDCClick┘     │ 
                                                 PutNewOrder┘ 
                                      TResponses.SaveOrder┘   
                                    TfrmODBase.ValidSave┘     
                          TfrmODBase.cmdAcceptClick...┤       
                             TfrmODBase.FormCloseQuery┤       
                                   TfrmODBase.TabClose┤       
                          TfrmODAllergy.cmdAcceptClick┘       

Calls

Name Declaration Comments
TOrder.Clear procedure Clear; -
SeqOfDGroup function SeqOfDGroup(IEN: Integer): Integer; -
TopNameOfDGroup function TopNameOfDGroup(IEN: Integer): string; -

Called-By

Name Declaration Comments
GetOrderByIFN function GetOrderByIFN(const ID: string): TOrder; -
LoadOrders procedure LoadOrders(Dest: TList; Filter, Groups: Integer); -
PutNewOrder procedure PutNewOrder(var AnOrder: TOrder; ConstructOrder: TConstructOrder; OrderSource: string); -
RetrieveOrderFields procedure RetrieveOrderFields(OrderList: TList; ATextView: Integer; ACtxtTime: TFMDateTime); -
SetOrderFromResults procedure SetOrderFromResults(AnOrder: TOrder); -


Source

594   procedure SetOrderFields(AnOrder: TOrder; const x, y, z: string);
595   {           1   2    3     4      5     6   7   8   9    10    11    12    13    14     15     16  17    18    19     20         21          22              23               24
596   { Pieces: ~IFN^Grp^ActTm^StrtTm^StopTm^Sts^Sig^Nrs^Clk^PrvID^PrvNam^ActDA^Flag^DCType^ChrtRev^DEA#^VA#^DigSig^IMO^DCOrigOrder^ISDCOrder^IsDelayOrder^IsControlledSubstance^IsDetox}
597   begin
598     with AnOrder do
599     begin
600       Clear;
601       ID := Copy(Piece(x, U, 1), 2, Length(Piece(x, U, 1)));
602       DGroup := StrToIntDef(Piece(x, U, 2), 0);
603       OrderTime := MakeFMDateTime(Piece(x, U, 3));
604       StartTime := Piece(x, U, 4);
605       StopTime  := Piece(x, U, 5);
606       Status    := StrToIntDef(Piece(x, U, 6), 0);
607       Signature := StrToIntDef(Piece(x, U, 7), 0);
608       VerNurse  := Piece(x, U, 8);
609       VerClerk  := Piece(x, U, 9);
610       ChartRev  := Piece(x, U, 15);
611       Provider  := StrToInt64Def(Piece(x, U, 10), 0);
612       ProviderName := Piece(x, U, 11);
613       ProviderDEA  := Piece(x, U, 16);
614       ProviderVA   := Piece(x, U, 17);
615       DigSigReq    := Piece(x, U, 18);
616       Flagged   := Piece(x, U, 13) = '1';
617       Retrieved := True;
618       OrderLocIEN  := Piece(Piece(x,U,19),':',2);   //imo
619       if Piece(Piece(x,U,19),':',1) = '0;SC(' then OrderLocName := 'Unknown'
620       else OrderLocName := Piece(Piece(x,U,19),':',1);   //imo
621       Text := y;
622       XMLText := z;
623       DGroupSeq  := SeqOfDGroup(DGroup);
624       DGroupName := TopNameOfDGroup(DGroup);
625       //AGP Changes 26.15 PSI-04-063
626       if (pos('Entered in error',Text)>0) then AnOrder.EnteredInError := 1
627       else AnOrder.EnteredInError := 0;
628       //if DGroupName = 'Non-VA Meds' then Text := 'Non-VA  ' + Text;
629       if Piece(x,U,20) = '1' then DCOriginalOrder := True
630       else DCOriginalOrder := False;
631       if Piece(X,u,21) = '1' then  IsOrderPendDC := True
632       else IsOrderPendDC := False;
633       if Piece(x,u,22) = '1' then IsDelayOrder := True
634       else IsDelayOrder := False;
635       if Piece(x,u,23) = '1' then IsControlledSubstance := True
636       else IsControlledSubstance := False;
637       if Piece(x,u,24) = '1' then IsDetox := True
638       else IsDetox := False;
639     end;
640   end;