Procedure

TfrmODRad.InitDialog

Directives

Override

Module

fODRad

Last Modified

7/15/2014 3:26:42 PM

Visibility

Protected

Overrides

TfrmODBase.InitDialog

Owner

TfrmODRad

Declaration

procedure InitDialog; override;

Calls Hierarchy


TfrmODRad.InitDialog
 ├ReasonForStudyCarryOn
 ├GetEventDiv1
 ├TCtrlInits.SetControl
 │ ├ClearControl
 │ └TCtrlInits.FindInitByName
 ├TfrmODBase.OrderForInpatient
 │ ├OrderEventTypeOnCreate
 │ └IsPassEvt1
 ├TfrmODRad.setup508Label
 ├PatientOnIsolationProcedures
 └TfrmODRad.ControlChange
   ├TResponses.Clear
   ├TResponses.Update
   │ ├TResponses.FindResponseByName
   │ └TResponses.IENForPrompt
   ├TEncounter.GetLocationName
   │ └TEncounter.UpdateText
   │   └GetEncounterText
   └TResponses.GetOrderText
     ├TResponses.NextInstance
     ├TResponses.FindResponseByName
     ├TResponses.FormatResponse
     │ └TResponses.FindResponseByIEN
     └TResponses.AppendChildren
       ├TResponses.FindPromptByIEN
       ├TResponses.FindResponseByIEN
       └TResponses.FormatResponse...

Called-By Hierarchy


                TfrmODRad.InitDialog
             TfrmODRad.SetupDialog┤ 
         TfrmODRad.ImageTypeChange┘ 
         TfrmODRad.cboImTypeExit┤   
TfrmODRad.cboImTypeDropDownClose┘   

Calls

Name Declaration Comments
TfrmODRad.ControlChange procedure ControlChange(Sender: TObject); -
GetEventDiv1 function GetEventDiv1(const AnEvntID: string): string; -
TfrmODBase.OrderForInpatient function OrderForInpatient: Boolean; -
PatientOnIsolationProcedures function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; -
ReasonForStudyCarryOn function ReasonForStudyCarryOn: Boolean; -
TCtrlInits.SetControl procedure SetControl(AControl: TControl; const ASection: string); -
TfrmODRad.setup508Label procedure setup508Label(text: string; lbl: TVA508StaticText; ctrl: TControl); -

Called-By

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


Source

228   procedure TfrmODRad.InitDialog;
229   var
230      i: integer;
231      tmplst: TStringList;
232      cboSubmitText: String;
233   begin
234     if not FEditCopy then
235     begin
236       inherited;
237       if not ReasonForStudyCarryOn then txtReason.text := '';
238     end;
239   
240     FPreOpDate := '';
241     FLastRadID := '';
242     Radiologist := '';
243     Contract := '';
244     Research := '';
245     ALocation := 0;
246     AName := '';
247     AType := 0;
248     FEvtDelayDiv := '';
249     if (Self.EvtID > 0 ) and (FEvtDelayDiv = '') then
250       FEvtDelayDiv := GetEventDiv1(IntToStr(Self.EvtID));
251     with CtrlInits do
252      begin
253       SetControl(cboProcedure, 'ShortList');
254       if cboProcedure.Items.Count > 0 then cboProcedure.InsertSeparator;
255       SetControl(FRadCommonCombo, 'Common Procedures');
256       for i := 0 to FRadCommonCombo.Items.Count-1 do
257         cboProcedure.Items.Add(FRadCommonCombo.Items[i]);
258       if FRadCommonCombo.Items.Count>0 then cboProcedure.InsertSeparator;
259   
260       //calRequestDate.Text := 'TODAY';     default removed per E3R #19834 - v27.10 - RV
261       SetControl(cboAvailMod, 'Modifiers');
262       SetControl(cboUrgency, 'Urgencies');
263       SetControl(cboTransport, 'Transport');
264       with cboTransport do if OrderForInpatient
265         then SelectByID('W')
266         else SelectByID('A');
267       SetControl(cboCategory, 'Category');
268       with cboCategory do if OrderForInpatient
269         then SelectByID('I')
270         else SelectByID('O');
271       SetControl(cboSubmit, 'Submit to');
272       SetControl(lblAskSubmit,'Ask Submit') ;
273       if (cboSubmit.Items.Count = 0) then
274         begin
275           cboSubmit.ItemIndex := -1;
276           lblSubmit.Enabled := False;
277           cboSubmit.Enabled := False;
278           //TDP - CQ#19393 cboSubmit 508 changes
279           cboSubmitText := cboSubmit.Text;
280           if cboSubmitText = '' then cboSubmitText := 'No Value';
281           setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
282           cboSubmit.Font.Color := clGrayText;
283         end
284       else if (lblAskSubmit.Caption = 'YES') then
285         begin
286           if (cboSubmit.Items.Count > 1) then
287             begin
288               tmplst := TStringList.Create;
289               try
290                 FastAssign(cboSubmit.Items, tmplst);
291                 SortByPiece(tmplst, U, 2);
292                 FastAssign(tmplst, cboSubmit.Items);
293               finally
294                 tmplst.Free;
295               end;
296               cboSubmit.ItemIndex := -1 ;
297               lblSubmit.Enabled := True;
298               cboSubmit.Enabled := True;
299               //TDP - CQ#19393 cboSubmit 508 changes
300               cboSubmitText := cboSubmit.Text;
301               if cboSubmitText = '' then cboSubmitText := 'No Value';
302               setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
303               cboSubmit.Font.Color := clWindowText;
304             end
305           else
306             begin
307               cboSubmit.ItemIndex := 0;
308               lblSubmit.Enabled := False;
309               cboSubmit.Enabled := False;
310               //TDP - CQ#19393 cboSubmit 508 changes
311               cboSubmitText := cboSubmit.Text;
312               if cboSubmitText = '' then cboSubmitText := 'No Value';
313               setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
314               cboSubmit.Font.Color := clGrayText;
315             end;
316         end
317       else if lblAskSubmit.Caption = 'NO' then
318         begin
319           if (cboSubmit.Items.Count = 1) then
320             cboSubmit.ItemIndex := 0
321           else
322             cboSubmit.ItemIndex := -1 ;
323           lblSubmit.Enabled := False;
324           cboSubmit.Enabled := False;
325           //TDP - CQ#19393 cboSubmit 508 changes
326           cboSubmitText := cboSubmit.Text;
327           if cboSubmitText = '' then cboSubmitText := 'No Value';
328           setup508Label(cboSubmitText, Submitlbl508, cboSubmit);
329           cboSubmit.Font.Color := clGrayText;
330         end;
331       chkIsolation.Checked := PatientOnIsolationProcedures(Patient.DFN) ;
332       SetControl(lstLastExam, 'Last 7 Days');
333      end;
334     lstSelectMod.Clear;
335     ControlChange(Self);
336     StatusText('Initializing Long List');
337     cboProcedure.InitLongList('') ;
338     StatusText('');
339   end;