source: cprs/branches/foia-cprs/CPRS-Chart/uDCSumm.pas@ 1705

Last change on this file since 1705 was 459, checked in by Kevin Toppenberg, 16 years ago

Adding foia-cprs branch

File size: 2.5 KB
RevLine 
[459]1unit uDCSumm;
2
3interface
4
5uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, uConst;
6
7type
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
65function MakeDCSummDisplayText(RawText: string): string;
66
67implementation
68
69function MakeDCSummDisplayText(RawText: string): string;
70var
71 x: string;
72begin
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);
82end;
83
84{ Discharge Summary Titles -------------------------------------------------------------------- }
85
86constructor TDCSummTitles.Create;
87{ creates an object to store Discharge Summary titles so only obtained from server once }
88begin
89 inherited Create;
90 ShortList := TStringList.Create;
91end;
92
93destructor TDCSummTitles.Destroy;
94{ frees the lists that were used to store the Discharge Summary titles }
95begin
96 ShortList.Free;
97 inherited Destroy;
98end;
99
100end.
Note: See TracBrowser for help on using the repository browser.