Module

fPrintList

Path

C:\CPRS\CPRS30\fPrintList.pas

Last Modified

7/15/2014 3:26:38 PM

Units Used in Interface

Name Comments
fAutoSz -
fConsult513Prt -

Units Used in Implementation

Name Comments
fConsults -
fDCSumm -
fFrame -
fNotePrt -
fNotes -
rTIU -
uConst -
uTIU -

Classes

Name Comments
TfrmPrintList -

Procedures

Name Owner Declaration Scope Comments
cmdCancelClick TfrmPrintList procedure cmdCancelClick(Sender: TObject); Public/Published -
cmdOKClick TfrmPrintList procedure cmdOKClick(Sender: TObject); Public/Published -
FormCreate TfrmPrintList procedure FormCreate(Sender: TObject); Public/Published -

Functions

Name Owner Declaration Scope Comments
SelectParentFromList TfrmPrintList function SelectParentFromList(ATree: TORTreeView; PageID: Integer): string; Public
Public declarations
strObj: TStringList;

Global Variables

Name Type Declaration Comments
frmPrintList TfrmPrintList frmPrintList: TfrmPrintList; -
HLDPageID Integer HLDPageID: Integer; -


Module Source

1     unit fPrintList;
2     
3     interface
4     
5     uses
6      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7       Dialogs, fAutoSz, StdCtrls, ORCtrls, fConsult513Prt, VA508AccessibilityManager;
8     
9     type
10      TfrmPrintList = class(TfrmAutoSz)
11        lbIDParents: TORListBox;
12        cmdOK: TButton;
13        cmdCancel: TButton;
14        lblListName: TLabel;
15        procedure FormCreate(Sender: TObject);
16        procedure cmdCancelClick(Sender: TObject);
17        procedure cmdOKClick(Sender: TObject);
18    
19      private
20        { Private declarations }
21         FParentNode: string;
22      public
23        { Public declarations }
24        function SelectParentFromList(ATree: TORTreeView; PageID: Integer): string;
25      end;
26    
27    var
28      frmPrintList: TfrmPrintList;
29      HLDPageID: Integer;
30    
31    implementation
32    
33    {$R *.dfm}
34    uses
35      uTIU, rTIU, uConst, fNotes, fNotePrt, ORFn, fConsults, fDCSumm, fFrame;
36    
37    procedure TfrmPrintList.FormCreate(Sender: TObject);
38    begin
39      inherited;
40       FParentNode := '';
41    end;
42    
43    procedure TfrmPrintList.cmdCancelClick(Sender: TObject);
44    begin
45      inherited;
46      FParentNode := '';
47      Close;
48    end;
49    
50    procedure TfrmPrintList.cmdOKClick(Sender: TObject);
51    begin
52      inherited;
53      case HLDPageID of
54        CT_NOTES:        frmNotes.RequestMultiplePrint(Self);
55        CT_CONSULTS:     frmConsults.RequestMultiplePrint(Self);
56        CT_DCSUMM:       frmDCSumm.RequestMultiplePrint(Self);
57      end; {case}
58      FParentNode := lbIDParents.ItemID;
59      Close;
60    end;
61    
62    function TfrmPrintList.SelectParentFromList(ATree: TORTreeView; PageID: Integer): string;
63    var
64      frmPrintList: TfrmPrintList;
65      i, AnImg: integer;
66      x: string;
67      tmpList: TStringList;
68      //strObj: TStringList;
69    begin
70      HLDPageID := PageID;
71      frmPrintList := TfrmPrintList.Create(Application);
72      frmPrintList.Parent := Self;
73      tmpList := TStringList.Create;
74       try
75        ResizeFormToFont(TForm(frmPrintList));
76        for i := 0 to ATree.Items.Count - 1 do
77          begin
78            AnImg := TORTreeNode(ATree.Items.Item[i]).ImageIndex;
79            if AnImg in [IMG_SINGLE, IMG_PARENT,IMG_IDNOTE_SHUT, IMG_IDNOTE_OPEN,
80                             IMG_IDPAR_ADDENDA_SHUT, IMG_IDPAR_ADDENDA_OPEN] then
81              begin
82                x := TORTreeNode(ATree.Items.Item[i]).Stringdata;
83                tmpList.Add(x);
84                //strObj := TStringList.Create;
85                //strObj.Insert(0,x);
86                //tmpList.AddObject(x, strObj)  // notes and dc/summs & Consults
87              end; {if}
88          end; {for}
89    
90        frmPrintList.lbIDParents.Sorted := FALSE;
91    
92          case PageID of
93          CT_NOTES:
94             begin
95               SortByPiece(tmpList, U, 3);
96               InvertStringList(tmpList);
97               for i := 0 to tmpList.Count - 1 do
98                 begin
99                   x := tmpList[i];
100                  tmpList[i] := Piece(x, U, 1) + U + (MakeNoteDisplayText(x));
101                end;
102              frmPrintList.lblListName.Caption := 'Select Notes to be printed.';
103            end;
104         CT_CONSULTS:
105            begin
106              SortByPiece(tmpList, U, 11);
107              InvertStringList(tmpList);
108              for i := 0 to tmpList.Count - 1 do
109                begin
110                  x := tmpList[i];
111                  tmpList[i] := Piece(x, U, 1) + U + (MakeConsultDisplayText(x));
112                end;
113              frmPrintList.lblListName.Caption := 'Select Consults to be printed.';
114            end;
115         CT_DCSUMM:
116            begin
117              SortByPiece(tmpList, U, 3);
118              InvertStringList(tmpList);
119              for i := 0 to tmpList.Count - 1 do
120                begin
121                  x := tmpList[i];
122                  tmpList[i] := Piece(x, U, 1) + U + (MakeNoteDisplayText(x));
123                end;
124              frmPrintList.lblListName.Caption := 'Select Discharge Summaries to be printed.';
125            end;
126         end; //case
127   
128       FastAssign(tmpList, frmPrintList.lbIDParents.Items);
129       frmPrintList.ShowModal;
130       Result := frmPrintList.FParentNode;
131     finally
132       tmpList.Free;
133       frmPrintList.Release;
134     end;
135   end;
136   
137   end.

Module Calls (2 levels)


fPrintList
 ├fAutoSz
 │ └fBase508Form
 ├uTIU
 ├uConst
 ├fNotes
 │ ├fHSplit
 │ ├uConst
 │ ├uPCE
 │ ├fDrawers
 │ ├rTIU
 │ ├uTIU
 │ ├uDocTree
 │ ├fRptBox
 │ ├fPrintList...
 │ ├fNoteST
 │ ├fNoteSTStop
 │ ├fFrame
 │ ├fEncnt
 │ ├rCore
 │ ├uCore
 │ ├fNoteBA
 │ ├fNoteBD
 │ ├fSignItem
 │ ├fEncounterFrame
 │ ├rPCE
 │ ├fNotePrt
 │ ├fAddlSigners
 │ ├fNoteDR
 │ ├fConsults
 │ ├uSpell
 │ ├fTIUView
 │ ├fTemplateEditor
 │ ├uReminders
 │ ├fReminderDialog
 │ ├uOrders
 │ ├rConsults
 │ ├fReminderTree
 │ ├fNoteProps
 │ ├fNotesBP
 │ ├fTemplateFieldEditor
 │ ├dShared
 │ ├rTemplates
 │ ├fIconLegend
 │ ├fPCEEdit
 │ ├fNoteIDParents
 │ ├rSurgery
 │ ├uTemplates
 │ ├fTemplateDialog
 │ ├uInit
 │ └uVA508CPRSCompatibility
 ├fConsults...
 └fDCSumm
   ├fHSplit...
   ├uConst
   ├uPCE...
   ├fDrawers...
   ├rDCSumm
   ├uDocTree...
   ├uDCSumm
   ├uTIU
   ├fPrintList...
   ├fFrame...
   ├fEncnt...
   ├rCore...
   ├uCore...
   ├fNoteBA...
   ├fNoteBD...
   ├fSignItem...
   ├fEncounterFrame...
   ├rPCE...
   ├fNotePrt...
   ├fAddlSigners...
   ├fNoteDR...
   ├uSpell...
   ├fTIUView...
   ├fTemplateEditor...
   ├rTIU...
   ├fDCSummProps
   ├fNotesBP...
   ├fTemplateFieldEditor...
   ├uTemplates...
   ├fReminderDialog...
   ├dShared...
   ├rTemplates...
   ├fIconLegend...
   ├fNoteIDParents...
   ├fTemplateDialog...
   └uVA508CPRSCompatibility...

Module Called-By (2 levels)


         fPrintList
           fNotes┤ 
         fFrame┤ │ 
  fPrintList...┤ │ 
    fNoteSTStop┤ │ 
      fConsults┤ │ 
fReminderDialog┤ │ 
        fReview┘ │ 
     fConsults...┤ 
          fDCSumm┘ 
      fFrame...┤   
  fPrintList...┤   
     fReview...┤   
   fAddlSigners┘