Procedure

TfrmODProc.SetupDialog

Directives

Override

Module

fODProc

Last Modified

7/15/2014 3:26:34 PM

Visibility

Public

Overrides

TfrmODBase.SetupDialog

Owner

TfrmODProc

Declaration

procedure SetupDialog(OrderAction: Integer; const ID: string); override;

Calls Hierarchy


TfrmODProc.SetupDialog
 ├TfrmODProc.ReadServerVariables
 │ ├TfrmODProc.SetProvDiagPromptingMode
 │ │ ├GetProvDxMode
 │ │ └TfrmODProc.ControlChange
 │ │   ├TResponses.Update
 │ │   │ ├TResponses.FindResponseByName
 │ │   │ └TResponses.IENForPrompt
 │ │   ├TfrmODProc.updateService
 │ │   │ ├TfrmODProc.setup508Label
 │ │   │ └TResponses.Update...
 │ │   └TResponses.GetOrderText
 │ │     ├TResponses.NextInstance
 │ │     ├TResponses.FindResponseByName
 │ │     ├TResponses.FormatResponse
 │ │     │ └TResponses.FindResponseByIEN
 │ │     └TResponses.AppendChildren
 │ │       ├TResponses.FindPromptByIEN
 │ │       ├TResponses.FindResponseByIEN
 │ │       └TResponses.FormatResponse...
 │ └TfrmODBase.GetKeyVariable
 ├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
 ├GetProcedureServices
 ├TResponses.FindResponseByName
 ├TfrmODProc.ShowPrerequisites
 │ ├GetServicePrerequisites
 │ └DisplayPrerequisites
 │   └CreateReportBox
 │     └TfrmBase508Form.Create
 │       ├TfrmBase508Form.UpdateAccessibilityActions
 │       ├UnfocusableControlEnter
 │       └AdjustControls
 │         ├TfrmBase508Form.ModifyUnfocusableControl
 │         └..(rec)..
 ├TfrmODProc.SetProvDiagPromptingMode...
 ├TfrmODProc.GetProvDxandValidateCode
 │ ├TResponses.FindResponseByName
 │ └IsActiveICDCode
 │   └IsActiveCode
 ├SetTemplateDialogCanceled
 ├WasTemplateDialogCanceled
 ├TfrmODProc.SetupReasonForRequest
 │ ├TfrmODProc.DefaultReasonForRequest
 │ │ ├GetDefaultReasonForRequest
 │ │ ├ExpandOrderObjects...
 │ │ ├WasTemplateDialogCanceled
 │ │ ├TemplateBPHasObjects
 │ │ └FastAssignWith508Msg
 │ │   └SpeakTextInserted
 │ ├ReasonForRequestEditable
 │ ├EnableReason
 │ └DisableReason
 ├TfrmODBase.OrderMessage
 │ └TfrmODBase.ShowOrderMessage
 ├ConsultMessage
 └TfrmODProc.ControlChange...

Calls

Name Declaration Comments
ConsultMessage function ConsultMessage(AnIEN: Integer): string; -
TfrmODProc.ControlChange procedure ControlChange(Sender: TObject); -
TResponses.FindResponseByName function FindResponseByName(const APromptID: string; AnInstance: Integer): TResponse; -
GetProcedureServices function GetProcedureServices(ProcIEN: integer): TStrings; -
TfrmODProc.GetProvDxandValidateCode procedure GetProvDxandValidateCode(AResponses: TResponses); -
TfrmODBase.OrderMessage procedure OrderMessage(const AMessage: string); -
TfrmODProc.ReadServerVariables procedure ReadServerVariables; -
TResponses.SetControl procedure SetControl(AControl: TControl; const APromptID: string; AnInstance: Integer); -
TfrmODProc.SetProvDiagPromptingMode procedure SetProvDiagPromptingMode; -
SetTemplateDialogCanceled procedure SetTemplateDialogCanceled(value: Boolean); -
TfrmODProc.SetupReasonForRequest procedure SetupReasonForRequest(OrderAction: integer); -
TfrmODProc.ShowPrerequisites function ShowPrerequisites: boolean; -
WasTemplateDialogCanceled function WasTemplateDialogCanceled: Boolean; -


Source

223   procedure TfrmODProc.SetupDialog(OrderAction: Integer; const ID: string);
224   var
225     tmpResp: TResponse;
226   begin
227     inherited;
228     ReadServerVariables;
229     if OrderAction in [ORDER_COPY, ORDER_EDIT, ORDER_QUICK] then with Responses do        {*KCM*}
230     begin
231       SetControl(cboProc,       'ORDERABLE', 1);
232       if cboProc.ItemIndex < 0 then exit;
233       FastAssign(GetProcedureServices(cboProc.ItemIEN), cboService.Items);
234       Changing := True;
235       tmpResp := TResponse(FindResponseByName('CLASS',1));
236       cboCategory.SelectByID(tmpResp.IValue);
237       if tmpResp.IValue = 'I' then
238         radInpatient.Checked := True
239       else
240         radOutpatient.Checked := True ;
241       SetControl(cboUrgency,    'URGENCY',     1);
242       SetControl(cboPlace,      'PLACE',     1);
243       SetControl(txtAttn,       'PROVIDER',  1);
244       SetControl(calEarliest,   'EARLIEST',  1);
245       cboProc.Enabled := False;
246       cboProc.Font.Color := clGrayText;
247      //SetControl(cboService,    'SERVICE',   1);     // to fix OR*3.0*95 bug in v17.6  (RV)
248       tmpResp := TResponse(FindResponseByName('SERVICE',1));
249       if tmpResp <> nil then
250         cboService.SelectByID(Piece(tmpResp.IValue, U, 1))
251       else if (cboService.Items.Count = 1) then
252         cboService.ItemIndex := 0
253       else if (cboService.Items.Count > 1) then
254         cboService.ItemIndex := -1 ;
255       if cboService.ItemIndex > -1 then
256         begin
257           cboService.Enabled := False;
258           cboService.Font.Color := clGrayText;
259         end
260       else
261         begin
262           cboService.Enabled := True;
263           cboService.Font.Color := clWindowText;
264         end;
265       if (OrderAction in [ORDER_COPY, ORDER_QUICK]) and (not ShowPrerequisites) then
266         begin
267           Close;
268           Exit;
269         end;
270       SetProvDiagPromptingMode;
271       GetProvDxandValidateCode(Responses);
272       SetTemplateDialogCanceled(FALSE);
273       SetControl(memReason,     'COMMENT',   1);
274       if WasTemplateDialogCanceled then
275       begin
276         AbortOrder := True;   
277         OkToFreeProcDialog := true;
278         SetTemplateDialogCanceled(FALSE);
279         Close;
280         Exit;
281       end;
282       SetTemplateDialogCanceled(FALSE);
283       SetupReasonForRequest(OrderAction);
284       if WasTemplateDialogCanceled then
285       begin
286         AbortOrder := True;
287         OkToFreeProcDialog := true;
288         SetTemplateDialogCanceled(FALSE);
289         Close;
290         Exit;
291       end;
292       Changing := False;
293       OrderMessage(ConsultMessage(cboProc.ItemIEN));
294       ControlChange(Self);
295     end;
296   end;