Procedure

TfrmODMeds.cmdAcceptClick

Module

fODMeds

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmODMeds

Declaration

procedure cmdAcceptClick(Sender: TObject);

Calls Hierarchy


TfrmODMeds.cmdAcceptClick
 ├TfrmODMeds.cboScheduleClick
 │ ├TfrmODMeds.CreateOtherScheduel
 │ │ └ShowOtherSchedule
 │ │   ├TfrmBase508Form.Create
 │ │   │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ │   │ ├UnfocusableControlEnter
 │ │   │ └AdjustControls
 │ │   │   ├TfrmBase508Form.ModifyUnfocusableControl
 │ │   │   └..(rec)..
 │ │   └SetFormPosition
 │ │     └TSizeHolder.GetSize
 │ └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
 ├TfrmODMeds.ValFor
 ├TfrmODBase.SetDisplayGroup
 ├DisplayGroupByName
 └TfrmODMeds.DropLastSequence

Calls

Name Declaration Comments
TfrmODMeds.cboScheduleClick procedure cboScheduleClick(Sender: TObject); -
DisplayGroupByName function DisplayGroupByName(const AName: string): Integer; -
TfrmODMeds.DropLastSequence procedure DropLastSequence(ASign: integer = 0); -
TfrmODBase.SetDisplayGroup procedure SetDisplayGroup(Value: Integer); -
TfrmODMeds.ValFor function ValFor(FieldID, ARow: Integer): string; -


Source

4822  procedure TfrmODMeds.cmdAcceptClick(Sender: TObject);
4823  var
4824  i: integer;
4825  begin
4826    if (FInptDlg) and (cboSchedule.Text = 'OTHER') then
4827    begin
4828      cboScheduleClick(Self);
4829      Exit;
4830    end;
4831    if timCheckChanges.Enabled = True then sleep(1500);
4832    //AGP Change for 26.45 PSI-04-069
4833    if self.tabDose.TabIndex = 1 then
4834      begin
4835         for i := 2 to self.grdDoses.RowCount do
4836           begin
4837             if ((ValFor(COL_DOSAGE, i-1) <> '') and (ValFor(COL_DOSAGE, i) <> '')) and (ValFor(COL_SEQUENCE,i-1) = '') then
4838               begin
4839                infoBox('To be able to complete a complex order every row except for the last row must have a conjunction defined. ' + CRLF
4840                + CRLF + 'Verify that all rows have a conjunction defined.','Sequence Error',MB_OK);
4841                Exit;
4842               end;
4843             //text := Self.cboXDosage.Items.Strings[i];
4844           end;
4845      end;
4846    if FInptDlg and (not FOutptIV)
4847      then DisplayGroup := DisplayGroupByName('UD RX')
4848    else DisplayGroup := DisplayGroupByName('O RX');
4849   (* if (Not FInptDlg) then
4850      begin
4851        if (ValidateDaySupplyandQuantity(strtoInt(txtSupply.Text), strtoInt(txtQuantity.text)) = false) then Exit
4852        else ClearMaxData;
4853      end;   *)
4854    //if (Not FInptDlg) and (ValidateMaxQuantity(strtoInt(txtQuantity.Text)) = false) then Exit;
4855    
4856  
4857    //timCheckChangesTimer(Self);
4858    DropLastSequence;
4859    cmdAccept.SetFocus;
4860    inherited;
4861    (*if self.Responses.Cancel = true then
4862      begin
4863        self.Destroy;
4864        exit;
4865      end; *)
4866  end;