source: FOIAVistA/trunk/r/CLINICAL_INFO_RESOURCE_NETWORK-MRF-RGE--RG--RGED--RGUT--RGWB/RGEX05.m@ 635

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

initial load of FOIAVistA 6/30/08 version

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