| [459] | 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; | 
|---|
|  | 15 | function LocationType(Location: integer): string; | 
|---|
|  | 16 |  | 
|---|
|  | 17 | implementation | 
|---|
|  | 18 |  | 
|---|
|  | 19 | uses   rODBase; | 
|---|
|  | 20 | (*    fODBase, rODBase, fODRad;*) | 
|---|
|  | 21 |  | 
|---|
|  | 22 |  | 
|---|
|  | 23 | function ODForRad(const PatientDFN, AnEventDiv: string; ImagingType: integer): TStrings;  //*DFN* | 
|---|
|  | 24 | { Returns init values for radiology dialog.  The results must be used immediately. } | 
|---|
|  | 25 | begin | 
|---|
|  | 26 | CallV('ORWDRA32 DEF', [PatientDFN, AnEventDiv, ImagingType]); | 
|---|
|  | 27 | Result := RPCBrokerV.Results; | 
|---|
|  | 28 | end; | 
|---|
|  | 29 |  | 
|---|
|  | 30 | function 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. | 
|---|
|  | 33 | begin | 
|---|
|  | 34 | Callv('ORWDRA32 RAORDITM',[StartFrom, Direction, ImagingType]); | 
|---|
|  | 35 | Result := RPCBrokerV.Results; | 
|---|
|  | 36 | end ; | 
|---|
|  | 37 |  | 
|---|
|  | 38 | function ImagingMessage(AnIEN: Integer): string; | 
|---|
|  | 39 | var | 
|---|
|  | 40 | x: string ; | 
|---|
|  | 41 | i: integer ; | 
|---|
|  | 42 | begin | 
|---|
|  | 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 ; | 
|---|
|  | 47 | end; | 
|---|
|  | 48 |  | 
|---|
|  | 49 | function PatientOnIsolationProcedures(const PatientDFN: string): boolean ;  //*DFN* | 
|---|
|  | 50 | begin | 
|---|
|  | 51 | Result := (StrToInt(Piece(sCallV('ORWDRA32 ISOLATN', [PatientDFN]),U,1)) > 0) ; | 
|---|
|  | 52 | end ; | 
|---|
|  | 53 |  | 
|---|
|  | 54 | function SubsetOfRadiologists: TStrings; | 
|---|
|  | 55 | begin | 
|---|
|  | 56 | Callv('ORWDRA32 APPROVAL',['']); | 
|---|
|  | 57 | Result := RPCBrokerV.Results ; | 
|---|
|  | 58 | end ; | 
|---|
|  | 59 |  | 
|---|
|  | 60 | function SubsetOfImagingTypes: TStrings; | 
|---|
|  | 61 | begin | 
|---|
|  | 62 | Callv('ORWDRA32 IMTYPSEL',['']); | 
|---|
|  | 63 | Result := RPCBrokerV.Results ; | 
|---|
|  | 64 | end ; | 
|---|
|  | 65 |  | 
|---|
|  | 66 | function SubsetOfRadSources(SrcType: string): TStrings; | 
|---|
|  | 67 | begin | 
|---|
|  | 68 | Callv('ORWDRA32 RADSRC',[SrcType]); | 
|---|
|  | 69 | Result := RPCBrokerV.Results ; | 
|---|
|  | 70 | end ; | 
|---|
|  | 71 |  | 
|---|
|  | 72 | function LocationType(Location: integer): string; | 
|---|
|  | 73 | begin | 
|---|
|  | 74 | Result := sCallV('ORWDRA32 LOCTYPE',[Location]); | 
|---|
|  | 75 | end; | 
|---|
|  | 76 |  | 
|---|
|  | 77 | end. | 
|---|