Print Page as PDF
DIRECT RPC CALL ICR (3144)

DIRECT RPC CALL    ICR (3144)

Name Value
NUMBER 3144
IA # 3144
DATE CREATED 2000/10/27
CUSTODIAL PACKAGE RPC BROKER
CUSTODIAL ISC San Francisco
USAGE Controlled Subscription
TYPE Routine
ROUTINE XWB2HL7
NAME DIRECT RPC CALL
GENERAL DESCRIPTION
This call is to make a RPC call on a remote facility.
Users of this API should be prepared to modifiy their calls to support support
strong authentication when made available by Infrastructure.
STATUS Active
DURATION Till Otherwise Agreed
ID XWB2HL7
COMPONENT/ENTRY POINT
COMPONENT/ENTRY POINT COMPONENT DESCRIPTION VARIABLES
DIRECT(RET,LOC,RPC,RPCVER,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)
Use of the DIRECT connect whether it is done through
DIRECT^XWB2HL7 or with DIRECT^HLMA is susceptible to encountering network
errors.  This was first noticed with the Institution File Redesign patch and
the Integrated Billing patch(RX Copay).  Susequently, HL7 issued patches
HL*1.6*76 and HL*1.6*77 to address these network errors and return the status
of failure back to the calling application.  With the DIRECT connect, VistA
HL7 only tries to send the message once.  If it encounters an network error
while attepting to send a message, it does not attempt to resend.

When using this API, you should check the returned value of subscript zero of
the first parameter.  This parameter is passed by reference.  For example, if
you made a call like D DIRECT^XWB2HL7(.MYRET,...

You should check the value of MYRET(0).  If there was a problem with sending
the message or receiving a response, MYRET(0) will have a value of -1^error
message

The -1 is both MYRET and MYRET(0), so one can use:

I $P(MYRET(0),"^")=-1!(-1=+MYRET) S ERROR=1 Q

See code below:


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

;Protect caller from HL7

N HLMTIEN,HLDOM,HLECH,HLFS,HLINSTN,HLNEXT,HLNODE,HLPARAM,HLQ,HLQUIT

D SETUP(1) I $G(RET(1))'="" Q

;(procedurename, query tag, error return, destination, Parameter
array)

D DIRECT^XWB2HL7A("ZREMOTE RPC",XWBHDL,.XWBMSG,LOC,.XWBPAR)

I $P(XWBMSG,U,2) S RET(0)="-1^"_$P(XWBMSG,"^",3) Q

I 'HLMTIEN S RET(0)="-1^No Message returned" Q

D RETURN,RTNDATA^XWBDRPC(.RET,XWBHDL)

Q
VARIABLES TYPE VARIABLES DESCRIPTION
RET Output
This is the return value.
LOC Input
This is the Institution name or VISN name or ien of
where to send the RPC call to.
RPC Input
This is the name of the RPC to run on the remote
system.
RPCVER Input
version number in Remote Procedure file. (optional)
P1 Input
1st RPC paramater on remote system.
P2 Input
2nd RPC paramater on remote system.
P3 Input
3rd RPC paramater on remote system.
P4 Input
4th RPC paramater on remote system.
P5 Input
5th RPC paramater on remote system.
P6 Input
6th RPC paramater on remote system.
P7 Input
7th RPC paramater on remote system.
P8 Input
8th RPC paramater on remote system.
P9 Input
9th RPC paramater on remote system.
P10 Input
10th RPC paramater on remote system.
EN1(RET,LOC,RPC,RPCVER,P1,P2,P3,P4,P5,P6,P7,P8,P9,P10)
This entry point is used by CPRS Remote Data Views.
It places the HL7 message into the HL7 message queue for deferred transfer.
See the DIRECT entry for parameter descriptions.  The return from this call is
a HANDLE that is used in the follow-up calls.
VARIABLES TYPE VARIABLES DESCRIPTION
RET Output
This variable is passed by reference.  If RET(0) is
empty, then RET(1) will have some error text.  Otherwise RET(0) will have the
HANDLE that is used in follow-up calls.
RPCCHK(RET,HDL)
This entry point is used after a call to EN1^XWB2HL7
to check the status of the call.  When it returns "1^Done" a call can be made
to RTNDATA^XWBDRPC to get the data.  When it returns "-1^text" there is a
problem with the call.
VARIABLES TYPE VARIABLES DESCRIPTION
HDL Input
This is the Handle that was returned from the
EN1^XWB2HL7 call.
SUBSCRIBING PACKAGE
SUBSCRIBING PACKAGE SUBSCRIBING DETAILS
INTEGRATED BILLING
Integrated Billing is to call ONLY IB RPCs to view
patient data and to send insurance data between VA sites.
REGISTRATION
For use with the Smart Card.
MASTER PATIENT INDEX
MPI is to call ONLY its own RPCs, with the following
exceptions allowed:

MPIF ACK CHECK
MPIF EXP PDAT REMOTE
MPIF INACTIVATE
MPIF REMOTE SPI
MPIF REMOTE ICN UPDATE
MPIF CHANGE CMOR
RG REM ACTIVITY
RG REMOTE HL7 TASK
MPIF SSN DUPS
CONSULT/REQUEST TRACKING
Consult/Request Tracking is to call ONLY its own RPCs.
CLINICAL INFO RESOURCE NETWORK
CIRN is to call ONLY its own RPCs.
MASTER PATIENT INDEX VISTA
Master Patient Index VistA is to call ONLY its own
RPCs.
CORBA SERVICES
INCOME VERIFICATION MATCH
BENEFICIARY TRAVEL
AUTOMATED MED INFO EXCHANGE
Added 9/22/20: The Capri CLAIMS server is calling the
MPI remote procedure "MPI GETCORRESPONDINGIDS", which only exists on the MPI
environment. This API will be used to determine if a patient has an Active
Cerner Correlation. This determination will then be used to alert VBA
employees in the Capri GUI to check Cerner for new patient data.