Procedure

TCtrlInits.SetControl

Module

fODBase

Last Modified

7/15/2014 3:26:40 PM

Comments

Initializes a control to the information in a section (~section from server)

Visibility

Public

Owner

TCtrlInits

Declaration

procedure SetControl(AControl: TControl; const ASection: string);

Calls Hierarchy


TCtrlInits.SetControl
 ├ClearControl
 └TCtrlInits.FindInitByName

Called-By Hierarchy


                         TCtrlInits.SetControl
                      TfrmODMedIn.InitDialog┤ 
                    TfrmODMedIn.FormCreate┘ │ 
                   TfrmODMedIn.SetOnOISelect┤ 
                   TfrmODMedIn.SetupDialog┤ │ 
           TfrmODMedIn.cboMedicationSelect┘ │ 
                TfrmODMedIn.CheckFormAlt┘   │ 
           TfrmODMedIn.cboDispenseExit┤     │ 
     TfrmODMedIn.cboDispenseMouseClick┘     │ 
  TfrmODMedIn.cboMedicationSelect...┘       │ 
                          ExecuteComplexDose┤ 
              TfrmODMedOut.cmdComplexClick┘ │ 
                     TfrmODMedOut.FormCreate┤ 
                     TfrmODMedOut.InitDialog┤ 
                   TfrmODMedOut.FormCreate┘ │ 
                  TfrmODMedOut.SetOnOISelect┤ 
                  TfrmODMedOut.SetupDialog┤ │ 
          TfrmODMedOut.cboMedicationSelect┘ │ 
               TfrmODMedOut.CheckFormAlt┘   │ 
          TfrmODMedOut.cboDispenseExit┤     │ 
    TfrmODMedOut.cboDispenseMouseClick┘     │ 
 TfrmODMedOut.cboMedicationSelect...┘       │ 
                       TfrmODProc.InitDialog┤ 
                     TfrmODProc.FormCreate┤ │ 
                  TfrmODProc.cboProcSelect┘ │ 
                TfrmODProc.radInpatientClick┤ 
               TfrmODProc.radOutpatientClick┤ 
                       TfrmODCslt.InitDialog┤ 
                     TfrmODCslt.FormCreate┘ │ 
                TfrmODCslt.radInpatientClick┤ 
               TfrmODCslt.radOutpatientClick┤ 
                        TfrmODRad.InitDialog┤ 
                     TfrmODRad.SetupDialog┤ │ 
                 TfrmODRad.ImageTypeChange┘ │ 
                 TfrmODRad.cboImTypeExit┤   │ 
        TfrmODRad.cboImTypeDropDownClose┘   │ 
                        TfrmODLab.FormCreate┤ 
                        TfrmODLab.InitDialog┤ 
                      TfrmODLab.FormCreate┘ │ 
                      TfrmODLab.LoadCollType┤ 
               TfrmODLab.cboCollSampChange┤ │ 
                   TfrmODLab.SetupDialog┤ │ │ 
            TfrmODLab.cboAvailTestSelect┘ │ │ 
                 TfrmODLab.SetupDialog┤   │ │ 
            TfrmODLab.cboAvailTestExit┘   │ │ 
     TfrmODLab.DetermineCollectionDefaults┘ │ 
                   TfrmODLab.SetupDialog┤   │ 
         TfrmODLab.cboAvailTestSelect...┘   │ 
                    TfrmODLab.SetupCollTimes┤ 
                      TfrmODLab.FormCreate┤ │ 
                     TfrmODLab.SetupDialog┤ │ 
                 TfrmODLab.LoadCollType...┤ │ 
               TfrmODLab.cboCollTypeChange┤ │ 
  TfrmODLab.DetermineCollectionDefaults...┘ │ 
    TfrmODLab.DetermineCollectionDefaults...┤ 
                      TfrmODBBank.FormCreate┤ 
                  TfrmODBBank.SetupCollTimes┤ 
                  TfrmODBBank.LoadCollType┤ │ 
 TfrmODBBank.DetermineCollectionDefaults┘ │ │ 
        TfrmODBBank.cboAvailTestSelect┘   │ │ 
             TfrmODBBank.SetupDialog┤     │ │ 
        TfrmODBBank.cboAvailTestExit┘     │ │ 
TfrmODBBank.DetermineCollectionDefaults...┤ │ 
             TfrmODBBank.cboCollTypeChange┘ │ 
                 TfrmODBBank.LoadCollType...┤ 
  TfrmODBBank.DetermineCollectionDefaults...┤ 
                      TfrmODMedIV.InitDialog┤ 
                    TfrmODMedIV.FormCreate┘ │ 
                     TfrmODVitals.InitDialog┤ 
                   TfrmODVitals.FormCreate┘ │ 
                 TfrmODMedNVA.SetOnMedSelect┤ 
                  TfrmODMedNVA.SetupDialog┤ │ 
               TfrmODMedNVA.btnSelectClick┤ │ 
               TfrmODMedNVA.UMDelayClick┘ │ │ 
             TfrmODMedNVA.CheckFormAltDose┘ │ 
             TfrmODMedNVA.cboDosageClick┘   │ 
            TfrmODMedNVA.cboDosageExit┘     │ 
                       TfrmODMeds.FormCreate┤ 
                   TfrmODMeds.SetOnMedSelect┤ 
                    TfrmODMeds.SetupDialog┤ │ 
                 TfrmODMeds.btnSelectClick┤ │ 
                 TfrmODMeds.UMDelayClick┘ │ │ 
               TfrmODMeds.CheckFormAltDose┘ │ 
               TfrmODMeds.cboDosageClick┘   │ 
             TfrmODMeds.cboDosageKeyUp┘     │ 
                    TfrmODAllergy.FormCreate┤ 
                    TfrmODAllergy.InitDialog┘ 
                  TfrmODAllergy.FormCreate┤   
             TfrmODAllergy.DisableControls┤   
   TfrmODAllergy.ckNoKnownAllergiesClick┘ │   
              TfrmODAllergy.EnableControls┘   
   TfrmODAllergy.ckNoKnownAllergiesClick┘     

Calls

Name Declaration Comments
ClearControl procedure ClearControl(AControl: TControl); -
TCtrlInits.FindInitByName function FindInitByName(const AName: string): TCtrlInit; -

Called-By

Name Declaration Comments
TfrmODLab.DetermineCollectionDefaults procedure DetermineCollectionDefaults(Responses: TResponses); -
TfrmODBBank.DetermineCollectionDefaults procedure DetermineCollectionDefaults(Responses: TResponses); -
ExecuteComplexDose function ExecuteComplexDose(CtrlInits: TCtrlInits; Responses: TResponses): Boolean; -
TfrmODMedOut.FormCreate procedure FormCreate(Sender: TObject); -
TfrmODLab.FormCreate procedure FormCreate(Sender: TObject); -
TfrmODBBank.FormCreate procedure FormCreate(Sender: TObject); -
TfrmODMeds.FormCreate procedure FormCreate(Sender: TObject); -
TfrmODAllergy.FormCreate procedure FormCreate(Sender: TObject); -
TfrmODMedIn.InitDialog procedure InitDialog; override; -
TfrmODMedOut.InitDialog procedure InitDialog; override; -
TfrmODProc.InitDialog procedure InitDialog; override; -
TfrmODCslt.InitDialog procedure InitDialog; override; -
TfrmODRad.InitDialog procedure InitDialog; override; -
TfrmODLab.InitDialog procedure InitDialog; override; -
TfrmODMedIV.InitDialog procedure InitDialog; override; -
TfrmODVitals.InitDialog procedure InitDialog; override; -
TfrmODAllergy.InitDialog procedure InitDialog; override; -
TfrmODLab.LoadCollType procedure LoadCollType(AComboBox:TORComboBox); -
TfrmODBBank.LoadCollType procedure LoadCollType(AComboBox:TORComboBox); -
TfrmODProc.radInpatientClick procedure radInpatientClick(Sender: TObject); -
TfrmODCslt.radInpatientClick procedure radInpatientClick(Sender: TObject); -
TfrmODProc.radOutpatientClick procedure radOutpatientClick(Sender: TObject); -
TfrmODCslt.radOutpatientClick procedure radOutpatientClick(Sender: TObject); -
TfrmODMedNVA.SetOnMedSelect procedure SetOnMedSelect; -
TfrmODMeds.SetOnMedSelect procedure SetOnMedSelect; -
TfrmODMedIn.SetOnOISelect procedure SetOnOISelect; -
TfrmODMedOut.SetOnOISelect procedure SetOnOISelect; -
TfrmODLab.SetupCollTimes procedure SetupCollTimes(CollType: string); -
TfrmODBBank.SetupCollTimes procedure SetupCollTimes(CollType: string); -


Source

418   procedure TCtrlInits.SetControl(AControl: TControl; const ASection: string);
419   { initializes a control to the information in a section (~section from server) }
420   var
421     CtrlInit: TCtrlInit;
422   begin
423     ClearControl(AControl);
424     CtrlInit := FindInitByName(ASection);
425     if CtrlInit = nil then Exit;
426     if AControl is TLabel then with TLabel(AControl) do Caption := CtrlInit.Text
427     else if AControl is TStaticText then with TStaticText(AControl) do Caption := CtrlInit.Text
428     else if AControl is TButton then with TButton(AControl) do Caption := CtrlInit.Text
429     else if AControl is TEdit then with TEdit(AControl) do Text := CtrlInit.Text
430     else if AControl is TMemo then FastAssign(CtrlInit.List, TMemo(AControl).Lines)
431     else if AControl is TRichEdit then QuickCopy(CtrlInit.List, TRichEdit(AControl))
432     else if AControl is TORListBox then FastAssign(CtrlInit.List, TORListBox(AControl).Items)
433     else if AControl is TListBox then FastAssign(CtrlInit.List, TListBox(AControl).Items)
434     else if AControl is TComboBox then with TComboBox(AControl) do
435     begin
436       FastAssign(CtrlInit.List, TComboBox(AControl).Items);
437       Text := CtrlInit.Text;
438     end
439     else if AControl is TORComboBox then with TORComboBox(AControl) do
440     begin
441       FastAssign(CtrlInit.List, TORComboBox(AControl).Items);
442       if LongList then InitLongList(Text) else Text := CtrlInit.Text;
443       SelectByID(CtrlInit.ListID);
444     end;
445     { need to add SelectByID for combobox & listbox }
446   end;