RPC HELP Tutorial Step 5

From VistApedia
Revision as of 17:39, 5 July 2015 by Kdtop (talk | contribs) (Created page with "<h2>Tutorial: Step 5 -- RPC to List Terminal Types</h2> Now that you've created an RPC-compatible routine to list terminal types ([[RPC_HELP_Tutorial_Step_4|...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Tutorial: Step 5 -- RPC to List Terminal Types

Now that you've created an RPC-compatible routine to list terminal types (Step 4), you can go ahead and create the RPC itself (the entry in the REMOTE PROCEDURE file) that will call the routine.

To create an RPC that uses the TERMLIST^ZxxxTT routine:

Using VA FileMan, create a new RPC entry in the REMOTE PROCEDURE file. Set up the RPC as follows:

   NAME: ZxxxTT LIST
   TAG: TERMLIST
   ROUTINE: ZxxxTT
   RETURN VALUE TYPE: GLOBAL ARRAY
   WORD WRAP ON: TRUE
   DESCRIPTION: Used in RPC Broker developer tutorial.

The RPC's RETURN VALUE TYPE is set to GLOBAL ARRAY. This means that the RPC expects a return value that is a global reference (with data stored at that global reference). Also, the RPC's WORD WRAP ON is set to TRUE. This means each data node from the VistA M Server is returned as a single node in the Results property of your TRPCBroker component in Delphi. Otherwise, the data would be returned concatenated into a single node in the Results property.

In the next step of the tutorial (Step 6) you will call this RPC from the tutorial application, through its TRPCBroker component.

PREV: Step 4: RPC Routine to List Terminal Types

NEXT: Step 6: Call the ZxxxTT LIST RPC