Ignore:
Timestamp:
May 8, 2011, 4:11:34 AM (13 years ago)
Author:
Sam Habiel
Message:

Merging Radiology Support branch back to trunk.

Location:
Scheduling/trunk/m
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Scheduling/trunk/m

  • Scheduling/trunk/m/BSDX01.m

    r1161 r1172  
    319319           I $$INDIV2(27)'=1 W "ERROR",!
    320320           QUIT
     321           ;
     322GETRADEX(BSDXY,DFN,SCIEN) ; Get All Pending and On Hold Radiology Exams for Patient; RPC EP; UJO/SMH new in v 1.6
     323 ; RPC: BSDX GET RAD EXAM FOR PT; Return: Global Array
     324 ;
     325 ; Input: DFN - you should know; SCIEN - IEN of Hospital Location
     326 ; Output: ADO Datatable with the following columns:
     327 ; - BMXIEN: Radiology Exam IEN in file 75.1 (RAD/NUC MED ORDERS)
     328 ; - STATUS: Pending Or Hold Status
     329 ; - PROCEDURE: Text Procedure Name
     330 ; - REQUEST_DATE: Date Procedure was requested
     331 ;
     332 ; Error Processing: Silent failure.
     333 ;
     334 S BSDXY=$NA(^BMXTEMP($J))
     335 K @BSDXY
     336 ;
     337 N BSDXI S BSDXI=0
     338 S @BSDXY@(BSDXI)="I00015BMXIEN^T00015STATUS^T00100PROCEDURE^D00030REQUEST_DATE"_$C(30)
     339 ;
     340 N BSDXRLIEN S BSDXRLIEN=$ORDER(^RA(79.1,"B",SCIEN,""))  ; IEN of HL in file 79.1, to get Radiology Imaging IEN
     341 I 'BSDXRLIEN GOTO END
     342 ;
     343 N BSDXOUT,BSDXERR ; Out, Error
     344 ;
     345 ; File 75.1 = RAD/NUC MED ORDERS
     346 ; Fields 5 = Request Status; 2 = Procedure; 16 = Requested Entered Date Time
     347 ; Filter Field: First piece is DFN, 5th piece is 3 or 5 (Status of Pending Or Hold); 20th piece is Radiology Location requested
     348 D LIST^DIC(75.1,"","@;5;2;16","P","","","","B","I $P(^(0),U)=DFN&(35[$P(^(0),U,5))&($P(^(0),U,20)=BSDXRLIEN)","","BSDXOUT","BSDXERR")
     349 ;
     350 IF $DATA(BSDXERR) GOTO END
     351 ;
     352 I +BSDXOUT("DILIST",0)>0 FOR BSDXI=1:1:+BSDXOUT("DILIST",0) DO  ; if we have data, fetch the data in each row and store it in the return variable
     353 . N BMXIEN,BMXSTAUS,BMXPROC,BMXDATE ; Proc IEN, Proc Status, Proc Name
     354 . S BMXIEN=$P(BSDXOUT("DILIST",BSDXI,0),U) ; IEN
     355 . S BMXSTATUS=$P(BSDXOUT("DILIST",BSDXI,0),U,2) ; Status
     356 . S BMXPROC=$P(BSDXOUT("DILIST",BSDXI,0),U,3) ; Procedure Name
     357 . S BMXDATE=$TR($P(BSDXOUT("DILIST",BSDXI,0),U,4),"@"," ") ; Request Entered Date Time
     358 . S @BSDXY@(BSDXI)=BMXIEN_U_BMXSTATUS_U_BMXPROC_U_BMXDATE_$C(30)
     359END ; Errors Jump Here...
     360 S @BSDXY@(BSDXI+1)=$C(31)
     361 QUIT
     362 ;
     363SCHRAEX(BSDXY,RADFN,RAOIFN,RAOSCH) ; Schedule a Radiology Exam; RPC EP; UJO/SMH new in v 1.6
     364 ; RPC: BSDX SCHEDULE RAD EXAM; Return: Single Value
     365 ;
     366 ; Input:
     367 ; - RADFN -> DFN
     368 ; - RAOIFN -> Radiology Order IEN in file 75.1
     369 ; - RAOSCH -> Scheduled Time for Exam
     370 ; Output: Always "1"
     371 ;
     372 S RAOSCH=+RAOSCH ; Strip the trailing zeros from the Fileman Date produced by C#
     373 N RAOSTS S RAOSTS=8  ; Status of Scheduled
     374 D ^RAORDU  ; API in Rad expects RADFN, RAOIFN, RAOSCH, and RAOSTS
     375 S BSDXY=1 ; Success
     376 QUIT
     377 ;
     378HOLDRAEX(BSDXY,RADFN,RAOIFN) ; Hold a Radiology Exam; RPC EP; UJO/SMH new in v 1.6
     379 ; RPC: BSDX HOLD RAD EXAM; Return: Single Vale
     380 ;
     381 ; Input:
     382 ; - RADFN -> DFN
     383 ; - RAOIFN -> Radiology Order IEN in file 75.1
     384 ; Output: Always "1"
     385 N RAOSTS S RAOSTS=3  ; Status of Hold
     386 N RAOREA S RAOREA=20 ; Reason: Exam Cancelled
     387 D ^RAORDU
     388 S BSDXY=1 ; Success
     389 QUIT
Note: See TracChangeset for help on using the changeset viewer.