source: cprs/branches/tmg-cprs/CPRS-Chart/rProbs.pas@ 1156

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 6.8 KB
RevLine 
[453]1//kt -- Modified with SourceScanner on 8/25/2007
2unit rProbs;
3
4interface
5
6uses SysUtils, Classes, ORNet, ORFn, uCore;
7
8function AddSave(PatientInfo: string; ProviderID: int64; ptVAMC: string;
9 ProbFile: TStringList): TStrings ;
10function AuditHistory(ProblemIFN: string): TStrings ;
11function ClinicFilterList(LocList: TStringList): TStrings ;
12function ClinicSearch(DummyArg:string): TStrings ;
13function ProblemDelete(ProblemIFN: string; ProviderID: int64; ptVAMC, Comment: string): TStrings ;
14{function ProblemDetail}
15function EditLoad(ProblemIFN: string; ProviderID: int64; ptVAMC: string): TStrings ;
16function EditSave(ProblemIFN: string; ProviderID: int64; ptVAMC, PrimUser: string;
17 ProbFile: TStringList): TStrings ;
18function InitPt(const PatientDFN: string): TStrings ; //*DFN*
19function InitUser(ProviderID: int64): TStrings ;
20function PatientProviders(const PatientDFN: string): TStrings ; //*DFN*
21function ProblemList(const PatientDFN: string; Status:string): TStrings ; //*DFN*
22function OldProblemLexiconSearch(SearchFor: string; Matches: integer; ADate: TFMDateTime = 0): TStrings ;
23function ProblemLexiconCodeSearch(LexIEN: string; CodeType: string; ADate: TFMDateTime = 0): string ;
24function ProblemLexiconSearch(SearchFor: string; View: string; ADate: TFMDateTime = 0): TStrings ;
25function ProviderFilterList(ProvList: TStringList): TStrings ;
26function ProviderList(Flag:string; Number:integer; From,Part: string): TStrings ;
27function ProblemReplace(ProblemIFN: string): TStrings ;
28function ServiceFilterList(LocList: TStringList): TStrings ;
29function ServiceSearch(const StartFrom: string; Direction: Integer; All: boolean = FALSE): TStrings;
30function ProblemUpdate(AltProbFile: TStringList): TStrings ;
31function UserProblemCategories(Provider: int64; Location: integer): TStrings ;
32function UserProblemList(CategoryIEN: string): TStrings ;
33function ProblemVerify(ProblemIFN: string): TStrings ;
34function GetProblemComments(ProblemIFN: string): TStrings;
35procedure SaveViewPreferences(ViewPref: string);
36function CheckForDuplicateProblem(TermIEN, TermText: string): string;
37
38implementation
39
40function AddSave(PatientInfo: string; ProviderID: int64; ptVAMC: string;
41 ProbFile: TStringList): TStrings ;
42begin
43 CallV('ORQQPL ADD SAVE',[PatientInfo, ProviderID, ptVAMC, ProbFile]);
44 Result := RPCBrokerV.Results ;
45end ;
46
47function AuditHistory(ProblemIFN: string): TStrings ;
48begin
49 CallV('ORQQPL AUDIT HIST',[ProblemIFN]);
50 Result := RPCBrokerV.Results ;
51end ;
52
53function ClinicFilterList(LocList: TStringList): TStrings ;
54begin
55 CallV('ORQQPL CLIN FILTER LIST',[LocList]);
56 MixedCaseList(RPCBrokerV.Results) ;
57 Result := RPCBrokerV.Results;
58end ;
59
60function ClinicSearch(DummyArg:string): TStrings ;
61begin
62 CallV('ORQQPL CLIN SRCH',[DummyArg]);
63 Result := RPCBrokerV.Results ;
64end ;
65
66function ProblemDelete(ProblemIFN: string; ProviderID: int64; ptVAMC, Comment: string): TStrings ;
67begin
68 CallV('ORQQPL DELETE',[ProblemIFN, ProviderID, ptVAMC, Comment]);
69 Result := RPCBrokerV.Results ;
70end ;
71
72function EditLoad(ProblemIFN: string; ProviderID: int64; ptVAMC: string): TStrings ;
73begin
74 CallV('ORQQPL EDIT LOAD',[ProblemIFN, ProviderID, ptVAMC]);
75 Result := RPCBrokerV.Results ;
76end ;
77
78function EditSave(ProblemIFN: string; ProviderID: int64; ptVAMC, PrimUser: string;
79 ProbFile: TStringList): TStrings ;
80begin
81 CallV('ORQQPL EDIT SAVE',[ProblemIFN, ProviderID, ptVAMC, PrimUser, ProbFile]);
82 Result := RPCBrokerV.Results ;
83end ;
84
85function InitPt(const PatientDFN: string): TStrings ; //*DFN*
86begin
87 CallV('ORQQPL INIT PT',[PatientDFN]);
88 Result := RPCBrokerV.Results ;
89end ;
90
91function InitUser(ProviderID: int64): TStrings ;
92begin
93 CallV('ORQQPL INIT USER',[ProviderID]);
94 Result := RPCBrokerV.Results ;
95end ;
96
97function PatientProviders(const PatientDFN: string): TStrings ; //*DFN*
98begin
99 CallV('ORQPT PATIENT TEAM PROVIDERS',[PatientDFN]);
100 Result := RPCBrokerV.Results ;
101end ;
102
103function ProblemLexiconSearch(SearchFor: string; View: string; ADate: TFMDateTime = 0): TStrings ;
104begin
105 CallV('ORWPCE LEX',[SearchFor,View, ADate]);
106 Result := RPCBrokerV.Results ;
107end ;
108
109function ProblemLexiconCodeSearch(LexIEN: string; CodeType: string; ADate: TFMDateTime = 0): string ;
110begin
111 CallV('ORWPCE LEXCODE',[LexIEN, CodeType, ADate]);
112 Result := RPCBrokerV.Results[0] ;
113end ;
114
115function OldProblemLexiconSearch(SearchFor: string; Matches: integer; ADate: TFMDateTime = 0): TStrings ;
116const
117 VIEW = '';
118begin
119 CallV('ORQQPL PROBLEM LEX SEARCH',[SearchFor, Matches, VIEW, ADate]);
120 Result := RPCBrokerV.Results ;
121end ;
122
123function ProblemList(const PatientDFN: string; Status:string): TStrings ; //*DFN*
124begin
125 CallV('ORQQPL PROBLEM LIST',[PatientDFN, status]);
126 Result := RPCBrokerV.Results ;
127end ;
128
129function ProviderFilterList(ProvList: TStringList): TStrings ;
130begin
131 CallV('ORQQPL PROV FILTER LIST',[ProvList]);
132 Result := RPCBrokerV.Results ;
133end ;
134
135function ProviderList(Flag:string; Number:integer; From,Part: string): TStrings ;
136begin
137 CallV('ORQQPL PROVIDER LIST',[Flag,Number,From,Part]);
138 Result := RPCBrokerV.Results ;
139end ;
140
141function ProblemReplace(ProblemIFN: string): TStrings ;
142begin
143 CallV('ORQQPL REPLACE',[ProblemIFN]);
144 Result := RPCBrokerV.Results ;
145end ;
146
147function ServiceFilterList(LocList: TStringList): TStrings ;
148begin
149 CallV('ORQQPL SERV FILTER LIST',[LocList]);
150 MixedCaseList(RPCBrokerV.Results) ;
151 Result := RPCBrokerV.Results;
152end ;
153
154function ServiceSearch(const StartFrom: string; Direction: Integer; All: boolean = FALSE): TStrings;
155begin
156 CallV('ORQQPL SRVC SRCH',[StartFrom, Direction, BoolChar[All]]);
157 MixedCaseList(RPCBrokerV.Results) ;
158 Result := RPCBrokerV.Results ;
159end ;
160
161function ProblemUpdate(AltProbFile: TStringList): TStrings ;
162begin
163 CallV('ORQQPL UPDATE',[AltProbFile]);
164 Result := RPCBrokerV.Results ;
165end ;
166
167function ProblemVerify(ProblemIFN: string): TStrings ;
168begin
169 CallV('ORQQPL VERIFY',[ProblemIFN]);
170 Result := RPCBrokerV.Results ;
171end ;
172
173function UserProblemCategories(Provider: int64; Location: integer): TStrings ;
174begin
175 CallV('ORQQPL USER PROB CATS',[Provider, Location]);
176 Result := RPCBrokerV.Results ;
177end ;
178
179function UserProblemList(CategoryIEN: string): TStrings ;
180begin
181 CallV('ORQQPL USER PROB LIST',[CategoryIEN]);
182 Result := RPCBrokerV.Results ;
183end ;
184
185function GetProblemComments(ProblemIFN: string): TStrings;
186begin
187 CallV('ORQQPL PROB COMMENTS',[ProblemIFN]);
188 Result := RPCBrokerV.Results ;
189end;
190
191procedure SaveViewPreferences(ViewPref: string);
192begin
193 CallV('ORQQPL SAVEVIEW',[ViewPref]);
194end;
195
196function CheckForDuplicateProblem(TermIEN, TermText: string): string;
197begin
198 CallV('ORQQPL CHECK DUP',[Patient.DFN, TermIEN, TermText]);
199 Result := RPCBrokerV.Results[0];
200end;
201
202end.
Note: See TracBrowser for help on using the repository browser.