source: FOIAVistA/tag/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/VAFCRAU.m@ 1696

Last change on this file since 1696 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 1.9 KB
Line 
1VAFCRAU ;BHAM/DRI-LIST MANAGER ROUTINE FOR MPI/PD VAFC EXCPT REMOTE AUDIT IN PDR ;3/14/02 11:41
2 ;;5.3;Registration;**477,479**;Aug 13, 1993
3 ;Reference to RPCCHK^XWB2HL7 supported by IA #3144
4 ;Reference to RTNDATA^XWBDRPC supported by IA #3149
5EN(ICN) ;main entry point for VAFC EXCPT REMOTE AUDIT
6 D EN^VALM("VAFC EXCPT REMOTE AUDIT")
7 Q
8HDR ;header code
9 S VALMHDR(1)="MPI/PD REMOTE AUDIT DATA"
10 S VALMHDR(2)=""
11 Q
12INIT ;
13 K @VALMAR ;K ^TMP("VAFCRAU",$J)
14 I '$D(DFN) G EXIT
15 S LIN=1,X=0,STR="",TXT=""
16 S TXT="-> For Patient "_$P($G(^DPT(DFN,0)),"^",1) S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP
17 S L=0 F S L=$O(TFARR(L)) Q:'L D
18 . S SL=$P(TFARR(L),"^",1)
19 . S STATUS=$P(TFL(SL),"^",3)
20 . I STATUS["Handle" S STATUS="Error in Process"
21 . E I STATUS["New" S STATUS="Request Sent"
22 . E I STATUS["Running" S STATUS="Awaiting Response"
23 . E I STATUS["Done" S STATUS="Response Received"
24 . S TXT=" "_$P(TFL(SL),"^")_" status: ("_STATUS_")"
25 . D ADDTMP
26 . S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP D
27 . S LOC=$P(TFL(SL),"^",2)
28 . N STATUS,RETURN,RESULT,RET
29 . I '$D(^XTMP("VAFCRAUD"_ICN,0)) S TXT=" - No audit query exists for this patient." S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP
30 . I $D(^XTMP("VAFCRAUD"_ICN,LOC,0)) D
31 .. S RETURN(0)=$P(^XTMP("VAFCRAUD"_ICN,LOC,0),"^")
32 .. D RPCCHK^XWB2HL7(.RESULT,RETURN(0)) I +RESULT(0)=1 D
33 ... D RTNDATA^XWBDRPC(.RET,RETURN(0))
34 ... 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
35 ... 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
36 ... S R="" F S R=$O(RET(R)) Q:R="" S TXT=RET(R) S STR=$$SETSTR^VALM1(TXT,STR,2,78) D ADDTMP ;**479
37 K TFARR,R,L,SL,LOC,TFL,GLO
38 S VALMCNT=LIN-1
39 Q
40ADDTMP ;
41 S ^TMP("VAFCRAU",$J,LIN,0)=STR
42 S ^TMP("VAFCRAU",$J,"IDX",LIN,LIN)=""
43 S LIN=LIN+1,STR=""
44 Q
45HELP ;
46 S X="?" D DISP^XQORM1 W !!
47 Q
48EXIT ;
49 S VALMBCK=""
50 K ^TMP("VAFCRAU",$J),LIN,X,STR,TXT
51 S VALMBCK="R"
52 Q
Note: See TracBrowser for help on using the repository browser.