Procedure

TfrmODMeds.grdDosesKeyDown

Module

fODMeds

Last Modified

7/15/2014 3:26:42 PM

Visibility

Public/Published

Owner

TfrmODMeds

Declaration

procedure grdDosesKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);

Calls Hierarchy


TfrmODMeds.grdDosesKeyDown
 ├TfrmODMeds.btnXInsertClick
 │ ├TfrmODMeds.ShowEditor
 │ │ ├TfrmODMeds.ValFor
 │ │ ├SynchCombo
 │ │ ├PlaceControl
 │ │ └TfrmODMeds.UpdateDurationControls
 │ └TfrmODMeds.DropLastSequence
 └TfrmODMeds.btnXRemoveClick
   ├TfrmODMeds.DropLastSequence
   └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...

Calls

Name Declaration Comments
TfrmODMeds.btnXInsertClick procedure btnXInsertClick(Sender: TObject); -
TfrmODMeds.btnXRemoveClick procedure btnXRemoveClick(Sender: TObject); -


Source

5043  procedure TfrmODMeds.grdDosesKeyDown(Sender: TObject; var Key: Word;
5044    Shift: TShiftState);
5045  begin
5046    inherited;
5047    case Key of
5048  //  VK_RETURN:   //moved to form key press
5049    VK_RIGHT:
5050      begin
5051        if (not FInptDlg) and (self.grdDoses.Col = COL_DURATION) then
5052          begin
5053            self.grdDoses.Col := COL_SEQUENCE;
5054            Key := 0;
5055          end;
5056      end;
5057    VK_LEFT:
5058      begin
5059        if (not FInptDlg) and (self.grdDoses.Col = COL_SEQUENCE) then
5060          begin
5061            self.grdDoses.Col := COL_DURATION;
5062            Key := 0;
5063          end;
5064      end;
5065    VK_ESCAPE:
5066      begin
5067        ActiveControl := FindNextControl(Sender as TWinControl, False, True, False); //Previous control
5068        Key := 0;
5069      end;
5070    VK_INSERT:
5071      begin
5072        btnXInsertClick(self);
5073        Key := 0;
5074      end;
5075    VK_DELETE:
5076      begin
5077        btnXRemoveClick(self);
5078        Key := 0;
5079      end;
5080    VK_TAB:
5081      begin
5082        if ssShift in Shift then
5083        begin
5084          ActiveControl := tabDose; //Previeous control
5085          Key := 0;
5086        end
5087        else if ssCtrl	in Shift then
5088        begin
5089          ActiveControl := memComment;
5090          Key := 0;
5091        end;
5092      end;
5093    end;
5094  end;