Module

uDCSumm

Path

C:\CPRS\CPRS30\uDCSumm.pas

Last Modified

7/15/2014 3:26:44 PM

Units Used in Interface

Name Comments
rCore -
uConst -
uCore -

Classes

Name Comments
TDCSummPrefs -
TDCSummTitles -

Functions

Name Owner Declaration Scope Comments
MakeDCSummDisplayText - function MakeDCSummDisplayText(RawText: string): string; Interfaced -


Module Source

1     unit uDCSumm;
2     
3     interface
4     
5     uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, uConst;
6     
7     type
8       TEditDCSummRec = record
9         Title: Integer;
10        DocType: integer;
11        Addend: integer;
12        EditIEN: integer;
13        AdmitDateTime: TFMDateTime;
14        DischargeDateTime: TFMDateTime;
15        TitleName: string;
16        DictDateTime: TFMDateTime;
17        Dictator: Int64;
18        DictatorName: string;
19        Cosigner: Int64;
20        CosignerName: string;
21        Transcriptionist: int64;
22        TranscriptionistName: string;
23        Attending: int64;
24        AttendingName: string;
25        Urgency: string;
26        UrgencyName: string;
27        Location: Integer;
28        LocationName: string;
29        VisitStr: string;
30        NeedCPT: Boolean;
31        Status: integer;       
32        LastCosigner: Int64;
33        LastCosignerName: string;
34        IDParent: integer;
35        Lines: TStrings;
36      end;
37    
38      TDCSummRec = TEditDCSummRec;
39    
40      TAdmitRec = record
41        AdmitDateTime: TFMDateTime;
42        Location: integer;
43        LocationName: string;
44        VisitStr: string;
45      end;
46    
47      TDCSummTitles = class
48        DfltTitle: Integer;
49        DfltTitleName: string;
50        ShortList: TStringList;
51        constructor Create;
52        destructor Destroy; override;
53      end;
54    
55      TDCSummPrefs = class
56        DfltLoc: Integer;
57        DfltLocName: string;
58        SortAscending: Boolean;
59        AskCosigner: Boolean;
60        DfltCosigner: Int64;
61        DfltCosignerName: string;
62        MaxSumms: Integer;
63      end;
64    
65    function  MakeDCSummDisplayText(RawText: string): string;
66    
67    implementation
68    
69    function MakeDCSummDisplayText(RawText: string): string;
70    var
71      x: string;
72    begin
73      x := RawText;
74      if Copy(Piece(x, U, 9), 1, 4) = '    ' then SetPiece(x, U, 9, 'Dis: ');
75      if Piece(x, U, 1)[1] in ['A', 'N', 'E'] then
76        Result := Piece(x, U, 2)
77      else
78        Result := FormatFMDateTime('mmm dd,yy', MakeFMDateTime(Piece(x, U, 3))) + '  ' +
79                  Piece(x, U, 2) + ', ' + Piece(x, U, 6) + ', ' + Piece(Piece(x, U, 5), ';', 2) +
80                  '  (' + Piece(x,U,7) + '), ' + Piece(Piece(x, U, 8), ';', 1) + ', ' +
81                  Piece(Piece(x, U, 9), ';', 1);
82    end;
83    
84    { Discharge Summary Titles  -------------------------------------------------------------------- }
85    
86    constructor TDCSummTitles.Create;
87    { creates an object to store Discharge Summary titles so only obtained from server once }
88    begin
89      inherited Create;
90      ShortList := TStringList.Create;
91    end;
92    
93    destructor TDCSummTitles.Destroy;
94    { frees the lists that were used to store the Discharge Summary titles }
95    begin
96      ShortList.Free;
97      inherited Destroy;
98    end;
99    
100   end.

Module Calls (2 levels)

-

Module Called-By (2 levels)


              uDCSumm
         uTemplates┤ 
          fODBase┤ │ 
          dShared┤ │ 
         fDrawers┤ │ 
  fTemplateDialog┤ │ 
           fNotes┤ │ 
        fConsults┤ │ 
          fDCSumm┤ │ 
  fTemplateEditor┤ │ 
  fReminderDialog┤ │ 
         fSurgery┤ │ 
       fODConsult┤ │ 
          fODProc┤ │ 
          fODAuto┤ │ 
fFindingTemplates┤ │ 
 fTemplateObjects┤ │ 
 fTemplateAutoGen┘ │ 
           uDocTree┤ 
        fNotes...┤ │ 
     fConsults...┤ │ 
       fDCSumm...┘ │ 
         fDCSumm...┤ 
            rDCSumm┤ 
       fDCSumm...┤ │ 
     fDCSummProps┤ │ 
    fOptionsNotes┤ │ 
   fOptionsTitles┘ │ 
    fDCSummProps...┘