[456] | 1 | unit rODRad;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses SysUtils, Classes, ORNet, ORFn, rCore, uCore, TRPCB, dialogs ;
|
---|
| 6 |
|
---|
| 7 | { Radiology Ordering Calls }
|
---|
| 8 | function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings; //*DFN*
|
---|
| 9 | function SubsetOfRadProcs(ImagingType: integer; const StartFrom: string; Direction: Integer): TStrings;
|
---|
| 10 | function ImagingMessage(AnIEN: Integer): string;
|
---|
| 11 | function PatientOnIsolationProcedures(const PatientDFN: string): boolean ; //*DFN*
|
---|
| 12 | function SubsetOfRadiologists: TStrings;
|
---|
| 13 | function SubsetOfImagingTypes: TStrings;
|
---|
| 14 | function SubsetOfRadSources(SrcType: string): TStrings;
|
---|
[1693] | 15 | function LocationType(Location: integer): string;
|
---|
[829] | 16 | function ReasonForStudyCarryOn: Boolean;
|
---|
[456] | 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]);
|
---|
[1693] | 76 | end;
|
---|
[829] | 77 |
|
---|
| 78 | function ReasonForStudyCarryOn: Boolean;
|
---|
| 79 | begin
|
---|
| 80 | Result := sCallV('ORWDXM1 SVRPC',['']) = '1';
|
---|
[456] | 81 | end;
|
---|
| 82 |
|
---|
| 83 | end.
|
---|