RGEX07 ;BIR/PTD-LIST MANAGER ROUTINE FOR REMOTE PRIMARY VIEW DISPLAY ;10/17/06
;;1.0;CLINICAL INFO RESOURCE NETWORK;**44,53**;30 Apr 99;Build 2
;
;Reference to ^XWB2HL7 supported by IA #3144
;Reference to ^XWBDRPC supported by IA #3149
;
EN(ICN,EXCDT) ;Entry point calling List Template for primary view reject display
D EN^VALM("RG EXCPT PV REJECT RDISPLAY")
Q
;
HDR ; -- header code
S VALMHDR(1)="MPI PRIMARY VIEW REJECT DISPLAY"
Q
;
INIT ;Display the MPI Primary View Rejected Data Report
K ^TMP("RGEXC7",$J)
K @VALMAR
I '$D(ICN) G EXIT
I '$D(EXCDT) G EXIT
S LIN=1,X=0,STR="",TXT=""
I '$D(^XTMP("RGPVREJ"_ICN,EXCDT)) S TXT=" - No Primary View Reject data exists for this patient/exception date." D ADDTMP
N STATUS,R,RETURN,RESULT,RET
I $D(^XTMP("RGPVREJ"_ICN,EXCDT)) S RETURN(0)=$P(^XTMP("RGPVREJ"_ICN,EXCDT),"^") D
.D RPCCHK^XWB2HL7(.RESULT,RETURN(0)) I +RESULT(0)=1 D
..;Retrieve the data
..D RTNDATA^XWBDRPC(.RET,RETURN(0)) D
...I $G(RET(0))<0 S TXT="No Data Returned Due To: "_$P(RET(0),"^",2,99) S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP Q
...I $G(RET)'="",$D(@RET) S GLO=RET F S GLO=$Q(@GLO) Q:$QS(GLO,1)'=$J S TXT=@GLO S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP
...S R="" F S R=$O(RET(R)) Q:R="" S TXT=RET(R) S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP
K GLO,L,R,SL
S VALMCNT=LIN-1
Q
;
ADDTMP ;Set string into the array.
S ^TMP("RGEXC7",$J,LIN,0)=STR
S ^TMP("RGEXC7",$J,"IDX",LIN,LIN)=""
S LIN=LIN+1,STR=""
Q
;
HELP ; -- help code
S X="?" D DISP^XQORM1 W !!
Q
;
EXIT ; -- exit code
S VALMBCK=""
K ^TMP("RGEXC7",$J),GLO,L,LIN,R,RESULT,RET,RETURN,SL,STATUS,STR,TXT,X
S VALMBCK="R"
Q
;
EXPND ; -- expand code
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGEX07 1723 printed Oct 16, 2024@17:42:37 Page 2
RGEX07 ;BIR/PTD-LIST MANAGER ROUTINE FOR REMOTE PRIMARY VIEW DISPLAY ;10/17/06
+1 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**44,53**;30 Apr 99;Build 2
+2 ;
+3 ;Reference to ^XWB2HL7 supported by IA #3144
+4 ;Reference to ^XWBDRPC supported by IA #3149
+5 ;
EN(ICN,EXCDT) ;Entry point calling List Template for primary view reject display
+1 DO EN^VALM("RG EXCPT PV REJECT RDISPLAY")
+2 QUIT
+3 ;
HDR ; -- header code
+1 SET VALMHDR(1)="MPI PRIMARY VIEW REJECT DISPLAY"
+2 QUIT
+3 ;
INIT ;Display the MPI Primary View Rejected Data Report
+1 KILL ^TMP("RGEXC7",$JOB)
+2 KILL @VALMAR
+3 IF '$DATA(ICN)
GOTO EXIT
+4 IF '$DATA(EXCDT)
GOTO EXIT
+5 SET LIN=1
SET X=0
SET STR=""
SET TXT=""
+6 IF '$DATA(^XTMP("RGPVREJ"_ICN,EXCDT))
SET TXT=" - No Primary View Reject data exists for this patient/exception date."
DO ADDTMP
+7 NEW STATUS,R,RETURN,RESULT,RET
+8 IF $DATA(^XTMP("RGPVREJ"_ICN,EXCDT))
SET RETURN(0)=$PIECE(^XTMP("RGPVREJ"_ICN,EXCDT),"^")
Begin DoDot:1
+9 DO RPCCHK^XWB2HL7(.RESULT,RETURN(0))
IF +RESULT(0)=1
Begin DoDot:2
+10 ;Retrieve the data
+11 DO RTNDATA^XWBDRPC(.RET,RETURN(0))
Begin DoDot:3
+12 IF $GET(RET(0))<0
SET TXT="No Data Returned Due To: "_$PIECE(RET(0),"^",2,99)
SET STR=$$SETSTR^VALM1(TXT,STR,2,78)
DO ADDTMP
QUIT
+13 IF $GET(RET)'=""
IF $DATA(@RET)
SET GLO=RET
FOR
SET GLO=$QUERY(@GLO)
if $QSUBSCRIPT(GLO,1)'=$JOB
QUIT
SET TXT=@GLO
SET STR=$$SETSTR^VALM1(TXT,STR,2,78)
DO ADDTMP
+14 SET R=""
FOR
SET R=$ORDER(RET(R))
if R=""
QUIT
SET TXT=RET(R)
SET STR=$$SETSTR^VALM1(TXT,STR,2,78)
DO ADDTMP
End DoDot:3
End DoDot:2
End DoDot:1
+15 KILL GLO,L,R,SL
+16 SET VALMCNT=LIN-1
+17 QUIT
+18 ;
ADDTMP ;Set string into the array.
+1 SET ^TMP("RGEXC7",$JOB,LIN,0)=STR
+2 SET ^TMP("RGEXC7",$JOB,"IDX",LIN,LIN)=""
+3 SET LIN=LIN+1
SET STR=""
+4 QUIT
+5 ;
HELP ; -- help code
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
+3 ;
EXIT ; -- exit code
+1 SET VALMBCK=""
+2 KILL ^TMP("RGEXC7",$JOB),GLO,L,LIN,R,RESULT,RET,RETURN,SL,STATUS,STR,TXT,X
+3 SET VALMBCK="R"
+4 QUIT
+5 ;
EXPND ; -- expand code
+1 QUIT
+2 ;