VAFCLAU ;BHAM/DRI-LIST MANAGER ROUTINE FOR MPI/PD VAFC EXCPT LOCAL AUDIT IN PDR ;3/14/02
;;5.3;Registration;**477**;Aug 13, 1993
EN ;main entry point for VAFC EXCPT AUDIT LOCAL
D EN^VALM("VAFC EXCPT LOCAL AUDIT")
Q
HDR ; header code
S VALMHDR(1)="MPI/PD PATIENT AUDIT DATA"
S VALMHDR(2)=""
Q
INIT ;
K @VALMAR ;K ^TMP("VAFCLAU",$J)
I '$D(DFN) G EXIT
I '$D(^TMP("VAFCRAUD",$J)) G EXIT
S LIN=1,X=0,STR="",TXT=""
F S X=$O(^TMP("VAFCRAUD",$J,X)) Q:'X D
. S TXT=^TMP("VAFCRAUD",$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("VAFCLAU",$J,LIN,0)=STR
S ^TMP("VAFCLAU",$J,"IDX",LIN,LIN)=""
S LIN=LIN+1,STR=""
Q
RSEND ;Send remote AUDIT Query
S VALMBCK=""
D FULL^VALM1
D SEND^VAFCRAUD(ICN,VAFCBDT,VAFCEDT)
D PAUSE^VALM1
D INIT
S VALMBCK="R"
Q
RCHK ;Check remote AUDIT Query
S VALMBCK=""
D FULL^VALM1
D CHKSTAT^VAFCRAUD(ICN)
D PAUSE^VALM1
D INIT
S VALMBCK="R"
Q
RDISP ;Display remote AUDIT Query
S VALMBCK=""
D FULL^VALM1
W !!,"Display data returned from remote patient audit queries."
S TFL="",L="",Y="",STATUS=""
I '$D(^XTMP("VAFCRAUD"_ICN)) W !!,"No remote query sent for this patient. " G QRD
D GETTFL^VAFCRAUD(ICN,.TFL)
W !!,"-> For Patient ",$P($G(^DPT(DFN,0)),"^",1),!
I $D(TFL(0)) D
. S X=0 F S X=$O(TFL(X)) Q:'X I '$D(^XTMP("VAFCRAUD"_ICN,X)) K TFL(X)
D SELTF^VAFCRAUD
I '$D(TFARR) W !,"No remote query sent for this patient." G QRD
I ((Y="")!(Y="^")) G QRD
D PAUSE^VALM1
D EN^VAFCRAU(ICN)
QRD D PAUSE^VALM1
D INIT
S VALMBCK="R"
Q
HELP ;
S X="?" D DISP^XQORM1 W !!
Q
EXIT ;
S VALMBCK=""
K ^TMP("VAFCLAU",$J),LIN,X,STR,TXT,Y,STATUS,TFL,TFARR,L
S VALMBCK="R"
Q
VAFCLAU ;BHAM/DRI-LIST MANAGER ROUTINE FOR MPI/PD VAFC EXCPT LOCAL AUDIT IN PDR ;3/14/02
+1 ;;5.3;Registration;**477**;Aug 13, 1993
EN ;main entry point for VAFC EXCPT AUDIT LOCAL
+1 DO EN^VALM("VAFC EXCPT LOCAL AUDIT")
+2 QUIT
HDR ; header code
+1 SET VALMHDR(1)="MPI/PD PATIENT AUDIT DATA"
+2 SET VALMHDR(2)=""
+3 QUIT
INIT ;
+1 ;K ^TMP("VAFCLAU",$J)
KILL @VALMAR
+2 IF '$DATA(DFN)
GOTO EXIT
+3 IF '$DATA(^TMP("VAFCRAUD",$JOB))
GOTO EXIT
+4 SET LIN=1
SET X=0
SET STR=""
SET TXT=""
+5 FOR
SET X=$ORDER(^TMP("VAFCRAUD",$JOB,X))
IF 'X
QUIT
Begin DoDot:1
+6 SET TXT=^TMP("VAFCRAUD",$JOB,X)
+7 IF $EXTRACT(TXT,1,12)'="Enter RETURN"
Begin DoDot:2
+8 SET STR=$$SETSTR^VALM1(TXT,STR,2,78)
+9 DO ADDTMP
End DoDot:2
End DoDot:1
+10 SET VALMCNT=LIN-1
+11 QUIT
ADDTMP ;
+1 SET ^TMP("VAFCLAU",$JOB,LIN,0)=STR
+2 SET ^TMP("VAFCLAU",$JOB,"IDX",LIN,LIN)=""
+3 SET LIN=LIN+1
SET STR=""
+4 QUIT
RSEND ;Send remote AUDIT Query
+1 SET VALMBCK=""
+2 DO FULL^VALM1
+3 DO SEND^VAFCRAUD(ICN,VAFCBDT,VAFCEDT)
+4 DO PAUSE^VALM1
+5 DO INIT
+6 SET VALMBCK="R"
+7 QUIT
RCHK ;Check remote AUDIT Query
+1 SET VALMBCK=""
+2 DO FULL^VALM1
+3 DO CHKSTAT^VAFCRAUD(ICN)
+4 DO PAUSE^VALM1
+5 DO INIT
+6 SET VALMBCK="R"
+7 QUIT
RDISP ;Display remote AUDIT Query
+1 SET VALMBCK=""
+2 DO FULL^VALM1
+3 WRITE !!,"Display data returned from remote patient audit queries."
+4 SET TFL=""
SET L=""
SET Y=""
SET STATUS=""
+5 IF '$DATA(^XTMP("VAFCRAUD"_ICN))
WRITE !!,"No remote query sent for this patient. "
GOTO QRD
+6 DO GETTFL^VAFCRAUD(ICN,.TFL)
+7 WRITE !!,"-> For Patient ",$PIECE($GET(^DPT(DFN,0)),"^",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("VAFCRAUD"_ICN,X))
KILL TFL(X)
End DoDot:1
+10 DO SELTF^VAFCRAUD
+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^VAFCRAU(ICN)
QRD DO PAUSE^VALM1
+1 DO INIT
+2 SET VALMBCK="R"
+3 QUIT
HELP ;
+1 SET X="?"
DO DISP^XQORM1
WRITE !!
+2 QUIT
EXIT ;
+1 SET VALMBCK=""
+2 KILL ^TMP("VAFCLAU",$JOB),LIN,X,STR,TXT,Y,STATUS,TFL,TFARR,L
+3 SET VALMBCK="R"
+4 QUIT