Procedure

TfrmODLab.LoadCollType

Module

fODLab

Last Modified

7/15/2014 3:26:42 PM

Visibility

Protected

Owner

TfrmODLab

Declaration

procedure LoadCollType(AComboBox:TORComboBox);

Calls Hierarchy


TfrmODLab.LoadCollType
 ├TCtrlInits.SetControl
 │ ├ClearControl
 │ └TCtrlInits.FindInitByName
 ├TLabTest.LabCanCollect
 │ └TLabTest.IndexOfCollSamp
 ├TfrmODBase.OrderForInpatient
 │ ├OrderEventTypeOnCreate
 │ └IsPassEvt1
 └TfrmODLab.SetupCollTimes
   ├GetLastCollectionTime
   ├TfrmODLab.ValidCollTime
   │ └StrToFMDateTime
   ├StrToFMDateTime
   ├TCtrlInits.SetControl...
   ├MakeRelativeDateTime
   │ └FMToday
   │   └FMNow
   └GetDefaultImmCollTime

Called-By Hierarchy


                 TfrmODLab.LoadCollType
          TfrmODLab.cboCollSampChange┤ 
              TfrmODLab.SetupDialog┤ │ 
       TfrmODLab.cboAvailTestSelect┘ │ 
            TfrmODLab.SetupDialog┤   │ 
       TfrmODLab.cboAvailTestExit┘   │ 
TfrmODLab.DetermineCollectionDefaults┘ 
              TfrmODLab.SetupDialog┤   
    TfrmODLab.cboAvailTestSelect...┘   

Calls

Name Declaration Comments
TLabTest.LabCanCollect function LabCanCollect: Boolean; -
TfrmODBase.OrderForInpatient function OrderForInpatient: Boolean; -
TCtrlInits.SetControl procedure SetControl(AControl: TControl; const ASection: string); -
TfrmODLab.SetupCollTimes procedure SetupCollTimes(CollType: string); -

Called-By

Name Declaration Comments
TfrmODLab.cboCollSampChange procedure cboCollSampChange(Sender: TObject); -
TfrmODLab.DetermineCollectionDefaults procedure DetermineCollectionDefaults(Responses: TResponses); -


Source

709   procedure TfrmODLab.LoadCollType(AComboBox:TORComboBox);
710   var
711     i: integer;
712   begin
713     with CtrlInits, cboCollType do
714       begin
715         SetControl(cboCollType, 'Collection Types');
716         if not ALabTest.LabCanCollect then
717           begin
718             i := SelectByID('LC');
719             if i > -1 then Items.Delete(i);
720             i := SelectByID('I');
721             if i > -1 then Items.Delete(i);
722           end ;
723         if LRFZX <> '' then
724           begin
725             if (LRFZX = 'LC') or (LRFZX = 'I') then
726               begin
727                 if ALabTest.LabCanCollect then
728                   cboCollType.SelectByID(LRFZX)
729                 else
730                   cboCollType.SelectByID('WC');
731               end
732             else
733               cboCollType.SelectByID(LRFZX);
734           end
735         else if FLastCollType <> '' then
736           begin
737             if (FLastCollType = 'LC') or (FLastCollType = 'I') then
738               begin
739                 if ALabTest.LabCanCollect then
740                   cboCollType.SelectByID(FLastCollType)
741                 else
742                   cboCollType.SelectByID('WC');
743               end
744             else
745               cboCollType.SelectByID(FLastCollType);
746           end
747         else if uDfltCollType <> '' then
748           begin
749             if (uDfltCollType = 'LC') or (uDfltCollType = 'I') then
750               begin
751                 if ALabTest.LabCanCollect then
752                   cboCollType.SelectByID(uDfltCollType)
753                 else
754                   cboCollType.SelectByID('WC');
755               end
756             else
757               cboCollType.SelectByID(uDfltCollType);
758           end
759         else if OrderForInpatient then
760           begin
761             if ALabTest.LabCanCollect then
762               cboCollType.SelectByID('LC')
763             else
764               SelectByID('WC');
765           end
766         else
767           cboCollType.SelectByID('SP');
768       end;
769     SetupCollTimes(cboCollType.ItemID);
770   end;