RMPR9VR ;HOIFO/SPS - VIEW CONSULT REQUESTS FOR GUI;01/29/03 11:38
;;3.0;PROSTHETICS;**59,83**;Feb 09, 1996;Build 20
;
;HNC #83 add free text ordering provider, results(1) call utility
;
A1(RMPRA) G A2
EN(RESULTS,RMPRA) ; -- Broker callback to get list to display
A2 ;
I '$D(^RMPR(668,RMPRA,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
K ADATE,PDAY
; ORDER DATE/SUSPENSE DATE
S RESULTS(0)=$P(^RMPR(668,RMPRA,0),U,1),RESULTS(0)=$$DAT1^RMPRUTL1(RESULTS(0))
; REQUESTOR
S RESULTS(1)=$P($G(^RMPR(668,RMPRA,0)),U,11)
I RESULTS(1)'="" S RESULTS(1)=$$WHO^RMPREOU(RESULTS(1))
I RESULTS(1)="" S RESULTS(1)=$$WHO^RMPREOU("",12,RMPRA)
; SUSPENDED BY
S RESULTS(2)=$P($G(^RMPR(668,RMPRA,0)),U,4)
I RESULTS(2)'="" S RESULTS(2)=$P(^VA(200,RESULTS(2),0),U)
; INITIAL ACTION DATE
S RESULTS(3)=$P(^RMPR(668,RMPRA,0),U,9),RESULTS(3)=$$DAT1^RMPRUTL1(RESULTS(3))
; COMPLETION DATE
S RESULTS(4)=$P($G(^RMPR(668,RMPRA,0)),U,5)
I RESULTS(4)>0 S RESULTS(4)=$$DAT1^RMPRUTL1(RESULTS(4))
EXIT Q
A3(RMPRA) G A4 ;display description
EN2(RESULTS,RMPRA) ;
A4 I '$D(^RMPR(668,RMPRA,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
I '$D(^RMPR(668,RMPRA,2,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
S (RMPRD,I)=0
F S RMPRD=$O(^RMPR(668,RMPRA,2,RMPRD)) Q:RMPRD'>0 D
.S RESULTS(I)=^RMPR(668,RMPRA,2,RMPRD,0)
.S I=I+1
Q
A5(RMPRA) G A6 ;display Initial Action Note
EN3(RESULTS,RMPRA) ;
A6 I '$D(^RMPR(668,RMPRA,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
I '$D(^RMPR(668,RMPRA,3,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
S (RMPRD,I)=0
F S RMPRD=$O(^RMPR(668,RMPRA,3,RMPRD)) Q:RMPRD'>0 D
.S RESULTS(I)=^RMPR(668,RMPRA,3,RMPRD,0)
.S I=I+1
Q
A7(RMPRA) G A8 ;display Completion Note
EN4(RESULTS,RMPRA) ;
A8 I '$D(^RMPR(668,RMPRA,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
I '$D(^RMPR(668,RMPRA,4,0)) S RESULTS(0)="NOTHING TO REPORT" G EXIT
S (RMPRD,I)=0
F S RMPRD=$O(^RMPR(668,RMPRA,4,RMPRD)) Q:RMPRD'>0 D
.S RESULTS(I)=^RMPR(668,RMPRA,4,RMPRD,0)
.S I=I+1
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRMPR9VR 2010 printed Sep 02, 2024@19:19:10 Page 2
RMPR9VR ;HOIFO/SPS - VIEW CONSULT REQUESTS FOR GUI;01/29/03 11:38
+1 ;;3.0;PROSTHETICS;**59,83**;Feb 09, 1996;Build 20
+2 ;
+3 ;HNC #83 add free text ordering provider, results(1) call utility
+4 ;
A1(RMPRA) GOTO A2
EN(RESULTS,RMPRA) ; -- Broker callback to get list to display
A2 ;
+1 IF '$DATA(^RMPR(668,RMPRA,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+2 KILL ADATE,PDAY
+3 ; ORDER DATE/SUSPENSE DATE
+4 SET RESULTS(0)=$PIECE(^RMPR(668,RMPRA,0),U,1)
SET RESULTS(0)=$$DAT1^RMPRUTL1(RESULTS(0))
+5 ; REQUESTOR
+6 SET RESULTS(1)=$PIECE($GET(^RMPR(668,RMPRA,0)),U,11)
+7 IF RESULTS(1)'=""
SET RESULTS(1)=$$WHO^RMPREOU(RESULTS(1))
+8 IF RESULTS(1)=""
SET RESULTS(1)=$$WHO^RMPREOU("",12,RMPRA)
+9 ; SUSPENDED BY
+10 SET RESULTS(2)=$PIECE($GET(^RMPR(668,RMPRA,0)),U,4)
+11 IF RESULTS(2)'=""
SET RESULTS(2)=$PIECE(^VA(200,RESULTS(2),0),U)
+12 ; INITIAL ACTION DATE
+13 SET RESULTS(3)=$PIECE(^RMPR(668,RMPRA,0),U,9)
SET RESULTS(3)=$$DAT1^RMPRUTL1(RESULTS(3))
+14 ; COMPLETION DATE
+15 SET RESULTS(4)=$PIECE($GET(^RMPR(668,RMPRA,0)),U,5)
+16 IF RESULTS(4)>0
SET RESULTS(4)=$$DAT1^RMPRUTL1(RESULTS(4))
EXIT QUIT
A3(RMPRA) ;display description
GOTO A4
EN2(RESULTS,RMPRA) ;
A4 IF '$DATA(^RMPR(668,RMPRA,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+1 IF '$DATA(^RMPR(668,RMPRA,2,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+2 SET (RMPRD,I)=0
+3 FOR
SET RMPRD=$ORDER(^RMPR(668,RMPRA,2,RMPRD))
if RMPRD'>0
QUIT
Begin DoDot:1
+4 SET RESULTS(I)=^RMPR(668,RMPRA,2,RMPRD,0)
+5 SET I=I+1
End DoDot:1
+6 QUIT
A5(RMPRA) ;display Initial Action Note
GOTO A6
EN3(RESULTS,RMPRA) ;
A6 IF '$DATA(^RMPR(668,RMPRA,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+1 IF '$DATA(^RMPR(668,RMPRA,3,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+2 SET (RMPRD,I)=0
+3 FOR
SET RMPRD=$ORDER(^RMPR(668,RMPRA,3,RMPRD))
if RMPRD'>0
QUIT
Begin DoDot:1
+4 SET RESULTS(I)=^RMPR(668,RMPRA,3,RMPRD,0)
+5 SET I=I+1
End DoDot:1
+6 QUIT
A7(RMPRA) ;display Completion Note
GOTO A8
EN4(RESULTS,RMPRA) ;
A8 IF '$DATA(^RMPR(668,RMPRA,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+1 IF '$DATA(^RMPR(668,RMPRA,4,0))
SET RESULTS(0)="NOTHING TO REPORT"
GOTO EXIT
+2 SET (RMPRD,I)=0
+3 FOR
SET RMPRD=$ORDER(^RMPR(668,RMPRA,4,RMPRD))
if RMPRD'>0
QUIT
Begin DoDot:1
+4 SET RESULTS(I)=^RMPR(668,RMPRA,4,RMPRD,0)
+5 SET I=I+1
End DoDot:1
+6 QUIT