source: cprs/branches/foia-cprs/CPRS-Chart/Orders/rODRad.pas@ 1571

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

Adding foia-cprs branch

File size: 2.3 KB
Line 
1unit rODRad;
2
3interface
4
5uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, TRPCB, dialogs ;
6
7 { Radiology Ordering Calls }
8function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings; //*DFN*
9function SubsetOfRadProcs(ImagingType: integer; const StartFrom: string; Direction: Integer): TStrings;
10function ImagingMessage(AnIEN: Integer): string;
11function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; //*DFN*
12function SubsetOfRadiologists: TStrings;
13function SubsetOfImagingTypes: TStrings;
14function SubsetOfRadSources(SrcType: string): TStrings;
15function LocationType(Location: integer): string;
16
17implementation
18
19uses rODBase;
20(* fODBase, rODBase, fODRad;*)
21
22
23function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings; //*DFN*
24{ Returns init values for radiology dialog. The results must be used immediately. }
25begin
26 CallV('ORWDRA32 DEF', [PatientDFN, AnEventDiv, ImagingType]);
27 Result := RPCBrokerV.Results;
28end;
29
30function SubsetOfRadProcs(ImagingType: integer; const StartFrom: string; Direction: Integer): TStrings;
31 // Needed separate call because of 'RA REQUIRE DETAILED' divisional parameter.
32 // Screens out 'Broad' procedures if parameter true.
33begin
34 Callv('ORWDRA32 RAORDITM',[StartFrom, Direction, ImagingType]);
35 Result := RPCBrokerV.Results;
36end ;
37
38function ImagingMessage(AnIEN: Integer): string;
39var
40 x: string ;
41 i: integer ;
42begin
43 CallV('ORWDRA32 PROCMSG', [AnIEN]);
44 for i := 0 to RPCBrokerV.Results.Count-1 do
45 x := x + RPCBrokerV.Results[i] + #13#10 ;
46 Result := x ;
47end;
48
49function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; //*DFN*
50begin
51 Result := (StrToInt(Piece(sCallV('ORWDRA32 ISOLATN', [PatientDFN]),U,1)) > 0) ;
52end ;
53
54function SubsetOfRadiologists: TStrings;
55begin
56 Callv('ORWDRA32 APPROVAL',['']);
57 Result := RPCBrokerV.Results ;
58end ;
59
60function SubsetOfImagingTypes: TStrings;
61begin
62 Callv('ORWDRA32 IMTYPSEL',['']);
63 Result := RPCBrokerV.Results ;
64end ;
65
66function SubsetOfRadSources(SrcType: string): TStrings;
67begin
68 Callv('ORWDRA32 RADSRC',[SrcType]);
69 Result := RPCBrokerV.Results ;
70end ;
71
72function LocationType(Location: integer): string;
73begin
74 Result := sCallV('ORWDRA32 LOCTYPE',[Location]);
75end;
76
77end.
Note: See TracBrowser for help on using the repository browser.