[453] | 1 | //kt -- Modified with SourceScanner on 8/8/2007
|
---|
| 2 | unit rODRad;
|
---|
| 3 |
|
---|
| 4 | interface
|
---|
| 5 |
|
---|
| 6 | uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, TRPCB, dialogs ;
|
---|
| 7 |
|
---|
| 8 | { Radiology Ordering Calls }
|
---|
| 9 | function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings; //*DFN*
|
---|
| 10 | function SubsetOfRadProcs(ImagingType: integer; const StartFrom: string; Direction: Integer): TStrings;
|
---|
| 11 | function ImagingMessage(AnIEN: Integer): string;
|
---|
| 12 | function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; //*DFN*
|
---|
| 13 | function SubsetOfRadiologists: TStrings;
|
---|
| 14 | function SubsetOfImagingTypes: TStrings;
|
---|
| 15 | function SubsetOfRadSources(SrcType: string): TStrings;
|
---|
| 16 | function LocationType(Location: integer): string;
|
---|
| 17 |
|
---|
| 18 | implementation
|
---|
| 19 |
|
---|
| 20 | uses rODBase;
|
---|
| 21 | (* fODBase, rODBase, fODRad;*)
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings; //*DFN*
|
---|
| 25 | { Returns init values for radiology dialog. The results must be used immediately. }
|
---|
| 26 | begin
|
---|
| 27 | CallV('ORWDRA32 DEF', [PatientDFN, AnEventDiv, ImagingType]);
|
---|
| 28 | Result := RPCBrokerV.Results;
|
---|
| 29 | end;
|
---|
| 30 |
|
---|
| 31 | function 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.
|
---|
| 34 | begin
|
---|
| 35 | Callv('ORWDRA32 RAORDITM',[StartFrom, Direction, ImagingType]);
|
---|
| 36 | Result := RPCBrokerV.Results;
|
---|
| 37 | end ;
|
---|
| 38 |
|
---|
| 39 | function ImagingMessage(AnIEN: Integer): string;
|
---|
| 40 | var
|
---|
| 41 | x: string ;
|
---|
| 42 | i: integer ;
|
---|
| 43 | begin
|
---|
| 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 ;
|
---|
| 48 | end;
|
---|
| 49 |
|
---|
| 50 | function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; //*DFN*
|
---|
| 51 | begin
|
---|
| 52 | Result := (StrToInt(Piece(sCallV('ORWDRA32 ISOLATN', [PatientDFN]),U,1)) > 0) ;
|
---|
| 53 | end ;
|
---|
| 54 |
|
---|
| 55 | function SubsetOfRadiologists: TStrings;
|
---|
| 56 | begin
|
---|
| 57 | Callv('ORWDRA32 APPROVAL',['']);
|
---|
| 58 | Result := RPCBrokerV.Results ;
|
---|
| 59 | end ;
|
---|
| 60 |
|
---|
| 61 | function SubsetOfImagingTypes: TStrings;
|
---|
| 62 | begin
|
---|
| 63 | Callv('ORWDRA32 IMTYPSEL',['']);
|
---|
| 64 | Result := RPCBrokerV.Results ;
|
---|
| 65 | end ;
|
---|
| 66 |
|
---|
| 67 | function SubsetOfRadSources(SrcType: string): TStrings;
|
---|
| 68 | begin
|
---|
| 69 | Callv('ORWDRA32 RADSRC',[SrcType]);
|
---|
| 70 | Result := RPCBrokerV.Results ;
|
---|
| 71 | end ;
|
---|
| 72 |
|
---|
| 73 | function LocationType(Location: integer): string;
|
---|
| 74 | begin
|
---|
| 75 | Result := sCallV('ORWDRA32 LOCTYPE',[Location]);
|
---|
| 76 | end;
|
---|
| 77 |
|
---|
| 78 | end.
|
---|