Procedure

TfrmODMeds.cboDosageExit

Module

fODMeds

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmODMeds

Declaration

procedure cboDosageExit(Sender: TObject);

Calls Hierarchy


TfrmODMeds.cboDosageExit
 └TfrmODMeds.UpdateRelated
   └TfrmODMeds.timCheckChangesTimer
     ├TfrmODMeds.ControlChange
     │ ├TResponses.Clear
     │ ├TResponses.Update
     │ │ ├TResponses.FindResponseByName
     │ │ └TResponses.IENForPrompt
     │ ├TfrmODMeds.FindCommonDrug
     │ │ ├TfrmODMeds.FindDoseFields
     │ │ ├SaveDrug
     │ │ └KillDrug
     │ ├TfrmODMeds.ConstructedDoseFields
     │ ├TfrmODMeds.ValueOf
     │ │ ├GetSingleDoseSchedule
     │ │ ├GetSingleDoseScheduleEX
     │ │ ├TfrmODMeds.FieldsForDose
     │ │ │ └TfrmODMeds.ConstructedDoseFields
     │ │ ├TfrmODMeds.FieldsForDrug
     │ │ ├GetComplexDoseSchedule
     │ │ │ └TfrmODMeds.ValFor
     │ │ └GetComplexDoseScheduleEX
     │ │   └TfrmODMeds.ValFor
     │ ├TfrmODMeds.lblAdminSchGetText
     │ ├TfrmODMeds.ValFor
     │ ├TfrmODMeds.InpatientSig
     │ │ ├TfrmODMeds.ValueOf...
     │ │ └TfrmODMeds.CheckDecimal
     │ │   └TfrmODMeds.TextDosage
     │ ├TfrmODMeds.OutpatientSig
     │ │ ├TfrmODMeds.ValueOf...
     │ │ └TfrmODMeds.CheckDecimal...
     │ └TResponses.GetOrderText
     │   ├TResponses.NextInstance
     │   ├TResponses.FindResponseByName
     │   ├TResponses.FormatResponse
     │   │ └TResponses.FindResponseByIEN
     │   └TResponses.AppendChildren
     │     ├TResponses.FindPromptByIEN
     │     ├TResponses.FindResponseByIEN
     │     └TResponses.FormatResponse...
     ├TResponses.NextInstance
     ├TfrmODMeds.ValueOfResponse
     │ └TResponses.IValueFor
     ├TfrmODMeds.ValueOf...
     ├TfrmODMeds.UpdateStartExpires
     │ ├TfrmODMeds.ValFor
     │ ├TfrmODMeds.lblAdminSchSetText
     │ ├TfrmODMeds.lblAdminSchGetText
     │ ├LoadAdminInfo
     │ ├FMToday
     │ │ └FMNow
     │ └TfrmODMeds.DisplayDoseNow
     ├IsClozapineOrder
     ├TfrmODMeds.UpdateDefaultSupply
     │ ├TResponses.IValueFor
     │ ├IsClozapineOrder
     │ ├DefaultDays
     │ └DaysToQty
     ├TfrmODMeds.UpdateSupplyQuantity
     │ ├TfrmODMeds.DurationToDays
     │ │ └TfrmODMeds.ValFor
     │ ├DaysToQty
     │ └QtyToDays
     └TfrmODMeds.UpdateRefills
       └CalcMaxRefills

Calls

Name Declaration Comments
TfrmODMeds.UpdateRelated procedure UpdateRelated(DelayUpdate: Boolean = TRUE); -


Source

2513  procedure TfrmODMeds.cboDosageExit(Sender: TObject);
2514  var
2515  str: string;
2516  begin
2517    inherited;
2518    str := cboDosage.Text;
2519    if (length(cboDosage.Text)<1) then
2520        cboDosage.ItemIndex := -1;
2521   (* Probably not needed here since this on validation check on accept
2522    if (LeftStr(cboDosage.Text,1)='.') then
2523         begin
2524           infoBox('Dosage must have a leading numeric value','Invalid Dosage',MB_OK);
2525           if self.tabDose.TabIndex = TI_DOSE then cboDosage.SetFocus;
2526           Exit;
2527         end; *)
2528    if (length(cbodosage.Text)>0) and (cboDosage.ItemIndex > -1) and
2529      (trim(Piece(cboDosage.Items.Strings[cboDosage.ItemIndex],U,5)) <> trim(Piece(cboDosage.Text,tab,1))) then
2530      begin
2531        cboDosage.ItemIndex := -1;
2532        cboDosage.Text := Piece(str, tab, 1);
2533        UpdateRelated(false);
2534      end;
2535    if ActiveControl = memMessage then
2536    begin
2537      memMessage.SendToBack;
2538      PnlMessage.Visible := False;
2539      Exit;
2540    end;
2541    if ActiveControl = memComment then
2542    begin
2543     if PnlMessage.Visible = true then
2544     begin
2545       memMessage.SendToBack;
2546       PnlMessage.Visible := False;
2547     end;
2548    end
2549    else if (ActiveControl <> btnSelect) and (ActiveControl <> memComment) then
2550    begin
2551     if PnlMessage.Visible = true then
2552     begin
2553       memMessage.SendToBack;
2554       PnlMessage.Visible := False;
2555     end;
2556     //cboDosageClick(Self);
2557    end;
2558  end;