Procedure

TfrmODDiet.SetValuesFromResponsesEL

Module

fODDiet

Last Modified

7/15/2014 3:26:42 PM

Visibility

Private

Owner

TfrmODDiet

Declaration

procedure SetValuesFromResponsesEL;

Calls Hierarchy


TfrmODDiet.SetValuesFromResponsesEL
 ├TfrmODDiet.ResetControlsEL
 ├TResponses.FindResponseByName
 ├TfrmODDiet.grpMealClick
 │ ├SetMealTimes
 │ │ └ActivateButton
 │ ├TfrmODBase.OrderForInpatient
 │ │ ├OrderEventTypeOnCreate
 │ │ └IsPassEvt1
 │ ├TfrmODDiet.PatientHasRecurringMeals
 │ │ └GetCurrentRecurringOPMeals
 │ └TfrmODDiet.ELChange
 │   ├TResponses.Clear
 │   ├TResponses.Update
 │   │ ├TResponses.FindResponseByName
 │   │ └TResponses.IENForPrompt
 │   ├TfrmODDiet.GetMealTime
 │   ├TfrmODDiet.IsEarlyTray
 │   ├TfrmODBase.OrderForInpatient...
 │   ├TfrmODDiet.GetDaysOfWeek
 │   └TResponses.GetOrderText
 │     ├TResponses.NextInstance
 │     ├TResponses.FindResponseByName
 │     ├TResponses.FormatResponse
 │     │ └TResponses.FindResponseByIEN
 │     └TResponses.AppendChildren
 │       ├TResponses.FindPromptByIEN
 │       ├TResponses.FindResponseByIEN
 │       └TResponses.FormatResponse...
 ├TfrmODBase.OrderForInpatient...
 ├TResponses.SetControl
 │ ├TResponses.FindResponseByName
 │ └AssignBPText
 │   ├DisplayGroupToLinkType
 │   │ └DisplayGroupByName
 │   ├TResponses.EValueFor
 │   ├GetServiceIEN
 │   ├TResponses.IValueFor
 │   ├GetProcedureIEN
 │   ├ExpandOrderObjects
 │   │ ├TdmodShared.BoilerplateOK
 │   │ │ ├ErrCount
 │   │ │ ├AddErr
 │   │ │ └TdmodShared.LoadTIUObjects
 │   │ │   └GetObjectList
 │   │ └GetTemplateText
 │   │   └TEncounter.GetVisitStr
 │   │     └TEncounter.GetVisitCategory
 │   ├SetTemplateDialogCanceled
 │   ├CheckBoilerplate4Fields
 │   ├ExecuteTemplateOrBoilerPlate
 │   └WasTemplateDialogCanceled
 ├TfrmODDiet.calELStopChange
 │ ├TfrmODDiet.SetEnableDOW
 │ └TfrmODDiet.ELChange...
 └TfrmODDiet.ELChange...

Called-By Hierarchy


TfrmODDiet.SetValuesFromResponsesEL
           TfrmODDiet.SetupDialog┘ 

Calls

Name Declaration Comments
TfrmODDiet.calELStopChange procedure calELStopChange(Sender: TObject); -
TfrmODDiet.ELChange procedure ELChange(Sender: TObject); -
TResponses.FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; -
TfrmODDiet.grpMealClick procedure grpMealClick(Sender: TObject); -
TfrmODBase.OrderForInpatient function OrderForInpatient: Boolean; -
TfrmODDiet.ResetControlsEL procedure ResetControlsEL; -
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -

Called-By

Name Declaration Comments
TfrmODDiet.SetupDialog procedure SetupDialog(OrderAction: Integer; const ID: string); override; -


Source

1547  procedure TfrmODDiet.SetValuesFromResponsesEL;
1548  var
1549    AResponse: TResponse;
1550  begin
1551    Changing := True;
1552    ResetControlsEL;
1553    with Responses do
1554    begin
1555      AResponse := FindResponseByName('MEAL', 1);
1556      if AResponse <> nil then
1557      begin
1558        if AResponse.IValue = 'B' then grpMeal.ItemIndex := 0;
1559        if AResponse.IValue = 'N' then grpMeal.ItemIndex := 1;
1560        if AResponse.IValue = 'E' then grpMeal.ItemIndex := 2;
1561      end;
1562      if grpMeal.ItemIndex <> 3 then grpMealClick(Self);
1563      AResponse := FindResponseByName('TIME', 1);
1564      if AResponse <> nil then
1565      begin
1566        if radET1.Caption = AResponse.IValue then radET1.Checked := True;
1567        if radET2.Caption = AResponse.IValue then radET2.Checked := True;
1568        if radET3.Caption = AResponse.IValue then radET3.Checked := True;
1569        if radLT1.Caption = AResponse.IValue then radLT1.Checked := True;
1570        if radLT2.Caption = AResponse.IValue then radLT2.Checked := True;
1571        if radLT3.Caption = AResponse.IValue then radLT3.Checked := True;
1572      end;
1573      if not OrderForInpatient then
1574        SetControl(cboOPELRecurringMeals, 'START', 1)
1575      else
1576      begin
1577        SetControl(calELStart, 'START', 1);
1578        SetControl(calELStop,  'STOP',  1);
1579      end;
1580      calELStopChange(Self);
1581      AResponse := FindResponseByName('SCHEDULE', 1);
1582      if AResponse <> nil then
1583      begin
1584        chkMonday.Checked    := Pos('M', AResponse.IValue) > 0;
1585        chkTuesday.Checked   := Pos('T', AResponse.IValue) > 0;
1586        chkWednesday.Checked := Pos('W', AResponse.IValue) > 0;
1587        chkThursday.Checked  := Pos('R', AResponse.IValue) > 0;
1588        chkFriday.Checked    := Pos('F', AResponse.IValue) > 0;
1589        chkSaturday.Checked  := Pos('S', AResponse.IValue) > 0;
1590        chkSunday.Checked    := Pos('X', AResponse.IValue) > 0;
1591      end;
1592      AResponse := FindResponseByName('YN', 1);
1593      if AResponse <> nil then chkBagged.Checked := AResponse.IValue = '1';
1594    end; {with Responses}
1595    Changing := False;
1596    ELChange(Self);
1597  end;