Procedure

TLabTest.LoadSpecimen

Module

fODLab

Last Modified

7/15/2014 3:26:42 PM

Comments

Loads specimen combo box, if SpecimenList is empty, use 'E' xref on 61 ??

Visibility

Public/Published

Owner

TLabTest

Declaration

procedure LoadSpecimen(AComboBox: TORComboBox);

Calls Hierarchy


TLabTest.LoadSpecimen
 ├TLabTest.ObtainSpecimen
 │ └TLabTest.IndexOfCollSamp
 ├LoadSpecimens
 ├TResponses.FindResponseByName
 ├TLabTest.IndexOfCollSamp
 ├GetOneSpecimen
 └TLabTest.ChangeSpecimen

Called-By Hierarchy


              TLabTest.LoadSpecimen
     TfrmODLab.cboAvailTestSelect┤ 
          TfrmODLab.SetupDialog┤ │ 
     TfrmODLab.cboAvailTestExit┘ │ 
      TfrmODLab.cboCollSampChange┤ 
          TfrmODLab.SetupDialog┤ │ 
TfrmODLab.cboAvailTestSelect...┘ │ 
    TfrmODLab.cboCollSampKeyPause┤ 
  TfrmODLab.cboCollSampMouseClick┘ 

Calls

Name Declaration Comments
TLabTest.ChangeSpecimen procedure ChangeSpecimen(const SpecimenIEN: string); -
TResponses.FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; -
GetOneSpecimen function GetOneSpecimen(LRFSPEC: integer): string; -
TLabTest.IndexOfCollSamp function IndexOfCollSamp(CollSampIEN: Integer): Integer; -
LoadSpecimens procedure LoadSpecimens(SpecimenList: TStringList) ; -
TLabTest.ObtainSpecimen function ObtainSpecimen: Boolean; -

Called-By

Name Declaration Comments
TfrmODLab.cboAvailTestSelect procedure cboAvailTestSelect(Sender: TObject); -
TfrmODLab.cboCollSampChange procedure cboCollSampChange(Sender: TObject); -
TfrmODLab.cboCollSampKeyPause procedure cboCollSampKeyPause(Sender: TObject); -
TfrmODLab.cboCollSampMouseClick procedure cboCollSampMouseClick(Sender: TObject); -


Source

671   procedure TLabTest.LoadSpecimen(AComboBox: TORComboBox);
672   { loads specimen combo box, if SpecimenList is empty, use 'E' xref on 61 ?? }
673   var
674     i: Integer;
675     tmpResp: TResponse;
676   begin
677     AComboBox.Clear;
678     if ObtainSpecimen then
679       begin
680         if SpecimenList.Count = 0 then LoadSpecimens(SpecimenList) ;
681         FastAssign(SpecimenList, AComboBox.Items);
682         AComboBox.Items.Add('0^Other...');
683         with QuickOrderResponses do tmpResp := FindResponseByName('SPECIMEN'  ,1);
684         if (LRFSPEC <> '') and (tmpResp = nil) then
685           AComboBox.SelectByID(LRFSPEC)
686         else if Specimen > 0 then
687           AComboBox.SelectByIEN(Specimen)
688         else
689           AComboBox.ItemIndex := AComboBox.Items.IndexOf('Other...');
690       end
691     else
692       begin
693         i := IndexOfCollSamp(CollSamp);
694         if i < CollSampList.Count then with TCollSamp(CollSampList.Items[i]) do
695           begin
696             AComboBox.Items.Add(IntToStr(SpecimenID) + '^' + SpecimenName);
697             AComboBox.ItemIndex := 0;
698           end;
699         with QuickOrderResponses do tmpResp := FindResponseByName('SPECIMEN'  ,1);
700         if (LRFSPEC <> '') and (tmpResp = nil) then
701           begin
702             AComboBox.Items.Add(GetOneSpecimen(StrToInt(LRFSPEC)));
703             AComboBox.SelectByID(LRFSPEC);
704           end;
705       end;
706     ChangeSpecimen(AComboBox.ItemID);
707   end;