Module

uSignItems

Path

C:\CPRS\CPRS30\uSignItems.pas

Last Modified

7/15/2014 3:26:44 PM

Comments

.$define debug

Initialization Code

initialization
  FlagCount := ord(high(TSigItemType)) - ord(low(TSigItemType)) + 1;
  BaseFlags := StringOfChar(StsChar[isNA], FlagCount);
  thisChangeItem := TChangeItem.Create; //CQ3301/3302
  AllBtnLeft := 0;

Finalization Code

finalization
  FreeAndNil(uSigItems);

end.

Units Used in Interface

Name Comments
fODBase -
UBAConst -
UBACore -

Units Used in Implementation

Name Comments
fOrdersSign -
fReview -
rOrders -
rPCE -
UBAGlobals -
uConst -
uCore -

Classes

Name Comments
TExposedListBox -
TSigItems -

Procedures

Name Owner Declaration Scope Comments
Add TSigItems procedure Add(ItemType: Integer; const ID: string; Index: integer); Public
TSigItems 

FItems Layout:
1         2               3                            4                      5
OrderID ^ ListBox Index ^ RPC Call was Made (0 or 1) ^ Settings by char pos ^ Disabled Flag
cbClicked TSigItems procedure cbClicked(Sender: TObject); Private -
cbEnter TSigItems procedure cbEnter(Sender: TObject); Private -
cbExit TSigItems procedure cbExit(Sender: TObject); Private -
Clear TSigItems procedure Clear; Public -
ClearDrawItems TSigItems procedure ClearDrawItems; Public -
ClearFcb TSigItems procedure ClearFcb; Public -
CopyCB TSigItems procedure CopyCB(FromIndex, ToIndex: integer); Public BAPHII 1.3.1
CopyCBValues TSigItems procedure CopyCBValues(FromIndex, ToIndex: integer); Private -
DisplayPlTreatmentFactors TSigItems procedure DisplayPlTreatmentFactors; Public -
DisplayUnsignedStsFlags TSigItems procedure DisplayUnsignedStsFlags(sFlags:string); Public Begin Billing Aware
EnableSettings TSigItems procedure EnableSettings(Index: integer; Checked: boolean); Public -
lbDrawItem TSigItems procedure lbDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState); Private -
Notification TSigItems procedure Notification(AComponent: TComponent; Operation: TOperation); override; Protected -
Remove TSigItems procedure Remove(ItemType: integer; const ID: string); Public -
ResetOrders TSigItems procedure ResetOrders; Public Resets ListBox positions, to avoid old data messing things up
SaveSettings TSigItems procedure SaveSettings; Public -
SetSigItems TSigItems procedure SetSigItems(Sender: TObject; sourceOrderID: string); Public BAPHII 1.3.1

Functions

Name Owner Declaration Scope Comments
CreateCB - function CreateCB(AParent: TWinControl): TORCheckBox; Local -
FindCB TSigItems function FindCB(ATag: integer): TORCheckBox; Public BAPHII 1.3.1
FindCBValues TSigItems function FindCBValues(ATag: integer): TORCheckBox; Private -
GetAllBtnLeftPos - function GetAllBtnLeftPos: integer; Interfaced -
GetSigItems TSigItems function GetSigItems : TORStringList; Public BAPHII 1.3.1
GetTempCkBxState TSigItems function GetTempCkBxState(Index: integer; CBValue:TSigItemType): string; Private -
ItemToTag TSigItems function ItemToTag(Info: TSigItemTagInfo): integer; Public CQ5074
notRightOne - function notRightOne(cnter: Integer): Boolean; Local -
OK2SaveSettings TSigItems function OK2SaveSettings: boolean; Public -
SigItemHeight - function SigItemHeight: integer; Interfaced -
SigItems - function SigItems: TSigItems; Interfaced -
SigItemsCS - function SigItemsCS: TSigItems; Interfaced -
TagInfo TSigItems function TagInfo(ASigType: TSigItemType; AIndex: integer): TSigItemTagInfo; Private -
TagToItem TSigItems function TagToItem(ATag: integer): TSigItemTagInfo; Public CQ5074
UpdateListBox TSigItems function UpdateListBox(lb: TCustomListBox): boolean; Public -

Global Variables

Name Type Declaration Comments
AllBtnLeft Integer AllBtnLeft: integer; -
BaseFlags UnicodeString BaseFlags: string; -
FlagCount Integer FlagCount: integer; -
tempCkBx TORCheckBox tempCkBx: TORCheckBox; -
thisChangeItem TChangeItem thisChangeItem: TChangeItem; -
thisOrderID UnicodeString thisOrderID: string; -
uSigItems TSigItems uSigItems: TSigItems = nil; BAPHII 1.3.1
uSigItemsCS TSigItems uSigItemsCS: TSigItems = nil; -
uSingletonFlag Boolean uSingletonFlag: boolean = FALSE; -

Constants

Name Declaration Scope Comments
AllIdx 31000 Global -
ColIdx 30000 Global -
INIT_STR '' Interfaced -
isChecked ItemStatus Global -
isNA ItemStatus Global -
isUnchecked ItemStatus Global -
isUnknown ItemStatus Global -
NA_FLAGS 'NNNNNNNN' Global -
sdLong SigDescType Global -
sdShort SigDescType Global -
siAgentOrange TSigItemType Interfaced -
siCombatVeteran TSigItemType Interfaced -
siEnvironmentalContaminants TSigItemType Interfaced -
SIG_ITEM_VERTICAL_PAD 2 Interfaced -
SigItemDesc array[TSigItemType, SigDescType] of string = Global -
SigItemDisplayOrder array[TSigItemType] of TSigItemType = Global -
siHeadNeckCancer TSigItemType Interfaced -
siIonizingRadiation TSigItemType Interfaced -
siMST TSigItemType Interfaced -
siServiceConnected TSigItemType Interfaced -
siSHAD TSigItemType Interfaced -
StsChar array[ItemStatus] of char = Global -
TC_Diagnosis_Error ' Missing Diagnosis' Interfaced -
TC_Order_Error 'All Service Connection and/or Rated Disabilities questions must be answered, '+#13+ Interfaced -
TX_Diagnosis_Error ' One or more Orders have not been assigned a Diagnosis' Interfaced -
TX_Order_Error 'All Service Connection and/or Rated Disabilities questions must be answered, '+#13+ Interfaced -


Module Source

1     unit uSignItems;
2     
3     {.$define debug}
4     
5     interface
6     
7     uses
8       SysUtils, Windows, Classes, Graphics, Controls, StdCtrls, CheckLst, ORClasses, ORCtrls,
9       Dialogs, UBAConst, fODBase, UBACore, Forms;
10    
11    type
12      TSigItemType = (siServiceConnected, siAgentOrange, siIonizingRadiation,
13                      siEnvironmentalContaminants, siMST, siHeadNeckCancer, siCombatVeteran, siSHAD);
14    
15      TSigItemTagInfo =  record
16        SigType: TSigItemType;
17        Index: integer;
18      end;
19    
20      TlbOnDrawEvent = record
21        xcontrol: TWinControl;
22        xevent: TDrawItemEvent;
23      end;
24    
25      TSigItems = class(TComponent)
26      private
27        FBuilding: boolean;
28        FStsCount: integer;
29        FItems: TORStringList;
30        FOldDrawItemEvent: TDrawItemEvent;
31        FOldDrawItemEvents: array of TlbOnDrawEvent;
32        Fcb: TList;
33        Flb: TCustomListBox;
34        FLastValidX: integer;
35        FValidGap: integer;
36        FDy: integer;
37        FAllCheck: array[TSigItemType] of boolean;
38        FAllCatCheck: boolean;
39        FcbX: array[TSigItemType] of integer;
40        function TagInfo(ASigType: TSigItemType; AIndex: integer): TSigItemTagInfo;
41        procedure cbClicked(Sender: TObject);
42        procedure cbEnter(Sender: TObject);
43        procedure cbExit(Sender: TObject);
44        procedure lbDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
45        procedure CopyCBValues(FromIndex, ToIndex: integer);
46        function  FindCBValues(ATag: integer): TORCheckBox;
47        function  GetTempCkBxState(Index: integer; CBValue:TSigItemType): string;
48    
49      protected
50        procedure Notification(AComponent: TComponent; Operation: TOperation); override;
51      public                          
52        constructor Create(AOwner: TComponent); override;
53        destructor Destroy; override;
54        procedure Add(ItemType: Integer; const ID: string; Index: integer);
55        procedure Remove(ItemType: integer; const ID: string);
56        procedure ResetOrders;
57        procedure Clear;
58        procedure ClearDrawItems;
59        procedure ClearFcb;
60        function  UpdateListBox(lb: TCustomListBox): boolean;
61        procedure EnableSettings(Index: integer; Checked: boolean);
62        function  OK2SaveSettings: boolean;
63        procedure SaveSettings;
64        procedure DisplayPlTreatmentFactors;
65        procedure DisplayUnsignedStsFlags(sFlags:string);
66        function GetSigItems : TORStringList; //BAPHII 1.3.1
67        function FindCB(ATag: integer): TORCheckBox; //BAPHII 1.3.1
68        procedure CopyCB(FromIndex, ToIndex: integer); //BAPHII 1.3.1
69        procedure SetSigItems(Sender: TObject; sourceOrderID: string); //BAPHII 1.3.1
70        function ItemToTag(Info: TSigItemTagInfo): integer; //CQ5074
71        function TagToItem(ATag: integer): TSigItemTagInfo; //CQ5074
72    
73      end;
74    
75    function SigItems: TSigItems;
76    function SigItemsCS: TSigItems;
77    function SigItemHeight: integer;
78    function  GetAllBtnLeftPos: integer;
79    
80    const
81      SIG_ITEM_VERTICAL_PAD = 2;
82    
83      TC_Order_Error = 'All Service Connection and/or Rated Disabilities questions must be answered, '+#13+
84                       'and at least one diagnosis selected for each order that requires a diagnosis.';
85    
86      TX_Order_Error = 'All Service Connection and/or Rated Disabilities questions must be answered, '+#13+
87                       'and at least one diagnosis selected for each order that requires a diagnosis.';
88                       
89      TC_Diagnosis_Error = ' Missing Diagnosis';
90      TX_Diagnosis_Error = ' One or more Orders have not been assigned a Diagnosis';
91      INIT_STR = '';
92    
93    
94    var
95      uSigItems: TSigItems = nil; //BAPHII 1.3.1
96      uSigItemsCS: TSigItems = nil; 
97    
98    
99    implementation
100   
101   uses
102     ORFn, ORNet, uConst, TRPCB, rOrders, rPCE, fOrdersSign, fReview,UBAGlobals,
103     uCore , VAUtils;
104   
105   type
106     ItemStatus = (isNA, isChecked, isUnchecked, isUnknown);
107     SigDescType = (sdShort, sdLong);
108   
109   const
110     SigItemDesc: array[TSigItemType, SigDescType] of string =
111           { siServiceConnected          } (('SC',  'Service Connected Condition'),
112           { siAgentOrange               }  ('AO',  'Agent Orange Exposure'),
113           { siIonizingRadiation         }  ('IR',  'Ionizing Radiation Exposure'),
114           { siEnvironmentalContaminants }  ('SWAC','Southwest Asia Conditions'),
115           { siMST                       }  ('MST', 'MST'), //'Military Sexual Trauma'
116           { siHeadNeckCancer            }  ('HNC', 'Head and/or Neck Cancer'),
117           { siCombatVeteran             }  ('CV',  'Combat Veteran Related'),
118           { siSHAD                      }  ('SHD', 'Shipboard Hazard and Defense'));
119   
120     SigItemDisplayOrder: array[TSigItemType] of TSigItemType =
121        (  siServiceConnected,
122           siCombatVeteran,
123           siAgentOrange,
124           siIonizingRadiation,
125           siEnvironmentalContaminants,
126           siSHAD,
127           siMST,
128           siHeadNeckCancer);
129   
130     StsChar: array[ItemStatus] of char =
131              { isNA        } ('N',
132              { isChecked   }  'C',
133              { isUnchecked }  'U',
134              { isUnknown   }  '?');
135   
136     ColIdx = 30000;
137     AllIdx = 31000;
138     NA_FLAGS = 'NNNNNNNN';
139   
140   var
141     uSingletonFlag: boolean = FALSE;
142     FlagCount: integer;
143     BaseFlags: string;
144     tempCkBx: TORCheckBox;
145     thisOrderID: string;
146     thisChangeItem: TChangeItem;
147     AllBtnLeft: integer;
148   
149   function TSigItems.GetSigItems : TORStringList;
150   begin
151     Result := FItems;
152   end;
153   
154   function TSigItems.FindCB(ATag: integer): TORCheckBox;
155   var
156     i: integer;
157     wc: TWinControl;
158   begin
159     for i := 0 to Fcb.Count-1 do
160     begin
161       wc := TWinControl(Fcb[i]);
162       if(wc is TORCheckBox) and (wc.Tag = ATag) then
163       begin
164         Result := TORCheckBox(wc);
165         exit;
166       end;
167     end;
168     Result := nil;
169   end;
170   
171   procedure TSigItems.CopyCB(FromIndex, ToIndex: integer);
172   var
173     si: TSigItemType;
174     FromTag, ToTag: integer;
175     FromCB, ToCB: TORCheckBox;
176   
177   begin
178     for si := low(TSigItemType) to high(TSigItemType) do
179     begin
180       FromTag := ItemToTag(TagInfo(si, FromIndex));
181       ToTag := ItemToTag(TagInfo(si, ToIndex));
182       FromCB := FindCB(FromTag);
183       ToCB := FindCB(ToTag);
184       if(Assigned(FromCB) and Assigned(ToCB)) then
185         ToCB.State := FromCB.State;
186     end;
187   end;
188   
189   procedure TSigItems.SetSigItems(Sender: TObject; sourceOrderID: string);
190   var
191     i: integer;
192   begin
193     if (Sender as TCaptionCheckListBox).Name = 'clstOrders' then
194       for i := 0 to frmSignOrders.clstOrders.Count - 1 do
195          begin
196          if ((fOrdersSign.frmSignOrders.clstOrders.Selected[i]) and (fOrdersSign.targetOrderID <> fOrdersSign.srcOrderID)) then
197             CopyCB(fOrdersSign.srcIndex, i);
198          end
199     else
200       if (Sender as TCaptionCheckListBox).Name = 'lstReview' then
201         for i := 1 to  frmReview.lstReview.Count -1 do
202            begin
203              if ((fReview.frmReview.lstReview.Selected[i]) and (fReview.targetOrderID <> fReview.srcOrderID)) then
204                 CopyCB(fReview.srcIndex, i);
205            end;
206   end;
207   
208   function SigItems: TSigItems;
209   begin
210     if not assigned(uSigItems) then
211     begin
212       uSingletonFlag := TRUE;
213       try
214         uSigItems := TSigItems.Create(nil);
215       finally
216         uSingletonFlag := FALSE;
217       end;
218     end;
219     Result := uSigItems;
220   end;
221   
222   function SigItemsCS: TSigItems;
223   begin
224     if not assigned(uSigItemsCS) then
225     begin
226       uSingletonFlag := TRUE;
227       try
228         uSigItemsCS := TSigItems.Create(nil);
229       finally
230         uSingletonFlag := FALSE;
231       end;
232     end;
233     Result := uSigItemsCS;
234   end;
235   
236   function SigItemHeight: integer;
237   begin
238     Result := abs(BaseFont.height) + 2 + SIG_ITEM_VERTICAL_PAD;
239   end;
240   
241   function  GetAllBtnLeftPos: integer;
242    begin
243     Result := uSignItems.AllBtnLeft;
244    end;
245   
246   
247   { TSigItems }
248   {
249   FItems Layout:
250   1         2               3                            4                      5
251   OrderID ^ ListBox Index ^ RPC Call was Made (0 or 1) ^ Settings by char pos ^ Disabled Flag
252   }
253   
254   procedure TSigItems.Add(ItemType: Integer; const ID: string; Index: integer);
255   var
256     idx: integer;
257   begin
258     if ItemType = CH_ORD then
259     begin
260       idx := FItems.IndexOfPiece(ID);
261       if idx < 0 then
262         idx := FItems.Add(ID);
263       FItems.SetStrPiece(idx, 2, IntToStr(Index));
264       FItems.SetStrPiece(idx,5,INIT_STR);    // hds4807 value was being reatained when same order selected in FReview.
265   
266     end;
267   end;
268   
269   procedure TSigItems.Clear;
270   begin
271     FItems.Clear;
272     Fcb.Clear;
273     Finalize(FOldDrawItemEvents);
274   end;
275   
276   procedure TSigItems.ClearDrawItems;
277   begin
278     Finalize(FOldDrawItemEvents);
279   end;
280   
281   procedure TSigItems.ClearFcb;
282   begin
283     Fcb.Clear;
284   end;
285   
286   constructor TSigItems.Create(AOwner: TComponent);
287   begin
288     if not uSingletonFlag then
289       raise Exception.Create('Only one instance of TSigItems allowed');
290     inherited Create(AOwner);
291     FItems := TORStringList.Create;
292     Fcb := TList.Create;
293     tempCkBx := TORCheckBox.Create(Owner);
294   
295   end;
296   
297   destructor TSigItems.Destroy;
298   begin
299     FreeAndNil(FItems);
300     FreeAndNil(Fcb);
301     inherited;
302   end;
303   
304   procedure TSigItems.Remove(ItemType: integer; const ID: string);
305   var
306     idx: integer;
307   begin
308     if ItemType = CH_ORD then
309     begin
310       idx := FItems.IndexOfPiece(ID);
311       if idx >= 0 then
312         FItems.Delete(idx);
313     end;
314   end;
315   
316   procedure TSigItems.ResetOrders; // Resets ListBox positions, to avoid old data messing things up
317   var
318     i: integer;
319   begin
320     for i := 0 to FItems.Count-1 do
321       FItems.SetStrPiece(i, 2, '-1');
322   end;
323   
324   function TSigItems.ItemToTag(Info: TSigItemTagInfo): integer;
325   begin
326     if Info.Index < 0 then
327       Result := 0
328     else
329       Result := (Info.Index*FlagCount) + ord(Info.SigType) + 1;
330   end;
331   
332   
333   function TSigItems.TagInfo(ASigType: TSigItemType; AIndex: integer): TSigItemTagInfo;
334   begin
335     Result.SigType := ASigType;
336     Result.Index := AIndex;
337   end;
338   
339   function TSigItems.TagToItem(ATag: integer): TSigItemTagInfo;
340   begin
341     if ATag <= 0 then
342     begin
343       Result.Index := -1;
344       Result.SigType := TSigItemType(0);
345     end
346     else
347     begin
348       dec(ATag);
349       Result.SigType := TSigItemType(ATag mod FlagCount);
350       Result.Index := ATag div FlagCount;
351     end;
352   end;
353   
354   type
355     TExposedListBox = class(TCustomListBox)
356     public
357       property OnDrawItem;
358     end;
359   
360   function TSigItems.UpdateListBox(lb: TCustomListBox): boolean;
361   const
362     cbWidth = 13;
363     cbHeight = 13;
364     btnGap = 2;
365     AllTxt = 'All';
366   
367   var
368     cb: TORCheckBox;
369     btn: TButton;
370     lbl: TLabel;
371     prnt: TWinControl;
372     ownr: TComponent;
373     FirstValidItem: TSigItemType;
374     x, y, MaxX, i, btnW, btnH, j, dx, ht, idx, dgrp: integer;
375     s, id, Code, cType, Flags,OrderStatus,CVFlag,ChangedFlags: string;
376     odie: TlbOnDrawEvent;
377     StsCode: char;
378     sx, si: TSigItemType;
379     sts, StsIdx: ItemStatus;
380     StsUsed: array[TSigItemType] of boolean;
381     AResponses : TResponses;
382     UFlags,HoldFlags: string;
383     thisCB: TORCheckBox;
384     cpFlags: string;
385     
386   
387     itemText: string;
388     thisTagInfo: TSigItemTagInfo;
389   
390     function CreateCB(AParent: TWinControl): TORCheckBox;
391     begin
392        Result := TORCheckBox.Create(ownr);
393        Result.Parent := AParent;
394        Result.Height := cbHeight;
395        Result.Width := cbWidth;
396        Result.GrayedStyle := gsBlueQuestionMark;
397        Result.GrayedToChecked := FALSE;
398        Result.OnClick := cbClicked;
399        Result.OnEnter := cbEnter;
400        Result.OnExit := cbExit;
401        UpdateColorsFor508Compliance(Result);
402        Fcb.Add(Result);
403     end;
404   
405     function notRightOne(cnter: Integer): Boolean;
406     var
407       id,idx: string;
408       ix: Integer;
409     begin
410       Result := TRUE;
411       id := piece(FItems[cnter],'^',1);
412       for ix := 0 to lb.Items.Count - 1 do
413         begin
414           if lb.Items.Objects[ix] is TOrder then
415           begin
416             idx := TOrder(lb.Items.Objects[ix]).ID;
417             if id = idx then Result := FALSE;
418           end;
419           if lb.Items.Objects[ix] is TChangeItem then
420           begin
421             idx := TChangeItem(lb.Items.Objects[ix]).ID;
422             if id = idx then Result := FALSE;
423             
424           end;
425         end;
426     end;
427   
428   begin
429     Result := FALSE;
430   //  Fcb.Clear;
431     FBuilding := TRUE;
432   try
433   
434     try
435       idx := 0;
436       RPCBrokerV.ClearParameters := True;
437   
438       for i := 0 to FItems.Count-1 do
439       begin
440          if notRightOne(i) then continue;
441          
442          s := FItems[i];
443          thisOrderID := Piece(s,U,1);
444          if BILLING_AWARE then
445            if NOT UBACore.IsOrderBillable(thisOrderID) then
446                RemoveOrderFromDxList(thisOrderID);
447          if (piece(s, U, 2) <> '-1') and (piece(s, U, 3) <> '1') then
448          begin
449             with RPCBrokerV do
450                 begin
451                 if idx = 0 then
452                   Param[1].PType := list;
453                 inc(idx);
454                 Param[1].Mult[IntToStr(idx)] := piece(s, U, 1);
455                 end;
456             end;
457          end; //for
458   
459          if idx > 0 then
460             begin
461               rpcGetSC4Orders;
462               for i := 0 to RPCBrokerV.Results.Count-1 do
463                  begin
464                     s := RPCBrokerV.Results[i];
465                   {Begin BillingAware}
466                   if  BILLING_AWARE then
467                   begin
468                     if (CharAt(piece(s,';',2),1) <> '1') then
469                       s := piece(s,U,1);
470                   end;  {End BillingAware }
471                   id := piece(s,U,1);
472                   idx := FItems.IndexOfPiece(id);
473   
474                   if idx >= 0 then
475                   begin
476                       FItems.SetStrPiece(idx, 3, '1'); // Mark as read from RPC
477                       j := 2;
478                       Flags := BaseFlags;
479                        repeat
480                            Code := piece(s,U,j);
481                            if Code = 'EC' then Code := 'SWAC';  // CQ:15431  ; resolve issue of displaying SWAC vs EC.
482                            if Code <> '' then
483                               begin
484                               cType := piece(Code, ';', 1);
485   
486                               for si := low(TSigItemType) to high(TSigItemType) do
487                                  begin
488                                    if cType = SigItemDesc[si, sdShort] then
489                                       begin
490                                       cType := piece(Code, ';', 2);
491   
492                                       if cType = '0' then
493                                         sts := isUnchecked
494                                       else
495                                          if cType = '1' then
496                                            sts := isChecked
497                                          else
498                                            sts := isUnknown;
499   
500                                       Flags[ord(si)+1] := StsChar[sts];
501                                       break;
502   
503                                       end; //if cType = SigItemDesc[si, sdShort]
504                                    end; //for
505                               end; //if Code <> ''
506   
507                              inc(j);
508                          until(Code = '');
509   
510                        FItems.SetStrPiece(idx, 4, Flags);
511                         // new code  if deleted order and ba on then
512                         // reset appropriate tf flags to "?".
513   
514                        if BILLING_AWARE then
515                           begin
516                              if not UBACore.OrderRequiresSCEI(Piece(s,U,1)) then
517                                 FItems.SetStrPiece(idx,4, NA_FLAGS)
518                              else
519                                 begin
520   
521                                 if UBAGlobals.BAUnsignedOrders.Count > 0 then
522                                    begin
523                                    UFlags := UBACore.GetUnsignedOrderFlags(Piece(s,U,1),UBAGlobals.BAUnsignedOrders);
524                                    if UFlags <> '' then FItems.SetStrPiece(idx,4, UFlags)
525                                    end;
526                                 //********************************
527                                 if UBAGlobals.BACopiedOrderFlags.Count > 0 then  //BAPHII 1.3.2
528                                    begin
529                                    UFlags := UBACore.GetUnsignedOrderFlags(Piece(s,U,1),UBAGlobals.BACopiedOrderFlags); //BAPHII 1.3.2
530                                    if UFlags <> '' then //BAPHII 1.3.2
531                                       FItems.SetStrPiece(idx,4,UFlags); //BAPHII 1.3.2
532                                    end;
533                                 //********************************
534                                 if UBAGlobals.BAConsultPLFlags.Count > 0 then
535                                    begin
536                                       UFlags :=  GetConsultFlags(Piece(s,U,1),UBAGlobals.BAConsultPLFlags,Flags);
537   
538                                    if UFlags <> '' then
539                                       FItems.SetStrPiece(idx,4, UFlags);
540                                    end;
541   
542                                    UBAGlobals.BAFlagsIN := Flags;
543                                 end; //else
544                              end; //if BILLING_AWARE
545   
546                          end; //if idx >= 0
547   
548                     end; //for i := 0 to RPCBrokerV.Results.Count-1
549                end; //if idx > 0
550   
551       FStsCount := 0;
552       AllBtnLeft := 0;
553   
554       for si := low(TSigItemType) to high(TSigItemType) do
555         StsUsed[si] := FALSE;
556       //  loop thru orders selected to be signed fReview/fOrdersSign.
557       for i := 0 to FItems.Count-1 do
558          begin                     
559            if notRightOne(i) then continue;
560            s := FItems[i];
561   
562            if (piece(s,u,2) <> '-1') and (piece(s,u,3) = '1') then
563               begin
564                s := piece(s, u, 4); // SC/EI
565               // code added 01/17/2006 - check dc'd nurse orders,
566               // originals where requiring CIDC if assigned to patient.
567                if (BILLING_AWARE) and (not UBACore.IsOrderBillable(Piece(s,U,1))) then
568                  s :=  NA_FLAGS;
569   
570               for si := low(TSigItemType) to high(TSigItemType) do
571                 if (not StsUsed[si]) and (s[ord(si)+1] <> StsChar[isNA]) then
572                 begin
573                   StsUsed[si] := TRUE;
574                   inc(FStsCount);
575                   if FStsCount >= FlagCount then break;
576                 end;
577               end;
578   
579            if FStsCount >= FlagCount then
580              Break;
581          end; //for
582   
583      {Begin BillingAware}
584        if  BILLING_AWARE then
585            begin
586               if FStsCount = 0 then //  Billing Awareness.  Force Grid to paint correctly
587                  FStsCount := 1;
588            end;
589      {End BillingAware}
590   
591       if FStsCount > 0 then
592          begin
593            Result := TRUE;
594            FirstValidItem := TSigItemType(0);
595   
596            prnt := lb.Parent;
597            ownr := lb.Owner;
598            MaxX := lb.ClientWidth;
599            lb.Canvas.Font := BaseFont;
600            btnW := 0;
601   
602            for si := low(TSigItemType) to high(TSigItemType) do
603            begin
604               j := lb.Canvas.TextWidth(SigItemDesc[si, sdShort]);
605               if btnW < j then
606                btnW := j;
607            end;
608   
609            inc(btnW, 8);
610            btnH := ResizeHeight( BaseFont, BaseFont, 21);
611            x := MaxX;
612            dx := (btnW - cbWidth) div 2;
613   
614            for si := high(TSigItemType) downto low(TSigItemType) do
615            begin
616               FcbX[si] := x - btnW + dx;
617               dec(x, btnW + btnGap);
618            end;
619            
620            if FStsCount > 1 then
621            begin
622              FAllCatCheck := FALSE;
623              btn := TButton.Create(ownr);
624              btn.Parent := prnt;
625              btn.Height := btnH;
626              btn.Width := btnW;
627              btn.Caption := AllTxt;
628              btn.OnClick := cbClicked;
629              btn.Left := FcbX[TSigItemType(0)] + lb.Left - dx + 2 - (FcbX[TSigItemType(1)] - FcbX[TSigItemType(0)]);
630              AllBtnLeft := btn.left;
631              btn.Top := lb.Top - btn.height - 2;
632              btn.Tag := AllIdx;
633              btn.ShowHint := TRUE;
634              btn.Hint := 'Set All Related Entries';
635              btn.TabOrder := lb.TabOrder;
636              UpdateColorsFor508Compliance(btn);
637              Fcb.Add(btn);
638            end;
639   
640            for sx := low(TSigItemType) to high(TSigItemType) do
641            begin                                                // print buttons on header of columns ie SC,AO,IR, etc....
642               si := SigItemDisplayOrder[sx];
643               FAllCheck[si] := TRUE;
644               btn := TButton.Create(ownr);
645               btn.Parent := prnt;
646               btn.Height := btnH;
647               btn.Width := btnW;
648               btn.Caption := SigItemDesc[si, sdShort];
649               btn.OnClick := cbClicked;
650               btn.Left := FcbX[sx] + lb.Left - dx + 2;
651               btn.Top := lb.Top - btn.height - 2;
652               btn.Tag := ColIdx + ord(si);
653               btn.ShowHint := TRUE;
654               btn.Hint := 'Set all ' + SigItemDesc[si, sdLong];
655               btn.Enabled := StsUsed[si];
656               //tab order before listbox but after previous buttons.
657               btn.TabOrder := lb.TabOrder;
658               UpdateColorsFor508Compliance(btn);
659               Fcb.Add(btn);
660            end;
661   
662               FValidGap := ((FcbX[succ(TSigItemType(0))] - FcbX[TSigItemType(0)] - cbWidth) div 2) + 1;
663               FLastValidX := FcbX[FirstValidItem] - FValidGap;
664               lb.ControlStyle := lb.ControlStyle + [csAcceptsControls];
665               
666               try
667                 ht := SigItemHeight;
668                 FDy := ((ht - cbHeight) div 2)+1;
669                 y := lb.TopIndex;
670                 FOldDrawItemEvent := TExposedListBox(lb).OnDrawItem;
671                 odie.xcontrol := lb;
672                 odie.xevent := FOldDrawItemEvent;
673                 SetLength(FOldDrawItemEvents,Length(FOldDrawItemEvents)+1);
674                 FOldDrawItemEvents[Length(FOldDrawItemEvents)-1] := odie;
675                 Flb := lb;
676                 TExposedListBox(lb).OnDrawItem := lbDrawItem;
677                 lb.FreeNotification(Self);
678   
679                 for i := 0 to FItems.Count-1 do
680                     begin
681                       if notRightOne(i) then continue;
682                       s := FItems[i];
683                       orderStatus := (Piece(s,u,1));
684                     if piece(s,u,3) = '1' then
685                        begin
686                          idx := StrToIntDef(piece(s,U,2),-1);
687   
688                        if idx >= 0 then
689                        begin
690                           Flags := piece(s,u,4);
691                             //loop thru treatment factors
692                           for sx := low(TSigItemType) to high(TSigItemType) do
693                              begin
694                                si := SigItemDisplayOrder[sx];
695                                StsCode := Flags[ord(si)+1];
696                                StsIdx := isNA;
697   
698                              for sts := low(ItemStatus) to high(ItemStatus) do
699                                 if StsCode = StsChar[sts] then
700                                    begin
701                                      StsIdx := sts;
702                                      Break;
703                                    end;
704   
705                                if (StsIdx <> isNA) then
706                                  begin
707                                    cb := CreateCB(lb);
708                                    cb.Left := FcbX[sx];
709                                    cb.Top := (ht * (idx - y)) + FDy;
710                                    cb.Tag := ItemToTag(TagInfo(si, idx));
711                                    cb.ShowHint := TRUE;
712                                    cb.Hint := SigItemDesc[si, sdLong];
713   
714                                    //CQ3301/3302
715                                    thisTagInfo := TagToItem(cb.Tag);
716                                    itemText := '';
717                                    thisChangeItem := nil; //init
718   
719                                    thisChangeItem := TChangeItem(lb.Items.Objects[thisTagInfo.Index]);
720   
721                                    if (thisChangeItem <> nil) then
722                                        begin
723                                           itemText := (FilteredString(lb.Items[thisTagInfo.Index]));
724                                           cb.Caption := itemText + cb.Hint;  //CQ3301/3302 - gives JAWS a caption to read
725                                        end;
726                                    //end CQ3301/3302
727                                     if ( (si = siCombatVeteran) and (StsIdx = isUnKnown) ) then
728                                     begin
729                                        StsIdx := isChecked;
730                                        Flags[7] := 'C';                  // HD200866 default as Combat Related - GWOT mandated Change
731                                        FItems.SetStrPiece(i, 4, Flags);  // HD200866 default as Combat Related - GWOT mandated Change
732                                     end;
733                                    case StsIdx of
734                                      isChecked:   cb.State := cbChecked;
735                                      isUnchecked: cb.State := cbUnchecked;
736                                    else cb.State := cbGrayed;
737                                    end; //case
738   
739                                  end; //if (StsIdx <> isNA)
740   
741                           end; //for sx := low(TSigItemType) to high(TSigItemType)
742   
743                        end; // if idx >= 0
744   
745                        end; //if piece(s,u,3) = '1'
746   
747                 end; //for i := 0 to FItems.Count-1
748   
749            finally
750              lb.ControlStyle := lb.ControlStyle - [csAcceptsControls];
751            end; //if FStsCount > 0
752       end;
753   
754     finally
755       FBuilding := FALSE;
756     end;
757     except
758     on ERangeError do
759     begin
760        ShowMsg('ERangeError in UpdateListBox' + s);
761     raise;
762     end;
763     end;
764   end;
765   
766   procedure TSigItems.cbClicked(Sender: TObject);
767   var
768     i,cnt,p: integer;
769     cb: TORCheckBox;
770     sType: TSigItemType;
771     idx, Flags: string;
772     Info: TSigItemTagInfo;
773     wc, w: TWinControl;
774   
775   begin
776     if FBuilding then exit;
777     wc := TWinControl(Sender);
778     if wc.Tag = AllIdx then
779     begin
780       FAllCatCheck := not FAllCatCheck;
781       for sType := low(TSigItemType) to high(TSigItemType) do
782         FAllCheck[sType] := FAllCatCheck;
783       cnt := 0;
784       for i := 0 to Fcb.Count-1 do
785       begin
786         w := TWinControl(Fcb[i]);
787         if (w <> wc) and (w.Tag >= ColIdx) and (w is TButton) then
788         begin
789           inc(cnt);
790           if w.Enabled then
791             TButton(w).Click;
792           if cnt >= FlagCount then break;
793         end;
794       end;
795     end
796     else
797     if wc.Tag >= ColIdx then
798     begin
799       sType := TSigItemType(wc.Tag - ColIdx);
800       FAllCheck[sType] := not FAllCheck[sType];
801       for i := 0 to Fcb.Count-1 do
802       begin
803         w := TWinControl(Fcb[i]);
804         if (w.Tag < ColIdx) and (w is TORCheckBox) then
805         begin
806           if TagToItem(w.Tag).SigType = sType then
807             TORCheckBox(w).Checked := FAllCheck[sType];
808         end;
809       end;
810     end
811     else
812     begin
813       cb := TORCheckBox(wc);
814       info := TagToItem(cb.Tag);
815       if info.Index >= 0 then
816       begin
817         idx := inttostr(info.Index);
818         i := FItems.IndexOfPiece(idx,U,2);
819         if i >= 0 then
820         begin
821           p := ord(Info.SigType)+1;
822           Flags := piece(FItems[i],U,4);
823           case cb.State of
824             cbUnchecked: Flags[p] := StsChar[isUnchecked];
825             cbChecked:   Flags[p] := StsChar[isChecked];
826             else         Flags[p] := StsChar[isUnknown];
827           end;
828           FItems.SetStrPiece(i,4,Flags);
829           if BILLING_AWARE then
830             UBAGlobals.BAFlagsIN := Flags;
831         end;
832       end;
833     end;
834   end;
835   
836   procedure TSigItems.cbEnter(Sender: TObject);
837   var
838     cb: TORCheckBox;
839   begin
840     cb := TORCheckBox(Sender);
841     cb.Color := clHighlight;
842     cb.Font.Color := clHighlightText;
843   
844     // commented out causing check box states to be out of sync when
845      //checked individually and/or when by column or all.
846     //CQ5074
847     if ( (cb.Focused) and (cb.State = cbGrayed) ) and (not IsAMouseButtonDown) then
848        cb.Checked := false;
849     //end CQ5074
850   end;
851   
852   procedure TSigItems.cbExit(Sender: TObject);
853   var
854     cb: TORCheckBox;
855   begin
856     cb := TORCheckBox(Sender);
857     cb.Color := clWindow;
858     cb.Font.Color := clWindowText;
859   end;
860   
861   
862   procedure TSigItems.lbDrawItem(Control: TWinControl; Index: Integer; Rect: TRect; State: TOwnerDrawState);
863   var
864     OldRect: TRect;
865     i,j: integer;
866     cb: TORCheckBox;
867     si: TSigItemType;
868     DrawGrid: boolean;
869     lb: TCustomListbox;
870   
871   begin
872     lb := TCaptionCheckListBox(Control);
873     DrawGrid := (Index < lb.Items.Count);
874     if DrawGrid and (trim(lb.Items[Index]) = '') and
875                     (Index = (lb.Items.Count - 1)) then
876       DrawGrid := FALSE;
877     if DrawGrid then
878       dec(Rect.Bottom);
879     OldRect := Rect;
880   
881     Rect.Right := FlastValidX - 4;
882   {Begin BillingAware}
883     if  BILLING_AWARE then Rect.Right := FLastValidX - 55;
884   {End BillingAware}
885   
886   //  if assigned(FOldDrawItemEvent) then
887     if True then
888     begin
889       for j := 0 to Length(FOldDrawItemEvents) - 1 do
890       begin
891         if FOldDrawItemEvents[j].xcontrol = lb then
892         begin
893           inc(Rect.Bottom);
894           FOldDrawItemEvents[j].xevent(Control, Index, Rect, State);
895           dec(Rect.Bottom);
896         end;
897       end;
898   //    inc(Rect.Bottom);
899   //    FOldDrawItemEvent(Control, Index, Rect, State);
900   //    dec(Rect.Bottom);
901     end
902     else
903        begin
904        lb.Canvas.FillRect(Rect);
905        if Index < lb.Items.Count then
906          lb.Canvas.TextRect(Rect, Rect.Left + 2, Rect.Top, FilteredString(lb.Items[Index]));
907        end;
908   
909     if DrawGrid then
910        begin
911          lb.Canvas.Pen.Color := Get508CompliantColor(clSilver);
912          lb.Canvas.MoveTo(Rect.Left, Rect.Bottom);
913          lb.Canvas.LineTo(OldRect.RIght, Rect.Bottom);
914        end;
915   
916     if  BILLING_AWARE then OldRect.Left := Rect.Right + 90
917     else OldRect.Left := Rect.Right;
918   
919    //// SC Column
920    ///
921     lb.Canvas.FillRect(OldRect);
922     for i := 0 to Fcb.Count-1 do
923        begin
924          cb := TORCheckBox(Fcb[i]);
925   
926          if TagToItem(cb.Tag).Index = Index then
927             begin
928               cb.Invalidate;
929               cb.Top := Rect.Top + FDy;
930             end;
931        end;
932   
933     // EI Columns
934     if DrawGrid then
935     begin
936       for si := low(TSigItemType) to high(TSigItemType) do
937       begin
938         if FcbX[si] > FLastValidX then
939         begin
940           lb.Canvas.MoveTo(FcbX[si] - FValidGap, Rect.Top);
941           lb.Canvas.LineTo(FcbX[si] - FValidGap, Rect.Bottom);
942         end;
943       end;
944     end;
945   end;
946   
947   procedure TSigItems.Notification(AComponent: TComponent;
948     Operation: TOperation);
949   begin
950     inherited;
951     if (AComponent = Flb) and (Operation = opRemove) then
952     begin
953       Fcb.Clear;
954       TExposedListBox(Flb).OnDrawItem := FOldDrawItemEvent;
955       FOldDrawItemEvent := nil;
956       Flb := nil;
957     end;
958   end;
959   
960   procedure TSigItems.EnableSettings(Index: integer; Checked: boolean);
961   var
962     cb: TORCheckBox;
963     i: integer;
964     Info: TSigItemTagInfo;
965   
966   begin
967     if Index < 0 then exit;
968     for i := 0 to Fcb.Count-1 do
969     begin
970       if TObject(Fcb[i]) is TORCheckBox then
971       begin
972         cb := TORCheckBox(Fcb[i]);
973         info := TagToItem(cb.Tag);
974         if info.Index = Index then
975           cb.enabled := Checked;
976       end;
977     end;
978     i := FItems.IndexOfPiece(IntToStr(Index), U, 2);
979     if i >= 0 then
980       FItems.SetStrPiece(i, 5, BoolChar[not Checked]);
981   end;
982   
983   function TSigItems.OK2SaveSettings: boolean;
984   var
985     i, Index: integer;
986     s: string;
987   
988   begin
989     {Begin BillingAware}
990     if BILLING_AWARE then
991        begin
992        if Assigned(UBAGlobals.BAOrderList) then
993           BAOrderList.Clear
994        else
995          begin
996             BAOrderList := TStringList.Create;
997             BAOrderList.Clear;
998          end;
999   {End BillingAware}
1000    end;
1001  
1002    Result := TRUE;
1003    for i := 0 to FItems.Count-1 do
1004    begin
1005      s := FItems[i];
1006      Index := StrToIntDef(piece(s,U,2),-1);
1007      if(Index >= 0) and (piece(s,U,5) <> '1') then
1008      begin
1009        if pos(StsChar[isUnknown], piece(s, U, 4)) > 0 then
1010        begin
1011          Result := FALSE;
1012          break;
1013        end{end if}
1014        else
1015           if BILLING_AWARE then
1016              BAOrderList.Add(piece(s,U,1)+ piece(s,U,3) + piece(s,U,4)); //baph1
1017      end; {end if}
1018    end;{end for}
1019  end;
1020  
1021  procedure TSigItems.SaveSettings;
1022  var
1023    s: string;
1024    i, Index: integer;
1025    TmpSL: TStringList;
1026  
1027  begin
1028    TmpSL := TStringList.Create;
1029  
1030    try
1031      for i := 0 to FItems.Count-1 do
1032      begin
1033        s := FItems[i];
1034        Index := StrToIntDef(piece(s,U,2),-1);
1035        if(Index >= 0) and (piece(s,U,5) <> '1') then
1036        begin
1037          TmpSL.Add(Piece(s,U,1) + U + piece(s,U,4));
1038          FItems.SetStrPiece(i, 6, '1');
1039        end;
1040      end;
1041  
1042      SaveCoPayStatus(TmpSL);
1043  
1044    finally
1045      TmpSL.Free;
1046    end;
1047    i := 0;
1048    while i < FItems.Count do
1049    begin
1050      if Piece(FItems[i], U, 6) = '1' then
1051        FItems.Delete(i)
1052      else
1053        inc(i);
1054    end;
1055    Fcb.Clear;
1056  end;
1057  
1058  { Begin Billing Aware }
1059  
1060  procedure TSigItems.DisplayUnsignedStsFlags(sFlags:string);
1061  var
1062     Index: integer;
1063     flags : string;
1064  begin
1065     Index := 0;
1066     Flags := sFlags;
1067     CopyCBValues(Index,Index);
1068  
1069  end;
1070  
1071  procedure TSigItems.DisplayPlTreatmentFactors;
1072  var
1073   FactorsOut:TStringList;
1074   y: integer;
1075   Index: integer;
1076  begin
1077       FactorsOut :=  TStringList.Create;
1078       FactorsOut.Clear;
1079       FactorsOut := UBAGlobals.PLFactorsIndexes;
1080       for y := 0 to FactorsOut.Count-1 do
1081       begin
1082          Index := StrToInt(Piece(FactorsOut.Strings[y],U,1));
1083          CopyCBValues(Index,Index);
1084       end;
1085  end;
1086  
1087  
1088  
1089  procedure TSigItems.CopyCBValues(FromIndex, ToIndex: integer);
1090  var
1091    si: TSigItemType;
1092    FromTag, ToTag: integer;
1093    FromCB, ToCB: TORCheckBox;
1094    x: string;
1095  begin
1096    tempCkBx.GrayedStyle := gsBlueQuestionMark;
1097    
1098    for si := low(TSigItemType) to high(TSigItemType) do
1099       begin
1100         FromTag := ItemToTag(TagInfo(si, FromIndex));
1101         ToTag := ItemToTag(TagInfo(si, ToIndex));
1102         FromCB := FindCBValues(FromTag);
1103         ToCB := FindCBValues(ToTag);
1104  
1105         if assigned(FromCB) then // and assigned(ToCB)) then
1106            begin
1107               tempCkBx.State := cbGrayed;
1108               x:= GetTempCkBxState(FromIndex,si);
1109               if x = 'C' then tempCkBx.State := cbChecked
1110               else if x = 'U' then tempCkBx.State := cbUnChecked ;
1111               ToCB.State := tempCkBx.State;// FromCB.State;
1112            end;
1113         end; //for
1114    end;
1115  
1116  function TSigItems.FindCBValues(ATag: integer):TORCheckBox;
1117  var
1118    i: integer;
1119    wc: TWinControl;
1120  begin
1121    for i := 0 to Fcb.Count-1 do
1122    begin
1123      wc := TWinControl(Fcb[i]);
1124      if(wc is TORCheckBox) and (wc.Tag = ATag) then
1125      begin
1126        Result := TORCheckBox(wc);
1127        Exit;
1128       end;
1129    end;
1130    Result := nil;
1131  end;
1132  
1133  function  TSigItems.GetTempCkBxState(Index: integer; CBValue:TSigItemType):string;
1134  var
1135   locateIdx,thisIdx,i: integer;
1136   iFactor: integer;
1137   TmpCBStatus : string;
1138  begin
1139    try
1140        locateIdx := Index;
1141        iFactor := Ord(CBValue) +1;
1142        for i := 0 to  UBAGlobals.BAFlagsOut.count-1 do
1143             begin
1144                  thisIdx := StrToInt(Piece(UBAGlobals.BAFlagsOut.Strings[i],U,1));
1145                  if thisIdx = locateIdx then
1146                  begin
1147                     TmpCBStatus := Piece(UBAGlobals.BAFlagsOut.Strings[i],U,2);
1148                     TmpCBStatus := Copy(TmpCBStatus,iFactor,1);
1149                     Result :=TmpCBStatus;
1150                  end;
1151             end;
1152    except
1153       on EAccessViolation do
1154          begin
1155          {$ifdef debug}Show508Message('EAccessViolation in uSignItems.GetTempCkBxState()');{$endif}
1156          raise;
1157          end;
1158    end;
1159  end;
1160   { End Billing Aware }
1161  
1162  
1163  initialization
1164    FlagCount := ord(high(TSigItemType)) - ord(low(TSigItemType)) + 1;
1165    BaseFlags := StringOfChar(StsChar[isNA], FlagCount);
1166    thisChangeItem := TChangeItem.Create; //CQ3301/3302
1167    AllBtnLeft := 0;
1168  
1169  finalization
1170    FreeAndNil(uSigItems);
1171  
1172  end.

Module Calls (2 levels)


uSignItems
 ├fODBase
 │ ├fAutoSz
 │ ├uConst
 │ ├rOrders
 │ ├rODBase
 │ ├uCore
 │ ├UBAGlobals
 │ ├UBACore
 │ ├fOCAccept
 │ ├uODBase
 │ ├rCore
 │ ├rMisc
 │ ├fTemplateDialog
 │ ├uEventHooks
 │ ├uTemplates
 │ ├rConsults
 │ ├fOrders
 │ ├uOrders
 │ ├fFrame
 │ ├fODDietLT
 │ └rODDiet
 ├UBACore...
 ├uConst
 ├rOrders...
 ├fOrdersSign
 │ ├mCoPayDesc
 │ ├XuDsigS
 │ ├uConsults
 │ ├UBAGlobals...
 │ ├UBACore...
 │ ├UBAMessages
 │ ├UBAConst
 │ ├fBase508Form
 │ ├fPrintLocation
 │ ├fCSRemaining
 │ ├rODMeds
 │ ├rCore...
 │ ├rOrders...
 │ ├uConst
 │ ├uCore...
 │ ├uOrders...
 │ ├uSignItems...
 │ ├fBALocalDiagnoses
 │ ├fFrame...
 │ ├rODLab
 │ └fRptBox
 ├fReview
 │ ├UBAGlobals...
 │ ├uConst
 │ ├uCore...
 │ ├mCoPayDesc...
 │ ├XuDsigS...
 │ ├UBACore...
 │ ├fBase508Form...
 │ ├fPrintLocation...
 │ ├fCSRemaining...
 │ ├rODMeds...
 │ ├rCore...
 │ ├fNotes
 │ ├fConsults
 │ ├rOrders...
 │ ├fDCSumm
 │ ├fOCSession
 │ ├uOrders...
 │ ├fSignItem
 │ ├fFrame...
 │ ├uSignItems...
 │ ├fSurgery
 │ ├fBALocalDiagnoses...
 │ ├UBAConst
 │ ├UBAMessages
 │ ├fOrdersSign...
 │ ├rODLab...
 │ └fRptBox...
 ├UBAGlobals...
 └uCore...

Module Called-By (2 levels)


                 uSignItems
                   fFrame┤ 
              CPRSChart┤ │ 
                  fPage┤ │ 
                uOrders┤ │ 
                fODBase┤ │ 
                UBACore┤ │ 
                fOrders┤ │ 
                   uPCE┤ │ 
      fBALocalDiagnoses┤ │ 
             fEncVitals┤ │ 
                fVitals┤ │ 
                 fCover┤ │ 
                 rCover┤ │ 
              fPtSelMsg┤ │ 
                 fPtSel┤ │ 
            fOrdersSign┤ │ 
         fPrintLocation┤ │ 
                  fMeds┤ │ 
                fRptBox┤ │ 
                 fNotes┤ │ 
               fReports┤ │ 
                 fEncnt┤ │ 
                 fProbs┤ │ 
          fReportsPrint┤ │ 
                fGraphs┤ │ 
              fConsults┤ │ 
                fDCSumm┤ │ 
        fReminderDialog┤ │ 
                  fLabs┤ │ 
              fLabPrint┤ │ 
                fReview┤ │ 
            fIconLegend┤ │ 
           fOrdersPrint┤ │ 
               fSurgery┤ │ 
uVA508CPRSCompatibility┤ │ 
           fOrdersRenew┤ │ 
             fODConsult┤ │ 
                fODProc┤ │ 
                 fODRad┤ │ 
                 fODLab┤ │ 
                fODMeds┤ │ 
               fODMedIV┤ │ 
              fODVitals┤ │ 
                fODAuto┤ │ 
                 fOMSet┤ │ 
         fOrdersRelease┤ │ 
              fODMedNVA┤ │ 
         fOrdersOnChart┤ │ 
             fOCSession┤ │ 
              fODActive┤ │ 
               fPCEEdit┘ │ 
           fOrdersSign...┤ 
               fReview...┘