RMPR9PA ;HOIFO/SPS - GUI 2319 TAB 2 PENDING APPOINTMENTS ;3/26/07 07:27
;;3.0;PROSTHETICS;**59,88**;Feb 09, 1996;Build 2
;DDA 6 MAR 07 - Patch 88 - Added Scheduling Encapsulation database check
; for SDA^VADPT call and ^UTILITY("VASD", usage.
; Variable RMPRSDER will equal 2 if the COTS database is unavailable.
;
A1(IEN) G A2
EN(RESULTS,IEN) ;broker entry point
A2 ;
S DFN=$P($G(^RMPR(668,IEN,0)),U,2)
I DFN="" S RESULTS(0)="NOTHING TO REPORT" G EXIT
;Pending Appointments
D SDA^VADPT S RMPRSDER=VAERR
I RMPRSDER=2!'$D(^UTILITY("VASD",$J)) G EXIT
S CNT=0,RO=0 F S RO=$O(^UTILITY("VASD",$J,RO)) Q:RO'>0 D
. I CNT>0 S CNT=CNT+1
. S RESULTS(CNT)=$P(^UTILITY("VASD",$J,RO,"E"),U,1)_"^"_$P(^UTILITY("VASD",$J,RO,"E"),U,2)_"^"_$P(^UTILITY("VASD",$J,RO,"E"),U,3)_"^"_$P(^UTILITY("VASD",$J,RO,"E"),U,4)
. S CNT=CNT+1
EXIT ;common exit point
I RMPRSDER=2 S RESULTS(0)="Fatal RSA error. See SDAM RSA ERROR LOG file."
I '$D(RESULTS) S RESULTS(0)="NOTHING TO REPORT"
K CNT,DFN,RMPRSDER,RO,^UTILITY("VASD",$J)
;END
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPR9PA 1049 printed Dec 13, 2024@02:33:44 Page 2
RMPR9PA ;HOIFO/SPS - GUI 2319 TAB 2 PENDING APPOINTMENTS ;3/26/07 07:27
+1 ;;3.0;PROSTHETICS;**59,88**;Feb 09, 1996;Build 2
+2 ;DDA 6 MAR 07 - Patch 88 - Added Scheduling Encapsulation database check
+3 ; for SDA^VADPT call and ^UTILITY("VASD", usage.
+4 ; Variable RMPRSDER will equal 2 if the COTS database is unavailable.
+5 ;
A1(IEN) GOTO A2
EN(RESULTS,IEN) ;broker entry point
A2 ;
+1 SET DFN=$PIECE($GET(^RMPR(668,IEN,0)),U,2)
+2 IF DFN=""
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+3 ;Pending Appointments
+4 DO SDA^VADPT
SET RMPRSDER=VAERR
+5 IF RMPRSDER=2!'$DATA(^UTILITY("VASD",$JOB))
GOTO EXIT
+6 SET CNT=0
SET RO=0
FOR
SET RO=$ORDER(^UTILITY("VASD",$JOB,RO))
if RO'>0
QUIT
Begin DoDot:1
+7 IF CNT>0
SET CNT=CNT+1
+8 SET RESULTS(CNT)=$PIECE(^UTILITY("VASD",$JOB,RO,"E"),U,1)_"^"_$PIECE(^UTILITY("VASD",$JOB,RO,"E"),U,2)_"^"_$PIECE(^UTILITY("VASD",$JOB,RO,"E"),U,3)_"^"_$PIECE(^UTILITY("VASD",$JOB,RO,"E"),U,4)
+9 SET CNT=CNT+1
End DoDot:1
EXIT ;common exit point
+1 IF RMPRSDER=2
SET RESULTS(0)="Fatal RSA error. See SDAM RSA ERROR LOG file."
+2 IF '$DATA(RESULTS)
SET RESULTS(0)="NOTHING TO REPORT"
+3 KILL CNT,DFN,RMPRSDER,RO,^UTILITY("VASD",$JOB)
+4 ;END