RMPR9CE ;HOIFO/SPS - GUI 2319 TAB 2 CLINIC ENROLLEMNT ;9/19/02 11:29
;;3.0;PROSTHETICS;**59**;Feb 09, 1996
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
;Clinic Enrollment segment
D SDE^VADPT
I '$D(^UTILITY("VAEN",$J)) G EXIT
S CNT=0,RO=0 F S RO=$O(^UTILITY("VAEN",$J,RO)) Q:RO'>0 D
. I CNT>0 S CNT=CNT+1
. S RESULTS(CNT)=$P(^UTILITY("VAEN",$J,RO,"E"),U,1)_"^"_$P(^UTILITY("VAEN",$J,RO,"E"),U,2)_"^"_$P(^UTILITY("VAEN",$J,RO,"E"),U,3)
. S CNT=CNT+1
EXIT ;common exit point
I '$D(RESULTS) S RESULTS(0)="NOTHING TO REPORT"
K CNT,DFN,RO,^UTILITY("VAEN",$J)
;END
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPR9CE 686 printed Dec 13, 2024@02:33:30 Page 2
RMPR9CE ;HOIFO/SPS - GUI 2319 TAB 2 CLINIC ENROLLEMNT ;9/19/02 11:29
+1 ;;3.0;PROSTHETICS;**59**;Feb 09, 1996
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 ;Clinic Enrollment segment
+4 DO SDE^VADPT
+5 IF '$DATA(^UTILITY("VAEN",$JOB))
GOTO EXIT
+6 SET CNT=0
SET RO=0
FOR
SET RO=$ORDER(^UTILITY("VAEN",$JOB,RO))
if RO'>0
QUIT
Begin DoDot:1
+7 IF CNT>0
SET CNT=CNT+1
+8 SET RESULTS(CNT)=$PIECE(^UTILITY("VAEN",$JOB,RO,"E"),U,1)_"^"_$PIECE(^UTILITY("VAEN",$JOB,RO,"E"),U,2)_"^"_$PIECE(^UTILITY("VAEN",$JOB,RO,"E"),U,3)
+9 SET CNT=CNT+1
End DoDot:1
EXIT ;common exit point
+1 IF '$DATA(RESULTS)
SET RESULTS(0)="NOTHING TO REPORT"
+2 KILL CNT,DFN,RO,^UTILITY("VAEN",$JOB)
+3 ;END