source: cprs/branches/HealthSevak-CPRS/CPRS-Chart/Orders/rODRad.pas@ 1706

Last change on this file since 1706 was 1693, checked in by healthsevak, 10 years ago

Committing the files for first time to this new branch

File size: 2.5 KB
RevLine 
[456]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;
[1693]15function LocationType(Location: integer): string;
[829]16function ReasonForStudyCarryOn: Boolean;
[456]17
18implementation
19
20uses rODBase;
21(* fODBase, rODBase, fODRad;*)
22
23
24function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings; //*DFN*
25{ Returns init values for radiology dialog. The results must be used immediately. }
26begin
27 CallV('ORWDRA32 DEF', [PatientDFN, AnEventDiv, ImagingType]);
28 Result := RPCBrokerV.Results;
29end;
30
31function SubsetOfRadProcs(ImagingType: integer; const StartFrom: string; Direction: Integer): TStrings;
32 // Needed separate call because of 'RA REQUIRE DETAILED' divisional parameter.
33 // Screens out 'Broad' procedures if parameter true.
34begin
35 Callv('ORWDRA32 RAORDITM',[StartFrom, Direction, ImagingType]);
36 Result := RPCBrokerV.Results;
37end ;
38
39function ImagingMessage(AnIEN: Integer): string;
40var
41 x: string ;
42 i: integer ;
43begin
44 CallV('ORWDRA32 PROCMSG', [AnIEN]);
45 for i := 0 to RPCBrokerV.Results.Count-1 do
46 x := x + RPCBrokerV.Results[i] + #13#10 ;
47 Result := x ;
48end;
49
50function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; //*DFN*
51begin
52 Result := (StrToInt(Piece(sCallV('ORWDRA32 ISOLATN', [PatientDFN]),U,1)) > 0) ;
53end ;
54
55function SubsetOfRadiologists: TStrings;
56begin
57 Callv('ORWDRA32 APPROVAL',['']);
58 Result := RPCBrokerV.Results ;
59end ;
60
61function SubsetOfImagingTypes: TStrings;
62begin
63 Callv('ORWDRA32 IMTYPSEL',['']);
64 Result := RPCBrokerV.Results ;
65end ;
66
67function SubsetOfRadSources(SrcType: string): TStrings;
68begin
69 Callv('ORWDRA32 RADSRC',[SrcType]);
70 Result := RPCBrokerV.Results ;
71end ;
72
73function LocationType(Location: integer): string;
74begin
75 Result := sCallV('ORWDRA32 LOCTYPE',[Location]);
[1693]76end;
[829]77
78function ReasonForStudyCarryOn: Boolean;
79begin
80 Result := sCallV('ORWDXM1 SVRPC',['']) = '1';
[456]81end;
82
83end.
Note: See TracBrowser for help on using the repository browser.