Procedure

PrintSF513

Module

fConsult513Prt

Last Modified

7/15/2014 3:26:34 PM

Comments

Displays a form that prompts for a device and then prints the SF513

Scope

Interfaced

Declaration

procedure PrintSF513(AConsult: Longint; AConsultTitle: string);

Calls Hierarchy


PrintSF513
 ├TfrmBase508Form.Create
 │ ├TfrmBase508Form.UpdateAccessibilityActions
 │ ├UnfocusableControlEnter
 │ └AdjustControls
 │   ├TfrmBase508Form.ModifyUnfocusableControl
 │   └..(rec)..
 ├GetDefaultPrinter
 ├TUser.SetCurrentPrinter
 └Tfrm513Print.cmdOKClick
   ├CreateReportTextComponent
   │ └ReportTextFontChange
   ├GetFormattedSF513
   ├PrintWindowsReport
   │ └CreatePatientHeader
   │   ├TEncounter.GetLocationName
   │   │ └TEncounter.UpdateText
   │   │   └GetEncounterText
   │   └FMNow
   ├PrintSF513ToDevice
   ├SaveDefaultPrinter
   └TUser.SetCurrentPrinter

Called-By Hierarchy


                            PrintSF513
           TfrmConsults.RequestPrint┤ 
TfrmConsults.mnuActPrintSF513Click┤ │ 
       TfrmFrame.mnuFilePrintClick┘ │ 
   TfrmConsults.RequestMultiplePrint┘ 
          TfrmPrintList.cmdOKClick┘   

Calls

Name Declaration Comments
Tfrm513Print.cmdOKClick procedure cmdOKClick(Sender: TObject); -
TfrmBase508Form.Create constructor Create(AOwner: TComponent); override; -
GetDefaultPrinter function GetDefaultPrinter(DUZ: Int64; Location: integer): string; -
TUser.SetCurrentPrinter procedure SetCurrentPrinter(Value: string); -

Called-By

Name Declaration Comments
TfrmConsults.RequestMultiplePrint procedure RequestMultiplePrint(AForm: TfrmPrintList); -
TfrmConsults.RequestPrint procedure RequestPrint; override; -


Source

59    procedure PrintSF513(AConsult: Longint; AConsultTitle: string);
60    { displays a form that prompts for a device and then prints the SF513 }
61    var
62      frm513Print: Tfrm513Print;
63      DefPrt: string;
64    begin
65      frm513Print := Tfrm513Print.Create(Application);
66      try
67        ResizeFormToFont(TForm(frm513Print));
68        with frm513Print do
69        begin
70          lblConsultTitle.Text := AConsultTitle;
71          FConsult := AConsult;
72          DefPrt := GetDefaultPrinter(User.Duz, Encounter.Location);
73          if User.CurrentPrinter = '' then User.CurrentPrinter := DefPrt;
74          with cboDevice do
75            begin
76              if Printer.Printers.Count > 0 then
77                begin
78                  Items.Add('WIN;Windows Printer^Windows Printer');
79                  Items.Add('^--------------------VistA Printers----------------------');
80                end;
81              if User.CurrentPrinter <> '' then
82                begin
83                  InitLongList(Piece(User.CurrentPrinter, ';', 2));
84                  SelectByID(User.CurrentPrinter);
85                end
86              else
87                InitLongList('');
88            end;
89          if (DefPrt = 'WIN;Windows Printer') and
90             (User.CurrentPrinter = DefPrt) then
91             cmdOKClick(frm513Print)
92          else
93             ShowModal;
94        end;
95      finally
96        frm513Print.Release;
97      end;
98    end;