source: cprs/trunk/CPRS-Chart/rProbs.pas@ 493

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

Initial Upload of Official WV CPRS 1.0.26.76

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