Procedure

CreatePatientHeader

Module

rReports

Last Modified

7/15/2014 3:26:44 PM

Comments

Standard patient header, from HEAD^ORWRPP

Scope

Interfaced

Declaration

procedure CreatePatientHeader(var HeaderList: TStringList; PageTitle: string);

Calls Hierarchy


CreatePatientHeader
 ├TEncounter.GetLocationName
 │ └TEncounter.UpdateText
 │   └GetEncounterText
 └FMNow

Called-By Hierarchy


                         CreatePatientHeader
                        PrintWindowsReport┤ 
                            PrintStrings┤ │ 
           TfrmReportBox.cmdPrintClick┤ │ │ 
        TfrmTemplateView.btnPrintClick┘ │ │ 
                TfrmPtDemo.cmdPrintClick┤ │ 
                TfrmNotePrint.cmdOKClick┤ │ 
                             PrintNote┘ │ │ 
             TfrmDCSumm.RequestPrint┤   │ │ 
       TfrmFrame.mnuFilePrintClick┘ │   │ │ 
     TfrmDCSumm.RequestMultiplePrint┤   │ │ 
          TfrmPrintList.cmdOKClick┘ │   │ │ 
   TfrmConsults.mnuActNotePrintClick┤   │ │ 
TfrmConsults.popNoteMemoPrintClick┘ │   │ │ 
            TfrmSurgery.RequestPrint┤   │ │ 
       TfrmFrame.mnuFilePrintClick┘ │   │ │ 
              TfrmNotes.RequestPrint┤   │ │ 
       TfrmFrame.mnuFilePrintClick┘ │   │ │ 
      TfrmNotes.RequestMultiplePrint┘   │ │ 
          TfrmPrintList.cmdOKClick┘     │ │ 
         TfrmPrerequisites.cmdPrintClick┤ │ 
                 TfrmLabPrint.cmdOKClick┤ │ 
                             PrintLabs┘ │ │ 
               TfrmLabs.RequestPrint┘   │ │ 
              TfrmLabs.Print1Click┤     │ │ 
              TfrmLabs.Print2Click┤     │ │ 
       TfrmFrame.mnuFilePrintClick┘     │ │ 
                TfrmReportPrt.cmdOKClick┤ │ 
                          PrintReports┘ │ │ 
            TfrmLabs.RequestPrint...┤   │ │ 
            TfrmReports.RequestPrint┤   │ │ 
       TfrmFrame.mnuFilePrintClick┤ │   │ │ 
           TfrmReports.Print1Click┤ │   │ │ 
           TfrmReports.Print2Click┘ │   │ │ 
           TfrmProblems.RequestPrint┘   │ │ 
       TfrmFrame.mnuFilePrintClick┘     │ │ 
                 Tfrm513Print.cmdOKClick┘ │ 
                            PrintSF513┘   │ 
           TfrmConsults.RequestPrint┤     │ 
TfrmConsults.mnuActPrintSF513Click┤ │     │ 
       TfrmFrame.mnuFilePrintClick┘ │     │ 
   TfrmConsults.RequestMultiplePrint┘     │ 
          TfrmPrintList.cmdOKClick┘       │ 
                                PrintGraph┤ 
                  TfrmLabs.PrintLabGraph┤ │ 
              TfrmLabs.RequestPrint...┤ │ │ 
                TfrmLabs.popPrintClick┘ │ │ 
                TfrmVitals.popPrintClick┘ │ 
                           PrintStrings...┤ 
                  TfrmPtDemo.cmdPrintClick┤ 
           TfrmPrerequisites.cmdPrintClick┤ 
                TfrmLabPrint.cmdOKClick...┤ 
               TfrmReportPrt.cmdOKClick...┘ 

Calls

Name Declaration Comments
FMNow function FMNow: TFMDateTime; -
TEncounter.GetLocationName function GetLocationName: string; -

Called-By

Name Declaration Comments
TfrmLabPrint.cmdOKClick procedure cmdOKClick(Sender: TObject); -
TfrmReportPrt.cmdOKClick procedure cmdOKClick(Sender: TObject); -
TfrmPtDemo.cmdPrintClick procedure cmdPrintClick(Sender: TObject); -
TfrmPrerequisites.cmdPrintClick procedure cmdPrintClick(Sender: TObject); -
PrintGraph procedure PrintGraph(GraphImage: TChart; PageTitle: string); -
PrintStrings procedure PrintStrings(Form: TForm; StringText: TStrings; const Title, Trailer: string); -
PrintWindowsReport procedure PrintWindowsReport(ARichEdit: TRichEdit; APageBreak, ATitle: string; var ErrMsg: string; IncludeHeader: Boolean = false); -


Source

637   procedure CreatePatientHeader(var HeaderList: TStringList; PageTitle: string);
638   // standard patient header, from HEAD^ORWRPP
639   var
640     tmpStr, tmpItem: string;
641   begin
642     with HeaderList do
643       begin
644         Add(' ');
645         Add(StringOfChar(' ', (74 - Length(PageTitle)) div 2) + PageTitle);
646         Add(' ');
647         tmpStr := Patient.Name + '   ' + Patient.SSN;
648         tmpItem := tmpStr + StringOfChar(' ', 39 - Length(tmpStr)) + Encounter.LocationName;
649         tmpStr := FormatFMDateTime('mmm dd, yyyy', Patient.DOB) + ' (' + IntToStr(Patient.Age) + ')';
650         tmpItem := tmpItem + StringOfChar(' ', 74 - (Length(tmpItem) + Length(tmpStr))) + tmpStr;
651         Add(tmpItem);
652         Add(StringOfChar('=', 74));
653         Add('*** WORK COPY ONLY ***' + StringOfChar(' ', 24) + 'Printed: ' + FormatFMDateTime('mmm dd, yyyy  hh:nn', FMNow));
654         Add(' ');
655         Add(' ');
656       end;
657   end;