Function

IsOrderBillable

Module

UBACore

Last Modified

7/15/2014 3:26:34 PM

Comments

UBAGlobals.NonBillableOrderList must be populated prior to calling this function.
 call   rpcNonBillableOrders to populate List.

Scope

Interfaced

Declaration

function  IsOrderBillable(pOrderID: string):boolean;

Calls Hierarchy


IsOrderBillable
 └PrepOrderID

Called-By Hierarchy


                                                   IsOrderBillable
                            CopyTreatmentFactorsDxsToCopiedOrder┤ 
                                                  ChangeOrders┤ │ 
                                TfrmOrders.mnuActChangeClick┤ │ │ 
                                  TfrmMeds.mnuActChangeClick┘ │ │ 
                                                    CopyOrders┤ │ 
                                  TfrmOrders.mnuActCopyClick┤ │ │ 
                                    TfrmMeds.mnuActCopyClick┤ │ │ 
                                     TfrmODActive.btnOKClick┘ │ │ 
                                                TransferOrders┘ │ 
                                  TfrmOrders.mnuActCopyClick┤   │ 
                                    TfrmMeds.mnuActCopyClick┤   │ 
                                     TfrmODActive.btnOKClick┘   │ 
                           CopyTreatmentFactorsDxsToRenewedOrder┤ 
                                                    RenewOrder┤ │ 
                                          ExecuteRenewOrders┘ │ │ 
                               TfrmOrders.mnuActRenewClick┤   │ │ 
                                 TfrmMeds.mnuActRenewClick┘   │ │ 
                                         ExecuteRenewOrders...┘ │ 
                                                     BADxEntered┤ 
                                     TfrmSignOrders.cmdOKClick┤ │ 
                                         TfrmReview.cmdOKClick┘ │ 
                                               ReviewChanges┘   │ 
                           TfrmFrame.AllowContextChangeAll┤     │ 
                                TfrmFrame.FormCloseQuery┤ │     │ 
                              TfrmFrame.mnuFileNextClick┤ │     │ 
                            TfrmFrame.mnuFileOpenClick┤ │ │     │ 
                                TfrmFrame.UMInitiate┤ │ │ │     │ 
                       TfrmFrame.mnuFileNextClick...┤ │ │ │     │ 
                       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.mnuFileNotifRemoveClick┤ │ │     │ 
                             TfrmFrame.NextButtonClick┘ │ │     │ 
                           TfrmFrame.SetUpNextButton┘   │ │     │ 
                     TfrmFrame.mnuFileOpenClick...┤     │ │     │ 
                              TfrmFrame.FormResize┘     │ │     │ 
                            TfrmFrame.ChangeFont┘       │ │     │ 
                    TfrmFrame.LoadSizesForUser┤         │ │     │ 
               TfrmFrame.LoadUserPreferences┘ │         │ │     │ 
                      TfrmFrame.UMInitiate┘   │         │ │     │ 
                    TfrmFrame.mnuFontSizeClick┘         │ │     │ 
                           TfrmFrame.mnuFileOpenClick...┤ │     │ 
                           TfrmFrame.ctxContextorPending┤ │     │ 
                          TfrmFrame.StartCCOWContextor┘ │ │     │ 
                                TfrmFrame.FormCreate┘   │ │     │ 
                         TfrmFrame.ctxContextorCommitted┤ │     │ 
                       TfrmFrame.StartCCOWContextor...┘ │ │     │ 
                  TfrmFrame.mnuFileResumeContextGetClick┤ │     │ 
                  TfrmFrame.mnuFileResumeContextSetClick┘ │     │ 
                                  TfrmFrame.FormCloseQuery┤     │ 
                              TfrmFrame.mnuFileReviewClick┤     │ 
                                           UpdateEncounter┘     │ 
                         TfrmFrame.mnuFileEncounterClick┤       │ 
                                 TfrmFrame.ViewInfo...┤ │       │ 
                    TfrmODMedIV.SetValuesFromResponses┤ │       │ 
                             TfrmODMedIV.SetupDialog┤ │ │       │ 
                   TfrmODMedIV.cboSolutionMouseClick┘ │ │       │ 
                       TfrmODMedIV.cboSolutionExit┘   │ │       │ 
                  TfrmODMedIV.cboSolutionMouseClick...┤ │       │ 
                     TfrmODMedIV.cboAdditiveMouseClick┤ │       │ 
                         TfrmODMedIV.cboAdditiveExit┘ │ │       │ 
                                TfrmODAuto.SetupDialog┤ │       │ 
                                   ActivateOrderDialog┤ │       │ 
                           TfrmRemDlg.btnFinishClick┤ │ │       │ 
           TfrmConsults.mnuActNewConsultRequestClick┤ │ │       │ 
                   TfrmConsults.cmdNewConsultClick┘ │ │ │       │ 
                TfrmConsults.mnuActNewProcedureClick┤ │ │       │ 
                      TfrmConsults.cmdNewProcClick┘ │ │ │       │ 
                                     ChangeOrders...┤ │ │       │ 
                                     ChangeOrdersEvt┤ │ │       │ 
                                       CopyOrders...┤ │ │       │ 
                                   TransferOrders...┤ │ │       │ 
                            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┘   │ │       │ 
                               TfrmOMSet.InsertList...┤ │       │ 
                                TfrmODMeds.SetupDialog┤ │       │ 
                             TfrmODMeds.btnSelectClick┤ │       │ 
                             TfrmODMeds.UMDelayClick┘ │ │       │ 
                                 ExecuteRenewOrders...┘ │       │ 
                                        EncounterPresent┤       │ 
                                      ReadyForNewOrder┤ │       │ 
                           TfrmRemDlg.btnFinishClick┤ │ │       │ 
        TfrmConsults.mnuActNewConsultRequestClick...┤ │ │       │ 
             TfrmConsults.mnuActNewProcedureClick...┤ │ │       │ 
                                     ChangeOrders...┤ │ │       │ 
                                     ChangeOrdersEvt┤ │ │       │ 
                                       CopyOrders...┤ │ │       │ 
                                   TransferOrders...┤ │ │       │ 
                            TfrmOrders.lstWriteClick┤ │ │       │ 
                             TfrmMeds.mnuActNewClick┘ │ │       │ 
                                     ReadyForNewOrder1┤ │       │ 
            TfrmOrders.PlaceOrderForDefaultDialog...┘ │ │       │ 
                              TfrmOrders.mnuActDCClick┤ │       │ 
                             TfrmOrders.mnuActRelClick┤ │       │ 
                            TfrmOrders.mnuActHoldClick┤ │       │ 
                          TfrmOrders.mnuActUnholdClick┤ │       │ 
                           TfrmOrders.mnuActRenewClick┤ │       │ 
                         TfrmOrders.mnuActReleaseClick┤ │       │ 
                         TfrmOrders.mnuActOnChartClick┤ │       │ 
                            TfrmOrders.mnuActSignClick┤ │       │ 
                                TfrmMeds.mnuActDCClick┤ │       │ 
                              TfrmMeds.mnuActHoldClick┤ │       │ 
                             TfrmMeds.mnuActRenewClick┤ │       │ 
                            TfrmMeds.mnuActUnholdClick┤ │       │ 
                              TfrmMeds.mnuActCopyClick┤ │       │ 
                            TfrmMeds.mnuActRefillClick┘ │       │ 
                                     EncounterPresentEDO┤       │ 
                                   ReadyForNewOrder...┤ │       │ 
                         TfrmOrders.mnuActChgEvntClick┤ │       │ 
                          TfrmOrders.mnuActChangeClick┤ │       │ 
                            TfrmOrders.mnuActCopyClick┤ │       │ 
                       TfrmOrders.btnDelayedOrderClick┤ │       │ 
                            TfrmMeds.mnuActChangeClick┤ │       │ 
                              TfrmMeds.mnuActCopyClick┘ │       │ 
                                             UpdateVisit┤       │ 
                                           EditPCEData┤ │       │ 
                             TfrmSurgery.cmdPCEClick┤ │ │       │ 
                                 UpdateEncounterInfo┘ │ │       │ 
                             TfrmNotes.cmdPCEClick┘   │ │       │ 
                        TfrmVitals.btnEnterVitalsClick┘ │       │ 
                                             UpdateVisit┤       │ 
                                        EncounterPresent┘       │ 
                         TfrmProblems.lstProbActsClick┘         │ 
                     TfrmProblems.wgProbDataDblClick┤           │ 
                           TfrmProblems.lstViewClick┘           │ 
                   TfrmProblems.HighlightDuplicate┘             │ 
                         TfrmProblems.AddProblem┤               │ 
              TfrmProblems.lstProbActsClick...┤ │               │ 
                 TfrmProblems.lstProbPickClick┤ │               │ 
              TfrmProblems.lstProbPickDblClick┤ │               │ 
              TfrmProblems.edProbEntKeyPress┘ │ │               │ 
                      TfrmProblems.UMPLLexicon┘ │               │ 
                   TfrmdlgProb.bbChangeProbClick┘               │ 
                                         CompleteConsultOrderRec┤ 
                                     TfrmODCslt.cmdAcceptClick┘ │ 
                            TfrmBALocalDiagnoses.AssocDxToOrders┤ 
                                TfrmBALocalDiagnoses.buOKClick┘ │ 
                            TfrmODCslt.SetUpCopyConsultDiagnoses┤ 
                           TfrmODCslt.GetProvDxandValidateCode┘ │ 
                                      TfrmODCslt.SetupDialog┤   │ 
                                 TfrmODCslt.treServiceChange┤   │ 
                              TfrmODCslt.treServiceKeyDown┘ │   │ 
                                 TfrmODCslt.cboServiceSelect┘   │ 
                                 TfrmODCslt.cboServiceExit┘     │ 
                               TfrmSignOrders.clstOrdersDrawItem┤ 
                                         TfrmSignOrders.FormShow┤ 
                                       TfrmSignOrders.Copy1Click┤ 
                                      TfrmSignOrders.Paste1Click┤ 
                             TfrmSignOrders.clstCSOrdersDrawItem┤ 
                                    TfrmReview.lstReviewDrawItem┤ 
                                  TfrmReview.lstCSReviewDrawItem┤ 
                                           TfrmReview.Copy1Click┤ 
                                          TfrmReview.Paste1Click┤ 
                                             TfrmReview.FormShow┤ 
                                         TSigItems.UpdateListBox┘ 
                                             ExecuteSignOrders┤   
                                  TfrmOrders.mnuActSignClick┘ │   
                                          TfrmReview.BuildList┘   
                                    TfrmReview.BuildFullList┤     
                                          ReviewChanges...┘ │     
                                    TfrmReview.BuildSignList┘     
                                          ReviewChanges...┘       

Calls

Name Declaration Comments
PrepOrderID function PrepOrderID(pOrderID:String): String; -

Called-By

Name Declaration Comments
TfrmBALocalDiagnoses.AssocDxToOrders procedure AssocDxToOrders; -
BADxEntered function BADxEntered:boolean; -
TfrmSignOrders.clstCSOrdersDrawItem procedure clstCSOrdersDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); -
TfrmSignOrders.clstOrdersDrawItem procedure clstOrdersDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); -
CompleteConsultOrderRec procedure CompleteConsultOrderRec(pOrderID: string; pDxList: TStringList); -
TfrmSignOrders.Copy1Click procedure Copy1Click(Sender: TObject); -
TfrmReview.Copy1Click procedure Copy1Click(Sender: TObject); -
CopyTreatmentFactorsDxsToCopiedOrder procedure CopyTreatmentFactorsDxsToCopiedOrder(pSourceOrderID:string; pTargetOrderID:string); -
CopyTreatmentFactorsDxsToRenewedOrder procedure CopyTreatmentFactorsDxsToRenewedOrder; -
TfrmSignOrders.FormShow procedure FormShow(Sender: TObject); -
TfrmReview.FormShow procedure FormShow(Sender: TObject); -
TfrmReview.lstCSReviewDrawItem procedure lstCSReviewDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); -
TfrmReview.lstReviewDrawItem procedure lstReviewDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); -
TfrmSignOrders.Paste1Click procedure Paste1Click(Sender: TObject); -
TfrmReview.Paste1Click procedure Paste1Click(Sender: TObject); -
TfrmODCslt.SetUpCopyConsultDiagnoses procedure SetUpCopyConsultDiagnoses(pOrderID:string); -
TSigItems.UpdateListBox function UpdateListBox(lb: TCustomListBox): boolean; -


Source

188   function IsOrderBillable(pOrderID: string):boolean ;
189   var
190     i: integer;
191     currOrderID: string;
192     matchOrderID : string;
193   
194   begin
195     Result := TRUE;    //  = Billable
196     currOrderID := PrepOrderID(pOrderID);
197     if Piece(pOrderID,';',2) = DISCONTINUED_ORDER THEN
198     begin
199        Result := FALSE;
200        Exit;
201     end;
202     try
203        for i := 0 to UBAGlobals.NonBillableOrderList.Count -1 do
204        begin
205           matchOrderID := PrepOrderID( (Piece(UBAGlobals.NonBillableOrderList.Strings[i],U,1)) );
206           if currOrderID = matchOrderID  then
207           begin
208              Result := FALSE;  //= Non Billable
209              Exit;
210           end;
211        end;
212     except
213        on EListError do
214           begin
215           {$ifdef debug}Show508Message('EListError in UBACore.IsOrderBillable()');{$endif}
216           raise;
217           end;
218     end;
219   end;