Function

AllSelectedDxBlank

Module

UBAGlobals

Last Modified

7/15/2014 3:26:34 PM

Scope

Interfaced

Declaration

function  AllSelectedDxBlank(const Caller: smallint) : boolean;

Calls Hierarchy


AllSelectedDxBlank
 └tempDxNodeExists

Called-By Hierarchy


                     AllSelectedDxBlank
TfrmSignOrders.buOrdersDiagnosisClick┤ 
          TfrmReview.buDiagnosisClick┘ 

Calls

Name Declaration Comments
tempDxNodeExists function tempDxNodeExists(thisOrderID: string) : boolean; -

Called-By

Name Declaration Comments
TfrmReview.buDiagnosisClick procedure buDiagnosisClick(Sender: TObject); -
TfrmSignOrders.buOrdersDiagnosisClick procedure buOrdersDiagnosisClick(Sender: TObject); -


Source

473   function AllSelectedDxBlank(const Caller: smallint) : boolean;
474   var
475     i: smallint;
476     selectedOrderID: string;
477   begin
478     Result := true;
479   
480     case Caller of
481        F_ORDERS_SIGN: begin
482                          try
483                             for i := 0 to fOrdersSign.frmSignOrders.clstOrders.Items.Count-1 do
484                                 if (frmSignOrders.clstOrders.Selected[i]) then
485                                    begin
486                                    selectedOrderID :=  TOrder(fOrdersSign.frmSignOrders.clstOrders.Items.Objects[i]).ID;
487                                    if (tempDxNodeExists(selectedOrderID)) then
488                                         Result := false;
489                                    end;
490                          except
491                              on EListError do
492                                begin
493                                 {$ifdef debug}ShowMsg('EListError in UBAGlobals.AllSelectedDxBlank() - F_ORDERS_SIGN');{$endif}
494                                 raise;
495                                end;
496                          end;
497                       end;
498        F_REVIEW:      begin
499                          try
500                             for i := 0 to fReview.frmReview.lstReview.Items.Count-1 do
501                                 if (fReview.frmReview.lstReview.Selected[i]) then
502                                    begin
503                                    selectedOrderID :=  TOrder(fReview.frmReview.lstReview.Items.Objects[i]).ID;
504                                    if tempDxNodeExists(selectedOrderID) then
505                                         Result := false;
506                                    end;
507                          except
508                              on EListError do
509                                begin
510                                 {$ifdef debug}ShowMsg('EListError in UBAGlobals.AllSelectedDxBlank() - F_REVIEW');{$endif}
511                                 raise;
512                                end;
513                          end;
514                       end;
515     end; //case
516   end;