Procedure

TfrmODMedIV.cboTypeChange

Module

fODMedIV

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmODMedIV

Declaration

procedure cboTypeChange(Sender: TObject);

Calls Hierarchy


TfrmODMedIV.cboTypeChange
 ├TfrmODMedIV.UpdateDuration
 └TfrmODMedIV.ControlChange
   ├TfrmODMedIV.loadExpectFirstDose
   │ ├TfrmODMedIV.DisplayDoseNow
   │ ├LoadAdminInfo
   │ └FMToday
   │   └FMNow
   ├TResponses.FindResponseByName
   ├TResponses.Clear
   ├TResponses.Update
   │ ├TResponses.FindResponseByName
   │ └TResponses.IENForPrompt
   ├IsNumericRate
   └TResponses.GetOrderText
     ├TResponses.NextInstance
     ├TResponses.FindResponseByName
     ├TResponses.FormatResponse
     │ └TResponses.FindResponseByIEN
     └TResponses.AppendChildren
       ├TResponses.FindPromptByIEN
       ├TResponses.FindResponseByIEN
       └TResponses.FormatResponse...

Called-By Hierarchy


     TfrmODMedIV.cboTypeChange
  TfrmODMedIV.ClearAllFields┘ 
    TfrmODMedIV.InitDialog┤   
  TfrmODMedIV.FormCreate┘ │   
TfrmODMedIV.cmdRemoveClick┘   

Calls

Name Declaration Comments
TfrmODMedIV.ControlChange procedure ControlChange(Sender: TObject); -
TfrmODMedIV.UpdateDuration procedure UpdateDuration(SchType: string); -

Called-By

Name Declaration Comments
TfrmODMedIV.ClearAllFields procedure ClearAllFields; -


Source

1170  procedure TfrmODMedIV.cbotypeChange(Sender: TObject);
1171  var
1172  i: integer;
1173  begin
1174    inherited;
1175    //if (self.cbotype.Text = 'Intermittent') or (self.cboType.itemIndex = 1) then
1176    if (self.cboType.itemIndex = 1) then
1177      begin
1178        cboSchedule.ItemIndex := -1;
1179        lblAdminTime.Caption := '';
1180        lblAdminTime.Visible := false;
1181        lblschedule.Enabled := True;
1182        cboSchedule.Enabled := True;
1183        txtNSS.Visible := true;
1184        chkDoseNow.Checked := false;
1185        chkDoseNow.Visible := true;
1186        chkPRN.Checked := false;
1187        chkPRN.Enabled := True;
1188        lblInfusionRate.Caption := 'Infuse Over Time (Optional)';
1189        cboInfusionTime.Enabled := true;
1190        if cboDuration.items.IndexOf('doses') = -1 then cboDuration.Items.Add('doses');
1191        //AGP ADDITIVE FREQUECNY CHANGES
1192        lblAddFreq.Caption := 'Additive Frequency';
1193        for i := 0 to grdselected.RowCount - 1 do
1194          begin
1195            if (TIVComponent(grdselected.Objects[0, i]) <> nil) and (TIVComponent(grdselected.Objects[0, i]).Fluid = 'A') then
1196              begin
1197                grdSelected.Cells[3, i] := 'N/A';
1198              end;
1199          end;
1200      end
1201    //else if (self.cbotype.Text = 'Continuous') or (self.cboType.itemIndex = 0) then
1202    else
1203      begin
1204        lblschedule.Enabled := False;
1205        cboSchedule.ItemIndex := -1;
1206        cboSchedule.Enabled := False;
1207        txtNSS.Visible := false;
1208        chkPRN.Checked := false;
1209        chkPRN.Enabled := false;
1210        if chkDoseNow.Visible = true then chkDoseNow.Checked := false;
1211        chkDoseNow.Visible := false;
1212        lblInfusionRate.Caption := 'Infusion Rate (ml/hr)*';
1213        cboInfusionTime.ItemIndex := -1;
1214        cboInfusionTime.Text := '';
1215        cboInfusionTime.Enabled := false;
1216        lblAdminTime.Visible := false;
1217        UpdateDuration('');
1218        cboduration.Items.Delete(cboDuration.Items.IndexOf('doses'));
1219        lblAddFreq.Caption := 'Additive Frequency*';
1220        if FIVTypeDefined = True then
1221          begin
1222            for i := 0 to grdselected.RowCount - 1 do
1223              begin
1224                if (TIVComponent(grdselected.Objects[0, i]) <> nil) and (TIVComponent(grdselected.Objects[0, i]).Fluid = 'A') then
1225                  begin
1226                    grdSelected.Cells[3, i] := '';
1227                  end;
1228              end;
1229          end;
1230      end;
1231    FIVTypeDefined := True;
1232    self.txtRate.Text := '';
1233    ControlChange(Sender);
1234  end;