RGEX04 ;BAY/ALS-LIST MANAGER ROUTINE FOR MPI/PD EXCEPTION PDAT QUERY ;10/31/01
;;1.0;CLINICAL INFO RESOURCE NETWORK;**23,25,41**;30 Apr 99
EN ;main entry point for RG EXCPT PDAT
D EN^VALM("RG EXCPT PDAT")
Q
HDR ; header code
S VALMHDR(1)="MPI/PD PATIENT DATA"
S VALMHDR(2)=""
Q
INIT ;
K ^TMP("RGEXC4",$J)
K @VALMAR
;I '$D(ICN) G EXIT
I '$D(^TMP("RGPDAT",$J)) G EXIT
S LIN=1,X=0,STR="",TXT=""
F S X=$O(^TMP("RGPDAT",$J,X)) Q:'X D
. S TXT=^TMP("RGPDAT",$J,X)
. I $E(TXT,1,12)'="Enter RETURN" D
.. S STR=$$SETSTR^VALM1(TXT,STR,2,78)
.. D ADDTMP
S VALMCNT=LIN-1
Q
ADDTMP ;
S ^TMP("RGEXC4",$J,LIN,0)=STR
S ^TMP("RGEXC4",$J,"IDX",LIN,LIN)=""
S LIN=LIN+1,STR=""
Q
RSEND ;Send remote PDAT Query
S VALMBCK="",RICN=ICN
D FULL^VALM1
D SEND^RGRPDAT
D PAUSE^VALM1
S ICN=RICN
D INIT
S VALMBCK="R"
Q
RCHK ;Check remote PDAT Query
S VALMBCK="",RICN=ICN
D FULL^VALM1
D CHKSTAT^RGRPDAT
D PAUSE^VALM1
S ICN=RICN
D INIT
S VALMBCK="R"
Q
RDISP ;Display remote PDAT Query
S VALMBCK="",RICN=ICN
D FULL^VALM1
W !!,"Display data returned from remote patient data queries."
S TFL="",L="",Y="",ICNARR="",STATUS=""
I '$D(^XTMP("RGPDAT"_ICN)) W !!,"No remote query sent for this patient. " G QRD
D GETTFL^RGRPDAT(ICN,.TFL)
W !!,"-> For ICN ",$P(ICN,"V",1),!
I $D(TFL(0)) D
. S X=0 F S X=$O(TFL(X)) Q:'X I '$D(^XTMP("RGPDAT"_ICN,X)) K TFL(X)
D SELTF^RGRPDAT
I '$D(TFARR) W !,"No remote query sent for this patient." G QRD
I ((Y="")!(Y="^")) G QRD
D PAUSE^VALM1
D EN^RGEX05(RICN)
QRD D PAUSE^VALM1
S ICN=RICN
D INIT
S VALMBCK="R"
Q
HELP ;
S X="?" D DISP^XQORM1 W !!
Q
EXIT ;
S VALMBCK=""
K ^TMP("RGEXC4",$J),^TMP("RGPDAT",$J),LIN,X,STR,TXT,RICN,Y,STATUS,TFL,TFARR,L,ICNARR
S VALMBCK="R"
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HRGEX04 1796 printed Dec 13, 2024@01:41:43 Page 2
RGEX04 ;BAY/ALS-LIST MANAGER ROUTINE FOR MPI/PD EXCEPTION PDAT QUERY ;10/31/01
+1 ;;1.0;CLINICAL INFO RESOURCE NETWORK;**23,25,41**;30 Apr 99
EN ;main entry point for RG EXCPT PDAT
+1 DO EN^VALM("RG EXCPT PDAT")
+2 QUIT
HDR ; header code
+1 SET VALMHDR(1)="MPI/PD PATIENT DATA"
+2 SET VALMHDR(2)=""
+3 QUIT
INIT ;
+1 KILL ^TMP("RGEXC4",$JOB)
+2 KILL @VALMAR
+3 ;I '$D(ICN) G EXIT
+4 IF '$DATA(^TMP("RGPDAT",$JOB))
GOTO EXIT
+5 SET LIN=1
SET X=0
SET STR=""
SET TXT=""
+6 FOR
SET X=$ORDER(^TMP("RGPDAT",$JOB,X))
if 'X
QUIT
Begin DoDot:1
+7 SET TXT=^TMP("RGPDAT",$JOB,X)
+8 IF $EXTRACT(TXT,1,12)'="Enter RETURN"
Begin DoDot:2
+9 SET STR=$$SETSTR^VALM1(TXT,STR,2,78)
+10 DO ADDTMP
End DoDot:2
End DoDot:1
+11 SET VALMCNT=LIN-1
+12 QUIT
ADDTMP ;
+1 SET ^TMP("RGEXC4",$JOB,LIN,0)=STR
+2 SET ^TMP("RGEXC4",$JOB,"IDX",LIN,LIN)=""
+3 SET LIN=LIN+1
SET STR=""
+4 QUIT
RSEND ;Send remote PDAT Query
+1 SET VALMBCK=""
SET RICN=ICN
+2 DO FULL^VALM1
+3 DO SEND^RGRPDAT
+4 DO PAUSE^VALM1
+5 SET ICN=RICN
+6 DO INIT
+7 SET VALMBCK="R"
+8 QUIT
RCHK ;Check remote PDAT Query
+1 SET VALMBCK=""
SET RICN=ICN
+2 DO FULL^VALM1
+3 DO CHKSTAT^RGRPDAT
+4 DO PAUSE^VALM1
+5 SET ICN=RICN
+6 DO INIT
+7 SET VALMBCK="R"
+8 QUIT
RDISP ;Display remote PDAT Query
+1 SET VALMBCK=""
SET RICN=ICN
+2 DO FULL^VALM1
+3 WRITE !!,"Display data returned from remote patient data queries."
+4 SET TFL=""
SET L=""
SET Y=""
SET ICNARR=""
SET STATUS=""
+5 IF '$DATA(^XTMP("RGPDAT"_ICN))
WRITE !!,"No remote query sent for this patient. "
GOTO QRD
+6 DO GETTFL^RGRPDAT(ICN,.TFL)
+7 WRITE !!,"-> For ICN ",$PIECE(ICN,"V",1),!
+8 IF $DATA(TFL(0))
Begin DoDot:1
+9 SET X=0
FOR
SET X=$ORDER(TFL(X))
if 'X
QUIT
IF '$DATA(^XTMP("RGPDAT"_ICN,X))
KILL TFL(X)
End DoDot:1
+10 DO SELTF^RGRPDAT
+11 IF '$DATA(TFARR)
WRITE !,"No remote query sent for this patient."
GOTO QRD
+12 IF ((Y="")!(Y="^"))
GOTO QRD
+13 DO PAUSE^VALM1
+14 DO EN^RGEX05(RICN)
QRD DO PAUSE^VALM1
+1 SET ICN=RICN
+2 DO INIT
+3 SET VALMBCK="R"
+4 QUIT
HELP ;
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
EXIT ;
+1 SET VALMBCK=""
+2 KILL ^TMP("RGEXC4",$JOB),^TMP("RGPDAT",$JOB),LIN,X,STR,TXT,RICN,Y,STATUS,TFL,TFARR,L,ICNARR
+3 SET VALMBCK="R"
+4 QUIT