BEHORDV ;MSC/IND/DKM - Remote Data View Support ;20-Mar-2007 13:48;DKM
;;1.1;BEH COMPONENTS;**020001**;Mar 20, 2007
;=================================================================
DIRECT(RET,LOC,RPC,RPCVER,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10) ;Call a remote RPC
N X,I,INX,N,XWBHL7,XWBPAR,XWBPCNT,XWBDVER,XWBESSO,XWBHDL,PMAX
N XWBMSG,XWBSEC,RPCIEN,HLMTIEN,HLDOM,HLECH,HLFS,HLINSTN,HLNEXT
N HLNODE,HLPARAM,HLQ,HLQUIT
D SETUP^XWB2HL7(1)
Q:$G(RET(1))'=""
D DIRECT^XWB2HL7A("ZREMOTE RPC",XWBHDL,.XWBMSG,LOC,.XWBPAR)
I $P(XWBMSG,U,2) S RET(0)="-1^"_$P(XWBMSG,U,3)
E I 'HLMTIEN S RET(0)="-1^No Message returned"
E D
.D RETURN^XWB2HL7,RTNDATA^XWBDRPC(.RET,XWBHDL)
.I XWBPTYPE=4 S @RET@(-1)=XWBHDL
.E S RET(-1)=XWBHDL
Q
BEHORDV ;MSC/IND/DKM - Remote Data View Support ;20-Mar-2007 13:48;DKM
+1 ;;1.1;BEH COMPONENTS;**020001**;Mar 20, 2007
+2 ;=================================================================
DIRECT(RET,LOC,RPC,RPCVER,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10) ;Call a remote RPC
+1 NEW X,I,INX,N,XWBHL7,XWBPAR,XWBPCNT,XWBDVER,XWBESSO,XWBHDL,PMAX
+2 NEW XWBMSG,XWBSEC,RPCIEN,HLMTIEN,HLDOM,HLECH,HLFS,HLINSTN,HLNEXT
+3 NEW HLNODE,HLPARAM,HLQ,HLQUIT
+4 DO SETUP^XWB2HL7(1)
+5 IF $GET(RET(1))'=""
QUIT
+6 DO DIRECT^XWB2HL7A("ZREMOTE RPC",XWBHDL,.XWBMSG,LOC,.XWBPAR)
+7 IF $PIECE(XWBMSG,U,2)
SET RET(0)="-1^"_$PIECE(XWBMSG,U,3)
+8 IF '$TEST
IF 'HLMTIEN
SET RET(0)="-1^No Message returned"
+9 IF '$TEST
Begin DoDot:1
+10 DO RETURN^XWB2HL7
DO RTNDATA^XWBDRPC(.RET,XWBHDL)
+11 IF XWBPTYPE=4
SET @RET@(-1)=XWBHDL
+12 IF '$TEST
SET RET(-1)=XWBHDL
End DoDot:1
+13 QUIT