Module

uConsults

Path

C:\CPRS\CPRS30\Consults\uConsults.pas

Last Modified

7/15/2014 3:26:36 PM

Units Used in Interface

Name Comments
uTIU -

Units Used in Implementation

Name Comments
uConst -

Classes

Name Comments
TClinProcTitles -
TConsultTitles -

Procedures

Name Owner Declaration Scope Comments
BuildConsultsTree - procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode; CurrentContext: TSelectContext); Interfaced -
BuildServiceTree - procedure BuildServiceTree(Tree: TORTreeView; SvcList: TStrings; const Parent: string; Node: TORTreeNode); Interfaced
TmpNode: TORTreeNode;
  AllNodes: TStringList;
  List: TList;
  Lists: TObjectList;
  bad: boolean;
 Former code was only filtering out half the duplicates, depending on
 how they appeared in the tree.  Commented out code filters out all the duplicates,
 and still keeps the fast tree build.  However, CPRS Clinical Workgroup determined
 that no duplicates should be filtered out.  Code kept here in order to keep fast filter
 logic, in case duplicates are ever filtered out in the future.

  procedure FilterOutDuplicates;
  var
    j: integer;
  begin
    bad := false;
    if AllNodes.Find(MyID, Idx) then
    begin
      if AllNodes.Objects[Idx] is TORTreeNode then
      begin
        tmpNode := TORTreeNode(AllNodes.Objects[Idx]);
        bad := tmpNode.HasAsParent(ParentNode);
        if (not bad) and assigned(tmpNode.Parent) then
          bad := ParentNode.HasAsParent(tmpNode.Parent);
      end
      else
      begin
        bad := False;
        List := TList(AllNodes.Objects[Idx]);
        for j := 0 to List.Count - 1 do
        begin
          tmpNode := TORTreeNode(List[j]);
          bad := TORTreeNode(List[j]).HasAsParent(ParentNode);
          if (not bad) and assigned(tmpNode.Parent) then
            bad := ParentNode.HasAsParent(tmpNode.Parent);
          if bad then break;
        end;
      end;
    end;
  end;

  procedure AddNode;
  begin
    if AllNodes.Find(MyID, Idx) then
    begin
      if AllNodes.Objects[Idx] is TORTreeNode then
      begin
        List := TList.Create;
        Lists.Add(List);
        List.Add(AllNodes.Objects[Idx]);
        AllNodes.Objects[Idx] := List;
      end
      else
        List := TList(AllNodes.Objects[Idx]);
      List.Add(ChildNode);
    end
    else
      AllNodes.AddObject(MyId, ChildNode);
  end;
CreateListItemsForConsultTree - procedure CreateListItemsForConsultTree(Dest, Source: TStrings; Context: integer; GroupBy: string; Ascending: Boolean); Interfaced -
SetNodeImage - procedure SetNodeImage(Node: TORTreeNode; CurrentContext: TSelectContext); Interfaced -

Functions

Name Owner Declaration Scope Comments
MakeConsultListDisplayText - function MakeConsultListDisplayText(InputString: string): string; Interfaced -
MakeConsultListItem - function MakeConsultListItem(InputString: string):string; Interfaced
============================================================================================
1016^Jun 04,98  ^(dc)^ COLONOSCOPY GASTROENTEROLOGY Proc^Consult #: 1016^15814^^P
1033^Jun 10,98  ^(c)^ GASTROENTEROLOGY Cons^Consult #: 1033^15881^^C
=============================================================================================
function call [GetConsultsList] returns the following string '^' pieces:
===============================================================
      1 -  Consult IEN
      2 -  Consult Date
      3 -  (Status)
      4 -  Consult/Procedure Display Text
      5 -  Consult #: ###
      6 -  Order IFN
      7 -  ''  (used for HasChildren in tree)
      8 -  Parent in tree
      9 -  'Consult', 'Procedure', or 'Clinical Procedure'
     10 -  Service Name
     11 -  FMDate of piece 2
     12 -  'C' or 'P' or 'M' or 'I' or 'R'
===============================================================
MakeConsultNoteDisplayText - function MakeConsultNoteDisplayText(RawText: string): string; Interfaced -

Global Variables

Name Type Declaration Comments
ConsultRec ConsultRec: TConsultRequest ; -

Constants

Name Declaration Scope Comments
CN_NEW_CP_NOTE '-20' Interfaced -
CN_NEW_CSLT_NOTE '-30' Interfaced -
CN_SVC_LIST_DISP 0 Interfaced -
CN_SVC_LIST_FWD 1 Interfaced -
CN_SVC_LIST_ORD 1 Interfaced -
CP_INSTR_COMPLETE 4 Interfaced -
CP_INSTR_INCOMPLETE 3 Interfaced -
CP_INSTR_NO_STUB 2 Interfaced -
CP_NO_INSTRUMENT 1 Interfaced -
CP_NOT_CLINPROC 0 Interfaced Clinical Procedure statuses
CSLT_PTR ';99CON' Interfaced -
PROC_PTR ';99PRC' Interfaced -
UL_ADMIN 3 Interfaced -
UL_NONE 0 Interfaced MenuAccessRec.UserLevel
UL_REVIEW 1 Interfaced -
UL_UNRESTRICTED 5 Interfaced -
UL_UPDATE 2 Interfaced -
UL_UPDATE_AND_ADMIN 4 Interfaced -


Module Source

1     unit uConsults;
2     
3     interface
4     
5     uses
6         SysUtils, Windows, Messages, Controls, Classes, StdCtrls, ORfn, uTIU, ORCtrls,
7         Contnrs, DateUtils;
8     
9     type
10    
11      TConsultRequest = record              {file 123}  {Order Dialog}
12        IEN: integer ;                          {.001}
13        EntryDate: TFMDateTime ;                { .01}
14        ORFileNumber: integer ;                 { .03}
15        PatientLocation: integer ;              { .04}
16        OrderingFacility: integer ;             { .05}
17        ForeignConsultFileNum: integer ;        { .06}
18        ToService: integer ;                    {   1}       { * }
19        From: integer ;                         {   2}
20        RequestDate: TFMDateTime ;              {   3}
21        ConsultProcedure: string ;              {   4}
22        Urgency: integer ;                      {   5}       { * }
23        PlaceOfConsult: integer ;               {   6}       { * }
24        Attention: int64   ;                    {   7}       { * }
25        ORStatus: integer ;                     {   8}
26        LastAction: integer ;                   {   9}
27        SendingProvider: int64 ;              {  10}
28        SendingProviderName: string ;
29        Result: string ;                        {  11}
30        ModeOfEntry: string ;                   {  12}
31        RequestType: integer ;                  {  13}
32        InOut: string ;                         {  14}       { * }
33        Findings: string ;                      {  15}
34        TIUResultNarrative: integer ;           {  16}
35        TIUDocuments: TStrings ;                {from '50' node of file 123}
36        MedResults:  TStrings;                  {from '50' node of file 123}
37        RequestReason: TStringList ;            {  20}       { * }
38        ProvDiagnosis: string ;                 {  30}       { * }
39        ProvDxCode: string;                     {  30.1}
40        RequestProcessingActivity: TStringList; {  40}
41        EarliestDate: TFMDateTime;
42        //LatestDate: TFMDateTime; //dropped requirement WAT
43      end ;
44    
45      TEditResubmitRec = record
46        Changed: boolean;
47        IEN: integer;
48        OrderableItem: integer;
49        RequestType: string;
50        ToService: integer;
51        ToServiceName: string;
52        ConsultProc: string;
53        ConsultProcName: string;
54        Urgency: integer;
55        UrgencyName: string;
56        EarliestDate: TFMDateTime;
57        //LatestDate: TFMDateTime; //dropped requirement WAT
58        Place: string;
59        PlaceName: string;
60        Attention: int64;
61        AttnName: string;
62        InpOutp: string;
63        RequestReason: TStringList;
64        ProvDiagnosis: string;
65        ProvDxCode: string;
66        ProvDxCodeInactive:  boolean;
67        DenyComments: TStringList;
68        OtherComments: TStringList;
69        NewComments: TStringList;
70      end;
71    
72      TSelectContext = record
73        Changed: Boolean;
74        BeginDate: string;
75        EndDate: string;
76        Ascending: Boolean;
77        Service: string;
78        ServiceName: string;
79        ConsultUser: Boolean ;
80        Status: string;
81        StatusName: string;
82        GroupBy: string;
83      end ;
84    
85      TMenuAccessRec = record
86        UserLevel: integer;
87        AllowMedResulting: Boolean;
88        AllowMedDissociate: Boolean;
89        AllowResubmit: Boolean;
90        ClinProcFlag: integer;
91        IsClinicalProcedure: Boolean;
92      end;
93    
94      TProvisionalDiagnosis = record
95        Code: string;
96        Text: string;
97        CodeInactive: boolean;
98        Reqd: string;
99        PromptMode: string;
100       PreviousPromptMode: string;
101     end;
102   
103     TConsultTitles = class
104       DfltTitle: Integer;
105       DfltTitleName: string;
106       ShortList: TStringList;
107       constructor Create;
108       destructor Destroy; override;
109     end;
110   
111     TClinProcTitles = class
112       DfltTitle: Integer;
113       DfltTitleName: string;
114       ShortList: TStringList;
115       constructor Create;
116       destructor Destroy; override;
117     end;
118   
119   function  MakeConsultListItem(InputString: string):string;
120   function  MakeConsultListDisplayText(InputString: string): string;
121   function  MakeConsultNoteDisplayText(RawText: string): string;
122   procedure BuildServiceTree(Tree: TORTreeView; SvcList: TStrings; const Parent: string; Node: TORTreeNode);
123   procedure CreateListItemsForConsultTree(Dest, Source: TStrings; Context: integer; GroupBy: string;
124             Ascending: Boolean);
125   procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode;
126              CurrentContext: TSelectContext);
127   procedure SetNodeImage(Node: TORTreeNode; CurrentContext: TSelectContext);
128   
129   const
130      CN_SVC_LIST_DISP     = 0 ;
131      CN_SVC_LIST_FWD      = 1 ;
132      CN_SVC_LIST_ORD      = 1 ;
133      CSLT_PTR             = ';99CON';
134      PROC_PTR             = ';99PRC';
135   
136      {MenuAccessRec.UserLevel}
137      UL_NONE              = 0;
138      UL_REVIEW            = 1;
139      UL_UPDATE            = 2;
140      UL_ADMIN             = 3;
141      UL_UPDATE_AND_ADMIN  = 4;
142      UL_UNRESTRICTED      = 5;
143   
144      {Clinical Procedure statuses}
145      CP_NOT_CLINPROC      = 0;
146      CP_NO_INSTRUMENT     = 1;
147      CP_INSTR_NO_STUB     = 2;
148      CP_INSTR_INCOMPLETE  = 3;
149      CP_INSTR_COMPLETE    = 4;
150   
151      CN_NEW_CSLT_NOTE     = '-30';
152      CN_NEW_CP_NOTE       = '-20';
153   
154   var
155      ConsultRec: TConsultRequest ;
156   
157   implementation
158   
159   uses
160     uConst;
161   
162   constructor TConsultTitles.Create;
163   { creates an object to store Consult titles so only obtained from server once }
164   begin
165     inherited Create;
166     ShortList := TStringList.Create;
167   end;
168   
169   destructor TConsultTitles.Destroy;
170   { frees the lists that were used to store the Consult titles }
171   begin
172     ShortList.Free;
173     inherited Destroy;
174   end;
175   
176   constructor TClinProcTitles.Create;
177   { creates an object to store ClinProc titles so only obtained from server once }
178   begin
179     inherited Create;
180     ShortList := TStringList.Create;
181   end;
182   
183   destructor TClinProcTitles.Destroy;
184   { frees the lists that were used to store the ClinProc titles }
185   begin
186     ShortList.Free;
187     inherited Destroy;
188   end;
189   
190   {============================================================================================
191   1016^Jun 04,98  ^(dc)^ COLONOSCOPY GASTROENTEROLOGY Proc^Consult #: 1016^15814^^P
192   1033^Jun 10,98  ^(c)^ GASTROENTEROLOGY Cons^Consult #: 1033^15881^^C
193   =============================================================================================
194   function call [GetConsultsList] returns the following string '^' pieces:
195   ===============================================================
196         1 -  Consult IEN
197         2 -  Consult Date
198         3 -  (Status)
199         4 -  Consult/Procedure Display Text
200         5 -  Consult #: ###
201         6 -  Order IFN
202         7 -  ''  (used for HasChildren in tree)
203         8 -  Parent in tree
204         9 -  'Consult', 'Procedure', or 'Clinical Procedure'
205        10 -  Service Name
206        11 -  FMDate of piece 2
207        12 -  'C' or 'P' or 'M' or 'I' or 'R'
208   ===============================================================}
209   
210   function MakeConsultListItem(InputString: string): string;
211   var
212     x: string;
213   begin
214     x := InputString;
215     if Piece(x, U, 6) = '' then SetPiece(x, U, 6, ' ');
216     if Piece(x, U, 9) <> '' then
217       case Piece(x, U, 9)[1] of
218         'C':  SetPiece(x, U, 10, 'Consult');
219         'P':  SetPiece(x, U, 10, 'Procedure');
220         'M':  SetPiece(x, U, 10, 'Procedure');  //'Clinical Procedure');
221         'I':  SetPiece(x, U, 10, 'Consult - Interfacility');
222         'R':  SetPiece(x, U, 10, 'Procedure - Interfacility');
223       end
224     else
225       begin
226         if Piece(x, U, 5) = 'Consult' then SetPiece(x, U, 10, 'Consult')
227         else SetPiece(x, U, 10, 'Procedure');
228       end;
229     x := Piece(x, U, 1) + U + FormatFMDateTime('mmm dd,yy', MakeFMDateTime(Piece(x, U, 2))) + '  ' + U + '(' + Piece(x, U, 3) + ')' + U + Piece(x, U, 6) + Piece(x, U, 7) + U +
230          'Consult #: ' + Piece(x, U, 1) + U + Piece(x, U, 8) + U + U + U + Piece(x, U, 10) + U + Piece(x, U, 4)+ U +
231          Piece(x, U, 2) + U + Piece(x, U, 9);
232     Result := x;
233   end;
234   
235   function MakeConsultListDisplayText(InputString: string): string;
236   var
237     x: string;
238   begin
239     x := InputString;
240     x := Piece(x, U, 2) + ' ' + Piece(x, U, 3) + ' ' + Piece(x, U, 4) + ' ' + Piece(x, U, 5);
241     Result := x;
242   end;
243   
244   function MakeConsultNoteDisplayText(RawText: string): string;
245   var
246     x: string;
247   begin
248     x := RawText;
249     if Piece(x, U, 1)[1] in ['A', 'N', 'E'] then
250       x := Piece(x, U, 2)
251     else
252       begin
253         x := FormatFMDateTime('mmm dd,yy', MakeFMDateTime(Piece(x, U, 3))) + '  ' + Piece(x, U, 2) +
254              ' (#' + Piece(Piece(x, U, 1), ';', 1) + ')';
255         if not (Copy(Piece(Piece(RawText, U, 1), ';', 2), 1, 4) = 'MCAR') then
256           x := x + ', ' + Piece(RawText, U, 6) + ', ' + Piece(Piece(RawText, U, 5), ';', 2);
257       end;
258     Result := x;
259   end;
260   
261   procedure BuildServiceTree(Tree: TORTreeView; SvcList: TStrings; const Parent: string; Node: TORTreeNode);
262   var
263     MyID, MyParent, Name, item: string;
264     i, Idx: Integer;
265     ParentNode, ChildNode: TORTreeNode;
266   //  tmpNode: TORTreeNode;
267     HasChildren: Boolean;
268   //  AllNodes: TStringList;
269     ParentNodes: TStringList;
270   //  List: TList;
271   //  Lists: TObjectList;
272   //  bad: boolean;
273   
274   // Former code was only filtering out half the duplicates, depending on
275   // how they appeared in the tree.  Commented out code filters out all the duplicates,
276   // and still keeps the fast tree build.  However, CPRS Clinical Workgroup determined
277   // that no duplicates should be filtered out.  Code kept here in order to keep fast filter
278   // logic, in case duplicates are ever filtered out in the future.
279   
280   {
281     procedure FilterOutDuplicates;
282     var
283       j: integer;
284     begin
285       bad := false;
286       if AllNodes.Find(MyID, Idx) then
287       begin
288         if AllNodes.Objects[Idx] is TORTreeNode then
289         begin
290           tmpNode := TORTreeNode(AllNodes.Objects[Idx]);
291           bad := tmpNode.HasAsParent(ParentNode);
292           if (not bad) and assigned(tmpNode.Parent) then
293             bad := ParentNode.HasAsParent(tmpNode.Parent);
294         end
295         else
296         begin
297           bad := False;
298           List := TList(AllNodes.Objects[Idx]);
299           for j := 0 to List.Count - 1 do
300           begin
301             tmpNode := TORTreeNode(List[j]);
302             bad := TORTreeNode(List[j]).HasAsParent(ParentNode);
303             if (not bad) and assigned(tmpNode.Parent) then
304               bad := ParentNode.HasAsParent(tmpNode.Parent);
305             if bad then break;
306           end;
307         end;
308       end;
309     end;
310   
311     procedure AddNode;
312     begin
313       if AllNodes.Find(MyID, Idx) then
314       begin
315         if AllNodes.Objects[Idx] is TORTreeNode then
316         begin
317           List := TList.Create;
318           Lists.Add(List);
319           List.Add(AllNodes.Objects[Idx]);
320           AllNodes.Objects[Idx] := List;
321         end
322         else
323           List := TList(AllNodes.Objects[Idx]);
324         List.Add(ChildNode);
325       end
326       else
327         AllNodes.AddObject(MyId, ChildNode);
328     end;
329   }
330   
331   begin
332     Tree.Items.BeginUpdate;
333     ParentNodes := TStringList.Create;
334   //  AllNodes := TStringList.Create;
335   //  Lists := TObjectList.Create;
336     try
337       ParentNodes.Sorted := True;
338   //    AllNodes.Sorted := True;
339       for i := 0 to SvcList.Count - 1 do
340       begin
341         item := SvcList[i];
342         if Piece(item, U, 5) = 'S' then Continue; 
343         MyParent := Piece(item, U, 3);
344         MyID := Piece(item, U, 1);
345         if not ParentNodes.Find(MyParent, Idx) then
346           ParentNode := nil
347         else
348         begin
349           ParentNode := TORTreeNode(ParentNodes.Objects[Idx]);
350   //        FilterOutDuplicates;
351   //        if bad then Continue;
352         end;
353         Name := Piece(item, U, 2);
354         HasChildren := Piece(item, U, 4) = '+';
355         ChildNode := TORTreeNode(Tree.Items.AddChild(ParentNode, Name));
356         ChildNode.StringData := item;
357   //      AddNode;
358         if HasChildren then
359           ParentNodes.AddObject(MyID, ChildNode);
360       end;
361     finally
362       ParentNodes.Free;
363   //    AllNodes.Free;
364   //    Lists.Free;
365     end;
366     Tree.Items.EndUpdate;
367   end;
368   
369   procedure CreateListItemsForConsultTree(Dest, Source: TStrings; Context: integer; GroupBy: string;
370             Ascending: Boolean);
371   var
372     i: Integer;
373     x, x3, MyParent, MyService, MyStatus, MyType, StatusText: string;
374     AList, SrcList: TStringList;
375   begin
376     AList := TStringList.Create;
377     SrcList := TStringList.Create;
378     try
379       FastAssign(Source, SrcList);
380       with SrcList do
381         begin
382           if (Count = 1) and (Piece(Strings[0], U, 1) = '-1') then
383             begin
384               Dest.Insert(0, IntToStr(Context) + '^^^' + 'No Matching Consults Found' + '^^^^0^^^^');
385               Exit;
386             end;
387           for i := 0 to Count - 1 do
388             begin
389               x := Strings[i];
390               MyType   := Piece(x, U, 9);
391               if Context = 0 then Context := CC_ALL;
392               SetPiece(x, U, 8, IntToStr(Context));
393               MyParent := Piece(x, U, 8);
394               MyService  := Piece(x, U, 10);
395               MyStatus   := Piece(x, U, 3);
396               if Length(Trim(MyService)) = 0 then
397                 begin
398                   MyService := '** No Service **';
399                   SetPiece(x, U, 10, MyService);
400                 end;
401               if Length(Trim(MyStatus)) = 0 then
402                 begin
403                   MyStatus := '** No Status **';
404                   SetPiece(x, U, 3, MyStatus);
405                 end;
406               if GroupBy <> '' then case GroupBy[1] of
407                 'S':  begin
408                         SetPiece(x, U, 8, MyParent + MyStatus);
409                         if MyStatus = '(a)' then StatusText := 'Active'
410                         else if MyStatus = '(p)' then StatusText := 'Pending'
411                         else if MyStatus = '(pr)' then StatusText := 'Partial Results'
412                         else if MyStatus = '(s)' then StatusText := 'Scheduled'
413                         else if MyStatus = '(x)' then StatusText := 'Cancelled'
414                         else if MyStatus = '(dc)' then StatusText := 'Discontinued'
415                         else if MyStatus = '(c)' then StatusText := 'Completed'
416                         else StatusText := 'Other';
417                         x3 := MyStatus + U + StatusText + U + IntToStr(Context);
418                         if (AList.IndexOf(x3) = -1) then AList.Add(x3);
419                       end;
420                 'V':  begin
421                         SetPiece(x, U, 8, MyParent + MyService);
422                         x3 := MyService + U + MixedCase(MyService) + U + IntToStr(Context);
423                         if (AList.IndexOf(x3) = -1) then AList.Add(x3);
424                       end;
425                 'T':  begin
426                         SetPiece(x, U, 8, MyParent + MyType);
427                         x3 := MyType + U + MixedCase(MyType) + U + IntToStr(Context);
428                         if (AList.IndexOf(x3) = -1) then AList.Add(x3);
429                       end;
430               end;
431               Dest.Add(x);
432             end; {for}
433           SortByPiece(TStringList(Dest), U, 11);
434           if not Ascending then InvertStringList(TStringList(Dest));
435           Dest.Insert(0, IntToStr(Context) + '^^^' + CC_TV_TEXT[Context] + '^^^+^0^^^^');
436           Alist.Sort;
437           InvertStringList(AList);
438           for i := 0 to AList.Count-1 do
439             Dest.Insert(0, IntToStr(Context) + Piece(AList[i], U, 1) + '^^^' + Piece(AList[i], U, 2) + '^^^+^' + Piece(AList[i], U, 3) + '^^^^');
440         end;
441     finally
442       AList.Free;
443       SrcList.Free;
444     end;
445   end;
446   
447   procedure BuildConsultsTree(Tree: TORTreeView; tmpList: TStrings; const Parent: string; Node: TORTreeNode;
448              CurrentContext: TSelectContext);
449   var
450     MyID, MyParent, Name, temp: string;
451     i: Integer;
452     ChildNode, tmpNode: TORTreeNode;
453     HasChildren: Boolean;
454   begin
455     Tree.Items.BeginUpdate;
456     with tmpList do for i := 0 to Count - 1 do
457       begin
458         MyParent := Piece(Strings[i], U, 8);
459         if (MyParent = Parent) then
460           begin
461             MyID := Piece(Strings[i], U, 1);
462             Name := MakeConsultListDisplayText(Strings[i]);
463             temp  := Strings[i];
464             tmpNode := nil;
465             HasChildren := Piece(Strings[i], U, 7) = '+';
466             if Node <> nil then if Node.HasChildren then
467               tmpNode := Tree.FindPieceNode(MyID, 1, U, Node);
468             if (tmpNode <> nil) and tmpNode.HasAsParent(Node) then
469               Continue
470             else
471               begin
472                 ChildNode := TORTreeNode(Tree.Items.AddChild(Node, Name));
473                 ChildNode.StringData := temp;
474                 SetNodeImage(ChildNode, CurrentContext);
475                 if HasChildren then
476                     BuildConsultsTree(Tree, tmpList, MyID, ChildNode, CurrentContext);
477               end;
478           end;
479       end;
480     Tree.Items.EndUpdate;
481   end;
482   
483   procedure SetNodeImage(Node: TORTreeNode; CurrentContext: TSelectContext);
484   begin
485     with Node do
486       begin
487         if Piece(Stringdata, U, 8) = '0' then
488           begin
489             ImageIndex    := IMG_GMRC_TOP_LEVEL;
490             SelectedIndex := IMG_GMRC_TOP_LEVEL;
491             if (Piece(StringData, U, 4) = 'No Matching Consults Found') then exit;
492             if Piece(Stringdata, U, 1) <> '-1' then
493               with CurrentContext, Node do
494                 if GroupBy <> '' then case GroupBy[1] of
495                   'V': Text := CC_TV_TEXT[StrToInt(Piece(Stringdata, U, 1))] + ' by Service';
496                   'S': Text := CC_TV_TEXT[StrToInt(Piece(Stringdata, U, 1))] + ' by Status';
497                   'T': Text := CC_TV_TEXT[StrToInt(Piece(Stringdata, U, 1))] + ' by Type';
498                 end;
499           end
500         else
501           begin
502             if Piece(Stringdata, U, 7) <> '' then
503               case Piece(Stringdata, U, 7)[1] of
504                 '+': begin
505                        ImageIndex    := IMG_GMRC_GROUP_SHUT;
506                        SelectedIndex := IMG_GMRC_GROUP_OPEN;
507                      end;
508               end
509             else
510               begin
511                 if Piece(StringData, U, 12) <> '' then
512                   case Piece(StringData, U, 12)[1] of
513                     'C': ImageIndex := IMG_GMRC_CONSULT;
514                     'P': ImageIndex := IMG_GMRC_ALL_PROC;  //IMG_GMRC_PROC;
515                     'M': ImageIndex := IMG_GMRC_ALL_PROC;  //IMG_GMRC_CLINPROC;
516                     'I': ImageIndex := IMG_GMRC_IFC_CONSULT;
517                     'R': ImageIndex := IMG_GMRC_IFC_PROC;
518                   end
519                 else
520                   begin
521                     if Piece(StringData, U, 9) = 'Procedure' then
522                       ImageIndex := IMG_GMRC_ALL_PROC
523                     else
524                       ImageIndex := IMG_GMRC_CONSULT;
525                   end;
526                 SelectedIndex := ImageIndex;
527               end;
528           end;
529         StateIndex := IMG_NONE;
530       end;
531   end;
532   
533   end.

Module Calls (2 levels)


uConsults
 └uConst

Module Called-By (2 levels)


          uConsults
        rConsults┤ 
          uCore┤ │ 
        uOrders┤ │ 
        fODBase┤ │ 
         fNotes┤ │ 
       uDocTree┤ │ 
 fConsult513Prt┤ │ 
      fConsults┤ │ 
fTemplateEditor┤ │ 
     fODConsult┤ │ 
     fConsultBS┤ │ 
    fConsultBSt┤ │ 
  fConsultsView┤ │ 
    fConsultAct┤ │ 
        fODProc┤ │ 
     fNoteProps┤ │ 
      fEditProc┤ │ 
   fEditConsult┤ │ 
   fConsMedRslt┤ │ 
        fODAuto┤ │ 
 fOptionsTitles┘ │ 
fBALocalDiagnoses┤ 
     UBAGlobals┤ │ 
    fOrdersSign┤ │ 
        fReview┤ │ 
  fODConsult...┘ │ 
   fOrdersSign...┤ 
      uDocTree...┤ 
     fConsults...┤ 
    fODConsult...┤ 
    fConsultBS...┤ 
       fConsultBD┤ 
   fConsults...┘ │ 
   fConsultBSt...┤ 
 fConsultsView...┤ 
   fConsultAct...┤ 
       fODProc...┤ 
        fCsltNote┤ 
   fConsults...┘ │ 
    fNoteProps...┤ 
     fEditProc...┤ 
  fEditConsult...┤ 
    fNoteCPFields┘ 
   fConsults...┘